|News||Recommended Links||Minitutorial||Architecture||X display manager||XDMCP||Troubleshooting|
|Configuration||Fonts in X||Exporting_display||Xdefaults||Using xauth|
What is the X Window System?
The X Window System is a client-server windowing system that works independently from an operating system. It was originally developed by Project Athena at MIT and is now owned and didtributed by a non profit organization called the X Consortium Inc.
In the X Windows world, the hardware through which you communicate with your programs (ie. the keyboard, the mouse, screens, ...) is called a display, and is controlled by a piece of software called an X Window Server. To establish communication with a person, a program (called a client) connects itself to this server through some comunication channel.
Client software talks with the server through a predefined set of message formats called the X Window System Protocol. Messages sent by a client are called requests, since they request actions by the server or information from it. Messages sent by the server to its clients are either responses that provide the requested information or feedback on the success or failure of the requested action, or events that tell the client that some event it might be interested in has taken place.
In conclusion, the X Window System is a windowing platform independent of the operating systems on the machines on which it runs. This means that a client program running under UNIX can use an X server running under DOS or some other operating system.
The window manager in X Windows is a special client that provides the set of features that produce the look and feel of the window system. These features include the window layout, the window borders, the way windows are created, how windows are moved, keyboard mappings, color mappings, onscreen menus, and so on. When a client needs to create a new window, the client and the server ask the window manager how this window should be displayed. Since the window manager is just a client, you can replace one window manager with another to change the look and feel of your window system.
Window managers available:
There are more than 20 different window managers for the X Window System. the most commonly used window managers include:
You can customize the menus and actions of your window manager. However, before doing so, you should spend more time using it and you should read the appropriate manual page. You will find directions on customizing the window manager on its manual page.
Your actual work session under the X Window System is controlled by a session script. Under xdm(1), the session script is taken form an executable file called .xsession in your home directory. You make a file executable using the command: chmod +x file.
#!/bin/sh PATH=$PATH:/usr/local/X11R5/bin twm & xmotd -geometry 500x600+5+5 xclock -digital -geometry 215x50-5+5 & xbiff -geometry 90x50-230+5 & xterm -n `hostname` -geometry 80x40+5+375 & exec xterm -n "[email protected]`hostname`" -geometry +5+5 -ls
I'll explain this line by line:
Now how do I change the default settings of my favorite applications?
Every application or object in the X Window System has an individual name, which may be individually set for each instance of the object, and a class name, which is usually fixed and the same for all objects in the class. This may sound a litte bit confusing so let's look at a specific example: let's say you have an xterm named login. If you only want to modify the resources of your login xterm, then you'll have to use its individual name, login. In the other hand, if you want to modify the resources of all xterms, then you'll need to use the class name, XTerm. The values of resource variables are usually specified in the form:
Let's say we want to enable the scrollbar:
name: specifies the application name or the name string that restricts the resource assignment to that application or to a component of an application. If this argument is not specified, the resource assignment is globally available to all X applications.
- resource: specifies the X resource.
! ! XTerm resources ! XTerm*scrollBar: On XTerm*saveLines: 500 XTerm*background: black XTerm*foreground: lightskyblue XTerm*borderColor: lightslateblue XTerm*cursorColor: royalblue XTerm*pointerColor: lightslateblue ! ! XClock resources ! XClock*background: royalblue XClock*foreground: linen XClock*analog: False
But how do I find out the resources available for customizing an application?
This could be a tough question. Most of the time, you'll find the necessary information in the application's online manual page. If you don't, then you can try using one the following commands and see what you can find:
Please consult the appropriate online manual page to learn about the usage and syntax of the commands listed above.
As a last resort, you can check the /usr/local/X11R5/lib/X11/app-defaults directory and see if you can find a sample resource file associated with the application you are trying to customize.
Can I change the resources of an application that is already running?
If editres(1) can get the widget tree of the application in question then you are in buisness. If not, then you'll have to quit the application, modify the resources then start the application again.
Editres is a great way to customize xterms. It'll let you change the font, colors, title and then some. Again, to learn how to use editres, please read its online manual page.
Can I set resources using command line options?
Sometimes you might want to start up an application with special resources, or maybe want to override some of the default resources. For these reasons, most X Widnows applications communicate with the shell command line and accept various command line arguments. These options are often listed in the application's online man page.
xterm -xrm 'XTerm*title: Login' -xrm 'XTerm*foreground: lightbluesky'
will start an xterm 80 columns wide by 40 rows long with its lower left corner 5 pixels away from the left and bottom edges of the screen.
will start an xclock 250 pixels wide by 50 pixels long with its upper right corner 5 pixels away form the right and top edges of the screen.
How do I find out which colors are available?
You can use the xcolors application to view the different colors and their colorname. Or you can list the colornames and their RGB values using the showrgb command.
How can I a choose fonts for my applications?
The X Window System offers hundreds of fonts for the display of text in various character sets and styles. You can use the xlsfonts utility to list the fonts available. You can also use xfontsel to display fonts. For more information on these commands, please read their online man pages.
How do I remap the keys on my keyboard?
There are several utilities that help you remap keys on your keyboard. The most popular ones are xmodmap and xkeycaps (basically a graphical front-end to xmodmap). This may sound redundant but to learn more about the usage of these commands, please consult their online man page.
You can create a file with a name like .xmodmaprc that includes all your bindings. Then type xmodmap .xmodmaprc to load your mappings. Here is a sample .xmodmaprc file:
! ! make shift-, be < and shift-. be > ! keysym comma = comma less keysym period = period greater ! ! swap Caps_Lock and Control_L ! remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L
How can I change the keyboard or the mouse cursor speed?
Description of common error messages
setenv DISPLAY displayname:0.0
If you don't know your displayname, then you can type the who am i
command and look for something that looks like name.seas.smu.edu:0.0 in the output.
Jan 26, 2013 | sanctum.geek.nz
A certain piece of very misleading advice is often given online to users having problems with the way certain command-line applications are displaying in their terminals. This is to suggest that the user change the value of their
TERMenvironment variable from within the shell, doing something like this:$ TERM=xterm-256color
This misinformation sometimes extends to suggesting that users put the forcedAccounting for differences
TERMchange into their shell startup scripts. The reason this is such a bad idea is that it forces your shell to assume what your terminal is, and thereby disregards the initial terminal identity string sent by the emulator. This leads to a lot of confusion when one day you need to connect with a very different terminal emulator.
All terminal emulators are not created equal. Certainly, not all of them are
xterm(1), although many other terminal emulators do a decent but not comprehensive job of copying it. The value of the
TERMenvironment variable is used by the system running the shell to determine what the terminal connecting to it can and cannot do, what control codes to send to the program to use those features, and how the shell should understand the input of certain key codes, such as the Home and End keys. These things in particular are common causes of frustration for new users who turn out to be using a forced
Instead, focus on these two guidelines for setting
- Avoid setting
TERMfrom within the shell, especially in your startup scripts like
.bash_profile. If that ever seems like the answer, then you are probably asking the wrong question! The terminal identification string should always be sent by the terminal emulator you are using; if you do need to change it, then change it in the settings for the emulator.
- Always use an appropriate
TERMstring that accurately describes what your choice of terminal emulator can and cannot display. Don't make an
rxvt(1)terminal identify itself as
xterm; don't make a
linuxconsole identify itself as
vt100; and don't make an
xterm(1)compiled without 256 color support refer to itself as
In particular, note that sometimes for compatibility reasons, the default terminal identification used by an emulator is given as something generic like
xterm, when in fact a more accurate or comprehensive terminal identity file is more than likely available for your particular choice of terminal emulator with a little searching.
An example that surprises a lot of people is the availability of theConfiguring your emulator's string
puttyterminal identity file, when the application defaults to presenting itself as an imperfect
Before you change your terminal string in its settings, check whether the default it uses is already the correct one, with one of these:$ echo $TERM $ tset -q
Most builds of
rxvt(1), for example, should already use the correct
TERMstring by default, such as
rxvt-unicode-256colorfor builds with 256 colors and Unicode support.
Where to configure which
TERMstring your terminal uses will vary depending on the application. For
.Xresourcesfile should contain a definition like the below:XTerm*termName: xterm-256color
rxvt(1), the syntax is similar:URxvt*termName: rxvt-unicode-256color
Other GTK and Qt emulators sometimes include the setting somewhere in their preferences. Look for mentions of
xterm, a common fallback default.
For Windows PuTTY, it's configurable under the "'Connections > Data"' section:
More detail about configuring PuTTY for connecting to modern systems can be found in my article on configuring PuTTY .Testing your
On GNU/Linux systems, an easy way to test the terminal capabilities (particularly effects like colors and reverse video) is using the
msgcat(1)utility:$ msgcat --color=test
This will output a large number of tests of various features to the terminal, so that you can check their appearance is what you expect.Finding appropriate
On GNU/Linux systems, the capabilities and behavior of various terminal types is described using
terminfo(5)files, usually installed as part of the
ncursespackage. These files are often installed in
/usr/share/terminfo, in subdirectories by first letter.
In order to use a particular
TERMstring, an appropriate file must exist in one of these directories. On Debian-derived systems, a large collection of terminal types can be installed to the system with the
For example, the following variants of the
rxvtterminal emulator are all available:$ cd /usr/share/terminfo/r $ ls rxvt* rxvt-16color rxvt-256color rxvt-88color rxvt-color rxvt-cygwin rxvt-cygwin-native rxvt+pcfkeys rxvt-unicode-256color rxvt-xpmPrivate and custom
If you connect to a system that doesn't have a
terminfo(5)definition to match the
TERMdefinition for your particular terminal, you might get a message similar to this on login:setterm: rxvt-unicode-256color: unknown terminal type tput: unknown terminal "rxvt-unicode-256color" $
If you're not able to install the appropriate terminal definition system-wide, one technique is to use a private
.terminfodirectory in your home directory containing the definitions you need:$ cd ~/.terminfo $ find . ./x ./x/xterm-256color ./x/xterm ./r ./r/rxvt-256color ./r/rxvt-unicode-256color ./r/rxvt ./s ./s/screen ./s/screen-256color ./p ./p/putty-256color ./p/putty
You can copy this to your home directory on the servers you manage with a tool like
scp:$ scp -r .terminfo server:
Terminal multiplexers like
tmux(1)are special cases, and they cause perhaps the most confusion to people when inaccurate
TERMstrings are used. The tmux FAQ even opens by saying that most of the display problems reported by people are due to incorrect
TERMsettings, and a good portion of the codebase in both multiplexers is dedicated to negotiating the differences between terminal capacities.
This is because they are "terminals within terminals", and provide their own functionality only within the bounds of what the outer terminal can do. In addition to this, they have their own type for terminals within them; both of them use
screenand its variants, such as
It's therefore very important to check that both the outer and inner definitions for
TERMare correct. In
.screenrcit usually suffices to use a line like the following:term screen
.tmux.conf:set-option -g default-terminal screen
If the outer terminals you use consistently have 256 color capabilities, you may choose to use the
If you follow all of these guidelines, your terminal experience will be much smoother, as your terminal and your system will understand each other that much better. You may find that this fixes a lot of struggles with interactive tools like
vim(1), for one thing, because if the application is able to divine things like the available color space directly from terminal information files, it saves you from having to include nasty hacks on the
t_Covariable in your
.vimrc. Posted in Terminal Tagged term strings , terminal types , terminfo
Thoughts on Technology
Klipper/Copy & Paste Manager
I use this one alot when I am either coding or writing a research paper for school. More often than not I find I have copied something new only to discover I need to paste a link or block of code again from two copies back. Having a tray icon where I can recall the last ten copies or so is mighty useful.
Most anyone who uses the computer in their everyday work will tell you that less mouse clicks means faster speed and thus (typically) more productivity. Gnome-Do is a program that allows you to cut down on mouse clicks (so long as you know what program you are looking to load). The jist of what it does is this: you assign a series of hot keys to call up the search bar (personally I use control+alt+space) and then you start typing in the name of an application or folder you want to open and it will start searching for it - once the correct thing is displayed all you need to do is tap enter to load it up. The best part is that it remembers which programs you use most often. Meaning that most times you only need to type the first letter or two of a commonly used application for it to find the one you are looking for.
Often it is necessary to change the escape sequences generated by
xtermwhen function keys are pressed, in order to match what an application expects. For example, this is very common for Oracle applications. Here's a way to do this.
xtermas follows where the escape sequences for F1, F2, and F3 have been redefined. Also, start an application called
appl.sh./usr/openwin/bin/xterm -name appl -xrm \ '/* F1=Exit F2=Clear Record F3=Back Tab */ runlod*VT100.translations: #override\n\ <Key>F1: string(0x1b) string("OS")\n\ <Key>F2: string(0x1b) string("[32~")\n\ <Key>F3: string(0x1b) string("OP") string(0xff09)' \ -e appl.sh
Xwindows on Solaris Tips
Copy and zip your favourite MS fonts from the nearest Windows box, a good start would be Arial, and Verdana, this will improve the look of most websites considerably.
On the Solaris box unzip the fonts into a temporary directory, using the -L switch ensures that the font names are lower case.
#unzip -L arial.zip
in the same directory run
This is a GUI tool, so just select the new fonts and click Install, the fonts will be installed in $HOME/fontadm_fonts. Earlier versions of this tool were reported to be unreliable, but the Sol9 version has worked everytime for me.
Google matched content
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Haterís Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D
Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to to buy a cup of coffee for authors of this site|
Last modified: February, 19, 2020