**This continues on from the previous post that can be found here**
Now that we have our base system installed, its time to add some tools that will give us a nice GUI desktop. But first off we will setup sudo so we can stop being root. First we’ll create a user. This first command creates a home directory called “dwheeler” using the -m flag, adds this user to the administrator group (wheel) with the -G flag and links us to bash. Enter a password after the passwd command. Obviously substitute for your username and password.
useradd -m -G wheel -s /bin/bash dwheeler passwd dwheeler
Next we setup sudo. Sudo has a special editor to change it called “visudo”, we should always use this modify the config file. After typing the visudo command scroll down to the line that contains “root ALL=(ALL) ALL”, and underneath that add your username and the “ALL=(ALL) ALL” part. Note that visudo uses VI, which can be a little tricky to use for the uninitiated. Once you are at the line you want to insert your username, type “i” to insert, once you have finished type [esc] and then colon “:” and [wq] to save and exit (ie “:wq”).
root ALL=(ALL) ALL dwheeler ALL=(ALL) ALL
Type “reboot” and now login as yourself. Now to install some graphics tools.
sudo pacman -S xorg-server xorg-xinit xorg-server-utils mesa sudo pacman -S xorg-twm xorg-xclock xterm
Because we are using virtualbox, we need to install some helper tools that will allow the graphics to work properly. I got some good ideas from this post (http://wideaperture.net/blog/?p=3851), it might be worth checking it out for a second way of doing this.
sudo pacman -S virtualbox-guest-utils sudo nano /etc/modules-load.d/virtualbox.conf
After nano opens, add these to these lines to the virtualbox.conf file:
Then get this too load.
sudo systemctl enable vboxservice.service
Reboot using “sudo reboot”, once you are back into the environment type “startx”, and some very basic windows should open confirming that x is working! Type exit in these windows to return to the terminal.
Finally, we will install the desktop environment. This consists of two parts, first the display manager that will log us in and kick off the desktop, and then the desktop environment itself. You can choose from a bunch of different environments, from fancy feature rich to bare-bones, see the arch desktop page for the options. I’m all for saving resources so I’m installing the lightweight LXDE. Installing the lxde group using pacman also installs the display manager (called lxdm).
pacman -S lxde
Accept the defaults. Now we need to get the display manager to load automatically at boot, and set the default desktop (note you can install multiple desktops environments lxdm will give you options to boot into them instead of the default if you should wish)
sudo systemctl enable lxdm nano /etc/lxdm/lxdm.conf
In nano uncomment the desktop environment you want to be the default, in my case it was this line ”
Reboot, login, and bobs your uncle!
Note: If full screen doesn’t work, try typing “sudo depmod -a” in a terminal and then reboot again
Last job is just to change the permissions on the shared folder so that we can access the host (replace username with your username).
sudo usermod -a -G vboxsf username