diff options
author | Frederic Crozat <fcrozat@mandriva.com> | 2003-06-13 16:52:42 +0000 |
---|---|---|
committer | Frederic Crozat <fcrozat@mandriva.com> | 2003-06-13 16:52:42 +0000 |
commit | 04a97edbe7cdeb210b55088e493d9b3f3615a92f (patch) | |
tree | de5d13812b2baa196cad2c8e9353e18fbbcf76dd /sbin | |
parent | 0d924f925d4eb60747c1f0254d9cecc201971e3d (diff) | |
download | common-data-04a97edbe7cdeb210b55088e493d9b3f3615a92f.tar common-data-04a97edbe7cdeb210b55088e493d9b3f3615a92f.tar.gz common-data-04a97edbe7cdeb210b55088e493d9b3f3615a92f.tar.bz2 common-data-04a97edbe7cdeb210b55088e493d9b3f3615a92f.tar.xz common-data-04a97edbe7cdeb210b55088e493d9b3f3615a92f.zip |
gdm session format has changed, fix chksession
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/chksession | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sbin/chksession b/sbin/chksession index 6ce62d6..078965f 100644 --- a/sbin/chksession +++ b/sbin/chksession @@ -89,23 +89,22 @@ if ($kdm) { if ($gdm) { - my $d = '/etc/X11/gdm/Sessions/'; + my $d = '/etc/X11/dm/Sessions/'; chdir $d; - #Any better way ? - opendir D, $d or die "Can't open $d\n"; - for ( readdir(D)) { next if /^\.\.?/;next if /^Failsafe/; chmod 0644, $_; } - closedir D; - for my $file (@lf) { - open FH, ">/etc/X11/gdm/Sessions/$file" or die "Can't write to /etc/X11/gdm/Sessions/$file\n"; - print FH "#!/bin/sh\n"; - print FH "exec /etc/X11/xdm/Xsession $file\n"; + open FH, ">/etc/X11/dm/Sessions/$file.desktop" or die "Can't write to /etc/X11/dm/Sessions/$file.desktop\n"; + print FH "[Desktop Entry]\n"; + print FH "Encoding=UTF-8\n"; + print FH "Name=$file\n"; + print FH "Comment=$file\n"; + print FH "Exec=/etc/X11/xdm/Xsession $file\n"; + print FH "Icon=\n"; + print FH "Type=Application\n"; close FH; chmod 0755, $file; } - unlink 'Default'; - symlink shift @lf, 'Default'; + } if ($xsession) { |