gvfsd not working after sleep

After suspend I usually had to restart gvfsd-sftp (basically, I’ve just kill it) in order to have access to my SSH server through GUI applications.

In order to fix this, I’ve created a script in /etc/pm/sleep.d, with the following content:

case "$1" in
        killall -15 gvfsd-sftp
        killall -15 gvfsd-smb-browse

This will politely ask gvfsd-sftp and gvfsd-smb-browse to quit, and they’ll be auto (re)started after that.

You’ll need to install pm-utils (# pacman -S pm-utils), and then use pm-suspend. For this you’ll need to be root; to avoid always typing in your password, modify /etc/sudoers, add (replacing username with your user name):

username  ALL = NOPASSWD: /usr/sbin/pm-suspend

Note: These must come after any user privilege specifications, e.g., username ALL=(ALL) ALL, or they will not work.

Also, add yourself to the power group so that way using things like applets to do suspend will work:

# gpasswd -a username power

This is archived version of blog, preventing broken links. This version will stay online indefinitely.