diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-01-07 06:54:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-01-07 06:54:23 +0000 |
commit | 3df21f51e247685ff7e62b8122ed20342674f871 (patch) | |
tree | d6053ed501bbc2a97da30194760c867e70870f0b /sbin/chksession | |
parent | f025318db172b21f98df38e9209ec77299fbd60c (diff) | |
download | common-data-3df21f51e247685ff7e62b8122ed20342674f871.tar common-data-3df21f51e247685ff7e62b8122ed20342674f871.tar.gz common-data-3df21f51e247685ff7e62b8122ed20342674f871.tar.bz2 common-data-3df21f51e247685ff7e62b8122ed20342674f871.tar.xz common-data-3df21f51e247685ff7e62b8122ed20342674f871.zip |
no_comment
Diffstat (limited to 'sbin/chksession')
-rw-r--r-- | sbin/chksession | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/chksession b/sbin/chksession index a735c0c..d0bec64 100644 --- a/sbin/chksession +++ b/sbin/chksession @@ -85,6 +85,10 @@ $file = $test ? './window-managers' : '/etc/X11/window-managers' unless $file; die "$file don't exist\n" unless -r $file; $remove ? remove_entry($remove, $file) : parse_file ($file); +sub cat { my ($f) = @_; local *F; open F, $f; join '', <F> } +my ($e) = cat("/etc/sysconfig/desktop") =~ /(\S+)/; +@lf = sort { $b =~ /$e/i <=> $a =~ /$e/i } @lf; + if ($kdm) { $session="SessionTypes="; for(@lf) { $session .= /$lf[-1]/ ? "$_;failsafe;default" : "$_;" } |