aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorHelio Chissini De Castro <helio@mandriva.com>2008-05-05 19:52:04 +0000
committerHelio Chissini De Castro <helio@mandriva.com>2008-05-05 19:52:04 +0000
commit42b81ce930d6acd86b9ff46c1afa57d8adbaa90b (patch)
tree938d394c2b9efb3b7a95947562679f1562882fcc /sbin
parent547ada9f972bc27b438dd89c0543a291e0efd2fb (diff)
downloadcommon-data-42b81ce930d6acd86b9ff46c1afa57d8adbaa90b.tar
common-data-42b81ce930d6acd86b9ff46c1afa57d8adbaa90b.tar.gz
common-data-42b81ce930d6acd86b9ff46c1afa57d8adbaa90b.tar.bz2
common-data-42b81ce930d6acd86b9ff46c1afa57d8adbaa90b.tar.xz
common-data-42b81ce930d6acd86b9ff46c1afa57d8adbaa90b.zip
- Enable both kdm 3 and 4 to be detected.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/chksession23
1 files changed, 15 insertions, 8 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 3e89e2f..29691d7 100644
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -14,14 +14,15 @@ sub usage {
print { $e ? STDERR : STDOUT } << "EOF";
Usage: $0 [OPTION]...
- -F --first: Print only first available entry.
+ -F --first: Print only first available entry.
-t, --test: Go in test mode.
-l, --list: List window-managers.
-L: List window-managers including the order number
- -d=DIR, --dir=DIR: Specifies a directory of w-m configuration files.
- Default is /etc/X11/wmsession.d/
--x=ENTRY, --xsession=ENTRY: Produce window-managers script of ENTRY.
- -k, --kdm: Produce window-managers list for kdm sessions.
+ -d=DIR, --dir=DIR: Specifies a directory of w-m configuration files.
+ Default is /etc/X11/wmsession.d/
+ -x=ENTRY, --xsession=ENTRY: Produce window-managers script of ENTRY.
+ -k, --kdm3: Produce window-managers list for kdm3 sessions.
+ -K, --kdm4: Produce window-managers list for kdm4 sessions.
-g, --gdm: Produce window-managers script for gdm sessions.
-h, --help: Produce this help.
@@ -89,8 +90,10 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) {
$list++;
} elsif (/^-L/) {
$list_order++;
- } elsif (/^--kdmsess/ || /^-k/) {
- $kdm++;
+ } elsif (/^--kdm3/ || /^-k/) {
+ $kdm3++;
+ } elsif (/^--kdm4/ || /^-K/) {
+ $kdm4++;
} elsif (/^--test/ || /^-t/) {
$test++;
} elsif (/^--dir=([^ ]+)/ || /^-d=([^ ]+)/) {
@@ -120,7 +123,11 @@ my ($e) = eval {cat("/etc/sysconfig/desktop")} =~ /DESKTOP=(\S+)/;
@lf = sort { $b =~ /^$e$/i <=> $a =~ /^$e$/i } @lf;
-if ($kdm) {
+if ($kdm3) {
+ gen_desktops('/opt/kde3/share/apps/kdm/sessions', 0);
+}
+
+if ($kdm4) {
gen_desktops('/usr/share/apps/kdm/sessions', 0);
}