------------------------------------------------------------------------------- Also see "User.hints", for general usage information ------------------------------------------------------------------------------- XLogout Button (Wait for User Press) XLogout Button The following will wait until the user presses a button and then exits. Its purpose is to stop Xsession scripts exiting until the user wishs to logout and as such are XLogout button applications. Rather than creating a specific X application to do this, I prefer to subvert an existing X applications. Xmessage Logout (any button press exist application) exec xmessage -name xlogout -title xlogout \ -geometry $position -fg "$fg" -bg "$bg" \ -buttons "" -xrm '*message.borderWidth: 0' \ -xrm '*message.scrollVertical: false' \ -xrm '*Font: -*-new cent*-bold-r-normal--24-*' \ -xrm 'xlogout*.displayList: ' \ -xrm 'xlogout*baseTranslations: #override : exit(0)' \ Logout XLabel (simple athena widget application) using bitmap! exec xlabel -name xlogout -title xlogout \ -g "$size$position" -bg "slategrey" -fg "black" \ -xrm "*bitmap: $bitmap" \ -xrm '*baseTranslations: #override : quit()' Emergency Button (xlogo -- which is available on all systems) Exit on mouse press anywhere in xlogo window! xlogo -g 32x32-5-5 -fg gold -bg firebrick \ -xrm 'XLogo*baseTranslations: #override : quit()' For more of these look at my "xlogout" script that creates logout buttons using many different programs ------------------------------------------------------------------------------- PostItNotes without the multiple icons (use an Icon Manager) (old 1988) I solved it for our users through the use of a twm Icon manager. Now almost (98%) all of our users use postit notes. The topbox is about 32x32 pixels and sits next to the xmail icon. (or in my case, I sit the xmail icon on top os a slightly larger postitnote topbox). Under this a icon manager exists, showing all the titles of the various postit notes the users have. Some users have only one or two postsit notes in the icon manager, avaialable at the push of a button. A friend has about 40 of them!. Here is the code in the system.twmrc (or users .twmrc file) that makes postitnotes managable. -----CUT--HERE----- IconManagerFont "6x9" # Font of postitnote manager (can be larger) # # Icon Managing PostItNotes # NoTitle { "xpostit" "PostItNote Icon Manager" } # don't title manager or topbox IconManagers { "PostItNote" "=100x1-184+5" 1 } # one column of postits StartIconified { "PostItNote" } # start in iconic mode only IconifyByUnmapping { "PostItNote" } # don't map them manage them -----CUT--HERE----- ------------------------------------------------------------------------------- Clipboard and Cut Buffers These are stored in the X Windows Server in the form of properities (atoms). You can also see these using "xprop". Note: Applications will generally hold larger selections as there is more information than can be held by a X server atom. "xsel" has a '-k' that does this (especially for the primary cut buffer), while "xclip" seems to handle this automatically. A clipboard manager will take over the CLIPBOARD allowing applications to close. NB: xselection should be depreciated as it is a non standard install Clipboard Manager xclipboard -- Yuck too bare bones xcutsel -- primative GUI for copy between to/from cutbuffers clipit -- GTK+ clipboard manager parcellite -- Basic Feature clipboard manager ** preferred ** Notes... xsel has output & primary as its default options -- prefered xclip has input & primary as its default options but it is silent on option errors makign mistakes too easy! xselection is obsolete and often not available Examples... Output from clipboard xsel -b xsel --clipboard xclip -o -sel c xclip -o -selection clipboard xselection CLIPBOARD clipboard clients... parcellite -c clipit -c Input text to clipboard echo "in" | xsel -i -b echo "in" | xsel -i --clipboard echo "in" | xclip -sel c echo "in" | xselection -replace CLIPBOARD - clipboard clients echo "in" | parcellite -c >/dev/null echo "in" | clipit -c >/dev/null Output from primary xsel xclip -o xselection PRIMARY clipboard clients parcellite -p clipit -p Primary -> Clipboard (Macro copy clipboard from xterm W-c ) xsel | xsel -i -b xclip -o -sel p | xclip -sel c xclip -o -selection primary | xclip xselection PRIMARY | xselection CLIPBOARD - Clipboard -> Primary xsel -b | xsel -i xsel -b | xsel -i -k xclip -o -sel c | xclip -sel p xselection CLIPBOARD | xselection PRIMARY - Type clipboard as a keyboard macro (using personal script_ xclip -o | keyboard_macro - xsel -b | keyboard_macro - File Coping xclip provides some shell scripts to copy/paste files via secondary buffer using a temporary gzipped tar format to preserve filenames and contents. xclip-copyfile [-p] file... xclip-cutfile [-p] file... xclip-pastefile The -p preserves the given path (relative or absolute) Example echo "A file created on ${HOSTNAME}" > testfile xclip-copyfile testfile go to another machine xclip-pastefile How compatible this is with file managers is not known. ------------------------------------------------------------------------------- XTerm name settings -name "Application Name" (defaults to "xterm" (regardless of -n or -T) ) -T "Title Name" ( defaults to the command name exec'd -n "Icon Name" otherwise defualts to application name ) NOTE: -n DOES NOT set the application name period. ------------------------------------------------------------------------------- XTerm Resource XTerm*pointerShape: bitmap This works (on SCO at least), but the bitmap mask must be called bitmapMask ------------------------------------------------------------------------------- XMail Resize XMail.geometry: +280+100 XMail*indexWindow.preferredPaneSize: 80 XMail*textWindow.preferredPaneSize: 600 XMail Icon change This is a tricky business. Note the two separate icon gemoerty parts XMail*iconic: True XMail*iconGeometry: -112+14 XMail.icon*geometry: 64x64 XMail.icon*noMailFlag: mail/mailbarrel.xbm XMail.icon*mailFlag: mail/mailbarrel.full.xbm ------------------------------------------------------------------------------- Framemaker invert display colors Maker.colorDocs: False Maker.colorImages: False Maker*foreground: white Maker*background: black Maker*winRect.foreground: white Maker*docBackground: black ------------------------------------------------------------------------------- To use xv to display a file on a root window the following is useful -root use root window -quit display one filename and quit -noresetroot do not reset root to weave pattern while working -rmode n mode to display : default is tile (n=0) -max expand image to fill screen -smooth smooth out expanded image (ultra slow) See other XV help in info/graphics/xv.hints and info/graphics/xv_mod.hints ------------------------------------------------------------------------------- Asterix Mail problem Some Asterix users have pointed out that if mail is received whilst running Asterix, Asterix will pop-up a notification window. As we don't have the Asterix mail software, it allows you to do no more. Below is the procedure for users to turn off this mail notification, as I would imagine it would become quite annoying... 1. From the * menu on the Asterix Window select the "Run Macro" menu item. This will display a prompt for a macro name. 2. Type in the name "Mail_prefs_dlg@" (without quotes) at the prompt, then click on OK. This will bring up a dialog window with various options to set. 3. Unselect the option "Display Notifier Window" by clicking on the box next to that option. 4. Unselect the option "Automatically Import System Mail". 5. Set the "Don't Beep" option 6. Once these options have been changed, click on OK. This will return you to the Asterix window. Once you have done this, you will no longer see a notification window when you receive mail. --- Troy Baalham. ------------------------------------------------------------------------------- Set XMosaic's home page depending on the login client. ! ! Set the default home page for xmosaic ! ! the homepage based on current machine #define kurango 1 #define lyrch 2 #define dragon 3 #define sisyphus 3 #if CLIENTHOST == kurango ! use school information server locally (kurango) Mosaic.homeDocument: http://localhost/ #else # if CLIENTHOST == lyrch ! use sysprog information area locally (lyrch) Mosaic.homeDocument: http://localhost/ # else # if CLIENTHOST == dragon # undef lyrch ! use sysprog information area remotely Mosaic.homeDocument: http://lyrch.cit.gu.edu.au/ # else ! all other systems ! use school information server remotely Mosaic.homeDocument: http://www.cit.gu.edu.au/ # endif # endif #endif #undef lyrch #undef dragon #undef kurango -------------------------------------------------------------------------------