[Users] switching claws-mail offline with a script run by root

Boffi Daniele 3daniele03 at gmail.com
Tue Nov 1 01:22:16 UTC 2022


> Probably you want to use the $XDG_RUNTIME_DIR env variable to find and use
> the correct directory.

It works beautifully, thanks! Here is the command I am using:

ps cax | grep claws-mail > /dev/null
if [ $? -eq 0 ]; then
    sudo -u myusername XDG_RUNTIME_DIR=/run/user/myuid
/usr/bin/claws-mail --offline
fi


More information about the Users mailing list