diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/chksession | 23 |
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); } |