Changing default applications

When I first installed Archlabs and I was using i3 it had asked me a few questions about default apps for things, I however am now using qtile and not i3, but I cannot seem to figure out where the settings are for default apps.

It is not a big deal however there seems to be some kind of issue with the “defauly” file browser, from vscode when I say to open with file browser it gives me an error instead of opening with ranger, also when I open ranger from alacritty it works fine, but if I launch it via rofi it uses xterm, and if I try to launch it via spawn from qtile literally nothing happens (this is probably a different issue I would like to try and figure out as well)

Anyways thanks for the help, just trying to get this system setup and there seems to be a few configuration issues.

Look in the xfce4-settings-managerDefault Applications

Though you won’t be able to set ranger as your default FM there. I am not a user of ranger so I am not sure of that process.

1 Like

Well that definitly helps, in that it does define what the default apps are, however I don’t fully understand why ranger doesn’t work correctly, might be another issue somewhere in a settings file

That’s because rofi (jgmenu erc …) is reading the /usr/share/applications/ranger.desktop file to launch ranger. It has the option:


so ranger starts in a terminal. I don’t know if *.desktop files have a search order when looking for terminals and start with xterm, or they launch with the default terminal. If you use the xfce4-settings-manager to set your default terminal to alacritty, ranger might launch with that instead of xterm.

You might need to spawn ranger as:

xterm -e ranger

or use alacritty and whatever its syntax is for launching an application. You can post that particular code here; someone that knows python may spot an error in your code.

I think there is an “Other” option at the end of the pull down menus for default applications. If you select ranger there, it might work. ArchWiki may have a solution for that in the ranger entry.

1 Like

This worked, I used alacritty -e ranger which works great

However I have alacritty set as my default terminal, so not sure what the deal is with that… So actually having then done some googling, there is a line in the rofi.config that was commented out, that allowed me to set terminal: “alacritty” which tells rofi which terminal to use. Which solved the issue. Thanks for the help guys!

Similar line in jgmenurc; I changed it to kitty, and ranger launched in kitty.
Forgot about that.

I use a small xdg-open replacement to fix issues like opening files from the browser or other Gui apps that call out for defaults based on mimetypes. The problem is that xdg-open is very confusing and complex for basic file matching and it doesn’t work well with many terminal applications.

Mine does require editing a bit of C for config and recompiling the changes but you can do more hacky/advanced openers for specific filetypes.

If you’re interested let me know and I’ll link the repo.

I have kitty as default terminal with rofi.

* Edit By KoO 03/09/2021 (Using ArchLabs dkwm & i3-gaps)
* Rofi Config v1.7.1

    terminal: "kitty";
	display-drun:					"Activate";
	display-run:					"Execute";
	show-icons:						true;
    click-to-exit:                  false;
1 Like