Meego Wiki
Views

MeeGo Desktop/Changing Desktops

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(UXSelect Switcher Tool (alpha))
(UXSelect Switcher Tool (alpha))
Line 77: Line 77:
http://download.meego.com/live/home:/bwachter:/uxlaunch/1.2/ for 1.2 and N900DE
http://download.meego.com/live/home:/bwachter:/uxlaunch/1.2/ for 1.2 and N900DE
-
1.3 is currently not supported due to the switch to systemd; however, my uxlaunch changes will most likely make it into 1.3 Trunk soon.
+
To test it with 1.3 use http://download.meego.com/live/home:/bwachter:/uxlaunch-1.3/Trunk/ -- however, most likely those changes will end up in 1.3 Trunk soon.
==TODO==
==TODO==

Revision as of 12:46, 28 May 2011

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

There appears to be some issues with setting this gconf key and a couple of suggested methods of changing resolution have appeared: Please try each and see which works

  • /etc/meegotouch/devices.conf
    • edit this and set resolution XY in the [default] section as a last resort
  • /usr/share/meegotouch/targets/Default.conf
    • same as previous suggestion

Did these work? are there are other ways or a specific one which works for you?


UXSelect Switcher Tool (alpha)

Developer Bernd Wachter (Aard in IRC) has done some hacking and produced an alpha version of the required switcher.

Current features, all of them can be disabled[4]:

  • Select UX
  • Select user
  • Go through PAM password auth (useful for unlocking cryptofs through pam, for example)

Please expand on this info and see how to reformat this page to show correctly.

Instructions for 1.1 and 1.2 can be found here:

http://lists.meego.com/pipermail/meego-dev/2011-March/481898.html

Repositories are: http://download.meego.com/live/home:/bwachter:/uxlaunch/1.1/ for 1.1, and http://download.meego.com/live/home:/bwachter:/uxlaunch/1.2/ for 1.2 and N900DE

To test it with 1.3 use http://download.meego.com/live/home:/bwachter:/uxlaunch-1.3/Trunk/ -- however, most likely those changes will end up in 1.3 Trunk soon.

TODO

  • Development of a single, cross-MeeGo, desktop switcher?
    • See UX Switcher above.
  • 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