1

I want to debug a program's behaviour when the user has no default web browser set, but I'm not sure how I'd return to this state after setting one. I know that I can set my default browser via xdg-settings set default-web-browser <value>, but what if I want to unset it, i.e., make it so that I don't have a default browser?

So far I've tried running

$ xdg-settings set default-web-browser ''

Which resulted in

xdg-settings: no parameter value given

I also tried

$ xdg-settings set default-web-browser ' '

Which resulted in

xdg-settings: invalid application name

I'm using a minimal installation of Alpine Linux running i3 in X.Org.

Newbyte
  • 856
  • 1
  • 9
  • 31
  • `xdg-settings set default-web-browser ""`? – Artem S. Tashkinov Nov 22 '20 at 09:04
  • @ArtemS.Tashkinov I tried that, but it complains about no value being given. – Newbyte Nov 22 '20 at 09:20
  • @Newbyte please [edit](https://unix.stackexchange.com/posts/620947/edit) your question and update with what is your environment, what you have tried so far and what is the exact result you have seen. – thanasisp Nov 22 '20 at 09:39
  • @thanasisp Does that look good? – Newbyte Nov 22 '20 at 10:18
  • You could also add the error message you get, especially if it was `xdg-settings: invalid application name` which means `xdg-settings` checks for existence of the value, into where it should exist (some /usr/share/ or ~/.local/chare or ~/.config etc) – thanasisp Nov 22 '20 at 11:15
  • @thanasisp Done – Newbyte Nov 22 '20 at 13:30
  • These are the [xdg-utils](https://wiki.archlinux.org/index.php/Xdg-utils). You could uninstall any file associations for url handling or html or anything simlar, using `xdg-mime`. Or find the `firefox.desktop` into `/usr/share/...` or elsewhere and remove it temporarily, to see what's the DE's failover behaviour for this. But I don't know if these or any similar approach fits to your testing, it depends on what you want to see. – thanasisp Nov 22 '20 at 19:02

0 Answers0