diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2009-06-19 18:06:20 +0100 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-06-19 18:06:20 +0100 |
| commit | cd60a7eb241e7e658cfa88043ca0049845ebdecd (patch) | |
| tree | 66ea5034858475aed63a906c5184ac20d6b30781 /meta-moblin/packages/matchbox-netbook-session | |
| parent | 19e1d23dd1c46b11d929d8803f24121b7b8447d3 (diff) | |
| download | poky-cd60a7eb241e7e658cfa88043ca0049845ebdecd.tar.gz | |
meta-moblin: Add recipes for most moblin beta components
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-moblin/packages/matchbox-netbook-session')
| -rw-r--r-- | meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook/session | 5 | ||||
| -rw-r--r-- | meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook_0.1.bb | 169 |
2 files changed, 174 insertions, 0 deletions
diff --git a/meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook/session b/meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook/session new file mode 100644 index 0000000000..5cf9ee1bf3 --- /dev/null +++ b/meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook/session | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | export LIBGL_ALWAYS_INDIRECT=1 | ||
| 4 | |||
| 5 | exec metacity --mutter-plugins=moblin-netbook | ||
diff --git a/meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook_0.1.bb b/meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook_0.1.bb new file mode 100644 index 0000000000..e318785ece --- /dev/null +++ b/meta-moblin/packages/matchbox-netbook-session/matchbox-session-netbook_0.1.bb | |||
| @@ -0,0 +1,169 @@ | |||
| 1 | DESCRIPTION = "Custom MB session files for poky" | ||
| 2 | LICENSE = "GPL" | ||
| 3 | SECTION = "x11" | ||
| 4 | RDEPENDS = "formfactor gtk-engines initscripts matchbox-session" | ||
| 5 | PR = "r15" | ||
| 6 | |||
| 7 | # This package is architecture specific because the session script is modified | ||
| 8 | # based on the machine architecture. | ||
| 9 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 10 | |||
| 11 | SRC_URI = "file://session" | ||
| 12 | S = "${WORKDIR}" | ||
| 13 | |||
| 14 | do_install() { | ||
| 15 | install -d ${D}/${sysconfdir}/matchbox | ||
| 16 | install ${S}/session ${D}/${sysconfdir}/matchbox/session | ||
| 17 | chmod +x ${D}/${sysconfdir}/matchbox/session | ||
| 18 | } | ||
| 19 | |||
| 20 | pkg_postinst_${PN} () { | ||
| 21 | #!/bin/sh -e | ||
| 22 | if [ "x$D" != "x" ]; then | ||
| 23 | exit 1 | ||
| 24 | fi | ||
| 25 | |||
| 26 | . ${sysconfdir}/init.d/functions | ||
| 27 | |||
| 28 | # Theme | ||
| 29 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 30 | --direct --type string -s \ | ||
| 31 | /apps/metacity/general/theme "Moblin-Netbook" | ||
| 32 | |||
| 33 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 34 | --direct --type string -s \ | ||
| 35 | /apps/metacity/general/button_layout ":close" | ||
| 36 | |||
| 37 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 38 | --direct --type string -s \ | ||
| 39 | /desktop/gnome/interface/gtk_theme "Moblin-Netbook" | ||
| 40 | |||
| 41 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 42 | --direct --type string -s \ | ||
| 43 | /desktop/gnome/interface/icon_theme "moblin" | ||
| 44 | |||
| 45 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 46 | --direct --type string -s \ | ||
| 47 | /desktop/gnome/peripherals/mouse/cursor_theme "moblin" | ||
| 48 | |||
| 49 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 50 | --direct --type string -s \ | ||
| 51 | /desktop/gnome/interface/toolbar_style "icons" | ||
| 52 | |||
| 53 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 54 | --direct --type bool -s \ | ||
| 55 | /desktop/gnome/interface/menus_have_icons false | ||
| 56 | |||
| 57 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 58 | --direct --type bool -s \ | ||
| 59 | /desktop/gnome/interface/buttons_have_icons false | ||
| 60 | |||
| 61 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 62 | --direct --type string -s \ | ||
| 63 | /desktop/gnome/sound/theme_name moblin | ||
| 64 | |||
| 65 | # Window Actions | ||
| 66 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 67 | --direct --type string -s \ | ||
| 68 | /apps/metacity/general/action_double_click_titlebar "none" | ||
| 69 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 70 | --direct --type string -s \ | ||
| 71 | /apps/metacity/general/action_middle_click_titlebar "none" | ||
| 72 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 73 | --direct --type string -s \ | ||
| 74 | /apps/metacity/general/action_right_click_titlebar "none" | ||
| 75 | |||
| 76 | # UX Shell | ||
| 77 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 78 | --direct --type bool -s \ | ||
| 79 | /apps/metacity/general/clutter_disabled false | ||
| 80 | |||
| 81 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 82 | --direct --type list --list-type string -s \ | ||
| 83 | /apps/metacity/general/clutter_plugins '[moblin-netbook]' | ||
| 84 | |||
| 85 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 86 | --direct --type string -s \ | ||
| 87 | /desktop/gnome/url-handlers/http/command 'moblin-web-browser %s' | ||
| 88 | |||
| 89 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 90 | --direct --type string -s \ | ||
| 91 | /desktop/gnome/url-handlers/https/command 'moblin-web-browser %s' | ||
| 92 | |||
| 93 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 94 | --direct --type string -s \ | ||
| 95 | /desktop/gnome/background/picture_filename \ | ||
| 96 | '/usr/share/mutter-moblin/theme/myzone/toys.jpg' | ||
| 97 | |||
| 98 | # Fonts | ||
| 99 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 100 | --direct --type string -s \ | ||
| 101 | /desktop/gnome/interface/document_font_name \ | ||
| 102 | 'Liberation Sans 10' | ||
| 103 | |||
| 104 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 105 | --direct --type string -s \ | ||
| 106 | /desktop/gnome/interface/font_name \ | ||
| 107 | 'Liberation Sans 10' | ||
| 108 | |||
| 109 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 110 | --direct --type string -s \ | ||
| 111 | /desktop/gnome/interface/monospace_font_name \ | ||
| 112 | 'Liberation Mono 10' | ||
| 113 | |||
| 114 | # Nautilus | ||
| 115 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 116 | --direct --type bool -s \ | ||
| 117 | /apps/nautilus/preferences/always_use_browser true | ||
| 118 | |||
| 119 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 120 | --direct --type bool -s \ | ||
| 121 | /apps/nautilus/icon_view/labels_beside_icons true | ||
| 122 | |||
| 123 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 124 | --direct --type string -s \ | ||
| 125 | /apps/nautilus/icon_view/default_zoom_level large | ||
| 126 | |||
| 127 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults \ | ||
| 128 | --direct --type string -s \ | ||
| 129 | /apps/gnome_settings_daemon/keybindings/power "" | ||
| 130 | |||
| 131 | # | ||
| 132 | # The interesting bit - we convert to run the system as the user "pokyuser" | ||
| 133 | # and setup this user account as needed | ||
| 134 | # | ||
| 135 | if [ ! -d /home/pokyuser ]; then | ||
| 136 | adduser --disabled-password --ingroup users pokyuser | ||
| 137 | |||
| 138 | # Setup any .skel files | ||
| 139 | if [ -d ${sysconfdir}/skel ]; then | ||
| 140 | cp -pPR ${sysconfdir}/skel/.[a-zA-Z0-9]* /home/pokyuser/ || /bin/true | ||
| 141 | cp -pPR ${sysconfdir}/skel/* /home/pokyuser/ || /bin/true | ||
| 142 | fi | ||
| 143 | |||
| 144 | # Move any sample media into this user | ||
| 145 | if [ -d ${sysconfdir}/skel-media ]; then | ||
| 146 | mv ${sysconfdir}/skel-media/* /home/pokyuser/ || /bin/true | ||
| 147 | fi | ||
| 148 | |||
| 149 | chown pokyuser.users -R /home/pokyuser/* || /bin/true | ||
| 150 | chown pokyuser.users -R /home/pokyuser/.[a-zA-Z0-9]* || /bin/true | ||
| 151 | |||
| 152 | # Make sure Xorg is suid | ||
| 153 | chmod a+s /usr/bin/Xorg | ||
| 154 | |||
| 155 | # Tell X to run as this user | ||
| 156 | mkdir -p ${sysconfdir}/X11/ | ||
| 157 | echo "pokyuser" > ${sysconfdir}/X11/Xusername | ||
| 158 | |||
| 159 | # Add pokyuser to the audio group | ||
| 160 | audiousers=`grep ^audio < /etc/group | cut -d ':' -f 4` | ||
| 161 | if [ "x$audiousers" == "x" ]; then | ||
| 162 | audiousers=pokyuser | ||
| 163 | else | ||
| 164 | audiousers=$audiousers,pokyuser | ||
| 165 | fi | ||
| 166 | sed -i -e "s/audio:\(.*\):\(.*\):\(.*\)/audio:\1:\2:$audiousers/" /etc/group | ||
| 167 | fi | ||
| 168 | |||
| 169 | } | ||
