Mageia Bugzilla – Attachment 8348 Details for
Bug 17617
[mga6-dev1] autologin seems to need the files in /etc/X11/wmsession.d
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
patch to fix chksession
dcd3.patch (text/plain), 1.43 KB, created by
David Walser
on 2016-08-15 23:11:04 CEST
(
hide
)
Description:
patch to fix chksession
Filename:
MIME Type:
Creator:
David Walser
Created:
2016-08-15 23:11:04 CEST
Size:
1.43 KB
patch
obsolete
>--- /tmp/chksession 2016-08-15 16:39:57.454604570 -0400 >+++ /sbin/chksession 2016-08-15 17:07:05.127892292 -0400 >@@ -23,6 +23,9 @@ > -d=DIR, --dir=DIR: Specifies a directory of w-m configuration files. > Default is /usr/share/xsessions/ > >+ >+ -x=ENTRY, --xsession=ENTRY: Produce window-managers script of ENTRY. >+ > -h, --help: Produce this help. > > EOF >@@ -40,9 +43,11 @@ > my ($fn) = @_; > my $n; > local $_ = cat($fn); > ($n = $1) =~ s| ||g if /^Name=(.*)/m; >+ my $e = $1 if /^Exec=(.*)/m; >+ $script{$n} = $e; > push @lf, $n; > ($order{$n}) = $fn =~ m/(^[0-9][0-9])/; > } > > usage(1) >@@ -50,7 +55,9 @@ > > while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) { > local $_ = shift; >- if (/^--first/ || /^-F/) { >+ if (/^--xsession=([^ ]+)/ || /^-x=([^ ]+)/) { >+ $xsession = $1; >+ } elsif (/^--first/ || /^-F/) { > $first++; > } elsif (/^--list/ || /^-l/) { > $list++; >@@ -82,6 +89,23 @@ > # Order of names in @lf is otherwise unchanged. > @lf = sort { $b =~ /^$e$/i <=> $a =~ /^$e$/i } @lf; > >+if ($xsession) { >+ if ($script{$xsession}) { >+ print "#!/bin/sh\n"; >+ print $script{$xsession} >+ } else { >+ print "xterm -geometry 100x25+0+0 &\n"; >+ if ( -x '/usr/bin/icewm' ) { >+ print "icewm\n"; >+ } elsif ( -x '/usr/bin/twm' ) { >+ print "twm\n"; >+ } else { >+ print "xterm -geometry 67x14+384+446\n"; >+ } >+ } >+ exit (0); >+} >+ > @lf ? print shift @lf, "\n" : print "default\n" > if $first; >
--- /tmp/chksession 2016-08-15 16:39:57.454604570 -0400 +++ /sbin/chksession 2016-08-15 17:07:05.127892292 -0400 @@ -23,6 +23,9 @@ -d=DIR, --dir=DIR: Specifies a directory of w-m configuration files. Default is /usr/share/xsessions/ + + -x=ENTRY, --xsession=ENTRY: Produce window-managers script of ENTRY. + -h, --help: Produce this help. EOF @@ -40,9 +43,11 @@ my ($fn) = @_; my $n; local $_ = cat($fn); ($n = $1) =~ s| ||g if /^Name=(.*)/m; + my $e = $1 if /^Exec=(.*)/m; + $script{$n} = $e; push @lf, $n; ($order{$n}) = $fn =~ m/(^[0-9][0-9])/; } usage(1) @@ -50,7 +55,9 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) { local $_ = shift; - if (/^--first/ || /^-F/) { + if (/^--xsession=([^ ]+)/ || /^-x=([^ ]+)/) { + $xsession = $1; + } elsif (/^--first/ || /^-F/) { $first++; } elsif (/^--list/ || /^-l/) { $list++; @@ -82,6 +89,23 @@ # Order of names in @lf is otherwise unchanged. @lf = sort { $b =~ /^$e$/i <=> $a =~ /^$e$/i } @lf; +if ($xsession) { + if ($script{$xsession}) { + print "#!/bin/sh\n"; + print $script{$xsession} + } else { + print "xterm -geometry 100x25+0+0 &\n"; + if ( -x '/usr/bin/icewm' ) { + print "icewm\n"; + } elsif ( -x '/usr/bin/twm' ) { + print "twm\n"; + } else { + print "xterm -geometry 67x14+384+446\n"; + } + } + exit (0); +} + @lf ? print shift @lf, "\n" : print "default\n" if $first;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 17617
:
7451
| 8348