The attached patch add the "-v" option in order to show lxsession version.
This "feature" may seem stupid on a first view, instead i added, because
i'm adding lxde support to xdg-utils and it works on some scripts like
that (gnome example)
which gnome-session >/dev/null 2>&1
if [ "$?" -eq 0 ] ; then
gnome_version=`gnome-session --version | cut -d ' ' -f3 2>/dev/null`
echo "gnome: $gnome_version"
if [ ! -z "$GNOME_DESKTOP_SESSION_ID" ]; then
running="gnome $running"
fi
else
echo "gnome: not present (didn't find gnome-session)"
fi
the same thing is made on kde and xfce
Regards
Andrea
--
------------------------------------------
Andrea Florio
QSI International School of Brindisi Sys Admin
CISCO CCNA Certified
openSUSE-Education Administrator
openSUSE Official Member (anubisg1)
Email: [email protected]
Packman Packaging Team
Email: [email protected]
Web: http://packman.links2linux.org/
Cell: +39-328-7365667
------------------------------------------
diff -uNr old-lxsession-0.4.1//lxsession/lxsession.c lxsession-0.4.1/lxsession/lxsession.c
--- old-lxsession-0.4.1//lxsession/lxsession.c 2009-12-10 18:51:48.000000000 +0100
+++ lxsession-0.4.1/lxsession/lxsession.c 2010-01-15 23:04:42.110638912 +0100
@@ -39,6 +39,7 @@
#include "autostart.h"
+static gchar version[] = VERSION;
static gboolean no_settings = FALSE; /* disable settings daemon */
static gboolean reload_settings = FALSE; /* reload settings daemon */
@@ -243,10 +244,13 @@
de_name = argv[i];
continue;
case 'r':
- reload_settings = TRUE;
- continue;
- default:
- goto usage;
+ reload_settings = TRUE;
+ continue;
+ case 'v':
+ printf("lxsession %s\n", version);
+ exit(0);
+ default:
+ goto usage;
}
}
}
@@ -256,9 +260,10 @@
"Usage: lxsession [OPTIONS...]\n"
"\t-d NAME\tspecify name of display (optional)\n"
"\t-s NAME\tspecify name of the desktop session profile\n"
- "\t-e NAME\tspecify name of DE, such as LXDE, GNOME, or XFCE.\n"
+ "\t-e NAME\tspecify name of DE, such as LXDE, GNOME, or XFCE.\n"
"\t-r\t reload configurations (for Xsettings daemon)\n"
- "\t-n\t disable Xsettings daemon support\n" );
+ "\t-n\t disable Xsettings daemon support\n"
+ "\t-v\t show version\n");
exit(1);
}
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list