Openbox LIGHT DESKTOP devuan setup fine tune ๐ผ
This guide try to setup a OpenBox desktop with modern like eye-candy, without use heavy packages like pulseaudio or xfce4.
Use this guide to setup Devuan on low resource machines like the ASUS Eeepc 2G/4G or the Intel UTECH UX211 Atom laptops that are very low end on resources and normal desktop will not works as expected never on.
This configuration desktop its special for those developers that need good administration of their resources due runs too many services on their machines.
Why not LXDE? ๐ผ
LXDE its not more lighter rather than openbox, mplayer does not play good a 640x480 video in the ASUS Eeepc 2G/4G when using LXDE, but with OpenBox plays decently.
Software sources: repositories ๐ผ
We need some packages from backports, so then enabling as normal repository event second chance for packages:
1) Activate and veryfy backports: ๐ผ
root@devuanvnx:~# grep ^deb /etc/apt/sources.list | grep devuan
/etc/apt/sources.list:deb http://auto.mirror.devuan.org/merged jessie main contrib non-free
/etc/apt/sources.list:deb http://auto.mirror.devuan.org/merged jessie-updates main contrib non-free
/etc/apt/sources.list:deb http://auto.mirror.devuan.org/merged jessie-security main contrib non-free
/etc/apt/sources.list:deb http://auto.mirror.devuan.org/merged jessie-backports main contrib non-free
cat << EOF > /etc/apt/preferences.d/backportspriory
Package: *
Pin: release a=jessie-backports
Pin-Priority: 991
Package: *
Pin: release a=wheeze-backports
Pin-Priority: 990
EOF
IMPORTANT NOTE in this case we are using the Devuan Jessie version and so enable Devuan jessie repository.
2) Enable Deb-multimedia ๐ผ
Debian marillat famous repository are still compatible with Devuan:
cat << EOF > /etc/apt/sources.list.d/debmultimedia.list
deb http://linorg.usp.br/debian-marillat/ jessie main non-free
deb ftp://ftp.deb-multimedia.org jessie-backports main
EOF
cat << EOF > /etc/apt/preferences.d/debmultimediapriory
Package: *
Pin: origin ftp.deb-multimedia.org
Pin-Priority: 992
Package: *
Pin: origin linorg.usp.br
Pin-Priority: 992
EOF
IMPORTANT NOTE in this case we are using the Devuan Jessie version and so enable Devuan jessie repository.
Installations ๐ผ
3) Install base openbox: ๐ผ
apt-get install openbox ttf-dejavu libxml2-dev menu obconf gmrun menu-xdg menu clipit fbpanel openbox-themes
apt-get lxappearance lxappearance-obconf lxtask lxpanel
4) Configure default desktop: ๐ผ
Autostart the panel depending of the availability on session opened, due penbox only display a clean desktop with nothing, so added this to the /etc/xdg/openbox/autostart file:
if test -x /usr/bin/fbpanel >/dev/null; then
fbpanel &
elif test -x /usr/bin/lxpanel >/dev/null; then
lxpanel &
fi
This will open a panel for you, when openbox enters on session start, no matter was invoke from startx or from display login manager.
5) Configure file handling: ๐ผ
Here there's only one choice, thunar its fantastic and already installed but still have some xfce depends and requirements on dconf so lest get more power from true light software:
apt-get install libfm-modules libfm-tools libfm-data lxmenu-data libfm4 libfm-gtk-data libfm-gtk4 pcmanfm
This will made available the pcmanfm that can display a menu root inside them also places and bookmarks from GTK places.
Pcmanfm can handle icons of mounted devices also network mounted devices on desktop see the next section for configurations:
6) Configure desktop/wallpaper handler: ๐ผ
Pcmanfm can handle the desktop icons and wallpaper but lest do a double ckeck for user choice:
aแนt-get install nitrogen
after install added to the end of the /etc/xdg/openbox/autostart file:
if test -x /usr/bin/nitrogen >/dev/null; then
nitrogen --restore &
elif test -x /usr/bin/pcmanfm >/dev/null; then
pcmanfm --desktop -d &
fi
this will handle the wallpaper depending of the availibility of the pcmanfm or the nitrogen package. If u prefer always the pcmanfm remove the nitrogen check and onlylet the pcmanfm line.
For the icons on desktops, the previous configuration must be handle only by pcmanfm usin the -d and --desktop options, go to the pcmanfm config tool in menu or invoke from command line:
pcmanfm --desktop-pref
and navigate to the second tab and choose to display all the things.
7) archiver packages: ๐ผ
In Devuan jessie 1.0.0 with Xfce4 xarchive comes pre-installed but in any case:
apt-get install xarchiver zip lhasa p7zip-full arj zx-utils bzip2 ncompress sharutils unace unzip unalz
The pcmanfm will use by default the xarchiver for extract or compress files.
8) office light related packages: ๐ผ
For right libreoffice run, we need to ensure the environment are set, so parse this to force always on the environment file:
echo "SAL_USE_VCLPLUGIN=gtk" >> /etc/xdg/openbox/environment
echo "OOO_FORCE_DESKTOP=gnome libreoffice" >> /etc/xdg/openbox/environment
This make it to force the GTK dialogs for better look over the openbox libreoffice interface. For more info please see https://wiki.openoffice.org/wiki/Environment_Variables#Environment_variables_for_users Before libreoffice that are complex a default set its need:
apt-get install gucharmap evince-gtk poppler-data
Take in consideration that we do not install the python related and the libxml2-dev its for right display of icons on menus.
Openbox Session manager ๐ผ
The openbox are very limited, the fbpanel and lxpanel can configure a session manager command for logout.
There's a obsession software available in debian and devuan but openbox still does not are right configuring for use it event on unstable, so lest configure session autostart handle and session manager software.
9) Session autostart handler: ๐ผ
Openbox uses a python based script until version 3.6.0, since 3.6.0 debian packages comes with better handling of the sesison and autostart desktop. Lest removed stupid python script and use powered precompiled package:
https://packages.debian.org/sid/obsession download and install with dpkg -i obsession*.deb
Until 2015 obsession comes with xdg-autostart that handle the desktop files, so lest modify the openbox scripts to use it:
sensible-editor /usr/lib/i386-linux-gnu/openbox-autostart
Remove the last line with "openbox-xdg-autostart" and added:
if which xdg-autostart >/dev/null 2>/dev/null; then
CMD=xdg-autostart
else
CMD=/usr/lib/i386-linux-gnu/openbox-xdg-autostart
fi
exec $CMD "$@"
This will made compatible with older pytnon based, but will prefer the newer powered obsession provided xdg-autostart.
IMPORTANT NOTE future releases of obsession will not provide the xdg-autostart due will be a independent package by upstream.
10) Session Logout/poweroff handler: ๐ผ
This are configured in two places, the openbox menu xml file and the panel logout command definition, that lasted its due lxpanel its a started project where lxpanel was made.
** Configure obsesion for fbpanel **
sed -i "s%/usr/lib/fbpanel/fbpanel/xlogout%obsession-logout%g" "/usr/share/fbpanel/default"
sed -i "s%/usr/lib/fbpanel/fbpanel/xlogout%obsession-logout%g" %HOME/.config/fbpanel/default
** Configure obsesion for lxpanel **
sed -i "s%command=logout%command=obsession-logout%g" /usr/share/lxpanel/profile/default/panels/panel
echo "Logout=obsession-logout" >> /usr/share/lxpanel/profile/default/config
sed -i "s%command=logout%command=obsession-logout%g" %HOME/.config/lxpanel/profile/default/panels/panel
echo "Logout=obsession-logout" >> %HOME/.config/lxpanel/profile/default/config