Is there a correct way to stop all keybase services? keybase ctl stop doesn't affect the GUI or the fuse daemon, as far as I can tell.
so far I've been doing:
keybase ctl stop
pkill Keybase
sudo umount /keybase
That looks about right, but I'd expect pkill kbfsfuse rather than sudo umount /keybase.
If you're on Linux, take a look at the first half of /usr/bin/run_keybase:
# Editing out all the echoes...
killall Keybase
fusermount -uz /keybase
killall kbfsfuse
killall keybase
I think the fusermount step is important -- I'm told scary things can happen if you umount a FUSE mount, but I don't know what they are.
(Maybe I should be using pkill instead of killall there? How standard is pkill?)
At some point I'd like to publish a systemd unit for all this stuff. I don't think we could rely on it by default, but folks on compatible distros who want to use systemctl could have the option. (Would need some way to suppress autofork in that case maybe?)
pkill's more broad (pattern matching on various fields, not solely on the process name) so I think we're right to use killall.
Hmm, there's this from man pkill:
-f, --full
The pattern is normally only matched against the process name. When -f is set, the full command line is used.
By default pkill matches on even more than that (e.g. the pid).
on OSX 11.11.5 umounting from GUI has almost no effect, the drive is quickly mounted after 1s. killing everything (both from cli or Activity Monitor) still leaves the drive mounted.
Options to stop GUI, ctl and umounting the drive should be available ootb.
It would be nice to have a way to turn off the filesystem or service! I don't use the keybase filesystem features, and even after closing keybase there are three processes using over 500GB of virtual RAM each. For some reason this always makes the OSX UI slow so I've uninstalled keybase.
+1 for way to shut down keybase and use it only when I need it.
Better support this wish than have people removing keybase because it bothers them.
Why is this not a thing? How is keybase even starting up I don't see a systemd unit for it?
We haven't taken a systemd dependency yet, though we might in the future. Right now we use ~/config/.autostart/keybase_autostart.desktop to start our 3 services (the keybase daemon, the kbfsfuse mount, and the GUI). If you want to disable autostart, there's a comment in that file about how to do it. (You can't just delete the file, though, because it'll get recreated.)
I do have the following function in my shell, for emergencies. Not guaranteed to be stable, of course:
kbdown () {
if killall Keybase &> /dev/null
then
echo Shutting down Keybase GUI...
fi
if fusermount -uz /keybase &> /dev/null
then
echo Unmounting /keybase...
fi
if killall kbfsfuse &> /dev/null
then
echo Shutting down kbfsfuse...
fi
if killall keybase &> /dev/null
then
echo Shutting down keybase service...
fi
}
@cjb, do you know what the current thinking is about whether quitting in the GUI should kill keybase/kbfsfuse?
If anyone wants to try out, I just wrote my first shot at keybase user unit files; placed them under /keybase/netvor/systemd-user.
Disclaimer: I'm just learning systemd; I'm almost sure I've missed something. The services are able to start but I haven't yad yet opportunity to try and re-login to see if they work properly. So, feedback is more than welcome; I'll update the files on the go. Also I'll gladly PR them somewhere if anybody tells me where.
I'll add a :+1: for having this actually be managed. I don't use the filesystem at all and don't want to. I just want the command line (not to mention the resource usage by keybase when I'm not even using it). This should definitely be considered a service and not a desktop startup script. Even if it remains as a desktop startup script it needs to be documented more thoroughly, it took me several minutes of Googling before I found the right term to get to this issue.
Hey hackers, I've also tried to manage keybase processes with systemd, but ran into minor issue with restarting of keybase process after updates. Maybe some of you will have ideas regarding issue #5355 ?
keybase ctl app-exit works
can this be closed? @panicbit's solution (keybase ctl app-exit) worked for me
On another note, for those of us who don't load KB on boot, keybase ctl app-start would be nice as well
For anyone else seeing this and wanting to stop keybase: Use keybase ctl stop. Using keybase ctl app-exit did nothing for me. Using stop immediately killed all the keybase processes and powertop no longer reports it completely dominating my battery. I haven't used Keybase in literally months and it's somehow consuming more power than Slack which is just completely bonkers insane.
this actually does not completely stop keybase from running. It doesn't have the same effect as "show keybase" --> "quit keybase", which effectively stops all keybase processes from running
Looking forward to systemd support.
On all platforms, clicking Username -> Quit Keybase from the app, or Hamburger -> Quit Keybase from the systray widget should close all Keybase processes.
On all platforms, running keybase ctl stop in the command line should do the same thing.
On Linux using systemd, you can also run systemctl --user stop keybase keybase.gui kbfs keybase-redirector.
On Linux packages packaged by Keybase, you can also run run_keybase -k.
If any of the above doesn't work, please make a new ticket. Thanks!
That do not seem to be true
keybase ctl stop is nice. thank you for that command tip
Most helpful comment
+1 for way to shut down keybase and use it only when I need it.
Better support this wish than have people removing keybase because it bothers them.