Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Raspberry Pi - Run Script at bootup


    Hi All,

    Looking for some advice

    Basically I need to create a script that runs at startup to load a web page in firefox which I have created but I cannot seem to get this to run at startup I dont have a wealth of experience with linux is there a easy way to get a bash script to run at startup I have tried a few guides online and have tried cron and init.d and cannot seem to get either working.

    any help would be great.

    Cheers

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    4,087
    At startup? Or perhaps after your desktop starts?

    Normally, at startup, there is no GUI/Desktop loaded, that comes later. If you launch firefox from your ~/.bashrc file it should run when the desktop loads.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Quote Originally Posted by Roxoff View Post
    At startup? Or perhaps after your desktop starts?

    Normally, at startup, there is no GUI/Desktop loaded, that comes later. If you launch firefox from your ~/.bashrc file it should run when the desktop loads.
    Thanks for this your right I need to be clearer with my terminology its after the gui loads the only issue I am having is I am unsure where I need to place the call to run my script. I have created a bin directory at the top level and made chmodded the files to 775 so the script runs fine if you could help me with the editing of the bashrc file i would really appreciate it . I am not that experienced but because I am the only one in the office who likes linux it has been assumed thatmakes me an expert :P

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    2,185
    Depending on the desktop environment in use it my be as easy as saving the session. Otherwise every DE has a way to autostart applications.

  6. #5
    Linux User
    Join Date
    Apr 2015
    Location
    Yorkshire, England
    Posts
    261
    I doubt it's your ~/.bashrc that needs editing, that only runs as part of a terminal login or when a terminal window is opened. There should be a start-up application available in your raspbian gui. I can't test this my raspberry pi is out on loan

  7. #6
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    -->
    no, not ~/.bashrc.
    it really depends on the desktop environment you use.
    give us some info about the system, which distro, which DE etc.
    as was pointed out already, ALL desktop environments have an option for autostarting applications.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •