aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorLuc Menut <lmenut@mageia.org>2015-01-07 19:48:02 +0100
committerLuc Menut <lmenut@mageia.org>2015-01-07 19:48:02 +0100
commit8f83679473fe87962325bd6ab8a9ba0877db54e8 (patch)
treecd777c28987723c652c0ed73261e19000b6176cc /sbin
parent4225aba0a6842f4e4be73d863f157ef0f648f524 (diff)
downloadcommon-data-8f83679473fe87962325bd6ab8a9ba0877db54e8.tar
common-data-8f83679473fe87962325bd6ab8a9ba0877db54e8.tar.gz
common-data-8f83679473fe87962325bd6ab8a9ba0877db54e8.tar.bz2
common-data-8f83679473fe87962325bd6ab8a9ba0877db54e8.tar.xz
common-data-8f83679473fe87962325bd6ab8a9ba0877db54e8.zip
sbin/chksession: add support for DesktopNames
write DesktopNames in session desktop files if DESKTOPNAMES is defined in the session config file (mga#14953)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/chksession4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 7e0ebf4..0bbd8e9 100644
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -49,10 +49,11 @@ sub parse_file { # parse a session descriptor file
$_ = cat ($fn);
($n = $1) =~ s| ||g if /^NAME=(.*)/m;
$e = $1 if /^EXEC=(.*)/m;
+ $dn = $1 if /^DESKTOPNAMES=(.*)/m;
# $d = $1 if /^DESC=(.*)/m;
# $i = $1 if /^ICON=(.*)/m;
$s = $1 while /SCRIPT:(.*?)$/gs; chomp $s;
- if (-x $e) { $script{$n} = $s; $exe{$n} = $e; push @lf, $n; ($order{$n}) = $fn =~ m/(^[0-9][0-9])/; }
+ if (-x $e) { $script{$n} = $s; $exe{$n} = $e; $desktopnames{$n} = $dn; push @lf, $n; ($order{$n}) = $fn =~ m/(^[0-9][0-9])/; }
# if (-x $e) { $script{$n} = $s; $exec{$n} = $e; $desc{$n} = $d; $icon{$n} = $i; push @lf, $n; }
}
@@ -68,6 +69,7 @@ sub gen_desktops {
print FH "Name=$file\n";
print FH "Comment=$file\n";
print FH "TryExec=$exe{$file}\n" if $exe{$file};
+ print FH "DesktopNames=$desktopnames{$file}\n" if $desktopnames{$file};
if ($usesession) {
print FH "Exec=/usr/share/X11/xdm/Xsession $file\n";
} else {