working version of emails

This commit is contained in:
Adrian Amaglio 2022-03-12 02:21:54 +01:00
parent 90d2373ee2
commit ba7347ade1

4
emails
View File

@ -1,5 +1,5 @@
#!/bin/sh
# We setup xauthority file to display stuff
xauthority="$(cat ~/.Xauthority)"
exec sudo -u emails sh -c "echo \"$xauthority\" > ~/.Xauthority && . ~/.bashrc && exec aerc"
auth="$(xauth extract - "$DISPLAY" | base64)"
exec sudo -u emails sh -c "echo -n '$auth' | base64 -d > ~/.Xauthority && . ~/.bashrc && cd ~/attachements && exec aerc"