diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/chksession | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sbin/chksession b/sbin/chksession index 196414f..f61ef1c 100644 --- a/sbin/chksession +++ b/sbin/chksession @@ -18,12 +18,19 @@ Usage: $0 [OPTION]... -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, --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. + + --generate=DIR: Produce window-manager .desktop files into DIR. + --wrap-sessions: Wrap window-managers with /usr/share/X11/xdm/Xsession. + + -k, --kdm3: Shortcut for --generate=/opt/kde3/share/apps/kdm/sessions + -K, --kdm4: Shortcut for --generate=/usr/share/apps/kdm/sessions + -g, --gdm: Shortcut for --generate=/etc/X11/dm/Sessions --wrap-sessions + -h, --help: Produce this help. EOF @@ -83,6 +90,10 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) { $xsession = $1; } elsif (/^--first/ || /^-F/) { $first++; + } elsif (/^--generate=([^ ]+)/) { + $generate = $1; + } elsif (/^--wrap-sessions/) { + $wrap_sessions++; } elsif (/^--gdm/ || /^-g/) { die "You should be root to build gdm session\n" if $< != 0; $gdm++; @@ -123,6 +134,10 @@ my ($e) = eval {cat("/etc/sysconfig/desktop")} =~ /DESKTOP=(\S+)/; @lf = sort { $b =~ /^$e$/i <=> $a =~ /^$e$/i } @lf; +if ($generate) { + gen_desktops($generate, $wrap_sessions); +} + if ($kdm3) { gen_desktops('/opt/kde3/share/apps/kdm/sessions', 0); } |