Skip to content

Instantly share code, notes, and snippets.

@wizonesolutions
Last active February 26, 2020 12:28
Show Gist options
  • Save wizonesolutions/140963989b063e383a27c83361988738 to your computer and use it in GitHub Desktop.
Save wizonesolutions/140963989b063e383a27c83361988738 to your computer and use it in GitHub Desktop.
#!/bin/sh
SSH_ASKPASS='/usr/lib/seahorse/ssh-askpass'
export SSH_ASKPASS
# Might need to wrap this in a DESKTOP_SESSION check, but this should be OK...
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
#!/bin/bash
# start tmux with the proper environment
# /usr/bin/systemctl --user import-environment
LOGFILE=/home/kevin/log/start-tmux.log
echo "Before starting tmux:" > $LOGFILE
/usr/bin/env > $LOGFILE
/usr/bin/systemctl --user status tmux >> $LOGFILE
echo "Setting env and starting tmux" >> $LOGFILE
# Start tmux
/usr/bin/dbus-update-activation-environment --systemd --all >> $LOGFILE
/usr/bin/systemctl --user start tmux
echo "After starting tmux:" >> $LOGFILE
/usr/bin/systemctl --user status tmux >> $LOGFILE
# Disable user unit
/usr/bin/systemctl --user disable tmux
echo "After disabling tmux:" >> $LOGFILE
/usr/bin/systemctl --user status tmux >> $LOGFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment