Lately, pgAdmin would automatically launch on boot. I'm using KDE, and there is no entry for pgAdmin in Autostart, nor was there any in ~/.config/autostart (tho' I'm guessing Autostart uses the file from there anyway).
- 2,652
- 1
- 21
- 27
- 103
- 1
- 10
3 Answers
Facing the same issue on Ubuntu 18.04 with KDE Plasma 5.12.6. The key problem is that KDE saves desktop session and restores it on reboot. That's why pgAdmin 4 starts automatically if it was running before reboot.
In order to fix this go to "System Settings", select "Startup and Shutdown" tab in "Workspace" section and then select "Desktop session":
You will see that "Restore previous session" box is enabled in "On Login" section there. If you want to exclude pgAdmin 4 only from being restored on login then just type a full path to its executable in "Applications to be excluded from sessions":
/usr/bin/pgAdmin4
You can detect a path by running:
which pgAdmin4
If you don't want to save desktop session related data then another simple solution is to tick "Start with an empty session" box.
After that click "Apply" button and reboot the system. Now pgAdmin 4 will start and open a browser only when you make it explicitly.
- 790
- 2
- 10
- 21
-
wohoo same issue on plasma, always learning about a new plasma settings panel : :' ) – edencorbin Sep 06 '19 at 06:54
Turns out it was due to pgadmin4 was still running in the background, so it would launch itself again on next logins. I just killed the process with old school pkill -f pgAdmin4 and it would no longer automatically launch itself on next logins. There's no need to stop postgresql service.
EDIT 26/12/2018: I've instead marked @Ezze's answer as the solution as that's indeed a better way to do it in my case.
- 103
- 1
- 10
-
It was `pkill -f pgAdmin4` for me instead of `pkill -f pgadmin4`. I confirm it works but next time you run pgAdmin you have to kill it again if you don't want to start it automatically on next boot. – ezze Dec 04 '18 at 12:26
You can disable startup services using:
sudo systemctl stop postgresql
sudo systemctl disable postgresql
- 5,419
- 2
- 27
- 36
-
1It would stop postgresql server from starting on boot, but it wouldn't stop pgadmin (even if there'd be no online servers that could be accessed from it). Either way, I don't mind the sql server starting on boot, in fact I desired that, I just don't want pgadmin in particular to do so. – Bobby Wibowo Sep 23 '18 at 15:00
-
Yeah, could someone vote this answer down? It's not correct given the question. – TechJohn Sep 30 '19 at 17:34
-
postgresql is not pgadmin, You are correctly disabling postgresql but it is not the answare as TechJohn said. nb: same asware here: https://ubuntu.forumming.com/question/8741/stop-pgadmin-4-from-launching-on-boot-ubuntu-16-04 as ezze pointed Pgadmin4 is not a service, but session stuff... (by the way...My opinion is that a service would be better...) – LittleEaster Apr 12 '20 at 12:22
