aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2004-03-02 08:42:41 +0000
committerFrederic Lepied <flepied@mandriva.com>2004-03-02 08:42:41 +0000
commitf3b22250bd6da53c035e3bc96e06ca0111e84f94 (patch)
treeeec8748b216c5dc030c288fc5d87bb4a4ebcce80 /sbin
parent2a49511435faaeb8c81274947bb2db8e90f3fe71 (diff)
downloadcommon-data-f3b22250bd6da53c035e3bc96e06ca0111e84f94.tar
common-data-f3b22250bd6da53c035e3bc96e06ca0111e84f94.tar.gz
common-data-f3b22250bd6da53c035e3bc96e06ca0111e84f94.tar.bz2
common-data-f3b22250bd6da53c035e3bc96e06ca0111e84f94.tar.xz
common-data-f3b22250bd6da53c035e3bc96e06ca0111e84f94.zip
don't pass /etc/X11/xdm/Xsession in Exec field for the KDE sessions
Diffstat (limited to 'sbin')
-rw-r--r--sbin/chksession12
1 files changed, 8 insertions, 4 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 5fa7357..c7c6fa8 100644
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -49,7 +49,7 @@ sub parse_file { # parse a session descriptor file
}
sub gen_desktops {
- my ($d, $createdefault) = @_;
+ my ($d, $createdefault, $usesession) = @_;
-d $d or system("mkdir -p $d");
system("rm -f $d/*");
@@ -60,7 +60,11 @@ sub gen_desktops {
print FH "Name=$file\n";
print FH "Comment=$file\n";
print FH "TryExec=$exe{$file}\n" if $exe{$file};
- print FH "Exec=/etc/X11/xdm/Xsession $file\n";
+ if ($usesession) {
+ print FH "Exec=/etc/X11/xdm/Xsession $file\n";
+ } else {
+ print FH "Exec=$file\n";
+ }
print FH "Icon=\n";
print FH "Type=Application\n";
close FH;
@@ -126,11 +130,11 @@ my ($e) = eval {cat("/etc/sysconfig/desktop")} =~ /DESKTOP=(\S+)/;
if ($kdm) {
- gen_desktops('/usr/share/apps/kdm/sessions', 0);
+ gen_desktops('/usr/share/apps/kdm/sessions', 0, 0);
}
if ($gdm) {
- gen_desktops('/etc/X11/dm/Sessions', 1);
+ gen_desktops('/etc/X11/dm/Sessions', 1, 1);
}
if ($xsession) {