User Tools

Site Tools


howto:getgnome

Installing the Gnome Desktop

CAUTION: Be aware that the steps you take here may for some reason or other screw up you system. Be sure that you know how to reinstall your system or revert your changes. And by golly, back up your data.

Introduction

This HowTo is very loosely based on the forum thread http://forum.eeeuser.com/viewtopic.php?id=2009. The thread contains more information, for example on using xfce, that is not yet contained in this HowTo. The goal of this HowTo is to get a working Gnome Desktop environment based on Asus' original installation, extended only by the full Xandros distribution and minimal further changes to the system.

The installation consists of two comparably simple, non-invasive parts:

  1. Installing the Gnome packages: Adding the Xandros-repositories and installing gnome-core.
  2. Changing the system to start Gnome at startup: Editing /usr/bin/startsimple.sh, adding /etc/X11/Xsession.d/11startkde and editing /etc/acpi/powerbtn.sh

Installation of the Gnome packages

The concept of repositories and a guide to editing the list for repositories is given at editing_the_list_of_sources.

Since the goal is a minimal disruption of the system, we use only xandros repositories, by copying the three lines in the blue box below into /etc/apt/sources.list

deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free
deb http://dccamirror.xandros.com/dccri/ dccri-3.0 main
deb http://www.geekconnection.org/ xandros4 main

This leaves out the community repositories, but is enough for a basic gnome system. Now edit /etc/apt/preferences, so that asus packages are preferred over xandros packages. If the file does not exist, create it. It should contain:

Package: *
Pin: origin update.eeepc.asus.com
Pin-Priority: 950

Package: *
Pin: origin
Pin-Priority: 925

Package: *
Pin: origin xnv4.xandros.com
Pin-Priority: 900

Package: *
Pin: origin dccamirror.xandros.com
Pin-Priority: 850

Package: *
Pin: origin www.geekconnection.org
Pin-Priority: 750

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600

Now you can install gnome-core with the synaptic-package manager or with the command line:

sudo apt-get update
sudo apt-get install gnome-core

Starting Gnome at startup

This follows the suggestion at yet_another_simple_way_to_boot_into_advanced_mode_no_double_boot_effect_can_switch_into_easy_mode.

Create a new file called what ever you like in /etc/X11/Xsession.d/:

11startkde:

#!/bin/sh
#added by me to start kde instead of icewm
 
touch /tmp/kdesession

Add one line to the /usr/bin/startsimple.sh script and exchange gnome-session for startkde:

elif [ -f /tmp/kdesession -a ! -f /home/user/.easysession ]; then
        sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
        if [ ! -d /home/user/Desktop ]; then
            if [ -d /home/.Desktop ]; then
                mv /home/user/.Desktop /home/user/Desktop
            fi
        fi
        [ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
        for i in /sys/block/s[dr]?/uevent ; do
                 sudo /bin/sh -c "echo add > $i"
        done
        sudo rm -f /tmp/kdesession /tmp/nologin
        # add line to get the powerbutton to call /usr/bin/powerbtn.sh
        /opt/xandros/bin/start_netserv &
        # execute gnome-session instead of startkde
        exec gnome-session

Of course, you can call /tmp/kdesession /tmp/gnomesession in both files, but this does not make a difference for the startup process.

powerbtn.sh does not yet open the shutdown dialog (where one can choose to standby, restart, or shutdown), but only shuts down the computer. This is because it checks for kde programs, not for gnome programs before showing the dialog. To get the dialog, add an additional check for gnome-session. In short, make the following your new /etc/acpi/powerbtn.sh:

# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.

if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop
then
    dcop --all-sessions --all-users ksmserver ksmserver logout 1 2 2 && exit 0
elif ps -Af | grep -q 'AsusLauncher'
then
    if [ ! -f /home/user/.doingLogin ]
    then
      DISPLAY=:0 su -c /opt/xandros/bin/shutdown_dialog user &
    fi
# begin of the new test
elif ps -Af | grep -q 'gnome-session'
then
    if [ ! -f /home/user/.doingLogin ]
    then
      DISPLAY=:0 su -c /opt/xandros/bin/shutdown_dialog user &
    fi
# end of the new test
else
    /bin/kill -SIGUSR2 1
fi

And that is it. Now the system starts into Gnome and the power button brings up the shutdown dialog.

howto/getgnome.txt · Last modified: 2008/07/31 02:07 by lemongrass