ࡱ> jli3 S3bjbjdd "~S.lZZZZZZZ$LG+Lffffffff*******$- /z*-Zfffff*&ZZff+&&&fZfZf*&f*&`&F')hZZ*fZ ]qFb!BJ*H* +0G+*-0%B-0*&nX@ZZZZX-Windows Background and Terminology In the Microsoft Windows world there are two basic approaches for GUI access to a remote system remote control where a user accesses an existing remote desktop shared with another user (VNC, Dameware), and remote desktop where the user actually gets a unique virtual desktop via separate login (Windows RDP, Citrix/ICA). XWindows, the LINUX/UNIX GUI is a slightly different animal. In XWindows, the GUI (screen manager) is separate from the desktop manager (GNOME or KDE for LINUX). As a matter of fact, XWindows need not manage a remote desktop at all. It can run remote Xwindows applications to interface with a local desktop. To put it another way, XWindows separates screen/mouse/keyboard device management from the GUI desktop or application. LINUX supports all 3 approaches. VNC has been in the LINUX for several years, Windows Remote Desktop support was introduced into Fedora Core, and XWIndows support has been there since Day 1. XWindows also stands the typical client/server relationship on its head. The GUI is the server, requesting execution of the remote client program. The remote client program can be an XWindows application (Xclient if you will) running on the local desktop or it can be a local or remote desktop. Common XWindows Terms The X Windows Server The X "server" is the machine that is responsible for managing the screen, mouse and keyboard. It's called a server because it "serves" graphics. In LINUX and UNIX, the Xserver is usually X. The X Windows Client The X client is the machine that runs the programs that use the X Windows server. This is where the real work gets done. Examples are xterm, xclock etc. or a desktop manager. The Display X Windows allows a server to have more than one display. This is sometimes used to create multiple virtual desktops that you switch back and forth between, and sometimes to support several physical monitors. Displays have names like 0.0, 1.0, and 0.3. "0.0"is used most often representing the main display for the server. Desktop Manager Any Windows Manager that presents a desktop KDE, CDE (UNIX), GNOME, TWM, FWDM. X Terminal Any machine running an XWindows Server X Application Any application that will speak to a XWindows terminal/server. Local XWindows Desktop Management Out of the box most LINUX/UNIX systems have XWindows setup properly for the local desktop manager GNOME and KDE for LINUX. This is the default if the inittab, inidefault runelevel is set to 5. Start XWindows? The basic XWindows server command is X . To start the local desktop (usually if in runlevel 3), type in: startx (gnome) or startkde (kde), which are front-end scripts to the xinit command. Exit Xwindows? To get out of XWindows, press these 3 keys (runlevel 3 only, runlevel 5 will respawn Xprefdm): Ctrl Alt Backspace XWindows and Virtual Consoles In GUI mode, you access text virtual consoles by pressing these 3 keys: Ctrl Alt F1 Virtual Console 1 Ctrl Alt F2 Virtual Console 2 etc up to 6 virtual consoles (by default) Multiple XWindows and Virtual Consoles If you start another GUI desktop from virtual console, use this command startx -- :1 that GUI is assigned to the next non-text virtual console # - VC7 by default and is accessed by pressing these 3 keys: Ctrl Alt F7 Virtual Desktop 1 (default) Ctrl Alt F8 Virtual Desktop 2 etc up to 6 virtual consoles (by default) startx and .xinitrc and .xserverrc startx is a script front end to the xinit command the local Xwindows manager. The xinit format is: xinit [client] options] [ [server] [display] [options] ] note two dashes between client and server xinit uses file $HOME/.xinitrc to start specific X client programs. If .xinitrc doesn't exist, the default program is xterm :0. All X programs are run in the background (&) except the last which is the desktop. This desktop is run with the command: exec where is the command that starts the window default windows manager you want to be your default.as the last line in the file. Most common window managers and desktop environments are: KDE = startkde Gnome = gnome-session Blackbox = blackbox FVWM = fvwm (or fvwm2) Window Maker = wmaker IceWM = icewm tvwm xinit uses the $HOME/.xserverrc file to specify server options. In the absence of this file, the default is: /usr/bin/X :0.0. Remote XWindows Application Management XWindows is the Server/Client model in reverse. The GUI is the server, the application is the client. Most Xwindows applications are local (Gnome or KDE local desktop). Sometimes we need to use an X client which needs to be run from another machine. The general procedure for setting up a remote XWindows app is: 1) Determine the display on the local host (server) who or echo $DISPLAY 2) Set the display on the remote (client) host. export DISPLAY= or setenv DISPLAY= 3) Set the security on the local hostto accept input from the remote client with the xhost command: xhost + 4) Start the XWindows application on the remote host: xterm, xclock, etc Example: you are logged into marie (local machine - server) and want to run xterm from arthur (remote machine - client): A. Determine the local display name on marie, go to a shell prompt on marie and issue the command: echo $DISPLAY The response should something look like: csc.oakton.edu:0.0 If you just get a blank line then type: who and look for your username: user1 /dev/pts1 Sep 17 13:16 (marie.oakton.edu:0.0) The last item will be your display name or it may be an address: Make Maries display known to arthur, LOGIN to arthur and issue the command: export DISPLAY=marie:0.0 (bash) or setenv DISPLAY marie:0.0 (csh) If you are at the console of marie (ie. in front of the computer itself ), then the display is called marie:0.0. Authorize arthur to write to marie, in marie type: xhost +arthur to which marie will reply: arthur being added to access control list. Run any X client from arthur and display it on marie display: xterm, xclock. NOT twm, startx, startkde etc. Attempt to start a remote desktop will fail. You can also run an Xwindows program directly from arthur without setting the environment variable using the display option: xterm -display marie:0.0 & Either way, place the XWindows app in the background with & on arthur. You can bypass steps 1-3, using SSH with the X flag to pass the graphical request in a encrypted tunnel: ssh X user@arthur Enter password: xterm &. Remote XWindows Desktop Management Most persons are used to the remote control or remote desktop scenarios Microsoft Windows provides. The above procedure provides neither. To get a remote login using a GUI, you must make use of two different XWindows tools xdm (XWindows Device Manager) and xmdcp (XWindows Display Manager Control Program). xdm on the client provides for controlling the remote XWindows device (terminal/server) and uses definitions to present a specific desktop application using a secipt called Xprefdm. Because xdmcp is inherently insecure, remote access to xdm is usually shipped turned off (local desktop only). The process to get a remote desktop is 1) turn on remote access to xdm, 2) point the local XWindows server to the xdm client using xdmcp. Xdm configuration files will vary among LINUX/UNIX flavors. So does setup Consult your specific technical reference for that OS release. 1) For LINUX, the GNOME equivalent of xdm is called gdm. Gdm has a configuration file /etc/gdm/gdm.conf (or custom.conf) that has very nice GUI configuration application gdmsetup that can run as a XWindows application. It can even be run remotely as sp specified above. Gdmsetup was not apparently shipped with Fedora Core 9 or 10. A sample gdm configuration file follows. Note the critical parameter is the enable=true in the [xdmcp] section. This allows xdmcp response on UDP port 177. [security] DisallowTCP=false AllowRemoteRoot=true [xdmcp] Enable=true [gui] [greeter] Browser=true Include=user1,root IncludeAll=true [chooser] [debug] Enable=true # [servers] 1=Standard # [server-Chooser] name=Chooser server command=/usr/bin/Xorg -audit 0 chooser=false handled=true flexible=true priority=0 2) The second step is to point XWindows server to the xdm/gdm client: X query marie If you have a graphical login and xdm as your display manager, you may change the default window manager by changing text file $HOME/.xsession.. Contents are the same as xinitrc, only the file name is different. After editing .xsession and saving the changes, your new window manager starts up the next time you log in via xdm. Summary Xwindows can be confusing to the newbie. Just remember that Xwindows is a split client/server in reverse. Relationship among commands and files are as follows: 1) startx -> xinit [client] [option] [--] [server] [display] [options] client = x program xterm (default) xclock etc or desktop manager like gnome or kde server = /usr/bin/X or Xsomedisplay display = :0.0 (default) : 1.0 etc $HOME/.xinitrc specifies the defalt client settings $HOME/.xerverrc specifies the default server settings.. 2) If you start the system in runlevel 5, you respawn the Xwindows server with the command /etc/X11/prefdm ... or something similar. Which is why the Ctrl Alt Backspace doesnt put you into text mode. 3) For remote Xwindows login, a separate X device manager (xdm/gdm) is started on the client and remote xdmcp access (UDP port 177) is allowed by specifying: [xdmcp] enable=yes in the appropriate xdm configuration file (varies by OS distro). Then from the X Server you connect to the remote client xdm with the command: X -query The -query flag forces an xdmcp connection request to be sent to the remote client xdm. Trouble shooting tips: To get out of XWindows press these 3 keys: Ctrl + Alt + Backspace Note this doesnt work for local systems at runlevel 5 where the GUI/XDM process is automatically respawned. Check Desktop managers in the system prefdm script. Make sure the remote xdm is set for xdmcp enabled (or scan for UDP port 177) If the desktop doesnt start properly after remote LOGIN, check the $HOME/.xinitrc or $HOME/.xsession files of the logged in user. This contains the script determining which desktop manager to use. If the remote desktop starts but the local display looks wrong (or blanks the screen), check the video setting of the remote xdm using Xconfigurator on manually editing files such as $HOME/.Xsession. Or as root, check the /etc/X11/xorg.conf file settings for monitor if you are using Fedora or use the XF86Config command for older versions of RedHat. Be careful of the Horizontal Sync and the Vertical Refresh rate on the monitor settings. iIf you get either one of those specs wrong you can possibly destroy your monitor; so be careful and start with the lowest sync rates and resolution values possible.. If you get an error message: X11 connection rejected because of wrong authentication. This usually means problems with the .$HOME/.Xauthority file that restricts Xwindows access. Check man pages for .Xauthority, xauth or mkxauth commands on the xdm machine for resolution procedures. If the desktop still doesnt start properly, check the options $HOME/.xxxxxxrc file, where xxxxxx is the run control file for the selected desktop: .twmrc or .fvwm2rc The XWindows files that you should be aware of and likely use: - XF86Config = the configuration file you may spend time editing - SuperProbe = video clock probing - Xconfigurator = configuring X manually. Usually for video or mouse setup. - system-config-display when using Fedora - drakconf or harddrake2 when using Mandrake  %'  - / 0 F    .  % hov,0145@^< 0JCJOJQJ^JaJB*OJPJQJ^Jph5CJOJQJ\^JaJ0JB* OJQJ^JaJph@CJOJQJ^JaJ OJQJ^J0JCJOJQJ^J 0JB* ph@CJOJQJ^J5CJ\aJ0J5B* \ph@6 'rs#$   / 0 F    -  % $ & F^ & F & FS3% ?@^_<=7 uvLr  ;<?@ vr&(Z\M^BRUe*3:PUJ]^ŽŽŽŽŽŽŽŶŶŶŽŬŝŬ0JCJOJQJ^JmH sH 0J5\mH sH 0JmH sH 5\mH sH mH sH 0J5B* \ph@OJQJ5\ OJQJ^J0JB* OJQJ^JaJph@0JCJOJQJ^JaJ=&ZM^e23!J 8h^8`hh`h$ & FJ]*w.o V6 hh^h`h & F^`h^h & F^`h`h & F^` ^`IOw".UZau~  ""$$U$%%%0'1'9':'+++++,,0JaJaJCJOJQJ^JaJOJPJQJ^JCJOJQJ^JaJ0JB* CJOJQJ^Jph@5\0JCJ^JmH sH 6]mH sH 5\mH sH 0JmH sH mH sH OJQJ^JmH sH :}~ g"h"##U$`$r$$$$$$$$$$$$$$$$$7$ $$% %%%(%<%[%i%v%%%%%%0'1'9':'''$(%(z(((($7$! "( Px 4 #\'*.25@97$7$((.)/)))*******=+>+g+h+++++++,,,,,^ & F$7$7$, ,,,,,,,,,----.=/>//>0]00b1111 2 2J2L2V222222223'3/333=3S35\5CJOJQJ\^JaJ0JCJOJQJ^JaJCJOJQJ^JaJmH sH OJQJ^J B*aJphB*CJOJQJaJph B*aJph0J5\aJ 0J5\aJ0JaJ*,--h----A... /=/>/>0?0]0000S1a1b11 2 2J2"-DM ^ -DM ` & FJ22R3S3^ 1h/ =!"#$%# i\@\ Normal$a$1$A$*$+B*OJQJCJmH sH PJ^JaJ_HtHb@b Heading 1@& & F & F"OJQJCJ05KHPJ^JaJ0\^@^ Heading 2@& & F & FOJQJCJ$5PJ^JaJ$\\@\ Heading 3@& & F & F<$OJQJCJ5^JaJ\<A@< Default Paragraph Font&O& WW8Num1z05.O. WW8Num2z0 OJQJCJ.O. WW8Num2z1 OJQJCJ.O!. WW8Num2z2 OJQJCJ&O1& WW8Num4z15&OA& WW8Num5z05<A@Q< Default Paragraph Font"W@Ra" Strong5\&X@Rq& Emphasis6]:b@R: HTML CodeOJQJCJPJ^JaJ.U@R. Hyperlink B*ph>*>V@R> FollowedHyperlink B* ph>*FOF Heading x$OJQJCJPJ^JaJFB@F Body Text-DM B*phaJ/@ List<"@< Caption xx $CJ6aJ]"O" Index $N^@N Normal (Web) B*phOJQJPJ^Je@ HTML Preformatted7! 2( Px 4 #\'*.25@9OJQJCJPJ^JaJLC@"L Body Text Indent"^]`S.~ z z z z z z ^1"&S."'# 'rs#$/0F- % ? @ ^ _   < = 7 uvLrQc|M^e23!J]*w.o V6}~ghU`r   ( < [ i v 0"1"9":"""$#%#z#####.$/$$$%%%%%%%=&>&g&h&&&&&&&'''''((h((((A))) *=*>*>+?+]++++S,a,b,, - -J--R.U.0(00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (00^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^ 0^0^0^ 0^0^ 0^0^ 0^0^ 0^000 0000000000000000000000000000000000000000000!000000000000000000000000000000000 000 00 00 0000 00000000 0"000000 000 0000,S3158<% J$(,J2S324679:;=>S33s{,4qy'  S [   R Z h n z   ! ( @ H  &  v{xYa~NQem*,23:<UW!OPZ[ou   }~ghU`krE Q ! !m!u!!!!!+".":"B"w"""""":#?#J#P#v#y##########$M$U$]$d$i$q$%%5%<%b%g%%%%%%%'&*&[&]&&&&&&&J'R'''''''''](d(o(w(W)Z)a)n)))5*;***++++ ,,,, ,',8,;,,,,,,,, -------. .'./.U.%)# & v{0:rvZ\de13 !IJ\])*vw-.nu UV56|~fhTV^    ( , < C [ b i p v ~ l!u!!!""%#+#z#######$%%%%%%\(d(n(w(((A)H))) *<***++,,S,],,,,,---.U.::::::::::::::::::::::::::::::::::::::::::::::::::::::: > @ ;<\]8"8"i""""""#-$$$$$%%q'q'''((((m(n(o(p(A)A)))++++----Q.R.U. Image v5.05PG:\CIS238\Handouts\XWindows.doc@`05. OJQJCJ5..WW8Num1WW8Num2WW8Num5WW8Num6U.@&&ȗB&&(S.@@@@,@Unknown Gz Times New Roman5Symbol3& z Arial?5 z Courier New;" HelveticaI& ??Arial Unicode MS;WingdingsS&Liberation SansArial?DejaVu SansBAhԦ#Eզ2&Qn\c2!>0.t@BASIC X-Windows Image v5.05P Image v5.05POh+'0  8 D P \hpxBASIC X-Windows Image v5.05P Normal.dotImage v5.05P2Microsoft Word 9.0@0@@z+u@:]F2&՜.+,0 hp  RR DonnelleyQ." BASIC X-Windows Title  !"#$%&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXZ[\]^_`bcdefghkRoot Entry F1qFm1Table@-0WordDocument"~SummaryInformation(YDocumentSummaryInformation8aCompObjjObjectPool1qF1qF  FMicrosoft Word Document MSWordDocWord.Document.89q