Add more possible paths for Xsession, depending on which display manager is installed. We need an Xsession that executes its command line parameters, so leave xinit last. See also https://bugs.gentoo.org/746227 and https://bugs.gentoo.org/936475 --- a/unix/vncserver/vncserver.in +++ b/unix/vncserver/vncserver.in @@ -437,11 +437,14 @@ die "$prog: couldn't find \"$cmd\" on your PATH.\n"; } - foreach $cmd ("/etc/X11/xinit/Xsession", "/etc/X11/Xsession") { - if (-x "$cmd") { - $Xsession = $cmd; - last; - } + $Xsession=$ENV{TIGERVNC_XSESSION_FILE}; + if (not defined $Xsession) { + foreach $cmd ("/usr/share/sddm/scripts/Xsession", "/etc/gdm/Xsession", "/etc/lightdm/Xsession", "/usr/share/slim/Xsession", "/etc/X11/Sessions/Xsession", "/etc/X11/xinit/Xsession", "/etc/X11/Xsession") { + if (-r "$cmd") { + $Xsession = $cmd; + last; + } + } } if (not defined $Xsession) { die "$prog: Couldn't find suitable Xsession.\n";