aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-04 07:39:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-04 07:39:42 +0000
commit5ab3ce63551d4f0aa411648836f69d628d8c6615 (patch)
tree7940010dd7b3c98c728389003decbf7248e0ef44 /sbin
parent6b40e27f533687a9fe1b167b03eb0875157016bd (diff)
downloadcommon-data-5ab3ce63551d4f0aa411648836f69d628d8c6615.tar
common-data-5ab3ce63551d4f0aa411648836f69d628d8c6615.tar.gz
common-data-5ab3ce63551d4f0aa411648836f69d628d8c6615.tar.bz2
common-data-5ab3ce63551d4f0aa411648836f69d628d8c6615.tar.xz
common-data-5ab3ce63551d4f0aa411648836f69d628d8c6615.zip
- don't generate /etc/X11/dm/Sessions/Default.desktop (otherwise gdm gives 2 "default" entries)
- cleanup
Diffstat (limited to 'sbin')
-rw-r--r--sbin/chksession20
1 files changed, 4 insertions, 16 deletions
diff --git a/sbin/chksession b/sbin/chksession
index c7c6fa8..9e4f0f3 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, $usesession) = @_;
+ my ($d, $usesession) = @_;
-d $d or system("mkdir -p $d");
system("rm -f $d/*");
@@ -70,18 +70,6 @@ sub gen_desktops {
close FH;
chmod 0755, $file;
}
- if ($createdefault) {
- open FH, ">$d/Default.desktop" or die "Can't write to $d/Default.desktop\n";
- print FH "[Desktop Entry]\n";
- print FH "Encoding=UTF-8\n";
- print FH "Name=Default\n";
- print FH "Comment=Default\n";
- print FH "Exec=/etc/X11/xdm/Xsession\n";
- print FH "Icon=\n";
- print FH "Type=Application\n";
- close FH;
- chmod 0755, $file;
- }
}
usage(1)
@@ -130,11 +118,11 @@ my ($e) = eval {cat("/etc/sysconfig/desktop")} =~ /DESKTOP=(\S+)/;
if ($kdm) {
- gen_desktops('/usr/share/apps/kdm/sessions', 0, 0);
+ gen_desktops('/usr/share/apps/kdm/sessions', 0);
}
if ($gdm) {
- gen_desktops('/etc/X11/dm/Sessions', 1, 1);
+ gen_desktops('/etc/X11/dm/Sessions', 1);
}
if ($xsession) {
@@ -159,7 +147,7 @@ if ($xsession) {
if ($list) {
if (@lf) {
- my $p; for(@lf) { $p .= /^$lf[-1]$/ ? "$_ default failsafe" : "$_ " } print "$p\n";
+ print join(' ', @lf, 'Default', 'failsafe'), "\n";
} else {
print "Default\n";
}