In part 1 and 2 I showed how I installed Arch and configured my hardware, and X.
Of course you could just type pacman -S xfce and be done with it, but honestly, if you were looking for an easy solution you’d be using something like Mint or Bodhi in the first place. So here’s what I did to create a kind of desktop environment based on JWM. JWM is a lightweight window manager used in distributions like Puppy or Damn Small Linux. Even without customizing, JWM creates a simple, fully functional XP- like desktop. JWM is very configurable, and all options can be set in one single XML file (~/.jwmrc, as always the Arch Wiki has more details).
- Install jwm (pacman -S jwm) and add the following line to ~/.xinitrc to start JWM when you run startx: exec ck-launch-session dbus-launch jwm.
Instead of using a logon manager like slim you can configure X to start automatically after logon as described in the wiki.
- By default, JWM is ugly as sin. To improve the looks, I copied the Antix JWM theme and replaced cyan with Arch blue (#1793D0 according to the Arch forums)
- GTK theme, icons and fonts can be modified using lxappearance. I chose elementary-gtk-theme and faenza-icon-theme from the AUR and installed ttf-droid and ttf-liberation fonts.
- JWM doesn’t have a run dialog or task manager, so I linked gmrun to Alt+F2 and xfce4-taskmanager to Ctrl+Alt+Del. The Exit menu entry will just bring you back to the terminal, so I added oblogout as shutdown / logout dialog
- Screensaver / lock is provided by xautolock and xlockmore - running xautolock -time 7 -corners 0-00 as <StartupCommand> will lock the screen after 7 minutes, unless the mouse cursor sits in the upper right corner (great way to disable screen locking while watching movies)
- Now you can install the usual tools and applications, like e.g. pcmanfm file manager, google-chrome browser, gpicview image viewer, lxterminal, xfce4-screenshotter, gksu, conky, scite text editor, xcalc, volumeicon, batti to show battery status, gpicview image viewer, gimp image editor, transmission Bittorrent client or the VLC mediaplayer … if you are looking for something special, alternative.to is always a good place to start
- For libreoffice, when installing with pacman -S libreoffice make sure to deselect libreoffice-kde to save diskspace for a whole lot of KDE dependencies. To address the issue of missing window decorations in JWM, you have to force the UI to generic mode (e.g. SAL_USE_VCLPLUGIN=gen lowriter).
That’s all it takes to create your own desktop environment based on JWM. Of course this is just an example, the variety of available tools and themes is endless, and as always in the Arch world, the journey is the reward.
Even after installation (see part 1), the Arch system is still pretty basic. You can boot into text mode, connect to the internet with wifi-menu or even do some basic text browsing, but for a desktop system a very central part is still missing – the desktop. The 2nd part of my “Arch from Scratch” diary shows how to set up X and configure some hardware for my Asus 1215N (the process may be different on different hardware).
- The first step is of course to install X-Windows. If you don’t know exactly what hardware you have, you can just install the whole Xorg group with pacman -S xorg. This will install most drivers and allow Xorg to auto detect your hardware. To be able to do ANYTHING in X you will also need xorg-init and xterm, too. Now you should be able to ‘startx’ successfully from root into a naked XWindows with a couple of xterms.
- You shouldn’t work as root of course, so now’s the time to create a new user with adduser. Some recommendations for groups can be found in the wiki. For startx to work for the new user, I had to copy /etc/X11/xinit/xinitrc to ~/.xinitrc.
- While you’re at it, install sudo and enable it for your user (or the whole wheel group) – run EXPORT EDITOR=nano; visudo and uncomment the desired line in the config file
- Add Firefox or Chromium and you already have a very basic work environment, allowing you to read Arch wiki and access the forum
- For easy AUR access you want a tool like yaourt or packer - I used this blog post as a guide, but you can also check out the more general documentation in the Arch wiki. Once this is done, you can simply search and install packages by typing e.g. packer chrome and then picking the number from the list.
- To support my Nvidia Optimus graphics chip, I installed Bumblebee from the AUR by simply typing packer bumblebee. I didn’t have to change anything in the PKGBUILD files, but Arch wiki insists you should always have a look at them, to check if they really do what they seem (a malicious PKGBUILD could do serious harm to your computer). This will install nvidia-utils-bumblebee but not the Nvidia drivers and power management, so you have to install nvidia and dkms-bbswitch separately. After a reboot you should be able to run any program against your Nvidia chip with the optirun command.
- For the automatic dkms rebuild to work properly after a kernel update, you have to change /etc/bumblebee/bumblebee.conf from PMMETHOD=auto to PMMETHOD=bbswitch (as described by Samsagax in a comment on the AUR page) and enable the DKMS service with systemctl enable dkms (more details here)
- Even though wifi was working with the included Kernel drivers, I experienced frequent disconnects with my BCM4013 wireless chip. After some research I finally resolved the issue by switching to the proprietary dkms-broadcom-wl driver from the AUR. To make sure broadcom-wl is really used, you should enable the kernel module wl and blacklist b43, ssb and brcm80211 (as described in the wiki). Using broadcom-wl will switch the wireless device from wlan0 to eth0, so you have to change netcfg configurations accordingly and wifi-menu will not work anymore.
- So this a good moment to install a network administration tool like wicd (don’t forget to configure the wireless device, usually wlan0 or eth0 – the easiest way to do this is in the preferences of the wicd-client took from package wicd-gtk)
Of course you could just install a desktop environment like XFCE (pacman -S xfce) or KDE now and be done with it, or start to create your own desktop environment with a window manager (like Openbox, Fluxbox, JWM, …)
This concludes part 2 of my Arch diaries, in the next part I will describe how I created a simple, lightweight desktop environment based on the JWM window manager.