1 / 20

Configuring and Using X-Windows: Starting X-Windows, Virtual Terminals, and Display Managers

Learn how to configure and use X-Windows, including starting X-Windows, working with virtual terminals, enabling/disabling display managers at boot, and more. Includes examples and tips for manual startup.

downingt
Télécharger la présentation

Configuring and Using X-Windows: Starting X-Windows, Virtual Terminals, and Display Managers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. X-Windows Configuring and Using Starting X Windows (Chapter 2: Pages 25 – 39 ) XWN740

  2. Agenda • Starting X Windows • Virtual Terminals • Enabling/Disabling Display Manager at Boot • startx • Starting Multiple Servers • Working in X Without a Mouse • Terminating X Windows Session

  3. Starting X Windows • Review from Last Week:We mentioned last weekthat only first two layersof diagram are required,and we can mix and matchother layers...We will now see how thiscan be done...

  4. Starting X Windows Virtual Terminals in X • Linux, FreeBSD, and many other modern Unix kernels support a virtual terminal (VT) (or virtual console) capability, which provides independent virtual video cards. • The monitor, keyboard, mouse, and physical video card are associated with only one VT at a time, and each virtual video card can be in a different display mode. • Some of these terminals are in text mode, others in graphical mode. Learning how to access these modes can be very useful...

  5. Starting X Windows Virtual Terminals in X • To switch virtual terminals, press <CTRL><ALT><Fx>, where Fx is a function key F1 through F12. • If you are currently in a virtual terminal you can then press <ALT><Fx> if the current virtual terminal is in text mode. • Keys <ALT><Right Arrow> and <ALT><Left Arrow> to move to next / previous X server if you are in display NOT running X Windows server.

  6. Starting X Windows Virtual Terminals in X • Virtual Terminals 1 – 6 (Text Based). • Virtual Terminals 7 – 12 (Graphical). • These rules may may depend on Linux Distro

  7. Starting X Windows Starting X Windows Server Manual Start • Disadvantage: • No client(s) are started – only root window.Must start client applications manually • Advantage: • Precise control over X server startup options(i.e. Just run the client program you want – eg. kiosk)‏

  8. Starting X Windows Starting X Windows Server Manual Start Examples: X :1 X :2 & sleep 2 ; DISPLAY=2 xeyes X :1 -terminate & sleep 2;DISPLAY=:1 xterm X Windows server terminates upon client app terminating

  9. Starting X Windows Starting X Windows Server Manual Start with Display Manager Examples: init 3 startx Used to set run level to text-based mode with network support(init 5 sets to graphical with network)‏

  10. Starting X Windows Permanently Change Runlevel • To permanently change the default runlevel, add the following line in the /etc/initab file: id:5:initdefault:orid:3:initdefault: Debian based systems (eg Ubuntu) have different methods...

  11. Starting X Windows Manually Starting X Windows:Using startx command Purpose • The xinit utility can be used to start an X server with specified clients, but the startx wrapper script provides a friendlier interface. Also, as sys admin, runlevel 3 is avoids further overhead of X Windows system unless required every now and then.... Examples: • startx • startx -- :1 • startx /usr/bin/xterm -bg yellow -geometry 180x50 --:1

  12. Starting X Windows What Starts the Display Manager Automatically? • Depending on your system configuration, the display manager may be started directly by init, or through an init script. It's useful to know how the display manager starts so that you can make changes and so that you know what will happen if the display manager exits (or crashes!). • In some Linux distributions, the display manager is directly started by init. For example, in Fedora's /etc/inittab, you will find this entry: # Run xdm in runlevel 5 x:5:respawn:/etc/X11/prefdm -nodaemon

  13. Starting X Windows What Starts the Display Manager Automatically? • Some Linux distributions use startup scripts to execute the display manager. • Similar to the prefdm script used by Fedora, this script finds your preferred display manager using a configuration file—in this case, /etc/sysconfig/displaymanager—or it uses XDM if that file is missing.

  14. Starting X Windows AUTOMATIC CONFIGURATION (MULTIPLE X SERVERS)XDM (Xt)‏ • XDM and older versions of KDM (pre-3.4) use the Xservers file to configure the number of servers started by the display manager. The location of this file varies; try /etc/X11/xdm/Xservers or /opt/kde3/share/config/kdm/Xservers. • To start additional X servers, simply add lines at the bottom of this file: :1 local /usr/bin/X :1 vt8 :2 local /usr/bin/X :2 vt9

  15. Starting X Windows • KDM (Qt)‏ • If you're using KDE 3.4 or higher, the local X server configuration is controlled by the kdmrc file (/etc/X11/xdm/kdmrc or /opt/kde3/share/config/kdm/kdmrc). In the [General] section of that file, you can specify a list of local displays to be started by adding a StaticServers key: StaticServers=:0,:1,:2

  16. Starting X Windows GDM (GTK+)‏ • GDM is configured using two files; the first specifies default values, which may be overwritten when GDM is updated, and the second provides local values, which are never overwritten. The name and location of these files varies; on an Ubuntu system, the defaults are in /etc/gdm/gdm.conf and the local settings are in /etc/gdm/gdm-custom.conf, while on a Fedora system, the defaults are in /usr/share/gdm/defaults.conf and the local settings are in /etc/gdm/custom.conf.

  17. Starting X Windows • GDM (GTK+)‏ • There are two sections in the GDM default configuration file that deal with local X servers. The first defines the command to be used to start a new server, and it looks like this: [server-Standard] name=Standard server command=/usr/bin/X flexible=true • This will start a single server with a display number of :0. To configure GDM to initially start additional servers with the same configuration, add a servers section to the local configuration file: [servers] 0=Standard 1=Standard 2=Standard

  18. Starting X Windows Pointing without Mouse in X Windows Purpose • Useful to know there is amethod to use pointerif mouse is not working • Press <SHIFT><NUMLOCK>to toggle mouse keys mode • Unavailable on keyboardsthat do not have NUMERIC keys

  19. Terminating X Windows FROM COMMAND LINE: Can use the killall command Examples: • Killall X • Killall xdm • Killall kdm • Killall gdm-binary Killing display manager has benefit of still running X

  20. Terminating X Windows • Terminating X Windows SessionWithin Graphical Session When the server is hopelessly messed up, zapping it may be your only available option short of a hard reset—and it is safe to do when no clients are connected • Press <CTRL><ALT><BACKSPACE>to toggle mouse keys mode • Disadvantage: • Any work-in-progress may be lost, and files may be left in an indeterminate state.

More Related