Autostart Programs

Introduction
This HOWTO explains how to get programs to launch when you login into your WM (Window Manager) and/or DE (Desktop Environment).

NOTE: New users should note that ~ equals user's home directory. Also note that these instructions should work on these Window Managers on most Distributions in addition to Gentoo.

GNOME
Programs that you wish to autostart on GNOME startup can be selected by using the Control Center. To do this, open the Control Center and then navigate to Sessions followed by Startup Programs. Click Add and either type the path, or use Browse to select your desired program[s]. If multiple programs are selected, they can be launched in a desired order.

If the GUI is not available or desireable, then one can instead modify ~/.gnome2/session-manual. Syntax is as follows: File:

Using Shell Scripts
Programs that you wish to autostart on KDE startup need to be placed into ~/.kde/Autostart.

Below is an example of autostarting GAIM written in bash.

Example contents for gaim:

Below is an alternative for the same example, this time using a soft link.

You can also put .desktop files here. For example, you can drag a shortcut from the K Menu.

Using symbolic links
To Autostart a program in KDE you simply need to put a symbolic link to the executable file in the Autostart directory. In most cases this is located at:

If wanted to have xbindkeys start automatically when KDE started then I would locate the the executable file for xbindkeys. In my installization it is located at:

All you have to do is place a symbolic link in the Autostart directory:

This command creates a link named "xbindlink" in the Autostart directory that links to the executable located in the directory.

Restart KDE and you should be in business. I hope this helps.

Using Shell Scripts
Programs that you wish to autostart on Xfce4 startup can be selected by using the xfce4-autostart-editor tool available in Xfce4 menu > Settings > Xfce 4 Autostarted Applications.

In new versions of Xfce4, Startup tool is available in Settings > Session and Startup

If the GUI is not desirable, you can put .desktop files in the directory. If this directory does not exist, simply create it. Note: In the Xfce versions prior to 4.4 the programs had to be located in.

Below is an example of autostarting GAIM written in bash.

(example script below)

Using symbolic links
For a simpler approach, a link will work as well:

Fluxbox
Programs that you wish to autostart on Fluxbox startup need to be placed into and fluxbox needs to be started with startfluxbox.

To start Fluxbox locally or globally with startx, ensure that your (for local) or  (for global) file contains the line:

If you want to add something to the startup list, make sure it has an "&" at the end of the command line.

Below is an example of line you need to add to autostart GAIM.

Before the line exec /usr/bin/fluxbox

add /usr/bin/gaim &

IceWM
IceWM is very similar to Fluxbox in that you have a script that is executed when IceWM starts up, simply add all the commands you'd like executed to. Note that since this is executed as a script all programs should either detach themselves or be backgrounded.

Unlike Fluxbox however this script does not need to start up IceWM itself. The file should be a well-formed script, e.g.: File:

And of course, it should be marked as executable:.

PekWM
PekWM is very similar to IceWM and Fluxbox in that you have a script that is executed when PekWM starts up, simply add all the commands you'd like executed to. Note that since this is executed as a script all programs should either detach themselves or be backgrounded.

Unlike Fluxbox however this script does not need to start up IceWM itself. The file should be a well-formed script, e.g.:

And of course, it should be marked as executable:

FVWM
Programs that you wish to autostart on FVWM startup need to be placed into

Below is an example of line you need to add to autostart GAIM.

After the line, if non-existing, add it. AddToFunc InitFunction

add + I Exec exec /usr/bin/gaim

Enlightenment DR16
Start the application you wish to autostart (e.g. gkrellm2). Alt + right click anywhere in the application's window. Select "Remember..." from the context menu. A menu called "Remembered Application Attributes" will appear. At the bottom of this window, check the "Restart application on login" checkbox. Click "Apply" then "OK".

Since e16.8 you can use/create folders. All you need to do is: create the folder(s) enable user session scripts in e16 menu -> Session Settings create a link/script in one of the folders

thats it

Enlightenment DR17
Note: Recent versions of e17 don't use eap files anymore but ordinary .desktop-files. Just substitute .eap with .desktop and forget the part about creating eap-files. Code: example file for gnome-settings-daemon

Programs that you wish to autostart on Enlightenment DR17 startup should have their corresponding .eap file listed in

Below is an example of making GAIM autostart: Code: Add existing .eap file to startup list

This, obviously, relies on the application you wish to autostart having a .eap file to begin with! (There's a full list at ) If that isn't the case, you can create one (here we're going to execute a simple script to start the Beagle daemon): Code: Create new .eap file

This will launch a dialog: we need to set the App Name to 'beagled' and the Executable should point to our script (in my case its : obviously you should set appropriately).

Finally, we need to add out new .eap to the startup list: Code: Add new .eap file to startup list

WindowMaker
Programs that you wish to autostart on WindowMaker startup need to be placed into

This should only be used for non-X applications or applications that do not support session management. Other applications should be restarted by the WindowMaker session restoring mechanism. WindowMaker will wait until this script finishes, so if you run any commands that take long to execute (like a xterm), put a "&" in the end of the command line. This file must be executable.

JWM
In JWM; the configurations are store in XML format. and this make all things possible. All the configuration stores in. at the END of this file do this:

and in  add what you need to run at the start up like and you are good to go!!!

WMFS
Thanks to xorg62; start-up applications in the WMFS is easy. you could do it with background_command in wmfsrc. you could start the executables programs this way. Either one program per background command or put all of your programs that you wish to start at start-up and make that file executable then address it in background_command. what ever fine with you. the full description is in link WMFS WIKI. Look carefully where the background_command is located in wmfsrc. ( wmfs is really nice among tilling windows manager in that way. every commands and attributes have tier own place.)

[root] background_command = "~/.config/wmfs/autostart (or autostart.sh)"

[mouse] button = "3" func = "menu" cmd = "rootmenu" [/mouse] [/root]

There is no more [root] section in WMFS2. WMFS2 wiki says:

"the easiest way to display datas in the statusbar is by a script launched on startup (with ~/.xinitrc): status.sh"