X-Windows on SGI 1
Total Page:16
File Type:pdf, Size:1020Kb
This manual describes features of the X-windows environ- ment on SGI and Aspect Station I. Functions of the SGI toolchest are described as well as several ways to set up your personal X-environment. For a full description of X- windows we refer to the books and WWW pages written on this subject. This manual is available in: - PDF format -> unix-xwindows.pdf - FRAMEVIEWER format -> unix-xwindows.doc The latest update can be found on the Bruker FTP servers: on ftp.bruker.de in the directories: /pub/nmr/courses+manuals/pdf /pub/nmr/courses+manuals/doc on ftp.bruker.com in the directories: /pub/nmr/mirror.bruker.de/courses+manuals/pdf /pub/nmr/mirror.bruker.de/courses+manuals/doc The README file describes its installation and usage. It is also delivered as XWIN-NMR online help: click Help -> Other topics -> Unix-Xwindows Please send your comments to: [email protected] Index X-windows on SGI 1 Functions of the Toolchest 2 Customize your X-environment - configuration files 5 - function keys in X-windows 8 - how to change the font of a UNIX shell 10 - how to start applications by mouse click 12 X-windows on Aspect Station 14 Appendix A: the command Editres 17 1 X-windows on SGI After successful login on an SGI workstation you have at least one window on your screen, the so called Toolchest. The Toolchest offers you the possibility to start applications by mouse click. One of these applications is a UNIX shell or UNIX window. In a UNIX shell you can enter UNIX commands like pwd, ls, cd etc. or you can start other applications. Operating system: IRIX Default window manager: 4Dwm User specific resources files: .xsession .Xresources .sgisession .4Dwmrc .auxchestrc UNIX shells: - xterm - winterm Useful X commands: xlsfonts, xdpyinfo, xfontsel, xman, xhost, xterm, winterm, xwininfo, xprop, editres. Manual Pages: - man X - man 4Dwm - man <command> (see commands above) 2 Functions of the Toolchest The Toolchest is a small window on the desktop of an SGI workstation. The Toolchest: - automatically appears when you log in at a terminal which is directly connected to the workstation - offers you a list of system tools and applications - allows you to start tools and applications by mouse click - can be customized in your personal file .auxchestrc - can be started with the command toolchest when you are logged in over the network The Toolchest usually contains the following buttons: * Desktop - open a UNIX shell, log out, customize * Selected - handle files and directories graphically * Find - find tools and applications on the local host - find files, hosts, printers etc. network wide * System - start the system management tools for disks, printers, network, system software, users etc. - restart the window manager, restart the host * Help - the SGI online books and manual pages 3 examples * Open a UNIX window (a UNIX shell) Desktop -> Unix Shell * log out Desktop -> Log Out or type endsession [-f] in a UNIX shell * Switch window auto placement on/off Desktop -> Customize -> Windows * Enable remote display permanently IRIX >= 6.3 Desktop -> Customize -> Desktop -> Enable remote .. or enter xhost + in your .profile or .cshrc * Change the UNIX default editor (SGI default is jot) Desktop -> Customize -> Desktop [-> Utilities] or type desktop in a UNIX shell * Open a window with icons for several applications find -> applications * General system information and setup System -> System Manager * Install a new user System -> User Manager 1 1.For IRIX >= 6.3: System -> System Manager -> Security and Access Control -> User manager 4 * Install a new printer System -> Printer manager We recommend to install a printer with cfpp in XWIN-NMR (see XWIN-NMR manual) 1. * Install system software System -> Software Manager - can be used to install SGI software - cannot be used to install Bruker software * Restart the 4Dwm window manager System [-> Utilities] -> Restart Window Manager * Shutdown the computer System -> System Shutdown or type init 0 in a UNIX shell * Reboot the computer System -> Restart System or type init 6 in a UNIX shell * The online books; help on various SGI topics Help -> Online Books - you can search for keywords in all books - corresponds to the UNIX command insight * A list of all UNIX commands and their manual pages. Help -> Man Pages - each manual pages corresponds to the output of the command man <command> 1.Network printer installation is described in the XWIN-NMR online help; click help -> other topics. 5 Customize your X-environment configuration files Each time you log in on an SGI, a series of files is executed: 1) the file /usr/lib/X11/xdm/Xsession is executed: this file executes the file /$HOME/.xsession 1, if it exists All further steps are performed by the file .xsession, if it exists, or else by its master file /usr/lib/X11/xdm/Xsession: 2) load the file /$HOME/.Xresources, if it exists 3) set the search path for X-resources 4) enable the hosts display access (xhost +) 5) start the window manager -> interpret the file: /$HOME/.4Dwmrc, if it exists, or else /usr/lib/X11/system.4Dwmrc 6) execute the file /$HOME/.sgisession, if it exists 7) start a toolchest window -> execute the file: /usr/lib/X11/system.chestrc and /$HOME/.auxchestrc, if it exists The files .xsession and .4Dwmrc replace their master files, the contents of .auxchestrc is added to system.chestrc. The file .xsession - you can create a .xsession by copying the file Xsession: cp /usr/lib/X11/xdm/Xsession /$HOME/.xsession - edit this .xsession (e.g. vi) and make your changes, e.g.: * always remove the line xsession=$HOME/.xsession 2 * you can change the display access, e.g. xhost -host1 * you can start a different window manager, e.g. twm 1.HOME is a system environment variable which, by default, is set to your home directory 2.you can also remove the entire if-then-fi structure containing the command "exec $xsession" 6 The file .Xresources The file .Xresources can be used to set resources (names, fonts, positions, sizes, colours) of various applications. Many applications have their own default resource file, which usually resides in a directory app-defaults, e.g.: /u/prog/app-defaults/XWinNmr /usr/lib/X11/app-defaults/XClock /usr/lib/X11/app-defaults/Toolchest You can change or extend these default resources in the file .Xresources in your home directory, e.g.: XWinNmr*background: green XClock*geometry: 200x200+50+50 Toolchest*fontList: 9x15bold for the applications xwinnmr, xclock and toolchest. Entries in your .Xresources usually start with the name of the corresponding file in app-defaults. 1 To activate the change in your .Xresources you can: - log out and log in again or - type: xrdb -load .Xresources Resources of UNIX applications can also be set with com- mand line arguments, e.g.: xclock -g 200x200+50+50 toolchest -fn 9x15bold A powerful tool to set up your .Xresources interactively is editres. An example of this is described in Appendix A. 1.This is usually the name of the application with the first letter capitalized. When the application starts with an "x", the first and second letter are capitalized. 7 The file .4Dwmrc This file is a resource file for the 4Dwm window manager. If it exists, it is used instead of /usr/lib/X11/system.4Dwmrc. The file .4Dwmrc can be used to add or change: - menus - key bindings - mouse button bindings Additional menus allow you to start your own application by mouse click from the background screen. This will be discussed on page 12 of this document. The file .sgisession This file can be used to automatically start applications upon login. You can just enter the names of the applications as they would be entered in a UNIX shell, e.g.: insight & xclock & netscape The ’&’ starts the application in background. If you don’t do this, applications might wait for each other to finish. 1 The file .auxchestrc This file can be used to add functions to the Toolchest. The application toolchest will interpret the two files: /usr/lib/X11/system.chestrc and /usr/people/<user>/.auxchestrc This will be discussed on page 12 of this in document. 1.This only counts for applications that do not return the UNIX prompt after start up. 8 Function keys in X-windows set function keys for an "xterm" UNIX shell - type cd to change to your home directory - edit (e.g. vi) the file .Xresources; enter your personal choice of function keys, e.g.: XTerm*VT100.Translations: #override \ Shift<Key>F1: string("ftp ftp.bruker.de") \n\ Ctrl<Key>F1: string("cd /pub/nmr/xwinnmr/patches") \n\ <Key>F1: string("cd /pub/nmr/courses+manuals") \n\ Shift<Key>F2: string("netscape") \n\ Ctrl<Key>F2: string("http://www.bruker.de") \n\ <Key>F2: string("http://www.bruker.com") \n\ To include a carriage return, add string(0x0a), e.g.: Shift<Key>F1: string("ftp ftp.bruker.de") string(0x0a) \n\ - edit (e.g. vi) the file .auxchestrc; enter the following lines: Menu Desktop { "Xkey" f.exec "xterm" } - log out and log in again - click on Desktop -> Xkey, which will open a new xterm, in which you can use the function keys. Each key can be used for three different commands by using the Shift and Control modifiers. Note that the order of the lines is important: Shift<key>, Ctrl<key>, <key>. Type man xterm for more information on xterm. 9 set function keys for a "winterm" UNIX shell - type cd to change to your home directory - edit (e.g. vi) the file keymap - enter your personal key functions e.g.: F1(shift): send("lpstat -t") F1(control): send("ps -fulp") F1(): send("ps -ef | grep xwin") F2(shift): send("cd ‘curd -a‘") F2(control): send("/etc/init.d/bruker_lmgr stop") F2(): send("/etc/init.d/bruker_lmgr start") - edit (e.g.