summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnewmail4
-rwxr-xr-xrunas1
2 files changed, 3 insertions, 2 deletions
diff --git a/newmail b/newmail
index 5cbe117..5443d10 100755
--- a/newmail
+++ b/newmail
@@ -1,9 +1,9 @@
#!/usr/bin/env sh
-servers="gmail posteo"
+servers="gmail posteo gwu"
result=
-regexp='s#^machine \(.*\) login \(.*\) password \(.*\) port \([0-9]*\)$#-u \2:\3 imaps://\1:\4/INBOX#'
+regexp='s#^machine \(.*\) login \(.*\) password \(.*\) port \([0-9]*\)$#-u \2:"\3" imaps://\1:\4/INBOX#'
data=$(gpg --quiet --decrypt $HOME/.authinfo.gpg | grep 993)
for server in $servers; do
line=$(echo "$data" | grep $server | head -n 1)
diff --git a/runas b/runas
index b11a321..9eb344c 100755
--- a/runas
+++ b/runas
@@ -48,6 +48,7 @@ if [ "$1" == "-n" ]; then
sudo useradd -m -G audio -s /usr/bin/mksh -k /tmp/skel $2
sudo passwd $2
else
+ printf '\033k'"$1"'\033\\'
cp .Xauthority /tmp
chmod 606 /tmp/.Xauthority
su -l $1 -c /home/$1/$1