Thursday, January 2, 2014

Ubuntu LXDE desktop

LXDE Desktop environment is an extremely fast-performing and energy-saving desktop environment. It is specially designed for netbooks, mobile devices or older and slower computers. I will show you how you can install it in this tutorial along with all the software required by ordinary user. So let’s start with by downloading that nice Ubuntu generic appliance and setting it up in VirtualBox.

LXDE Desktop step one: Download and import Ubuntu generic appliance

In first step of this tutorial I will download Ubuntu generic appliance image here. After download is complete I have to set it up in VirtualBox. If you don’t have VirtualBox, don’t worry. You can download it on VirtualBox download page, or you can install LXDE Desktop as additional environment along with the one you’re using with your Ubuntu on real machine.
When you download image, copy it where your other VirtualBox machines are located. On Linux that is usually /home/username/VirtualBox VMs and on Microsoft Windows folder isC:/Username/VirtualBox VMs. Extract ubuntugeneric.zip and rename extracted 000-UbuntuGeneric folder to LXDE-Desktop or something similar. After that is done, start VirtualBox and add the machine by pressing Ctrl+A keys:
001-ubuntu-lxde-desktop
Select 000-UbuntuGeneric.vbox and click on Open to add the machine to your Virtual Box. Now we need to rename and configure network for our new virtual machine. So select your new virtual machine in main VirtualBox window (named 000-UbuntuGeneric) and press Ctrl+S keys to open settings dialog:
002-ubuntu-lxde-desktop
When in settings click on General tab on left and change the name of virtual machine to Ubuntu-LXDE or something similar. Next click on Network tab:
003-ubuntu-lxde-desktop
Set up network as on picture above. Please mind that your settings may differ from what I have. If you don’t have Bridge Adapter option, select NAT, it should work in most cases. Also if you’re on Windows systems Paravirtualized Network adapter will not work out of the box and I will not cover how to make it work in this tutorial. So just select Intel PRO/1000 MT Desktop adapter and that should work. After that is done, click on OK to close virtual machine settings window and let’s start the VM.

LXDE Desktop step two: Initial configuration

004-ubuntu-lxde-desktop
Login in with username root and password rootroot.As you can see on the picture above in the comments box, let’s start clone_setup. This will set up new name for our virtual machine, it will help us set up the network, will perform a basic system update and it will change root password. Script will guide you throughout the complete setup, so just follow messages on the screen. After script finishes its run, just press enter for a machine to reboot.
005-ubuntu-lxde-desktop

LXDE Desktop step three: Configuring software repositories

Now to make things easier, we will continue work in terminal on your local computer or in Putty or some similar SSH client if you’re on windows machines. When machine boots up again, login with username root and new password you entered in the previous step of this tutorial. Executeifconfig command and note eth0 adapter IP address:
001-Ubuntu-Desktop-LXDE
As you can see from image above, IP for my virtual machine is 172.30.0.126. Now I will open my terminal (or Putty if on Windows) and SSH login to my virtual machine by executing ssh root@172.30.0.126.
Before we start with software installation we will add a few software repositories so we can install latest versions of software like Gimp, Google Chrome, Oracle Java etc. To do this, just copy/paste the following lines to your VM console:
1echo -e "deb http://extras.ubuntu.com/ubuntu precise main" >> /etc/apt/sources.list
2echo -e "deb http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu precise main" > /etc/apt/sources.list.d/gimp.list
3echo -e "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
4echo -e "deb http://dl.google.com/linux/earth/deb/ stable main" > /etc/apt/sources.list.d/google-earth.list
5echo -e "deb http://ppa.launchpad.net/motumedia/mplayer-daily/ubuntu precise main" > /etc/apt/sources.list.d/mplayer.list
6echo -e "deb http://ppa.launchpad.net/smplayer2/daily/ubuntu precise main" > /etc/apt/sources.list.d/smplayer2.list
7echo -e "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" > /etc/apt/sources.list.d/oracle-java.list
Now we need to add signing keys for them:
1aptitude install ubuntu-extras-keyring
2apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 614C4B38
4apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 06438B87
5apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3A17F739
6apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7992E892
7apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
8aptitude update
Before we start with software installation we need to instruct our debconf package to present us with questions software packages will ask when installing. To do it execute the following:
1dpkg-reconfigure debconf
006-UbuntuJWM
Select Dialog and press Enter to continue.
007-UbuntuJWM
Select low and press Enter to continue.

LXDE Desktop step four: Software installation

Everything is ready now for software installation. I the first run we are going to install packages necessary for LXDE desktop environment along with Firefox as our main browser, display manager and a few others:
1aptitude -R -y install lxde xorg build-essential firefox arj fakeroot galculator gvfs-backends gvfs-fuse lxdm hal consolekit aptdaemon_ gir1.2-glib-2.0_ libcurl3-gnutls_ libgirepository-1.0-1_ lxmusic_ notification-daemon_ openbox-themes_ python-aptdaemon_ python-chardet_ python-dbus_ python-dbus-dev_ python-debian_ python-defer_ python-gi_ python-gnupginterface_ python-pkg-resources_ python-pycurl_ python-software-properties_ unattended-upgrades_ xmms2-core_ xmms2-plugin-alsa_ xmms2-plugin-id3v2_ xmms2-plugin-mad_ xmms2-plugin-vorbis_ xterm_ xul-ext-ubufox_
Accept defaults for any questions asked by installer. In the second run we will install all the software a casual user would require on a computer:
1aptitude -R -y install alsamixergui audacious browser-plugin-vlc epdfview filezilla flashplugin-installer fonts-sil-gentium-basic gimp google-chrome-stable google-earth-stable libreoffice mozilla-plugin-vlc mplayer2 oracle-java7-installer oracle-java7-set-default smplayer2 thunderbird transmission ttf-mscorefonts-installer wicd xine-plugin skype cmap-adobe-japan1_ hunspell-en-us_ launchpad-integration_ libcanberra-gtk3-0_ libcanberra-gtk3-module_ libmysqlclient18_ libqt4-sql-mysql_ mysql-common_ notification-daemon_
If asked any questions just accept default options (press Enter), choose a default paper size (mine is a4) and accept license for Oracle Java and Microsoft fonts.
Let’s clean downloaded software packages by executing:
1aptitude clean

LXDE Desktop step five: Final adjustments

Now we need to create our user as it’s not advisable to run desktop with root user:
1useradd -m -s /bin/bash username
Swap “username” with name for your user (mine is zack for instance). Lets give our new user a password:
1passwd username
You will have to enter password twice. To work properly we need to add our new user to couple of more groups:
1usermod -a -G adm,cdrom,sudo,dip,plugdev,netdev username
Again swap “username” with your users name. Now we need to give our new user the ability to shut down/reboot the machine:
1visudo
Add the following line below “%sudo   ALL=(ALL:ALL) ALL” so that it looks like this:
1%sudo   ALL=(ALL:ALL) ALL<br />
2# Allow user username to restart/shutdown computer
3username    ALL=NOPASSWD: /sbin/shutdown
Again swap username with your users name. Basically now you can reboot your virtual machine and LXDE desktop will be ready, but let’s do a few things before.
Log in as user you created few steps back:
1su - username
Here create the following folder and cd into it:
1mkdir -p .local/share/applications
2cd .local/share/applications
Download and extract the following file:
2unzip lxde_apps.zip
3rm lxde_apps.zip
Now log out back to root by pressing Ctrl+D keys simultaniously and cd into a following directory:
1cd /etc/lxdm
Here create a backup of lxdm.conf file and download a modified version of the same file:
1mv lxdm.conf lxdm.conf.orig
3unzip lxdm.zip
4rm lxdm.zip
There, your LXDE Desktop is ready to use. If you would like to further modify the looks, check outthis link. If not, reboot your VM/computer.
002-Ubuntu-Desktop-LXDE
Select “LXDE” in Desktop drop-down menu at the bottom left end of the screen and enter your user name and password to login.
003-Ubuntu-Desktop-LXDE
There you go. Your LXDE Desktop environment is ready to use. Enjoy!

0 comments:

Post a Comment