aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2003-06-13 16:52:42 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2003-06-13 16:52:42 +0000
commit04a97edbe7cdeb210b55088e493d9b3f3615a92f (patch)
treede5d13812b2baa196cad2c8e9353e18fbbcf76dd /sbin
parent0d924f925d4eb60747c1f0254d9cecc201971e3d (diff)
downloadcommon-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/chksession21
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) {