User Preferences in X

The file .xinitrc in your home directory holds the information about what will happen when you start X. You may find that the file itself does not exist but that there is a file .xini-trc.template. You can copy this to .xinitrc and make changes to it. One useful and very simple thing you may want to do is to add a command near the end of the file to start an xterm before the window manager is executed. This is simply a question of adding the following line just before the line that reads exec $WINDOWMANAGER:

xterm &

Making this change means that if a problem with the window manager arises, you will at least have somewhere to type commands to rectify the situation, rather than seeing the frustrating gray screen with an X pointer on it and nothing else.

The .xinitrc file is automatically invoked when starting X. In general, you can use this file to specify any other commands that you want to start when the X Window system starts. Many people use this file to automatically start web browsers or other popular applications when starting X. Because this file is a standard Linux shell script (command file), you can simply list any other applications that you want to start before the line that says exit 0 — make sure to follow each of these with an ampersand (&) to indicate that the X Window system starts them as background processes, rather than interrupting the execution of the .xinitrc file.

Was this article helpful?

0 0

Post a comment