void-packages/srcpkgs/xinit/patches/06_move_serverauthfile_into_tmp.diff
Clifford Sabalo e03ba02709 xinit: add new patch
Whenever startx is ran, it generates a random .serverauth* file
in the home directory which is not being removed on shutdown or
reboot. This patch moves these .serverauthXXX files in the /tmp
directory so they are removed on reboot.
2019-06-15 14:54:56 +02:00

20 lines
721 B
Diff

Move startx auth files in /tmp so they are removed on reboot.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
The trap patch didn't seem to work on reboot.
---
startx.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: startx.cpp.orig
===================================================================
--- startx.cpp.orig
+++ startx.cpp
@@ -273,7 +273,7 @@
dummy=0
XCOMM create a file with auth information for the server. ':0' is a dummy.
- xserverauthfile=$HOME/.serverauth.$$
+ xserverauthfile=`mktemp -p /tmp serverauth.XXXXXXXXXX`
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
xauth -q -f "$xserverauthfile" << EOF
add :$dummy . $mcookie