Startup files
From ArchWiki
Contents |
[edit] If you want to startup your computer to a DM(Desktop Manger. Like XDM, GDM, Entrance) or to a shell
open /etc/inittab
change the last line in the file to the DM of your choice.
examples:
x:5:respawn:/usr/sbin/entranced -nodaemon x:5:respawn:/usr/sbin/gdm -nodaemon x:5:respawn:/usr/X11R6/bin/xdm -nodaemon
Then you can set the first line in inittab to 5 to startup a DE as default or 3 to startup a shell(usually /bin/bash, you can set it by using chsh) as default.
example:
id:5:initdefault:
You can also specify this one on GRUB cmd-line when you bootup by adding 'init single' (to not load any modules) 'init 3' or 'init 5'.
[edit] After INIT X on startup
explanation: after you see INIT 3 (or5) when you startup your computer but before you have logged in: this file /etc/rc.local executes.
[edit] When /bin/bash is being used (through xterm or as login shell etc..)
~/.bashrc executes and set's all the ENVIRONMENT VARIABLES for itself. You can put whatever you want here if you want it to startup each time you open an xterm etc.
[edit] if you run startx or xinit
~/.xinitrc executes
[edit] XDM
From the xdm man page:
First, the xdm configuration file should be set up. Make a directory
(usually /usr/X11R6/lib/X11/xdm) to contain all of the relevant files.
Here is a reasonable configuration file, which could be named xdm-con-
fig:
DisplayManager.servers: /usr/X11R6/lib/X11/xdm/Xservers
DisplayManager.errorLogFile: /var/log/xdm.log
DisplayManager*resources: /usr/X11R6/lib/X11/xdm/Xresources
DisplayManager*startup: /usr/X11R6/lib/X11/xdm/Xstartup
DisplayManager*session: /usr/X11R6/lib/X11/xdm/Xsession
DisplayManager.pidFile: /usr/X11R6/lib/X11/xdm/xdm-pid
DisplayManager._0.authorize: true
DisplayManager*authorize: false
Note that this file mostly contains references to other files. Note
also that some of the resources are specified with ``*'' separating the
components. These resources can be made unique for each different dis-
play, by replacing the ``*'' with the display-name, but normally this
is not very useful. See the Resources section for a complete discus-
sion.
Note that these can also be in ~/.Xstartup and ~/.Xresources
[edit] DE startup files
explanation: when you launch a DE, these files startup things for you.
[edit] XFCE, GNOME, KDE
~/Desktop/Autostart/*
[edit] KDE
~/.kde/Autostart
[edit] Fluxbox
~/.fluxbox/startup
[edit] Openbox
User-specific:
~/.config/openbox/autostart.sh
System-wide (only executes if above file doesn't exist):
/etc/xdg/openbox/autostart.sh
[edit] Arch Specific
/etc/rc.conf: Among other things executes modules and the daemons(scripts) inside /etc/rc.d/ at bootup before you have logged in
/etc/rc.d/* - configured daemons for the system.
[edit] Notes
make sure the various startup files have execute permissions for your user. here's an example.
chmod a+rwx name-of-startup-file