diff --git a/debian/changelog b/debian/changelog index 7945692..99f56cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,20 @@ lubuntu-default-settings (0.30) UNRELEASED; urgency=low * usr/share/lubuntu/openbox/rc.xml - Add shortcuts for windows tiling (SuperKey + the direction). - Set drawContents to "no" on resize, to reduce the use of resize. + * 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. + * 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 Mon, 22 Oct 2012 22:26:04 +0200 + -- Julien Lavergne Mon, 22 Oct 2012 22:26:04 +0200 lubuntu-default-settings (0.29) quantal; urgency=low diff --git a/debian/control b/debian/control index 015f508..b614c00 100644 --- a/debian/control +++ b/debian/control @@ -27,3 +27,17 @@ Suggests: 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 Lubuntu. 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/postrm b/debian/lubuntu-default-session.postrm similarity index 100% rename from debian/postrm rename to debian/lubuntu-default-session.postrm 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 67% rename from debian/postinst rename to debian/lubuntu-default-settings.postinst index f965f17..b4b9465 100644 --- a/debian/postinst +++ b/debian/lubuntu-default-settings.postinst @@ -18,14 +18,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/lubuntu-default-settings.postrm b/debian/lubuntu-default-settings.postrm new file mode 100644 index 0000000..ccae28d --- /dev/null +++ b/debian/lubuntu-default-settings.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/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/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 + + + diff --git a/usr/bin/startlubuntu-lxgames b/usr/bin/startlubuntu-lxgames new file mode 100644 index 0000000..ad76ad2 --- /dev/null +++ b/usr/bin/startlubuntu-lxgames @@ -0,0 +1,89 @@ +#!/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" +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 + +# Install custom lxterminal configuration if no one is already installed +if [ ! -f "$XDG_CONFIG_HOME/lxterminal/lxterminal.conf" ]; then + cp /etc/xdg/lubuntu/lxterminal/lxterminal.conf "$XDG_CONFIG_HOME/lxterminal/lxterminal.conf" +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 + +# Export Gnome-keyring variables if needed +# See bug #664206 +if which gnome-keyring-daemon >/dev/null; then + export $(/usr/bin/gnome-keyring-daemon --start --components=ssh) +fi + +# Start SSH agent, require since 3.5 +# (see https://wiki.archlinux.org/index.php/Openbox#SSH_agent_no_longer_starting) +SSHAGENT="/usr/bin/ssh-agent" +SSHAGENTARGS="-s" +if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then + eval `$SSHAGENT $SSHAGENTARGS` + trap "kill $SSH_AGENT_PID" 0 +fi + +# Start the LXDE session +exec /usr/bin/lxsession -s Lubuntu-Netbook -e LXDE 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