Difference between revisions of "Startup files"

From ArchWiki
Jump to: navigation, search
(Arch Specific)
(reduce duplication)
Line 1: Line 1:
 
[[Category:System administration (English)]]
 
[[Category:System administration (English)]]
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
== If you want to startup your computer to a DM(Desktop Manger. Like XDM, GDM, Entrance) or to a shell ==
 
  
open /etc/inittab
+
= Boot process =
  
change the last line in the file to the DM of your choice.
+
See [[The Arch boot process]]
 
 
examples:
 
<pre>
 
x:5:respawn:/usr/sbin/entranced -nodaemon
 
x:5:respawn:/usr/sbin/gdm -nodaemon
 
x:5:respawn:/usr/X11R6/bin/xdm -nodaemon
 
</pre>
 
 
 
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:
 
<pre>
 
id:5:initdefault:
 
</pre>
 
 
 
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'.
 
 
 
== 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.
 
 
 
== 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.
 
 
 
== if you run startx or xinit ==
 
~/.xinitrc executes
 
 
 
== XDM ==
 
From the xdm man page:
 
<pre>
 
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-
+
= Terminals =
      fig:
+
If you use Bash (Arch default) as your shell, ~/.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.
  
            DisplayManager.servers:            /usr/X11R6/lib/X11/xdm/Xservers
+
= X =
            DisplayManager.errorLogFile:      /var/log/xdm.log
+
== Using Display Managers ==
            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
+
See [[Display manager]]
      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.
 
</pre>
 
  
Note that these can also be in ~/.Xstartup and ~/.Xresources
+
== Starting X by startx or xinit ==
 +
~/.xinitrc executes.
  
 
== DE startup files ==
 
== DE startup files ==
Line 74: Line 31:
 
System-wide (only executes if above file doesn't exist):
 
System-wide (only executes if above file doesn't exist):
 
  /etc/xdg/openbox/autostart.sh
 
  /etc/xdg/openbox/autostart.sh
 
== Arch Specific ==
 
See [[The Arch boot process]]
 
 
== Notes ==
 
make sure the various startup files have execute permissions for your user. here's an example.
 
<pre>
 
chmod a+rwx name-of-startup-file
 
</pre>
 

Revision as of 12:54, 1 October 2008


Boot process

See The Arch boot process

Terminals

If you use Bash (Arch default) as your shell, ~/.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.

X

Using Display Managers

See Display manager

Starting X by startx or xinit

~/.xinitrc executes.

DE startup files

explanation: when you launch a DE, these files startup things for you.

XFCE, GNOME, KDE

~/Desktop/Autostart/*

KDE

~/.kde/Autostart

Fluxbox

~/.fluxbox/startup

Openbox

User-specific:

~/.config/openbox/autostart.sh

System-wide (only executes if above file doesn't exist):

/etc/xdg/openbox/autostart.sh