Meego Wiki
Views

MeeGo Desktop/Changing Desktops

From MeeGo wiki
< MeeGo Desktop
Revision as of 02:52, 5 January 2011 by Ali1234 (Talk | contribs)
Jump to: navigation, search

Contents

Background

At the 2010 MeeGo Conference in Dublin, the question of how to switch from the Netbook to the Handset desktop was asked during the MeeGo Handset UX Roadmap session. The context of the question had to do with using the Lenovo S10-3t Netbooks given away at the conference as platforms for MeeGo Handset development. Sabotage pipped up and offered up his experience as proof that it can be done, and some very basic instructions on how to do so. Since the question continues to come up in Mailing lists and IRC, the specifics on how to switch between desktops are being documented for ongoing reference.

If it proves useful and interesting to others, maybe these will spawn the development of a desktop "switcher" applet/tool... hint, hint ;)

Pre-work

Assumptions

  1. Using a supported Netbook, such at the Lenovo S10-3t that was given away at the 2010 MeeGo Conference
  2. You have root and/or sudo rights on the above device
  3. You have an installed and running MeeGo 1.1 or later Netbook image (Daily images)

Install Handset Packages

Add the Handset repos

You need to add the appropriate repos to your zypper configs so you can install the Handset packages. This will be different depending on:

  1. Your architecture (ARM, ia32, etc.)
  2. Your desired stability (Daily vs. Weekly vs. Release repos)

So, for example, to add the daily handset repos for the ia32 architecture, you could do this as root:

cat << EOF > /etc/zypp/repos.d/handset.repo
[handset]
name=handset
enabled=1
autorefresh=0
baseurl=http://repo.meego.com/MeeGo/builds/trunk/daily/handset/repos/ia32/packages/
type=rpm-md
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-meego
EOF

Refresh the packages list

sudo zypper refesh

Install the Handset Desktop packages

sudo zypper in -t pattern meego-handset-base-support meego-handset-desktop

How-To

Now that you have the needed packages installed, we must tell uxlaunch (process that controls the user session startup environment and auto starts configured user session daemons and apps)

Change uxlaunch configuration

Edit the /etc/sysconfig/uxlaunch file and comment out the following, existing, entry

sudo sed -i.BAK -ne 's/\(^#\)\(session=.*mcompositor.*$\)/\2/g; s/\(^session=.*mutter.*$\)/#\1/g; p' /etc/sysconfig/uxlaunch

Add a new, Handset specific, entry that will start the windomanager used (mcompositor)

sudo sh -c "echo 'session=/usr/bin/mcompositor' >> /etc/sysconfig/uxlaunch"

Restart user session

  1. $ sudo reboot
    OR
  2. $ sudo telinit 3; sleep 3; sudo telinit 5;

Get correct resolution on IdeaPad

Change the default target configuration by editing a gconf key:

gconftool-2 --set /meegotouch/target/name --type=string "slate"

The reset session as above

TODO

  • Development of a single, cross-MeeGo, desktop switcher?
    This would need to be Qt/Gnome agnostic or independent, since, today at least, the Netbook desktop is Gnome based, while the Handset one is Qt based.
    Here's a simple script for starters that simply toggles between the Netbook and Handset desktops:
#!/bin/bash

NETBOOK_CMD="/usr/bin/mutter"
HANDSET_CMD="/usr/bin/mcompositor"
UXLAUNCH_CONF="/etc/sysconfig/uxlaunch"

CURRENT=$(grep -e "^session=" ${UXLAUNCH_CONF}|cut -d' ' -f1|sed -ne "s/^session=\(.*\)$/\1/p")

function sethandset {
	sudo sed -i -ne 's/\(^#\)\(session=.*mcompositor.*$\)/\2/g; s/\(^session=.*mutter.*$\)/#\1/g; p' ${UXLAUNCH_CONF}
}

function setnetbook {
	sudo sed -i -ne 's/\(^#\)\(session=.*mutter.*$\)/\2/g; s/\(^session=.*mcompositor.*$\)/#\1/g; p' ${UXLAUNCH_CONF}
}

[ $nocasematch ] || nocasematch=1
case "${CURRENT}" in
	"${NETBOOK_CMD}" )
               echo "Switching to Handset Desktop"
		sethandset
		;;
	"${HANDSET_CMD}" )
               echo "Switching to Netbook Desktop"
		setnetbook
		;; 
	*)
               echo "Unknown desktop: \"$CURRENT\""
        	exit
		;;
esac
Personal tools