|
1 | 1 | #!/bin/sh |
2 | 2 |
|
3 | 3 | # Copyright (C)2007 Sun Microsystems, Inc. |
4 | | -# Copyright (C)2009-2014, 2016, 2018-2020, 2022-2023 D. R. Commander |
| 4 | +# Copyright (C)2009-2014, 2016, 2018-2020, 2022-2023, 2025 D. R. Commander |
5 | 5 | # |
6 | 6 | # This library is free software and may be redistributed and/or modified under |
7 | 7 | # the terms of the wxWindows Library License, Version 3.1 or (at your option) |
@@ -220,23 +220,6 @@ addvglgenkey() |
220 | 220 | fi |
221 | 221 | } |
222 | 222 |
|
223 | | -addvglgenkey_lightdm() |
224 | | -{ |
225 | | - backup $1 |
226 | | - if [ "$VGLUSERSONLY" = "1" ]; then |
227 | | - echo ... Adding greeter-setup-script=vglgenkey to $1 ... |
228 | | - else |
229 | | - echo ... Adding greeter-setup-script=xhost \+LOCAL\: to $1 ... |
230 | | - fi |
231 | | - removeline $1 display-setup-script |
232 | | - removeline $1 greeter-setup-script |
233 | | - if [ "$VGLUSERSONLY" = "1" ]; then |
234 | | - addtoconf $1 "Seat:seat*" "Seat:seat\*" greeter-setup-script=$VGLGENKEY |
235 | | - else |
236 | | - addtoconf $1 "Seat:seat*" "Seat:seat\*" "greeter-setup-script=xhost +LOCAL:" |
237 | | - fi |
238 | | -} |
239 | | - |
240 | 223 | disablextest() |
241 | 224 | { |
242 | 225 | if [ -z "$1" ]; then |
|
683 | 666 | delvglgenkey $file |
684 | 667 | fi |
685 | 668 | done |
686 | | - if [ -f /etc/lightdm/lightdm.conf ]; then |
687 | | - echo "... Removing X server access from /etc/lightdm/lightdm.conf ..." |
688 | | - removeline /etc/lightdm/lightdm.conf display-setup-script |
689 | | - removeline /etc/lightdm/lightdm.conf greeter-setup-script |
| 669 | + if [ -f /etc/lightdm/lightdm.conf.d/99-virtualgl.conf ]; then |
| 670 | + echo "... Removing /etc/lightdm/lightdm.conf.d/99-virtualgl.conf ..." |
| 671 | + rm /etc/lightdm/lightdm.conf.d/99-virtualgl.conf |
690 | 672 | fi |
691 | 673 | for dir in /usr/share/gdm/greeter/autostart \ |
692 | 674 | /usr/local/share/gdm/greeter/autostart; do |
@@ -899,11 +881,15 @@ EOF |
899 | 881 | addvglgenkey $file |
900 | 882 | fi |
901 | 883 | done |
902 | | - if [ -f /etc/lightdm/lightdm.conf ]; then |
903 | | - addvglgenkey_lightdm /etc/lightdm/lightdm.conf |
904 | | - elif [ -d /etc/lightdm ]; then |
905 | | - echo [SeatDefaults] >/etc/lightdm/lightdm.conf |
906 | | - addvglgenkey_lightdm /etc/lightdm/lightdm.conf |
| 884 | + if [ -d /etc/lightdm/lightdm.conf.d ]; then |
| 885 | + echo ... Creating /etc/lightdm/lightdm.conf.d/99-virtualgl.conf ... |
| 886 | + echo "[Seat:seat*]" >/etc/lightdm/lightdm.conf.d/99-virtualgl.conf |
| 887 | + if [ "$VGLUSERSONLY" = "1" ]; then |
| 888 | + echo "greeter-setup-script=$VGLGENKEY" >>/etc/lightdm/lightdm.conf.d/99-virtualgl.conf |
| 889 | + else |
| 890 | + echo "greeter-setup-script=xhost +LOCAL:" >>/etc/lightdm/lightdm.conf.d/99-virtualgl.conf |
| 891 | + fi |
| 892 | + chmod 644 /etc/lightdm/lightdm.conf.d/99-virtualgl.conf |
907 | 893 | fi |
908 | 894 | for dir in /usr/share/gdm/greeter/autostart \ |
909 | 895 | /usr/local/share/gdm/greeter/autostart; do |
|
0 commit comments