Modifying the startup script


Forum: Other Help Topics
Topic: Modifying the startup script
started by: jrobinson

Posted by jrobinson on Aug. 06 2006,19:54
Hello! I'm building a digital picture frame for my mom using an old 466mhz hp laptop with a bad battery and piercingly loud hard drive.
I used an ide-to-cf adapter to hook up a 128mb CF card, since that's the biggest one I could find. Anyway, I need to do the following, which I hear involves editing .xinitrc:
-Not have the screen blank after a period of inactivity.
-Run a shell script in my home directory that will start feh (or whatever else I decide on) with images from a thumb drive: let's call it slideshow.sh
-Not pop up dillo.
I'm starting with a fresh install of DSL, so if you want to just change the default xinitrc file and let me copy it, that's fine. Thank you and have a nice day.

James Robinson

Posted by Cinnamon on Aug. 06 2006,21:09
To prevent the screen going blank add these line to .xinitrc:
Code Sample

xset s off &


To prevent the dillo to pop-up when starting just add # first on the same line as dillo /usr/ ......

I have my DSL on a usb memory stick. So I have to make a backup to keep my settings.

Posted by jrobinson on Aug. 06 2006,21:24
First of all, thank you so much!

Second of all, I did it and Dilllo did not pop up. I still haven't been away long enough to test whether or not the screen will blank. I still want to be able to have it run a specific shell script when it boots up, which contains the commands to start the picture software, feh.

Again, thank you, you are appreciated.

James Robinson

Posted by jrobinson on Aug. 06 2006,21:57
Nope, the screen still blanked. Was I supposed to do anything else besides go to the end, press enter, and type that one line?

To start slideshow.sh, would I just add this line to the end?
Code Sample
slideshow.sh &

Posted by jrobinson on Aug. 06 2006,22:25
Interestingly enough, running the command you gave me works fine in the terminal, so if I can start a shell script on startup, i can make that the first line.
Posted by mikshaw on Aug. 07 2006,03:27
Quote
Was I supposed to do anything else besides go to the end, press enter, and type that one line?

Yes.  If you add it to the end of .xinitrc the command will never run.  The "exec" command that starts the window manager replaces the current process (.xinitrc) with a new process (the window manager), so .xinitrc is finished at this point and will run no more commands.

Any commands that you want to run along with the window manager should be added above the part that starts the window manager.  In the DSL .xinitrc, this would be before the "case $DESKTOP in" part.  An exception to this would be if you want to run a command with a specific window manager (see where "fluxter" is added in relation to fluxbox).

Also, most of these commands should be followed by "&" so they will be run in the background and allow .xinitrc to continue to the next command.  Exceptions to this would be a few programs that are built to run in the background by default (most daemons), and programs that run in such a short time that running them in the background isn't necessary (such as xsri and xset).

Posted by jrobinson on Aug. 07 2006,03:57
OK, thanks. I still haven't figured out how to run a script, though. Any ideas?
Posted by mikshaw on Aug. 07 2006,14:17
same as running any other application from .xinitrc....add the path to the script somewhere before the "case $DESKTOP", followed by "&"
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.