Disable the xdg-open with the snap juju client

I’m having problem on a multiuser system running the juju client.

Some users use “watch juju status” which fires up a google-chrome tab.

They leave the session and after some time, the RAM of the system fills up and all users get into major problems.

I need a way to disable juju client (system wide) from being able to fire up xdg-open to prevent my system from being OOM.

Any pointers?

[update] A note here is that candid is used as the authentication mechanism which generates an URL which in turns fire up xdg-open.

I’ve tried this which I hope will resolve the situation: chromium - How to set which application is launched by xdg-open? - Ask Ubuntu

sudo update-alternatives --remove x-www-browser /usr/bin/google-chrome
sudo update-alternatives --remove x-www-browser /usr/bin/chromium-browser
sudo update-alternatives --remove gnome-www-browser /usr/bin/google-chrome
sudo update-alternatives --remove gnome-www-browser /usr/bin/chromium-browser

I am not sure if it’s possible to restrict this globally across your organisation, but you can ask people to add the --no-browser-login option to juju status.

Full command:

watch juju status  --no-browser-login
2 Likes

Thanx @timClicks.

I’m however fairly confident that they will not remember that and since its even less obvious why to include the command line switch, in a multi-user environment.

A means to turn that behavior off would be welcome in this context. I’m considering un-installing the xdg-utils to avoid this, but that will have other impacts on the system…