Home
Up

X Window
...Installing, configuring the X server
...Restarting the X server
...No graphical login manager
...Automatic login
...GDM nest

Window Managers
...FVWM
.......FVWM build
......FVWM's configuration file
......My FVWM configuration
......Background images
......IIIM Properties
......System tray
...Gnome
...XFCE4

X Terminals
...ATerm
...ETerm
......Solaris Installation Tips
...Mrxvt
......OpenSolaris Installation Tips
......Default properties for Mrxvt
...Unicode Rxvt
......Compiling Urxvt on OpenSolaris
......Default properties for Urxvt
...XTerm

Conky
Fonts
Mouse Pointer
X Window tools
...Xwininfo
...Xwd
...Xmodmap
This page gathers information concerning the configuration of X Window servers for various Unix hosts.
Those notes provide commands or tips relative to Debian / Ubuntu only.
Those notes are for Solaris / OpenSolaris only.

X Window

Installing, configuring the X server

Xorg.conf needs to be configured in the following situations:
  • installation of the video card (refresh rates etc) !
  • support of Wacom Tablet
  • support of new fonts
It's usually nice to install x-window-system-core and x-window-system to set up X Window. Then, configure it using :
dpkg-reconfigure xserver-xfree86

Also check the file /etc/X11/XF86Config-4

restarting the X server

OpenSolarisDebian/Ubuntu
svcadm disable gdm and then svcadm enable gdmctrl alt backspace

No graphical login manager

OpenSolarisDebian
svcadm disable gdmremove /etc/rc?.d/S99xdm and S99kdm to make sure XDM or KDM are not loaded at boot

Automatic login

Run gdmsetup (as root) or in /etc/X11/gdm/custom.conf:

AutomaticLoginEnable=true
AutomaticLogin=username

GDM nest

# /usr/bin/gdmXnest -query 192.168.0.20 --xnest=-display 192.168.0.2:0.0

Window Manager

To know which Window Manager you are using currently, do:
$ wmctrl -m
Name: FVWM
Class: fvwm
PID: N/A
Window manager's "showing the desktop" mode: N/A
or
$ echo $DESKTOP_SESSION 
fvwm

Gnome

Solaris OpenSolaris 2009.06 Debian Ubuntu
Provided in the Java Desktop Environment Yes Yes.
  • to set power management: Applications -> Debian -> Apps -> System -> Gnome -> Gnome Control Center, power management.
  • to set default browser and mailer: launch Gnome Control Center, preferred applications
  • for automatic login: Desktop -> Administration -> Login Windows Preferences -> Security -> enable automatic login
To install a screenlet, install the screenlet package:
sudo apt-get install screenlets
screenlets-manager &
The location where we have the scripts to run for each menu in gnome is in /usr/share/applications.

Gnome is a major Unix desktop, probably as famous as KDE. Depending on operating systems and versions, its default look may be a bit "strict". The main problem I see with it is that it is heavy.

One of my former desktops used the following:

  • Theme: BlackGarden theme. You have to install the theme with Preferences > Desktop Preferences > Display > Themes. Fetch the tar.gz, then close and reload the theme manager to see BlackGarden. The install procedure actually untars the theme in ~/.themes.
  • Gnome-terminal: transparency's throttle is set to the middle.
  • Icon bar: with weather, sticky notes, log out, two launchers (terminal & firefox). The bar's properties are set to: don't expand, show hide buttons.

To use GNOME's screensaver, launch: gnome-screesaver (without &). Then, to lock, do gnome-screensaver --lock

To launch an application as root: gksu

To control sound level: gnome-volume-control

Enlightenment

Solaris 10 OpenSolaris 2008.11 Debian Ubuntu
Tested both on x86 and Sparc. Not tried (but should work) Yes

You can download Enlightenment themes from Get-E. My favorite themes are :

  • Bevelfree: coloured, simple with no 3D.
  • Dufrenite: nice, but a bit 'gray'.
  • Thingradient
  • XaquaX: an Apple look

Enlightenment shows customizable menus. To edit the menus, look for a file called files.menu in ~/.enlightenment. Buttons are configured in the theme as buttons.cfg. Usually, you set action classes (actionclasses.cfg). Make sure they use the right path.

FVWM

I like FVWM because it is quite lightweight. However, the look and feel of FVWM 2.4 is a bit 'old' (to my opinion), so I wanted to use FVWM 2.5. Since then, a version 2.6 is out, but I haven't tried it.

Installing FVWM

OpenIndiana Solaris 10 OpenSolaris 2009.06 Debian Ubuntu Linux Mint
Compile from sources using ./configure -disable-xinerama -disable-bidi No pre-compiled package: I managed to compile it from sources though I remember I had a few problems No pre-compiled package. Compiles easily from sources: ./configure -disable-dmalloc -disable-efence -disable-debug-msgs -disable-xinerama -disable-nls There's a package for it There's a package for 2.5.24 ./configure --disable-xinerama --disable-bidi --disable-nls --disable-iconv
In .xinitrc, put:
xterm &    
fvwm  

I currently use fvwm 2.6.5.

FVWM's configuration is usually located in a file named .fvwm2rc or .fvwmrc. In my case, it is located in .fvwm/config.

FVWM's configuration file

Setting an environment variable with SetEnv. The shortcut $. means the current FVWM directory. It is possible to access shell variables with $[NAME]. Environment variables may also initiate commands.
SetEnv	fvwm_img		$./img/
SetEnv	fvwm_wallpaper_dir	$[HOME]/images/backgrounds
SetEnv	fvwm_term		"xterm -sb -sl 1200"
Setting a window as sticky (i.e will be shown on all desktops) requires its title and the keyword sticky.
Style   crocbar Sticky
Including other configuration files:
Read	$./conf/style.fvwm2rc
Disabling the splash banner at startup: make sure the FvwmBanner module is commented.
#+ I module	FvwmBanner
To launch things at startup (or exit) add them to InitFunction, StartFunction and ExitFunction. StartFunction is called each time FVWM is started or restarted. An example of InitFunction is displayed below. Note the screensaver (xscreensaver package) will only work if the no-splash option is specified.
AddtoFunc InitFunction
+ I exec exec	fvwm-root -r $[fvwm_wallpaper_dir]/.current
+ I exec exec	xscreensaver -no-splash
Iconify applications with a screenshot: the idea is to manually take a bad quality screenshot of the application you are iconifying when iconifying is requested. The image is stored in a temporary directory and used as the application's icon.
SetEnv fvwm_icon_size	150
DestroyFunc	Thumbnail
AddToFunc	Thumbnail
+ I Raise
+ I SetEnv Icon-$[w.id] $[w.IconFile]
+ I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
    "xwd -silent -id $[w.id] | convert -scale $[fvwm_icon_size] -quality 0 \
    xwd:- png:/dev/shm/icon.tmp.$[w.id].png; \
    composite -geometry +5+5 $[w.IconFile] \
    /dev/shm/icon.tmp.$[w.id].png /dev/shm/icon.tmp.$[w.id].png; \
    echo WindowStyle IconOverride, Icon /dev/shm/icon.tmp.$[w.id].png"
+ I Iconify

DestroyFunc	DeThumbnail
AddToFunc	DeThumbnail
+ I PipeRead "echo WindowStyle IconOverride, Icon \\$\\[Icon-$[w.id]\\]"
+ I UnsetEnv Icon-$[w.id]
+ I Exec exec "rm -f /dev/shm/icon.tmp.$[w.id].png"
FVWM's pager is handled by the FvwmPager module. To set up a vertical pager, do:

*FvwmPager: Columns	    1
If you enjoy configurable button bars (for example, similar to Windows' bottom bar with the Start Menu), you should consider using the FvwmButtons module which groups buttons in a configurable way. PEM's config provides a pre-configured topbar and a dockbar.
#Read	$./conf/topbar.fvwm2rc
Read	$./conf/dock.fvwm2rc
Alternatively, you might be interested in my husband's CrocBar. With FVWM, several key and mouse bindings can be configured. For example, to have the FVWM main menu show when one clicks on the root frame in any desktop:
Mouse	1	R	A	Menu MenuFvwmRoot
  • The first number specifies the button of the mouse (1=left click, 2=middle button, 3=right click, 4=wheel down, 5=wheel up).
  • The second parameter specifies the window the action applies to (R=root window, T=title bar of the window).
  • The third parameter corresponds to when the binding should be enabled (A=Always).
# display window list when middle button is clicked
Mouse	2	R	A	WindowList NoCurrentDeskTitle

# move to desktop on the right when scrolling with mouse button upwards
# move to the left when scrolling down.
Mouse	4	R	A	GoToDesk +1 0 3
Mouse	5	R	A	GoToDesk -1 0 3

# iconify the window if the mouse clicks on the iconify button of the window
Mouse	1	I	A	Iconify

# shade the window if you scroll down with the mouse on the title of the window
Mouse	4	T	N	WindowShade	True
Setting up a specific layout for given programs is to be configured using a Style command. For example, if I wish no title bar by default for unknown programs, then:
Style Untitled		NoTitle
But I don't like that, so I actually commented this line ;) To set up the colors of the window titles, this must be done by defining colorsets. There are pre-defined numbers for colorsets, and for instance, inactive windows get colorset 0, while the active one has colorset 1. This defines the colorset for active windows with the window title written in light yellow, and the window title background in orange. I used the hexadecimal representation of colors, but it's possible to specify RGB colors, or just the name (orange, red etc) if it's a plain color.
Colorset 1 fg #f3ebb4, bg #f17f3a
This defines a transparent colorset for inactive windows:
Colorset 0 fg #93cb1b, bg #3f633f, RootTransparent Buffer, Tint #000000 20
Globally, the window title is dark green, but it is transparent and slightly tinted in black (000000).
Colorset 0 for inactive windows and 1 for active windows are actually set that way:
Style *	Colorset 0, HilightColorset 1
Style *	BorderColorset 0, HilightBorderColorset 1
It is also possible to specify other parameters such as the width of the border, and the handles to shrink or grow the window:
Style * Borderwidth 3, HandleWidth 5
The font of the window title can be specified:
Style * Font "-*-clean-bold-*-*-*-16-*-*-*-*-*-*-*"
Use something your system supports (select with xfontsel). Of course, one can specify where to put the window title. If you don't want it on top of the window, but on the left, then it's that way:
Style * TitleAtLeft
To specify the number of buttons one wishes on the window, this is done that way:
Style *	Button 1, Button 2, Button 4, Button 6, GrabFocusOff
where I say I want buttons 1, 2, 4 and 6, where those numbers correspond to the position of buttons on the window. Then, it's possible to specify the buttons to show in each position. For example, this specifies the icon image to use for the iconify button.
+ AddButtonStyle    6	    Active	Pixmap $[fvwm_theme_img]/iconify_activeup.xpm -- flat
+ AddButtonStyle    6	    Inactive	Pixmap $[fvwm_theme_img]/iconify_inactive.xpm -- flat

My FVWM configuration

A screenshot of my current desktop. It is very much taken from PEM. It also features the Crocbar.

Initially, my FVWM configuration is taken from PEM. He splits his FVWM configuration in a main "config" file that loads other .fvwm2rc files such as:
  • ./conf/animate.fvwm2rc for animations, in particular when iconifying a window.
  • ./conf/dock.fvwm2rc for the FvwmDock. In my configuration, my dock consists only of a small vertical pager.
  • ./conf/menu.fvwm2rc to define the system menus. They are transparent.
  • ./conf/pager.fvwm2rc to define the pager. In my case, I have 4 desktops.
  • ./conf/style.fvmw2rc for general style definitions of common applications.
  • the ./deco directory contains the look and feel of windows, with their colors and buttons. Each look and feel corresponds to a sub-directory of deco. And then in the main config file, you just need to specify the name of that directory as the fvwm_theme. In that case, I built my own theme, named Pico. The buttons are actually taken from another FVWM configuration I can't remember which one. I made the buttons transparent.
  • there's a script directory there with plenty of things you can have FVWM do, though I do not personally use those, except for the wallpaper script.
So, I customized this FVWM configuration to have:
  • full orange color active windows but transparent inactive window titles (slightly tinted)
  • transparent - tinted - menus and submenus
  • a transparent dock with a vertical pager
  • window titles on the left with a settings button, and on the other side, iconify, maximize and close buttons
  • when I iconify my windows, it takes a screenshot of them. I didn't do that myself, it's a script I found on the web. I think it's from taviso.
  • my windows can also roll to their window title. I like that
The rest of the features of my desktop actually come from the Crocbar. My FVWM environment starts 2 crocbars. One crocbar on the right, with the time, action buttons and various widgets. Another crocbar on the bottom left, with a slideshow, 2 xbiffs and a random image viewer. Of course, those are features of the crocbar. I actually put those crocbar as sticky, and they are transparent so that it looks like they are on the root window.
My FVWM configuration here.

FVWM Root

To modify the background image:
fvwm-root Image.png
If your FVWM config uses a background menu, you can create a thumbnail for your background image with convert:
convert -quality 0 -resize 48 Image.png Thumb.png

IIIM Properties

On OpenSolaris, I kept on having a silly and ugly small tab next to my Xterms, this tab showing various locales/encodings. To remove this, launch iiim-properties, and set Input Method and switcher placement to "None". Apply.

System tray

To have a system tray in FVWM, install stalonetray

XFCE4

To run the XFCE panel, run: xfce4-panel
To enable Window Manager Tweaks:
  • modify wmtweaks.xml
      
    mousepad ~/.config/xfce4/mcs_settings/wmtweaks.xml
    
  • set 'Xfwm/UseCompositing' to 1.
Then, in Applications/ Settings/ Settings Manager, find "Window Manager Tweaks". To lock the screen, XFCE4 relies on xscreensaver. If you want to use something else, modify the script /usr/bin/xflock4. For example, to use xlock:
xlock $*
to show xfce-terminal menubar:
xfce4-terminal --show-menubar &

X Terminals

aterm

Afterstep terminal.
Debian package: aterm. To launch a nice transparent terminal, try
aterm -tr -trsb -bg black -fg white -sh 40 -fade 25

Eterm

Solaris OpenSolaris 2008.11 Debian Ubuntu
No precompiled package. Compile from sources Not tried

Eterm is a terminal particularly suited for use within Enlightenment. There are specific Eterm themes here

Solaris Installation Tips

  • Download, build and install libAST. Unless a special directory has been specified for configure (./configure –prefix=...), libAST installs in /usr/local (this is not the usual Solaris method).
    export PATH=/usr/sfw/bin:/opt/csw/bin:/usr/sbin:/usr/bin::/usr/openwin/bin:/usr/ccs/bin:.
    export MAKE=gmake
    make
    
  • Download Eterm. Add /usr/local/lib to your LD_LIBRARY_PATH so that it finds libAST.
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export PATH=/usr/sfw/bin:/opt/csw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ccs/bin:.:/usr/local/bin
    export MAKE=gmake
    
  • Install imlib2
    /opt/csw/bin/pkg-get install imlib2
    
  • Configure Eterm, specifying the right path for Imlib2 (/opt/csw in my case – note you mustn't specify /opt/csw/lib). ./configure --with-imlib=/opt/csw
  • Compile Eterm
    make
    
  • Install Eterm: the Makefile of bg needs to be fixed: at the end of the Makefile, the lines that call install-sh for the various images is wrong: add a '..' so that gets install-sh from the right directory.

Mrxvt

Solaris OpenSolaris 2008.11 Ubuntu
Download here
Mrxvt is a nice terminal, with support for transparency and tabs (though I usually do not use tabs !). The only problem is that is doesn't support unicode yet, so French accents are quite ugly.

OpenSolaris Installation Tips

I recommend:
  • set the installation in /usr directory, because Solaris does not commonly use /usr/local.
  • disable support for Greek (unless you need it). On my system, it bugged and whenever I typed a pipe, it would switch to Greek encoding !
  • set the terminal name to xterm (and not rxvt) on Solaris. Otherwise it'll complain about not having the right termcap. Unless you know better than me how to install termcap and terminfo on Solaris, then do install them (they're providing in the package).
  • ./configure --prefix=/usr --enable-xft --disable-greek --with-save-lines=1000 --with-term=xterm --disable-debug
    

My default properties

Set the following properties in ~/.Xdefaults:
mrxvt*vt0*saveLines:   1000
mrxvt*loginShell:   false
mrxvt*scrollBar:   true
mrxvt*scrollbarStyle: rxvt
mrxvt*transparent:   true
mrxvt*shading: 85
mrxvt*transparentScrollbar: false
mrxvt*transparentTabbar:    true
mrxvt*transparentMenubar:   true
mrxvt*background:   darkblue
mrxvt*backgroundFade:   60
mrxvt*fading:      0
mrxvt*tabForeground:   lightgreen
mrxvt*itabForeground:   lightgreen
mrxvt*itabBackground:   black
mrxvt*bottomTabbar:   true
mrxvt*windowsSwitch:   false
mrxvt*showMenu:      false
mrxvt*hideButtons:   false
mrxvt*xft:      true
mrxvt*xftFont:      DejaVu Sans Mono
mrxvt*xftmFont:      DejaVu Sans Mono
mrxvt*xftWidth:      normal
mrxvt*xftSize:      12
mrxvt*cursorBlink:   false
mrxvt*geometry:      80x25
mrxvt*cursorColor:   red

Unicode Rxvt

OpenIndiana Solaris OpenSolaris 2008.11 Ubuntu
pkg install pkg:/terminal/urxvt CVS to checkout

URxvt is a unicode rxvt... so it supports French accents ! It also supports transparency. However, I currently experience a slight bug (?) related to the terminal's size. Looks like it does not know/handle very well its height.

Compiling Urxvt on OpenSolaris

  
$ ./configure --prefix=/usr/share --enable-xft --enable-font-styles --enable-transparency --enable-fading --enable-rxvt-scroll --enable-next-scroll --enable-xterm-scroll --enable-mousewheel --enable-smart-resize --enable-text-blink --enable-keepscrolling --enable-selectionscrolling --with-term=xterm --with-x --disable-perl
$ make
$ make install

I had to fix the man page directory: they were put in /usr/share/share/man and not /usr/share/man.

Default X properties

Set the following properties in ~/.Xdefaults:

URxvt*xft:      true
URxvt*scrollBar: true
URxvt*vt0*saveLines:   1000
URxvt*loginShell:   false
URxvt*scrollbarStyle: rxvt
URxvt*transparent:   true
URxvt*shading: 60
URxvt*transparentScrollbar: false
URxvt*transparentTabbar:    true
URxvt*transparentMenubar:   true
URxvt*foreground:   orange
URxvt*background:   darkblue
URxvt*cursorColor:   red
URxvt*geometry:      80x25
URxvt*scrollColor:   orange
URxvt*font: xft:DejaVu Sans Mono:style=Normal:pixelsize=15
URxvt*mouseWheelScrollPage: true

XTerm

This is the simplest, lightest, THE original XTerm Example:
xterm -font 9x15 -sb -bg white -fg gray &
Set the following properties in ~/.Xdefaults:
XTerm*font: 9x15
XTerm*foreground: lightgreen
XTerm*background: black
XTerm*scrollBar: true
XTerm*vt0*saveLines:   1000

Conky

Conky displays system information on the root window. Install: apt-get install conky (add contrib to APT sources).
Setup in ~/.conkyrc: (very much similar to this one)
# set to yes if you want Conky to be forked in the background
background no

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=10

own_window_transparent no
own_window_colour hotpink

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 5
# Create own window instead of using desktop (required in nautilus)
own_window no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 280 800
#maximum_width 400

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 10

# border margins
#border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color yellow
default_shade_color yellow
default_outline_color yellow

# Text alignment, other possible values are commented
gap_x 13
gap_y 13
alignment bottom_left

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

TEXT
$nodename - $sysname $kernel on $machine - $addr (eth0)
#$stippled_hr
${color orange}Uptime:$color $uptime ${color orange}- Load:$color $loadavg
${color orange}CPU:$color ${cpu}% ${color #0077ff}${cpubar 5,85}   ${color orange}Disk I/O: $color${diskio}
${color orange}${cpugraph 0 32,155 104E8B 0077ff} ${color orange}${diskiograph 32,155 104E8B 0077ff 750}
#${color black}${cpugraph 000000 5000a0}
${color orange}RAM Usage:$color $mem/$memmax - $memperc% $membar
${color orange}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar}
${color orange}Processes:$color $processes  ${color orange}Running:$color $running_processes
${color orange}/:            ${fs_bar 3,100 /} ${color }${fs_free /}/${fs_size /} 
${color orange}/home:        ${fs_bar 3,100 /home} ${color }${fs_free /home}/${fs_size /home} 
${color orange}/home/backup: ${fs_bar 3,100 /home/backup} ${color }${fs_free /home/backup}/${fs_size /home/backup} 
${color orange}Name              PID     CPU%   MEM%
${color red} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color orange}Mem usage
${color red} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color orange}RSS:
${color} ${rss http://URL 3600 item_title (3)}
${color orange}Tweets
${color}${execi 100 twidge lsrecent}

Fonts

To list available fonts:
xlsfonts
Debian:

I had awful fonts at first when going to my DokuWiki website. This has been easily fixed by installing new (and nice) fonts: the DebianFonts wiki explains it all (I'm copying what I did below, just in case their site disappears, but really, it's better to read their wiki !).

  • apt-get install defoma fontconfig ttmkfdir cabextract
  • update the /etc/X11/xorg.conf file
    Section "Files"
            FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    
            FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
            FontPath        "/usr/share/fonts/truetype"
            FontPath        "/usr/local/share/fonts/truetype"
            FontPath        "/usr/lib/X11/fonts/CID"
            FontPath        "/usr/lib/X11/fonts/Speedo"
    
            FontPath        "/usr/lib/X11/fonts/misc"
            FontPath        "/usr/lib/X11/fonts/cyrillic"
            FontPath        "/usr/lib/X11/fonts/100dpi:unscaled"
            FontPath        "/usr/lib/X11/fonts/75dpi:unscaled"
            FontPath        "/usr/lib/X11/fonts/Type1"
    
    EndSection
    
  • create /etc/fonts/local.conf
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <!-- /etc/fonts/local.conf file to configure system font access -->
    
    <fontconfig>
      <dir>/usr/local/share/fonts</dir>
    </fontconfig>
    
  • Download and install fonts:
    # apt-get install xfonts-100dpi xfonts-100dpi-transcoded \
                       xfonts-75dpi xfonts-75dpi-transcoded \
                       xfonts-base xfonts-base-transcoded
    # apt-get install ttf-bitstream-vera msttcorefonts ttf-junicode ttf-kochi-gothic ttf-kochi-mincho
    # wget http://orwell.ru.nyud.net:8090/download/aruniupd.exe
    # cabextract aruniupd.exe
    # mkdir -p /usr/local/share/fonts/truetype/
    # cp Arialuni.TTF /usr/local/share/fonts/truetype/
    # wget http://www.languagegeek.com/font/absans.zip
    # for font in *.zip; do unzip $font; done
    # cp *.ttf /usr/local/share/fonts/truetype/
    # cd /usr/local/share/fonts/truetype/
    # mkfontscale
    # mkfontdir
    
How to list fonts monospace fonts by family and file.
$ fc-list -f "%{family} : %{file}\n" :spacing=100 | sort

Mouse pointer

Set the system mouse pointer via .Xdefaults:
!sets system cursor (see /usr/share/icons)
Xcursor.theme: whiteglass
! 24, 32, 48...
Xcursor.size: 24
Normally, you can also set the pointer for each application, if this is not superseded (and possible).
App.PointerColor: Red
To reload .Xdefaults:
xrdb ~/.Xdefaults
To reread your .Xresources file, and keep your old resources, type:
xrdb -merge ~/.Xdefaults
On the command line, the following command sets the cursor type and color:
xsetroot -cursor_name left_ptr -fg red

X Window tools

Xwininfo

To get the geometry of a given window:
xwininfo
This also returns the ID of a window (usable by xwd for example).

Xwd

To capture a screenshot of the entire screen:
xwd -root -out /tmp/out.xwd
To capture a given window, first get its window ID with xwininfo, then,
xwd -id ID | convert - image.png

Xmodmap

To modify keymappings, and for instance get French accents on Qwerty:
xmodmap ~/.xmodmaprc
And then, in .xmodmaprc:
! letters

keycode  24 = q Q acircumflex
keycode  25 = w W
keycode  26 = e E eacute
keycode  27 = r R egrave
keycode  28 = t T
keycode  29 = y Y
keycode  30 = u U ucircumflex
keycode  31 = i I icircumflex
keycode  32 = o O ocircumflex
keycode  33 = p P

keycode  38 = a A agrave
keycode  39 = s S
keycode  40 = d D ediaeresis
keycode  41 = f F ecircumflex
keycode  42 = g G
keycode  43 = h H ugrave
keycode  44 = j J udiaeresis
keycode  45 = k K idiaeresis
keycode  46 = l L

keycode  52 = z Z
keycode  53 = x X
keycode  54 = c C ccedilla
keycode  55 = v V
keycode  56 = b B
keycode  57 = n N
keycode  58 = m M

keycode  108 = Mode_switch