Warning: be sure to test your startup scripts manually in a Terminal session (Ctrl-Alt-T in Easy Mode) before following either of the methods below. If your script prevents the graphical desktop from starting properly, your machine may enter an endless boot loop, requiring you to resort to using the Rescue Console.,
#!/bin/sh sleep 8 # wait 8 seconds before executing xset command. # increase sleep time to greater than 8 seconds # if necessary. /usr/bin/xset r
if [ -x /home/user/.icewm/startup ]; then #we have a start up file to execute /home/user/.icewm/startup & fi
If you don't feel comfortable with editing /usr/bin/startsimple.sh, another alternative is to make use of /usr/sbin/services.sh, which refers to a file called /etc/fastservices (doesn't exist by default). You can create or edit this file to add services to the bootup process, one line per service.
Also, some forum members have suggested running rc.local with /etc/fastservices.
sudo echo "rc.local" > /etc/fastservices
Then you can add the command to run your favourite script to /etc/rc.local, which will be run at the end of the system startup process.
/home/YourUserName/ExampleName.sh ( the first line of the script must be #!/bin/sh )chmod 0755 /home/YourUserName/ExampleName.sh/home/YourUserName/ExampleName.sh ( the first line of the script must be #!/bin/sh )chmod 0755 /home/YourUserName/ExampleName.sh/etc/ExampleName.sh ( the first line of the script must be #!/bin/sh )chmod 0755 /etc/ExampleName.sh/etc/rc.local (again, as root) and add the full path to your script above the exit 0 line (place a nice comment above the edit, explaining the command to your older self – any line that starts with a # is a comment)# This is my example script, that makes an example of every user on bootup! /etc/ExampleName.sh exit 0
/home/YourUserName/ExampleName.sh ( the first line of the script must be #!/bin/sh )chmod 0755 /home/YourUserName/ExampleName.shAll users, not just the current user, will be affected by the script.
- If your script requires X, you can add the lines of the script to the bottom of the /etc/gdm/Init/Default script, right before 'exit 0'. Or call it from the Default script. This is the way to add xmodmap changes to all users.