X11

From Peyton Hall Documentation

Jump to: navigation, search

Some information about the X Window Interface (aka X11 or xorg), the system used to display a graphical interface on Unix and Linux desktops (and also used on Macs to display X11 windows from Unix or Linux machines over SSH tunnels).


Contents

Changing your window manager

The window manager is the program that helps you maintain all the programs running on your desktop. It may provide quick buttons to minimize, maximize and close the window, as well as usually has menus to help you execute programs and find different features. The default window manager for all users is KDE, since we've found it to be not only easy to use but easy to understand for new users (and yet quite powerful for those more familiar with the system too). However, if you decide you want to change your window manager you can do that.

The simplest thing to do, if for example you wish to use Gnome instead, is to select it from the login screen.

If the window manager you wish to run isn't listed on the login screen, then you'll need to call it yourself. Create a file in your home directory called .xinitrc, like this:

#!/bin/sh 
PATH=$PATH:/usr/peyton/bin
XUSERFILESEARCHPATH=/peyton/lib/X11/app-defaults/%L/%N 
export XUSERFILESEARCHPATH PATH 
xrdb -load $HOME/.Xdefaults 
if [ -f /usr/bin/startkde ] ; then 
     /usr/bin/startkde 
else 
     xterm -geometry 80x24+1+110 -fn 6x12 -sb -sl 1000 -bg black -fg white & 
     xclock -geom 85x85-300+1 & 
     xterm -geometry 80x4+1+1 -fn 6x12 -C -fg wheat -bg black -T Console 
fi
kbd_mode -a

This will exec /usr/bin/startkde if it's available, and if not it will run a "failsafe" mode with a couple xterms and no window manager at all. Replace the "startkde" lines with your own window manager, and it will be run instead.

Keep in mind that there must be at least one line in the .xinitrc file that is *NOT* backgrounded (no '&' after the command). This is because the .xinitrc file is read like a script, and when it exits it is assumed that you have closed your X session. Therefore, the window manager is usually the item that is left in the foreground (so you can select "Log Out" in the window manager, which will cause it to exit cleanly, and your X session will close). In the failsafe mode above, the Xterm in the upper left corner is the foreground process, so when it is closed your session will end.


Color issues

There's a number of things that could be affecting your color settings. A common problem is programs that only half obey the settings in your .Xdefaults files. Therefore, lines that look like '*Background: moccasin' or 'xterm*Foreground: black' may actually cause Pine to display black text on a black background. Try commenting these lines out by putting a '!' in front of them, then reload the .Xdefaults file with 'xrdb .Xdefaults'. Also see the section on Color problems in IDL.


Changing key functions (Caps, Control)

Many people prefer to swap Ctrl and Caps Lock, either because they feel it's more comfortable or started on a Sun and are more used to that layout. You can do this easily by creating (or adding) the following lines in a file called .Xmodmap in your home directory:

!
! Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

Next, run 'xmodmap ~/.Xmodmap' to load the settings. Caps Lock and Ctrl should now be swapped, acting more like a Sun keyboard.

NOTE:

You could use any file name for this purpose, however by using the name .Xmodmap and putting it in your home directory, the next time you fire up X the display manager will load these settings for you automagically.


My mouse buttons don't seem to work!

Turn off Num Lock. Don't ask why. Just trust me. This may not be pertinent anymore, but it bit quite a few people in the past.


See also

Personal tools