% which XSee how that works? We found the symlink X and followed it to another symlink X which pointed to yet another symlink X which finally pointed to the SVGA server binary.
% ls -l /usr/X11R6/bin/X
lrwxrwxrwx 1 root root 16 Oct 11 1999 /usr/X11R6/bin/X -> /var/X11R6/bin/X*
% ls -l /var/X11R6/bin/X
lrwxrwxrwx 1 root root 24 Oct 11 1999 /var/X11R6/bin/X -> /usr/X11R6/bin/XF86_SVGA*
Debian is a bit different. The file /etc/X11/Xserver is a text file which gives the location of the server binary and who can use it.
% cat Xserver
The first line in this file is the full pathname of the default X server.
The second line shows who is allowed to run the X server:
Console (anyone whose controlling tty is on the console)
First, run xev, which will tell you the keycode for any key. Put the X cursor in the tester box and press the backspace key. You'll see something like:
KeyRelease event, serial 24, synthetic NO, window 0x1c00001,This reports my backspace key to be keycode 22 (yours may be different).
root 0x26, subw 0x1c00002, time 3098665090, (31,41), root:(622,60),
state 0x0, keycode 22 (keysym 0xff08, BackSpace), same_screen YES,
XLookupString gives 1 characters: "
The 2nd step is to actually do the mapping, which is done using xmodmap To perform the mapping, try:
xmodmap -e "keycode 22 = Delete"You can use xmodmap -pk to see what the valid targets are besides Delete. There's lots of them, like F1 through F12, Home, Up, Left, Control_R, KP_Enter, Pause, Print, Meta_L (Meta is the Alt key), KP_Down, KP_Insert and many, many more.
See man xmodmap for more details.
At this point, I assume that you've picked out a wm and are all hot and bothered to try it out. Most likely, all these window managers are already on your system, ready to be used. I won't go into installing them here.
In your home directory, there might be a file called .wm_style. This file contains the name of the window manager that you want X to start up. If you want Afterstep, .wm_style should contain the string `AfterStep'. If you want Enlightenment, the file should contain the word "Enlightenment". You need to be a bit careful about what you specify in this file, since computers are very bad at interpreting Afterstep to mean AfterStep. Some effort is made to do this interpretation, but if you want to know for sure what the string is, look at the output of less .Xclients (from your home directory). Even if you don't know shell programming, you should be able to figure out what X expects as valid strings in .wm_style. Next, kill your xserver (ctl-alt-backspace) and restart it with startx. You should be staring at a new window manager!
If you don't have .wm_style (like if you have Debian), you want to edit a file named $HOME/.xinitrc. First find the location of the window manager executable by using the which command. For example, if you type which enlightenment, the system should respond with (for example) /usr/bin/enlightenment. Then, in .xinitrc you'll want to have the single line
exec /usr/bin/enlightenmentand you should be all set to go.
start-xdmto the end of the file /etc/X11/config.
xhost +remote.host.eduNext, start an ssh session to the remote host:
ssh -X -C -cblowfish remote.host.eduThe -X option tells ssh to enables X11 forwarding. The -C option tells ssh to compress all the incoming/outgoing packetsl. If you're at ethernet speeds or higher, this can actually make things slower, but on DSL and T1's it's supposed to help a lot (you may want to experiment with this).
By default, ssh uses the 3des (triple DES) cipher scheme to encrypt the connection. By specifying -cblowfish, you're telling ssh to use the blowfish algorithm, which is appears to be equally as secure, but MUCH faster than 3des.
If you get denied X11 forwarding then you'll need to allow X forwarding in the remote host's /etc/sshd/sshd.conf. If either the local or remote machines have a restrictive hosts.allow and/or hosts.deny, you'll have to add an entry for X-forwarding. Check out the man pages.
This should all work if you're on a masqueraded machine going out onto the internet. If you're on the internet and want to run an application on a machine which is masqueraded behind a firewall, the firewall will need to have a hole to make things work. Lastly, look into lbx, low bandwidth X.
Now all that stuff is for ssh, which automatically sets up the needed variables for X11 forwarding. If you use telnet (shame on you), you'll still need to use xhost (see above), but you'll have to manually set the $DISPLAY variable on the remote machine.
export DISPLAY=local.host.edu:0 setenv DISPLAY local.host.edu:0for bash/sh and csh/tcsh shells.
You can even make the local machine into an xterm for the remote machine. On the local machine, without X running, edit the appropriate starting script so it runs X with the following command:
X -query remote.host.eduNow, when you start X, your local machine will appear to be an Xterm connected to the remote machine (with a little bit of a delay).
Please report bugs or broken links to me.