debian-setup

A Quick Note of LXDE

Core LXDE not recommended for laptops. In my case, LXDE is installed on a work station with fixed displays. Network is local on eth0 via the TRENDnet TEW-647GA wireless adapter.

Even though Lean LXDE and Lean GNOME both install a basic, minimal desktop, keep in mind that LXDE is much lighter than GNOME. Choose LXDE if you want a super lean desktop, if you don’t mind manually installing and setting up additional packages on top of LXDE (which can be challenging), and if you don’t care much about the visual appeal. On the other hand, GNOME provides many of the packages such as pulse audio, a display manager, a wireless network manager, a PDF viewer right out of the box. You will find that most of them will be needed at some point and need to be installed anyways.

Before you start, make sure you don’t already have a desktop installed. Follow instructions on Manual Install. There, when you choose “Expert Install”, you will have the option to not to install any default desktop environment. This allows us to install a bare minimum desktop based on LXDE here.

Display Manager

sudo apt-get install lightdm

  1. From ArchWiki, “A display manager, or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell.” Possible candidates:
    • CDM (Console Display Manager) - ultra-minimalistic, yet full-featured login manager written in bash.
    • SLiM (Simple Login Manager) - lightweight and elegant graphical login solution.
    • LXDM - LXDE Display Manager. This is the default display manager for LXDE. Can be used independent of the LXDE desktop environment.
    • LightDM - Cross-desktop display manager, can use various front-ends written in any toolkit.
  2. Install a light-weight display manager. sudo apt-get install lightdm to install the light-weight display manager. This installs 166 new packages including the X server drivers, acl, dbus, lightdm, lightdm-gtk-greeter.
  3. After reboot, should see the login screen with only the default x-session available.
  4. Can’t really log in at this point though. The desktop loading sequence: LightDM –> LXSession –> OpenBox, LXDE. Need to Ctrl-Alt-F1 to open tty1 to install LXDE (see blow).

Core LXDE

sudo apt-get install lxde-core lxtask

  1. Install LXDE
    1. On the login screen, Ctrl-Alt-F1 to open tty1.
    2. Install the LXDE core with the minimum feature set, sudo apt-get install lxde-core.
    3. Installs 134 new packages including desktop-file-utils, gksu, gnome-keyring, gvfs, lxde-common (for configuration), lxde-core, lxmenu-data, lxpanel, lxsession, lxterminal, openbox, pcmanfm, xscreensaver. Note missing lxtask as this point. LXDE uses Openbox as the default windows manager.
  2. sudo reboot and now should be able to login to the desktop.
  3. Once logged in, if I type Ctrl-Alt-Del, Openbox shows an error about missing lxtask. I have to manually install it sudo apt-get install lxtask.

Multiple Displays

sudo apt-get install lxrandr

A very simple desktop GUI for managing multiple displays. Helpful if the external monitors are not fixed (e.g. on a laptop).

GNOME Keyring

Fix the keyring configurations by appending LXDE.

  1. Edit files /etc/xdg/autostart/gnome-keyring-*.desktop
  2. Edit OnlyShowIn=GNOME;Unity; append LXDE;
  3. sudo reboot and make sure the daemon runs ps aux | grep keyring

LXTerminal

  1. LXTerminal preference on a 24” 1920 X 1200 monitor:
    • Droid Sans Mono 15
    • Background #000000, foreground #009900
    • Hide menu bar, hide scroll bar. They can be enabled again by editing ~/.config/lxterminal/lxterminal.conf.
  2. LXTerminal start-up size
    1. sudo vi /usr/share/applications/lxterminal.desktop.
    2. Change Exec=lxterminal to Exec=lxterminal --geometry=155x50.
    3. Must reboot the computer to see the effect.
  3. Environment

    LXTerminal is a non-login shell. The start-up script is ~/.bashrc, not ~/.bash_profile. For example, the PATH variable should be modified in ~/.bashrc (see the java page for examples). However, to be consistent with the login shells, include ~/.bashrc in ~/.bash_profile. There is also ~/.profile, which is for the generic shell sh (bash is a specific implementation of sh). Its documentation says “~/.profile: executed by the command interpreter for login shells. This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists.” Also include ~/.profile in ~/.bash_profile. Here is what ~/.bash_profile looks like:

     if [ -r "${HOME}/.profile" ]; then
         . "${HOME}/.profile"
     fi
        
     if [ -r "${HOME}/.bashrc" ]; then
         . "${HOME}/.bashrc"
     fi
    

Audio

sudo apt-get install pulseaudio pavucontrol

ALSA is deprecated. Use PulseAudio instead in Debian Stretch.