X11 LXDE in OpenVZ: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
Line 122: Line 122:
* [http://x2go-community.org/node/439 Portable Mode for Windows Clients]
* [http://x2go-community.org/node/439 Portable Mode for Windows Clients]
* [http://www.fdsd.co.uk/wiki/Tech/LxdeTips.html LXDE Tips]
* [http://www.fdsd.co.uk/wiki/Tech/LxdeTips.html LXDE Tips]
* [https://wiki.debian.org/LibreOffice LibreOffice on Debian]
* [https://www.debian.org/News/2011/20110623 LibreOffice replaces OpenOffice.org in Debian Wheezy onwards]
* [https://packages.debian.org/search?keywords=openjdk-6-jre OpenJDK 6 JRE in Debian Packages]





Revision as of 18:06, 15 October 2014

Introduction

x2go is available as a server for linux distributions and as a client for Windows, MacOS, Linux - Debian / Fedora and their derivatives. The x2go client in a remote instance can connect to a headless VM in an OpenVZ container running the x2go server and the specific GUI bindings (Gnome, KDE, LXDE, etc). Though this article is specific to debian squeeze x2go server install, it can be a general guide with small modifications to suit any distro.

Installing the x2go server in a Debian Squeeze VM

  • Create an OpenVZ container based on any debian squeeze template (standard preferred).
  • SSH into it as root
  • Make sure the squeeze-lts repo is available (otherwise add it):
grep squeeze-lts /etc/apt/sources.list

Output: deb http://ftp.debian.org/debian squeeze-lts main contrib

  • Now execute the following (stopping and starting the container as directed in the comments):
apt-get update && apt-get dist-upgrade
apt-get clean all

# export DEBIAN_FRONTEND=noninteractive
apt-get install lxde
# During above installation, Keyboard Country and Charset will be interactively asked

(
cat <<REPOstring
# X2Go Repository (release builds)
deb http://packages.x2go.org/debian squeeze main
# X2Go Repository (sources of release builds)
deb-src http://packages.x2go.org/debian squeeze main
REPOstring
) > /etc/apt/sources.list.d/x2go.list

apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
apt-get update
apt-get install x2go-keyring && apt-get update
apt-get install x2goserver x2goserver-xsession
# The following will have to be removed and installed again if the primary lxpanel gets removed in the GUI
apt-get install x2golxdebindings

Installing Firefox

apt-get remove iceweasel
(
cat <<FFRepo
# Firefox Repository
deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main
FFRepo
) > /etc/apt/sources.list.d/firefox.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
apt-get update
apt-get install firefox-mozilla-build

shutdown -r now

Startup Apps

All the applications are in: /usr/share/applications

cat <<EOF > /etc/xdg/autostart/lxterminal.desktop
[Desktop Entry]
Type=Application
Exec=lxterminal
OnlyShowIn=LXDE;
EOF

cat <<EOF >> /etc/xdg/lxsession/LXDE/autostart
@/etc/xdg/autostart/lxterminal.desktop
EOF

Other Applications in LXDE

To install and run applications such as LibreOffice (forked from OpenOffice.org and standard from Debian Wheezy onwards), we need to increase the RAM and Swap to atleast 1GB. Incase the RAM was not increased and the apt-get install [package] froze, it can be recovered on reboot after increasing the RAM by executing:

dpkg --configure -a

LibreOffice is available in the squeeze-backports repo which can be installed using:

squeeze-backports repo

  • Increase VM memory and swap allocation to atleast 1GB
  • Enable squeeze-backports and squeeze-backports-sloppy repos by appending the following to /etc/apt/sources.list
deb http://backports.debian.org/debian-backports squeeze-backports main
deb http://backports.debian.org/debian-backports squeeze-backports-sloppy main

This can also be done with:

cat <<EOF >> /etc/apt/sources.list
deb http://backports.debian.org/debian-backports squeeze-backports main
deb http://backports.debian.org/debian-backports squeeze-backports-sloppy main
EOF

apt-get update

InstallLibre Office

  • LibreOffice can be installed with:
apt-get install -t squeeze-backports libreoffice
  • openjdk 6 also gets installed
  • Depending on the used desktop environment, you might also have to install the libreoffice-gtk, libreoffice-gnome or libreoffice-kde packages. For LXDE, the necessary packages have already been installed now.

Installing the x2go Client

  • In Windows XP/7/8/8.1, download and install the x2go client.
  • Linux and Mac clients too are available.

Using the x2go client

  • Choose the appropriate graphic resolution and color depth to suit your monitor and bandwidth respectively.
  • Connect to the x2go server accepting to open what firewall requests emanate.
  • While inside the LXDE GUI:
    • Set Firefox Preferences
    • Set Default Browser to Firefox
    • Set Panel icons as desired by right-clicking the Menu icon

lxpanel issues

  • If the lxpanel gets lost, try to logout and connect again.
  • If the lxpanel is still unavailable the restart it with:
lxpanelctl restart
  • Still drastic measures can be:
killall lxpanel && lxpanel -p LXDE &

Portable Client

x2goclient on Windows has a portable mode (and has had one for a very long time, if not even from the beginning). No need to apply any external tweaks or tools. See x2goclient.exe --help for details.

References