1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

fu-vpn: include xauthority setup

This commit is contained in:
2025-05-21 10:50:36 +02:00
parent b90aa5ef07
commit 5244ae3850

View File

@@ -131,7 +131,10 @@ in {
(pkgs.writers.writeDashBin "fu-vpn" '' (pkgs.writers.writeDashBin "fu-vpn" ''
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
then then
sudo ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect # root firefox will not open login window unless root owns Xauthority
sudo cp $XAUTHORITY /root/.Xauthority
sudo chown root: /root/.Xauthority
XAUTHORITY=/root/.Xauthority sudo ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect
fi fi
'') '')
]; ];