From 4d6892471cceef6c6a18cf429866862ff56e50a2 Mon Sep 17 00:00:00 2001 From: Julien Lavergne Date: Mon, 19 Dec 2011 00:06:24 +0100 Subject: [PATCH] * usr/bin/startlubuntu-lxgames : - Add a new script to start a games session, with a specific menu structure. --- debian/changelog | 2 ++ usr/bin/startlubuntu-lxgames | 69 ++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 usr/bin/startlubuntu-lxgames diff --git a/debian/changelog b/debian/changelog index a274a85..caae177 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ lubuntu-default-settings (0.23) UNRELEASED; urgency=low default (LP: #578789). * etc/xdg/lubuntu/menus/lxgames-applications.menu : - Add a specific menu structure for a games session. + * usr/bin/startlubuntu-lxgames : + - Add a new script to start a games session, with a specific menu structure. -- Julien Lavergne Tue, 15 Nov 2011 13:47:32 +0700 diff --git a/usr/bin/startlubuntu-lxgames b/usr/bin/startlubuntu-lxgames new file mode 100644 index 0000000..b0293e4 --- /dev/null +++ b/usr/bin/startlubuntu-lxgames @@ -0,0 +1,69 @@ +#!/bin/sh + +#Workaround to disable rgba, because lxpanel in Lubuntu doesn't support it +#(see bug #589763) +# +#export XLIB_SKIP_ARGB_VISUALS=1 + +if [ -z "$XDG_CONFIG_HOME" ]; then + export XDG_CONFIG_HOME="$HOME/.config" +fi + +#Allow custom configuration files in /etc/xdg/lubuntu +#Patch stolen from Xubuntu +if test "x$XDG_CONFIG_DIRS" = "x" +then + XDG_CONFIG_DIRS="/etc/xdg/lubuntu:/etc/xdg" +else + XDG_CONFIG_DIRS="/etc/xdg/lubuntu/:$XDG_CONFIG_DIRS:/etc/xdg" +fi +export XDG_CONFIG_DIRS + +if test "x$XDG_DATA_DIRS" = "x" +then + XDG_DATA_DIRS="/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg" + else + XDG_DATA_DIRS="/etc/xdg/lubuntu:$XDG_DATA_DIRS:/usr/share:/usr/share/gdm:/var/lib/menu-xdg" +fi +export XDG_DATA_DIRS + +# Ensure the existance of openbox config file +OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox" +if [ ! -f "$OPENBOX_CONF_DIR/lubuntu-rc.xml" ]; then + mkdir -p "$OPENBOX_CONF_DIR" + cp /usr/share/lubuntu/openbox/rc.xml "$OPENBOX_CONF_DIR/lubuntu-rc.xml" +fi + +# Install custom QT configuration if no one is already installed +if [ ! -f "$XDG_CONFIG_HOME/Trolltech.conf" ]; then + cp /usr/share/lubuntu/qt/Trolltech.conf "$XDG_CONFIG_HOME/Trolltech.conf" +fi + +# Install custom configuration for leafpad +LEAFPAD_CONF_DIR="$XDG_CONFIG_HOME/leafpad" +if [ ! -f "$LEAFPAD_CONF_DIR/leafpadrc" ]; then + mkdir -p "$LEAFPAD_CONF_DIR" + cp /usr/share/lubuntu/leafpad/leafpadrc "$LEAFPAD_CONF_DIR/leafpadrc" +fi + +# Install custom configuration for xscreensaver +if [ ! -f "$HOME/.xscreensaver" ]; then + cp /usr/share/lubuntu/xscreensaver/xscreensaver "$HOME/.xscreensaver" +fi + +# Clean up after GDM (GDM sets the number of desktops to one) +xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null + +#Ensure the menu prefix +export XDG_MENU_PREFIX="lxgames-" + +# Enable GTK+2 integration for OpenOffice.org, if available. +export SAL_USE_VCLPLUGIN=gtk + +# Launch DBus if needed +if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then + eval "$(dbus-launch --sh-syntax --exit-with-session)" +fi + +# Start the LXDE session +exec /usr/bin/lxsession -s Lubuntu-Netbook -e LXDE