Author Topic: HOWTO Setup a Lightweight GUI on an eBox Machine  (Read 8087 times)

SamK

  • Zen Samurai
  • ****
  • Posts: 283
  • Karma: +3/-0
    • View Profile
HOWTO Setup a Lightweight GUI on an eBox Machine
« on: May 04, 2009, 11:25:08 am »
A non-exhaustive HOWTO showing the way in which a minimalist, lightweight GUI can be installed on an eBox machine.  This resulted from discussions in this thread:
http://forum.ebox-platform.com/index.php?topic=1252.0
It is suitable for use with the underlying Ubuntu 8.04-LTS Operating System and the entire download of files is approximately 110MB.  It is lightweight but this does not imply lightest possible.


ROADMAP
  • Goals of the Installation
  • List of Packages & Purpose
  • Package Availability
  • Installing the Packages
  • Configuration
  • References




STAGE 01 - GOALS:
  • Use Open Source Software
  • Produce a lightweight GUI desktop capable of being run on low specification machines
  • The GUI to run reliably on an eBox + Ubuntu 8.04-LTS installation
  • Provide a locally installed web browser to enable access to the local eBox web-GUI
  • Provide a small selection of GUI tools
  • Provide a means of installing and/or removing packages via the GUI
  • Provide a means of updating the installed packages via the GUI
  • Provide 2-way remote control
  • Allow the look of the GUI to be modified
  • Require minimal post installation configuration




STAGE 02 - PACKAGES
      Name                             Purpose
  • xserver-xorg-core     Provide an x server for GUI display
  • xinit                            Automatic starting of x server and session at bootup
  • menu                         Generate a 'start' menu of programs for menu aware applications
  • menu-xdg                  Convert Debian type menu structures to freedesktop.org types
  • gdm                            Logon Manager
  • lxde                            Provide an (incomplete) suite of programs for management of a GUI environment
    Incuded in the meta-package for this version:
             openbox           Window Manager
             pcmanfm           Desktop & File Manager
             lxpanel              Desktop Panel Manager (Task Bar)
             lxsession-lite    Session Manager
             lxappearance   Theme Switcher
             xarchiver           File Compression/Decompression
             leafpad              Text Editor
             gpicview            Graphic File Viewer
    By recommendation
             gdm                    Logon Manager
  • lxnm                            Provides basic network information
  • lxterminal                   Provides a terminal emulator
  • lxtask                          Provides management of running processess, reports CPU and RAM usage
  • obconf                        Provides configuration of openbox preferences
  • openbox-themes      Provide a selection of themes for the Window Manager
  • grandr                         Provide VDU configuration
  • gdebi                           Installation of local *.deb packages, resolving and installing all dependencies
  • synaptic                      Provide a simplified GUI based display for apt package management
  • update-manager        Provide a simplifed GUI based display to install updates
  • firefox                          Provide a web browser to enable local access to eBox management controls
  • vinagre                        Enable a remote desktop to be controlled on a machine running tightvncserver
  • tightvncserver             Enable the local desktop to be controlled by a machine running vinagre
  • autocutsel                   Enable synchronization of the clipboard between local and remote machines
  • evince                         Enable reading of PDF files
  • pyneighborhood        Enable the browsing and mounting of shares on the network




STAGE 03 - AVAILABILITY
Notes:
1.  I wanted to have the same Ubuntu repositories available as those listed when installing from the official Ubuntu 8.04 LTS CD-ROM (i.e. excluding eBox).  When installing from the eBox v 1.0 CD-ROM only the security repositories were listed by default.
2. The deb-src repositories were not required for my installation and therefore manually commented out
3. Apart from the security repository the Ubuntu repositories for Great Britain are shown



Assume root credentials
Code: [Select]
sudo su


Edit the file governing repository access
Code: [Select]
nano /etc/apt/sources.list


Ensure the following entries are listed:
Code: [Select]
#
# eBOX PLATFORM INSTALLATION CD_ROM
# deb cdrom:[Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1)]/ hardy extras main restricted
# deb cdrom:[Ubuntu-Server 8.04.2 _Hardy Heron_ - Release i386 (20090121.1)]/pool/extras/ /

# SECURITY
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
# deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse

# MAIN RESTRICTED
deb http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted

# MAIN RESTRICTED UPDATES
## Major bug fix updates produced after the final release of the distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

# UNIVERSE
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in universe
## WILL NOT receive any review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy universe
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe

# MULTIVERSE
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

# BACKPORTS
## Uncomment the following two lines to add software from the 'backports'repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

# PARTNER
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is offered
## by Canonical and the respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu hardy partner
# deb-src http://archive.canonical.com/ubuntu hardy partner

# eBOX PLATFORM REPOSITORIES
deb http://ppa.launchpad.net/ebox/ubuntu hardy main

# LXDE REPOSITORY
deb http://ppa.launchpad.net/lxde/ubuntu hardy main



Ensure Packages from the Repositories are Available
Code: [Select]
apt-get update




STAGE 04 - INSTALLATION
Notes:
1. apptitude is used as, by default, it installs the specified packages together with any recommended by them


Install the GUI packages and tools
Code: [Select]
aptitude --assume-yes install [list of packages detailed in Packages by Name]
example:
aptitude --assume-yes install xserver-xorg-core xinit menu ...etc


Verify the installation is complete by checking for broken dependencies
Code: [Select]
apt-get check


Restart the machine to display a GUI logon screen
Code: [Select]
shutdown -r now




STAGE 05 CONFIGURATION
Notes:
1. Packages which require configuration to function are shown
2. Packages which provide cosmetic configuration are not shown
3. The following configurations should be performed with root credentials




AUTOCUTSEL

Automatically start at bootup
Edit /root/.vnc/xstartup
Add the following lines
Code: [Select]
# Enable synchronization of the local & remote clipboards
autocutsel -fork &




FIREFOX
Notes:
1. After configuration the eBox web-gui can be started by entering https://127.0.0.1/ebox in the Firefox Address Bar


Provide a Menu Icon
Edit /usr/share/applications/firefox.desktop  (Displayed as Firefox Web Browser)
Change the Icon= to the following
Code: [Select]
Icon=firefox.png




GRANDR

Provide a menu icon
Create /usr/share/applications/grandr.desktop
Add the following lines:
Code: [Select]
[Desktop Entry]
Name=Monitor Resolution Settings
Comment=Configure VDU Display
Exec=grandr
Icon=gnome-monitor.png
Terminal=false
Categories=Settings; System;




TIGHTVNCSERVER
Notes:
1. After configuration the tightvncserver can be contacted from a client running vinagre by entering the server-ip-address:5909 in the vinagre Connect-->Host field
2. A remote session to the server will start with root credentials


Generate the Configuration Files for Desktop Number 9
Conduct as root in an LXterminal window
Code: [Select]
vncserver :9create a password when requested


Set Up the Desktop to Display on a Remote Client
Edit /root/.vnc/xstartup to contain the following
Code: [Select]
# Set the resources to be used by the xserver
xrdb $HOME/.Xresources

# set the desktop colour
xsetroot -solid grey

# Set the defaults for the terminal window
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

# Start the window manager
#x-window-manager &
openbox &

# Display the GUI panel
lxpanel &


Specify the Default Screen Resolution for Remote Clients Connecting to the Server
Edit /usr/bin/tightvncserver
Code: [Select]
Comment out $geometry = "1074x768";
Add the line $geometry = "800x600";


Ensure a Server Session Automatically Starts at Bootup
Edit /etc/rc.local
Add the lines
Code: [Select]
# Start TightVNCServer at bootup
su --command="tightvncserver :9"   root




References:
http://wiki.dennyhalim.com
http://ebox-platform.com
http://www.lxde.org
http://www.ubuntu.com
« Last Edit: May 04, 2009, 11:12:40 pm by SamK »

poundjd

  • Zen Warrior
  • ***
  • Posts: 243
  • Karma: +0/-0
  • To your own morals be true!
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #1 on: May 04, 2009, 11:02:57 pm »
Sam,
    This looks outstanding!  I am sorry that I'll have to wait till this weekend to try it...
-jeff
Jeffrey D. Pound, Sr.
CISSP
Still learning, hope to never stop!

kjurkic

  • Zen Apprentice
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #2 on: May 06, 2009, 09:01:05 pm »
Howdy Sam,

tinkered with this yesterday, and was able to GDM login, lxde, firefox icon & menu shortcut all working, but encountered a couple of glitches.

1. vncserver won't start at boot, must be manually loaded; maybe should be "vncserver :9" in the start command, rather than "tightvncserver"
Ensure a Server Session Automatically Starts at Bootup
Edit /etc/rc.local
Add the lines
Code:

# Start TightVNCServer at bootup
su --command="tightvncserver :9"   root



2. when connecting to vnc session, all I get is a grey screen; no lxde panel, no terminal, no right-click menu, etc

3 after a short while, all the GUI applications failed...I could not even logout. I had to <CTRL><ALT><F1> to a terminal session, and kill all X processes.  I have not yet been able to repeat this error, but will try and catch what the sequence was for the next time.

regards
Ken

SamK

  • Zen Samurai
  • ****
  • Posts: 283
  • Karma: +3/-0
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #3 on: May 06, 2009, 09:50:32 pm »
Hi Ken,

1. vncserver won't start at boot, must be manually loaded; maybe should be "vncserver :9" in the start command, rather than "tightvncserver"
Ensure a Server Session Automatically Starts at Bootup
Edit /etc/rc.local
Add the lines
Code:

# Start TightVNCServer at bootup
su --command="tightvncserver :9"   root

I'm a little stumped by this not starting, it took a lot of research over a long time to track down this method of starting the server.  It is working reliably in all the desktop PCs and servers I've built (quite a lot of them).  They are all Ubuntu 8.04.2-Server or 9.10-Desktop.   

One other thing to check is that the command includes the quotation marks as shown in the guide.

There is no outward sign that the server has started once the GUI is running.  Try to see if the process starts as follows:
In an LXterminal window
Code: [Select]
ps -AWhen the server is running a process "Xtightvnc" is shown.


2. when connecting to vnc session, all I get is a grey screen; no lxde panel, no terminal, no right-click menu, etc
This was my experience also when I first was finding out how to set up remote control.  It can be very frustrating. It is almost certainly due to configuration settings in /root/.vnc/xstartup.  Again the guide settings are copied and pasted from working setups used on each server and desktop I have built.  Ensure that openbox is the only window manager referenced in the file; x-window-manager appears by default and should be commented out.

One other thing to look at may be the screen resolution.  I use 800x600 as it displays well on the monitors I use.  Other settings sometimes can occupy too large an area for the whole screen to be displayed.


3 after a short while, all the GUI applications failed...I could not even logout. I had to <CTRL><ALT><F1> to a terminal session, and kill all X processes.  I have not yet been able to repeat this error, but will try and catch what the sequence was for the next time.
I have never experienced this.


As I mentioned in my original post, I am not able to actively support this but can assure you it does work well and is worth persevering with.  Good luck with your experiments.
« Last Edit: May 06, 2009, 09:58:37 pm by SamK »

kjurkic

  • Zen Apprentice
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #4 on: May 06, 2009, 10:22:45 pm »
Howdy

Thanks for the guide...saved a lot of time for initial config...I can tinker from there. I was just providing a bit of feedback.

Maybe I am jinxed when it comes to recipes....many is the time I am following a tutorial or recipe for some task (ie Moodle install, or Ruby-on-rails) and despite the fact that I have printed the instructions out, and ticked each step as completed, about 3/4 of the time, I do NOT get the same result as the author(s). I also have experienced that in the dynamic opensource world, a recipe that is more than a few months old can be staled by fixes, patches, & updates.

Ken

SamK

  • Zen Samurai
  • ****
  • Posts: 283
  • Karma: +3/-0
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #5 on: May 06, 2009, 10:29:18 pm »
Hi Ken,

Thanks for the guide...saved a lot of time for initial config...I can tinker from there. I was just providing a bit of feedback.
I am sure that a working setup can be achieved, I built a server today (May 06) using the guide. Do feedback again once you have it working as you want, it will be helpful to others that follow in your path.
« Last Edit: May 06, 2009, 10:33:01 pm by SamK »

thewordofaking

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #6 on: August 04, 2009, 11:44:39 pm »
Great info and a great looking desktop.

I kept getting an error when trying to start the gui.  It was a "fontpath could not be found" error.

The one thing I needed to add to get startx to work was apt-get install xfonts-base.  Don't know if this will help someone else that has this problem.  It took me an hour to find it myself.

Now, when I put "https://127.0.0.1/ebox" in the address bar of firefox I get nothing.  Any ideas on this?  This is set up in a virtual machine by the way.

*****************************
OK, never mind about not not being able to access the ebox gui through firefox.  I foolishly assumed all the ebox packages were already installed with the installer.  I didn't realize that you had to install ebox still.  My bad.
« Last Edit: August 05, 2009, 10:39:21 pm by thewordofaking »

matsingen

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Thanks!
« Reply #7 on: August 31, 2009, 05:30:44 pm »
Tanks for this great guide Sam!
As a long time user of Ubuntu desktop, I find i tricky to work in an console only environment.
When i found my self unable to connect to the server through the browser on my computers i found it MUCH harder and time consuming to manage the server.
Thanks to this guide (witch were very easy to follow!) i was able to enter the server with Firefox through  the new light weight GUI, and re-establish connection to the server from the browsers on the rest of my computers.
Keep up the good work!

Kind regards!
Matsingen

VitRom

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: HOWTO Setup a Lightweight GUI on an eBox Machine
« Reply #8 on: April 09, 2010, 05:01:52 pm »
Anyone has some xperience/notes abt this howto for a current 1.4/1.4-1 ?