Date: Fri, 6 Apr 2007 23:15:27 -0400 From: "David A. Harding" To: "The Cherry Hill Linux User's Group Mailing List" Subject: Some Xtra Bits, was Re: [CHLUG] Friendly Reminder On Fri, Apr 06, 2007 at 10:17:40AM -0400, Joe Smith wrote: > The outline & slides look great Dave. You should have no problem filling > the 2 hours ;-) Actually, the trouble was NOT filling the whole two hours. :-) 20 Minutes Over and 4 Commands Short ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I read in a guide to speaking that you should put the least useful parts of your speech last because speeches are mostly likely to not be said. I, unwisely, didn't follow that advice for tonight's talk. The four commands I skipped from my Official Commands list, and a brief description of what they do, follow: #4 xev: this program allows you to determine (among other things) what keycode keypresses and mouse clicks generate. Once you know the keycode, you can configure X to do nifty things when that key is pressed. For example, my laptop keyboard has volume control buttons that I use to (wait for it) control the speaker volume. #8 xwininfo: displays information about the currently running windows. The command below this paragraph will textually represent the way windows are ordered into a tree; if you run the command, I think you'll be able to better understand the window re-parenting I talked about in the Basics section of my talk. xwininfo -root -tree #9 xsetroot: changes the behavior of the root window. The root window is the only window the X server creates for itself. This program, or a similar program, is at the core of every desktop environment, for the default background and mouse cursors in X11 are fugly. #10 xdpyinfo: prints information about the capabilities (read: configuration) of your X server. We didn't talk about configuring X (on purpose), but if you ever find yourself in a situation where the configuration file doesn't seem to match the observed behaviour, use xdpyinfo for a sanity check. The complete list can still be found in my notes page: http://gnuisance.net/archives/xws/ Detailed Answers ~~~~~~~~~~~~~~~~ For secure shell (ssh) encrypted X Window System protocol forwarding, you may need to edit the file, /etc/ssh/sshd_config, and enable (set to yes) the following option on the computer with the program you want to run: X11Forwarding no If this option was not previous set to yes, then you also need to restart the secure shell server (sshd) on that same computer with the following command: /etc/init.d/sshd restart The computer you did all the configuration for above is about to become your X client. For the purposes of this example, we'll call this computer, mycomputer, and we'll call your username on this computer, me. Sit down at your X _server_, which can be the same computer or any other computer that is currently running X. Start a xterm and type the following command to see a graphical representation of the system load on your X client's computer: ssh -X me@mycomputer xload You should see a white box with ``mycomputer'' in the top left corner. As time passes, a plot of the system load will be drawn. Replace xload with any other command you wish to run. If it don't work, reply to this email. If my instructions aren't clear, reply to this email and impugn upon my character. Note: if you connect to a computer that has be cracked (hacked) using X display forwarding, the cracker (hacker) could possibly use the display forwarding to monitor all keystrokes you type on your X server. That includes any typed passwords. I've never seen this attack in the wild, but you've been warned. * * * The list of window managers that corresponds to the slideshow at the end of my presentation is on Wikipedia at the following URL: http://en.wikipedia.org/wiki/X_window_manager Thanks ~~~~~~ Joe Smith for the idea for the presentation and for many great suggestions. Etan Reisner for being the X guru I've turned to for about 4 years. The Wikipedia contributors to the X Window System articles for all the great information I've learned for, and tried to pass on with, this presentation. Everyone else and their ferret. -Dave -- +-----------------------------------------------------------------------------+ | David A. Harding | No violence, gentlemen -- no violence, I beg of you! | | http://gnuisance.net | Consider the furniture! | | | -- Sherlock Holmes | +-----------------------------------------------------------------------------+