420 likes | 568 Views
CIS 191 - Lesson 7. X. CIS 191 - Lesson 7. Understanding X Overview. One of the original open source projects Developed at MIT Criticisms of X Handles fonts poorly Security issues Overly complex Recent improvements to XFree86. CIS 191 - Lesson 7. Understanding X Overview.
E N D
CIS 191 - Lesson 7 Understanding X Overview • One of the original open source projects • Developed at MIT • Criticisms of X • Handles fonts poorly • Security issues • Overly complex • Recent improvements to XFree86
CIS 191 - Lesson 7 Understanding X Overview User's System Remote X clients Network X server • X clients are programs with a graphical user interface: • xeyes • xlogo • firefox • gimp • etc. Local X clients
CIS 191 - Lesson 7 Understanding X The Components of X • Server Component • most important component • controls input devices • controls video hardware • VGA and hardware specific servers • Client Component • clients are what the user sees • window manager provides access to individual clients and windows • e.g. metacity, mwm, twm, sawfish, enlightenment ... • file manager - client that acts as a graphical shell allowing access to the file system • desktop manager - provides login sessions, authentication, and taskbar support
CIS 191 - Lesson 7 Understanding X Understanding the XF86config File • General Format of the File: • 1. File Section • 2. Keyboard Section • 3. Pointer Section • 4. Monitor Section • 5. Graphics Device Section • 6. Screen Section • Testing the Configuration
CIS 191 - Lesson 7 Understanding X Starting an X Window Session • startx shell script – starts up your GUI desktop • x, xinit commands • xdm command • can be run only by root • usually used in startup scripts • shows graphical logon screen xinit (bare bones X server and xterm) x (bare bones X server)
CIS 191 - Lesson 7 Understanding X Window Managers – widgets level (look and feel) • AfterStep • Enlightenment • Fvwm95 • IceWM • Sawfish • Window Maker • mwm • twm twm (Tom's Window Manager)
CIS 191 - Lesson 7 Understanding X Window Managers – widgets level (look and feel) • AfterStep • Enlightenment • Fvwm95 • IceWM • Sawfish • Window Maker • mwm • twm mwm (Motif Window Manager)
CIS 191 - Lesson 7 Understanding X Desktop Environments Debian with Gnome Mandriva with KDE
CIS 191 - Lesson 7 Understanding X GUI File Managers • File Manager Features • Accomplish same tasks as shell without lengthy commands • Have drag and drop support • Midnight Commander • Nautilus • Easy to use visual file manager • Use mouse to eliminate excessive key strokes • File Managers on KDE • KFM • Konqueror
CIS 191 - Lesson 7 Understanding X Observe how many hidden files there are now for a fresh account that has never run the gnome desktop yet.
CIS 191 - Lesson 7 Understanding X Type X (a capital X) to run the X server
CIS 191 - Lesson 7 Understanding X To end, type Ctrl-Alt-BS keys at the same time
CIS 191 - Lesson 7 Understanding X After exiting X you will see all the messages written to tty1.
CIS 191 - Lesson 7 Understanding X Type xinit to run the X server and an xterm terminal
CIS 191 - Lesson 7 Understanding X To end, type exit
CIS 191 - Lesson 7 Understanding X After exiting X you will see all the messages written to tty1.
CIS 191 - Lesson 7 Understanding X To start the full desktop, type startx
CIS 191 - Lesson 7 Understanding X Look familiar?
CIS 191 - Lesson 7 Understanding X ps –u cis191 shows that thee are a lot more processes used now than with the earlier xinit example Log out to end
CIS 191 - Lesson 7 Understanding X After exiting X you will see all the messages written to tty1.
CIS 191 - Lesson 7 Understanding X There are quite a few new hidden files and hidden directories now
CIS 191 - Lesson 7 Understanding X Copy the system xinitrc file to the home directory. cp /etc/X11/xinit/xinitrc .xinitrc Make it a hidden file.
CIS 191 - Lesson 7 Understanding X Enter the xinit command again
CIS 191 - Lesson 7 Understanding X Look familiar?
CIS 191 - Lesson 7 Understanding X Create a file named .Xclients and add: xclock -geometry 100x100-5+5 & exec xterm -geometry 80x24+50+150 Give the file execute permissions then enter xinit
CIS 191 - Lesson 7 Understanding X You have just started to create your own personal desktop
CIS 191 - Lesson 7 Understanding X
CIS 191 - Lesson 7 Understanding X Edit .Xclients to be: xclock -geometry 100x100-5+5 & xterm -geometry 80x24+50+150 & exec twm Note &'s to run xclock and xterm in the background. Also note there is only one exec command and that is at the end
CIS 191 - Lesson 7 Understanding X TWM is Tom's Window Manager (Tom LaStrange)
CIS 191 - Lesson 7 Understanding X Now run firefox
CIS 191 - Lesson 7 Understanding X Position the frame for the Firefox window
CIS 191 - Lesson 7 Understanding X Enter the xinit command again
CIS 191 - Lesson 7 One last X example [cis191@star ~]$ cat .Xclients xclock -geometry 100x100-5+5 & xterm -geometry 80x24+50+150 & xkbwatch -geometry 100x100+50+5 & xlogo -geometry 80x80+600+480 & xsetroot -solid "azure2" exec twm [cis191@star ~]$
CIS 191 - Lesson 7 One last X example To close windows or exit using Tom's Window Manager, left click and hold on the background to get a pop-up menu, then select choice.
CIS 191 - Lesson 7 X over Network
CIS 191 - Lesson 7 X over the Network Client – Server model (just reversed) Normally we refer to the remote computer running an application as the "server". It is the reverse with X. remote local Star Duke The xclient runs here The xclient graphical output is displayed here using the local X server We will use Duke's X server to serve up a graphical display from a program running on Star.
CIS 191 - Lesson 7 ssh remote login with –X option Note: Using the –X option on ssh command to log into Star Note: the processes running on Star before and after the remote ssh login
CIS 191 - Lesson 7 Using X to run xeyes client program remotely Note: xeyes graphical output is displayed on Duke Note: xeyes process running on Star
CIS 191 - Lesson 7 Using X to run firefox client program remotely Note: firefox graphical output is displayed on Duke Note: xfirefox processes running on Star
CIS 191 - Lesson 7 X over the Network Client – Server model (just reversed) Normally we refer to the remote computer running an application as the "server". It is the reverse with X. remote local Star Windows Vista PC The xclient runs here The xclient graphical output is displayed here using the local X server (cygwin) We will use Duke's X server to serve up a graphical display from a program running on a Windows PC
CIS 191 - Lesson 7 Using X with Microsoft Windows PC 1) Run Cygwin Bash Shell and enter: startx 2) Connect to Star (CentOS) with: ssh –X root@192.168.0.25 then run xeyes and xclock