From ba7347ade10acf4a9d87293c89d8bd27ee12fec3 Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Sat, 12 Mar 2022 02:21:54 +0100 Subject: [PATCH] working version of emails --- emails | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emails b/emails index aab9db4..a18ff00 100755 --- a/emails +++ b/emails @@ -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"