Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xubuntu setting preferred application from command line

Tags:

ubuntu

I'm managing a few hundred computers with Xubuntu installed. I want to switch the default file manager from Thunar to Nemo (both of which are installed).

This is easy to do by launching exo-preferred-applications and using the dialog box. However, I'd like to automate this.

I've done some research and tried a lot of things that didn't work -- i.e. editing various defaults.list files. I tried removing Thunar, which caused other things to break (and to be honest, I don't want to resort to removing Thunar).

If someone could tell me what exactly changes on my system when I use the exo-preferred-applications dialog box, I feel like I could make progress.

To that end, I've even gone so far as to start pouring over the relevant C code:

https://github.com/xfce-mirror/exo/tree/master/exo-helper

But I'm not at all familiar with C or Xfce4 or the Exo framework. Maybe someone can help point me in the right direction here. Surely, at the end of the day, there is some way to programmatically alter whatever file the exo-preferred-applications dialog alters.

(P.S. I'm using the GalliumOS version of Xubuntu. That's probably not relevant -- but who knows?)

like image 543
Stephen Foster Avatar asked Oct 26 '25 06:10

Stephen Foster


1 Answers

I eventually found the answer in the C code:

https://github.com/xfce-mirror/exo/blob/master/exo-helper/exo-helper.c

It turns out the file that changes is /home/USER/.config/xfce4/helpers.rc

I changed the line:

FileManager=Thunar

To:

FileManager=nemo

NOTE: This file also specifies the default applications for the mail reader, terminal emulator, and web browser.

like image 137
Stephen Foster Avatar answered Oct 29 '25 09:10

Stephen Foster