From db445f798d412977d015d1c875d8082c4a65a836 Mon Sep 17 00:00:00 2001 From: Julien Lavergne Date: Mon, 19 Dec 2011 00:00:36 +0100 Subject: [PATCH 1/3] * etc/xdg/lubuntu/menus/lxgames-applications.menu : - Add a specific menu structure for a games session. --- debian/changelog | 2 + .../lubuntu/menus/lxgames-applications.menu | 199 ++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 etc/xdg/lubuntu/menus/lxgames-applications.menu diff --git a/debian/changelog b/debian/changelog index 312c9a4..a274a85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ lubuntu-default-settings (0.23) UNRELEASED; urgency=low * usr/bin/startlubuntu* & usr/share/lubuntu/xscreensaver/xscreensaver: - Add a custom configuration file for xscreensaver, with blank mode by default (LP: #578789). + * etc/xdg/lubuntu/menus/lxgames-applications.menu : + - Add a specific menu structure for a games session. -- Julien Lavergne Tue, 15 Nov 2011 13:47:32 +0700 diff --git a/etc/xdg/lubuntu/menus/lxgames-applications.menu b/etc/xdg/lubuntu/menus/lxgames-applications.menu new file mode 100644 index 0000000..c4260e7 --- /dev/null +++ b/etc/xdg/lubuntu/menus/lxgames-applications.menu @@ -0,0 +1,199 @@ + + + Applications + lxde-menu-applications.directory + + + + + + + Action + ArcadeGame + BoardGame + CardGame + Education + Emulator + LogicGame + Simulation + SportsGame + Strategy + Other + Settings + + + Action + + + Game + ActionGame + Education + + + + + ArcadeGame + + + Game + ArcadeGame + Education + + + + + BoardGame + + + Game + BoardGame + Education + + + + + CardGame + + + Game + CardGame + Education + + + + + Education + + + Education + Game + + + + + Emulator + + + Game + Emulator + Education + + + + + LogicGame + + + Game + LogicGame + Education + + + + + Simulation + + + Game + Simulation + Education + + + + + SportsGame + + + Game + SportsGame + Education + + + + + Strategy + + + Game + StrategyGame + Education + + + + + Other + + + Game + ActionGame + ArcadeGame + BoardGame + CardGame + Emulator + LogicGame + Simulation + SportsGame + StrategyGame + Education + + + + + Settings + lxde-settings.directory + + + System + PackageManager + Game + + + + + Settings + Game + + + + + + + Graphics + Work/Graphics + + + Accessories + Work/Accessories + + + Development + Work/Development + + + Education + Learn + + + Games + Play/Games + + + Multimedia + Play/Multimedia + + + Office + Work/Office + + + System + Settings + + + + wine-wine + Work/wine-wine + + + From 4d6892471cceef6c6a18cf429866862ff56e50a2 Mon Sep 17 00:00:00 2001 From: Julien Lavergne Date: Mon, 19 Dec 2011 00:06:24 +0100 Subject: [PATCH 2/3] * 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 From c1cf9ae36f289a3ba14f111c9c7b14b875cafdb5 Mon Sep 17 00:00:00 2001 From: Julien Lavergne Date: Mon, 19 Dec 2011 00:23:13 +0100 Subject: [PATCH 3/3] * usr/share/xsessions/lxgames.desktop : - Add a new session to start a games session. * debian/control: - Add new binaries, to configure default session on lightdm. * Reorganize script in debian/ to handle the creation of the new default-session binaries. * debian/lubuntu-default-settings.install: - Keep all files in lubuntu-default-settings. --- debian/changelog | 8 ++++++++ debian/control | 14 ++++++++++++++ debian/lubuntu-default-session.postinst | 15 +++++++++++++++ debian/lubuntu-default-session.postrm | 16 ++++++++++++++++ debian/{dirs => lubuntu-default-settings.dirs} | 0 debian/lubuntu-default-settings.install | 2 ++ ...ostinst => lubuntu-default-settings.postinst} | 9 --------- .../{postrm => lubuntu-default-settings.postrm} | 0 ...{preinst => lubuntu-default-settings.preinst} | 0 debian/{prerm => lubuntu-default-settings.prerm} | 0 debian/lxgames-default-session.postinst | 15 +++++++++++++++ debian/lxgames-default-session.postrm | 16 ++++++++++++++++ usr/share/xsessions/lxgames.desktop | 7 +++++++ 13 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 debian/lubuntu-default-session.postinst create mode 100644 debian/lubuntu-default-session.postrm rename debian/{dirs => lubuntu-default-settings.dirs} (100%) create mode 100644 debian/lubuntu-default-settings.install rename debian/{postinst => lubuntu-default-settings.postinst} (73%) rename debian/{postrm => lubuntu-default-settings.postrm} (100%) rename debian/{preinst => lubuntu-default-settings.preinst} (100%) rename debian/{prerm => lubuntu-default-settings.prerm} (100%) create mode 100644 debian/lxgames-default-session.postinst create mode 100644 debian/lxgames-default-session.postrm create mode 100644 usr/share/xsessions/lxgames.desktop diff --git a/debian/changelog b/debian/changelog index caae177..2ef9b25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,14 @@ lubuntu-default-settings (0.23) UNRELEASED; urgency=low - 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. + * usr/share/xsessions/lxgames.desktop : + - Add a new session to start a games session. + * debian/control: + - Add new binaries, to configure default session on lightdm. + * Reorganize script in debian/ to handle the creation of the new + default-session binaries. + * debian/lubuntu-default-settings.install: + - Keep all files in lubuntu-default-settings. -- Julien Lavergne Tue, 15 Nov 2011 13:47:32 +0700 diff --git a/debian/control b/debian/control index 6ce12e3..c39e713 100644 --- a/debian/control +++ b/debian/control @@ -24,3 +24,17 @@ Recommends: amixer, Provides: lightdm-gtk-greeter-config Description: default settings for Lubuntu Various system settings tailored for Lubuntu. + +Package: lxgames-default-session +Architecture: all +Depends: ${misc:Depends}, + lubuntu-default-settings +Description: Set default session to lxgames + Set default session to lxgames. + +Package: lubuntu-default-session +Architecture: all +Depends: ${misc:Depends}, + lubuntu-default-settings +Description: Set default session to lxgames + Set default session to lxgames. diff --git a/debian/lubuntu-default-session.postinst b/debian/lubuntu-default-session.postinst new file mode 100644 index 0000000..e0bfb43 --- /dev/null +++ b/debian/lubuntu-default-session.postinst @@ -0,0 +1,15 @@ +#!/bin/sh -e + +set -e + +case "$1" in + configure|upgrade) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --keep-old --session=Lubuntu || true + /usr/lib/lightdm/lightdm-set-defaults --keep-old --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/lubuntu-default-session.postrm b/debian/lubuntu-default-session.postrm new file mode 100644 index 0000000..ccae28d --- /dev/null +++ b/debian/lubuntu-default-session.postrm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +set -e + +case "$1" in + remove|purge) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --remove --session=Lubuntu || true + /usr/lib/lightdm/lightdm-set-defaults --remove --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + + +#DEBHELPER# +exit 0 diff --git a/debian/dirs b/debian/lubuntu-default-settings.dirs similarity index 100% rename from debian/dirs rename to debian/lubuntu-default-settings.dirs diff --git a/debian/lubuntu-default-settings.install b/debian/lubuntu-default-settings.install new file mode 100644 index 0000000..7c0337f --- /dev/null +++ b/debian/lubuntu-default-settings.install @@ -0,0 +1,2 @@ +etc/ +usr/ diff --git a/debian/postinst b/debian/lubuntu-default-settings.postinst similarity index 73% rename from debian/postinst rename to debian/lubuntu-default-settings.postinst index b992716..92e60b8 100644 --- a/debian/postinst +++ b/debian/lubuntu-default-settings.postinst @@ -22,14 +22,5 @@ if [ "$1" = "configure" ] ; then /etc/xdg/lubuntu/lightdm/lightdm-gtk-greeter.conf 30 fi -case "$1" in - configure|upgrade) - if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then - /usr/lib/lightdm/lightdm-set-defaults --keep-old --session=Lubuntu || true - /usr/lib/lightdm/lightdm-set-defaults --keep-old --greeter=lightdm-gtk-greeter || true - fi - ;; -esac - #DEBHELPER# exit 0 diff --git a/debian/postrm b/debian/lubuntu-default-settings.postrm similarity index 100% rename from debian/postrm rename to debian/lubuntu-default-settings.postrm diff --git a/debian/preinst b/debian/lubuntu-default-settings.preinst similarity index 100% rename from debian/preinst rename to debian/lubuntu-default-settings.preinst diff --git a/debian/prerm b/debian/lubuntu-default-settings.prerm similarity index 100% rename from debian/prerm rename to debian/lubuntu-default-settings.prerm diff --git a/debian/lxgames-default-session.postinst b/debian/lxgames-default-session.postinst new file mode 100644 index 0000000..e59bdbe --- /dev/null +++ b/debian/lxgames-default-session.postinst @@ -0,0 +1,15 @@ +#!/bin/sh -e + +set -e + +case "$1" in + configure|upgrade) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --keep-old --session=lxgames || true + /usr/lib/lightdm/lightdm-set-defaults --keep-old --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/lxgames-default-session.postrm b/debian/lxgames-default-session.postrm new file mode 100644 index 0000000..abe3cd2 --- /dev/null +++ b/debian/lxgames-default-session.postrm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +set -e + +case "$1" in + remove|purge) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --remove --session=lxgames || true + /usr/lib/lightdm/lightdm-set-defaults --remove --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + + +#DEBHELPER# +exit 0 diff --git a/usr/share/xsessions/lxgames.desktop b/usr/share/xsessions/lxgames.desktop new file mode 100644 index 0000000..8e85af1 --- /dev/null +++ b/usr/share/xsessions/lxgames.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +# The names/descriptions should really be better +Name=LX Games +Comment=LX Games - A collection of games, using LXDE desktop. +Exec=/usr/bin/startlubuntu-lxgames +# Icon= +Type=Application