MeeGo uses a generic X session launch utility called Uxlaunch (http://www.meego.gitorious.org/meego-os-base/uxlaunch). It is designed to quickly start X and a user desktop. There are two ways to set which script or application the Uxlaunch should boot:
1. Editing KickStart (.ks) file. The .ks file is used to create a MeeGo image.
NOTE: You can get more information about creating MeeGo images at http://oss.signove.com/index.php/Custom_Meego_Platform
You can customize your MeeGo UX by setting the desktop session to your own script or application through the KickStart file. The desktop --session property is used by Uxlaunch to start the desktop session during MeeGo startup. Each MeeGo UX (Netbook, Handset and IVI) uses a different startup script or application, for example:
#core-armv7l-n900.ks --> mcompositor ( used by MeeGo handset )
desktop --autologinuser=meego --defaultdesktop=DUI --session="/usr/bin/mcompositor"
#core-ia32-generic.ks --> No window manager, only starts xterm, the standard terminal emulator for the X Window System
desktop --autologinuser=meego --session="/usr/bin/xterm"
#ivi-ia32-noemgd-1.1.ks --> starts the matchbox window manager and the Qt GUI application through startivi script ( used by MeeGo IVI )
desktop --autologinuser=meego --defaultdesktop=X-IVI --session=/usr/bin/startivi
It follows the content of startivi script used by IVI:
#!/bin/sh
## check to see if a instance is already running
CHECK=`/bin/ps auxwww | /bin/grep -v grep | /bin/grep "/usr/bin/ivihome$"`
if [ -z "$CHECK" ] ; then
xsetroot -solid black -cursor_name watch
matchbox-window-manager -use_desktop_mode plain -use_titlebar no &
ividesktop &
panel=`which ivihome`
case "x$panel" in
x|xno*)
;;
*)
$panel
ret=$?
while test $ret -ne 0; do
$panel
ret=$?
done
;;
esac
xsetroot -bg white -fg red -solid black -cursor_name watch
else
echo "startivi is already started, run 'pkill startivi' to restart"
fi
2. Editing /etc/sysconfig/uxlaunch file after image was created
The /etc/sysconfig/uxlaunch file has a session property that defines which script or application it should start. You can edit the file to start your own script or application.
session=/usr/bin/mcompositor
On our customized MeeGo image, we create our own script ('''twm-session''') to initialize the twm window manager and start our GUI application. For that, we changed the desktop --session property at KickStart file to start our twm-session script:
#customized ks to "core-ia32-generic.ks"
desktop --autologinuser=meego --session=/usr/local/bin/twm-session
It follows our twm-session script:
#!/bin/bash
/usr/bin/xsetroot -grey
#starts twm window manager
/usr/bin/twm &
#starts our QT application
/usr/local/bin/signove-desktop
NOTE: the twm-session script was installed during the image creation through signove-desktop RPM package.
You can choose the Window Manager according to your needs. If your platform should support translucent applications, you will need a Compositing Window Manager like mcompositor and mutter. If your platform should NOT support translucent applications and need more efficiency, you could use a Stacking Window Manager like matchbox. You can read more about Window Managers at:
- http://en.wikipedia.org/wiki/X_window_manager
- http://en.wikipedia.org/wiki/Comparison_of_X_window_managers
- http://en.wikipedia.org/wiki/Stacking_window_manager
- http://en.wikipedia.org/wiki/Compositing_window_manager
You can check the links bellow to create translucent applications using QT:
- http://doc.qt.nokia.com/4.7/qwidget.html#creating-translucent-windows
- http://wiki.meego.com/QML/Creating_a_transparent_window
For more details about changing desktops on MeeGo:
Nenhum comentário:
Postar um comentário