Some notes on various Linux items

Debian and LXDE

I usually want to have the following things set in the operating environment:

Now, for the shell logins, the path adjustment already comes with the system, in the ~/.profile. And the compose key is less relevant there as I am not so likely to write anything that needs it outside the GUI -- I can do without it there.

Raspbian systems already have a convenient tool for defining this on login, even into terminal windows.

However, when I set-up this newer machine using Debian Jessie, with GUI startup using LXDE, then the path was not set, and neither was there any obvious way to get the keyboard settings into place.

Looking on the net, there were references to all sorts of different systems and files, most of which would not work.

As it turns out, there are two files that have to have things changed in them. Both of the files live somewhere in the home directory tree.

Compose key

The file in question is:


Adding the line

@setxkbmap -option compose:rwin

makes the right windows key into the Compose key .


As the ~/.profile isn't being read on startup, and the ~/.bashrc file is only read on starting a shell, these files are not the ones to use. However, another file similar to these can be created. This file is ~/.xsessionrc and it can be created if it doesn't already exist.

The contents of this is similar to the relevant script in ~/.profile :

if [ -d "$HOME/bin" ] ; then

Number of desktops

Some Debin LXDE installations only provide 1 or 2 desktop, I like to have 4 of them. To change this, and set the number of desktops, for the general case, this is in /etc/xdg/openbox/LXDE/rc.xml

In the object named <desktops> there is an object identified as <number>, which is the setting. If this value isn't 4 it can be changed to 4, for 4 desktops.

There are several other rc.xml files around, and the one here is the one being given to various users when they first start the GUI. For existing users, this file sits in ~/.config/openbox/lxde-rc.xml where the same <desktops> and <number> objects can be found.


To start with the console instead of the full desktop GUI appearing on powerup:

systemctl set-default

It can always be entered via startx

systemctl and rc-local (rock64)

/etc/rc.local is the older startup. With systemd we can check if this is enabled and running:

$ systemctl | grep rc-local
	loaded active running /etc/rc.local Compatibility

Or it might be included in the root's crontab.

@reboot /bin/sh /etc/rc.local

Don't do both, or it will run the script twice!

Locale settings (Ubuntu MATE, also others)

Compose key is a matter of selecting the desired key (right alt, menu etc.) via the menu: system/preferences/hardware/keyboard and then the tab Layouts, then the button Options... and select the Compose key settings from the list there.

The default locale settings can be put into /etc/default/locale.

Most useful is one of the UTF-8 variants, since me wanting to use the accented letters in general includes both making them with the compose key and then reading them later. In many cases, a reasonably useful locale, such as en_US.UTF-8 is being set, for the LANG= entry in particular, as this controls the way things are displayed.

The Rock64's os had no defined locale setting, so that needed to be changed.

The command locale can be used to control this.

Valid XHTML 1.0!