aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Salguero <nicolas.salguero@laposte.net>2016-08-13 01:02:31 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-08-13 02:02:37 +0200
commita8aec7a0e6f505ed750ce61991012d6d47cc7bda (patch)
tree0cd3570a3ea6cc0226ecb22ab799c8a6a8451626
parent731b154e46b7b22a835e482fdc0e34ae01a46eb6 (diff)
downloadcommon-data-a8aec7a0e6f505ed750ce61991012d6d47cc7bda.tar
common-data-a8aec7a0e6f505ed750ce61991012d6d47cc7bda.tar.gz
common-data-a8aec7a0e6f505ed750ce61991012d6d47cc7bda.tar.bz2
common-data-a8aec7a0e6f505ed750ce61991012d6d47cc7bda.tar.xz
common-data-a8aec7a0e6f505ed750ce61991012d6d47cc7bda.zip
use sessions from /usr/share/xsessions/ (mga#17617)
instead of from /etc/X11/wmsession.d/ v2 (Thierry Vignaud): - prune useless stuff (removed by earlier perl_checker commit) - do not reparse twice the directory, just keep the existing order logic (which is slowly going towards /dev/null)
-rwxr-xr-x[-rw-r--r--]sbin/chksession10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 8afb6f9..108bc9b 100644..100755
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -21,7 +21,7 @@ Usage: $0 [OPTION]...
-L: List window-managers including the order number
-d=DIR, --dir=DIR: Specifies a directory of w-m configuration files.
- Default is /etc/X11/wmsession.d/
+ Default is /usr/share/xsessions/
-h, --help: Produce this help.
@@ -40,9 +40,9 @@ sub parse_file { # parse a session descriptor file
my ($fn) = @_;
my $n;
local $_ = cat($fn);
- ($n = $1) =~ s| ||g if /^NAME=(.*)/m;
- $e = $1 if /^EXEC=(.*)/m;
- if (-x $e) { push @lf, $n; ($order{$n}) = $fn =~ m/(^[0-9][0-9])/; }
+ ($n = $1) =~ s| ||g if /^Name=(.*)/m;
+ push @lf, $n;
+ ($order{$n}) = $fn =~ m/(^[0-9][0-9])/;
}
usage(1)
@@ -69,7 +69,7 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) {
}
# Parse all relevant files in session directory $dir
-$dir = $test ? './wmsession.d/' : '/etc/X11/wmsession.d/' unless $dir;
+$dir = $test ? './xsessions/' : '/usr/share/xsessions/' unless $dir;
chdir $dir;
for (<*>) {
next if /.*~/;