1

[Note: I'm sorry if this has been asked before. I googled, I searched StackOverflow and other forums but couldn't find anything. Which is pretty weird in my opinion, because to me this seems like a very important question...]

[I'm on Xubuntu 16.04 with stock Thunar 1.6.10-2ubuntu1.]

Problem

I really like Thunar's custom action mechanism. They make using Thunar quite fun and productive.

But every time you do a new system installation there's this annoying process of re-entering or modify-and-copy-ing the old custom action configuration file ~/.config/Thunar/uca.xml to get them back.

Question

I am looking for a solution to provide .deb-packages with Thunar custom actions that install somewhere to the system and then appear in every users Thunar custom actions.

This is not a question on debian packaging! I know how to package.

Does anybody know a neat solution to this?

Because I am afraid this is not possible at the current state without some changes in Thunar...

Advantages

  • no need for re-entering or modify-and-copy-ing old configuration files with static paths
  • easily keep all your Thunar installations on all your machines with the same base set of custom actions (super convenient in combination with a personal apt repository)

Attempts I've made so far:

  • use synchronization software (e.g. syncthing, dropbox, ...) and create a symbolic link to ~/.config/Thunar/uca.xml (Does not work for other people, only you. Plus, as you most likely have to ship a bunch of scripts, you still have the problem of static paths in the configuration file. Practicable, but not optimal...)
  • There's this file /etc/xdg/Thunar/uca.xml, but it seems to be only a skeleton for new users that start Thunar for the first time. Maybe suitable for new users, but not existing ones.

Problems I see

  • Thunar seems to only source the custom actions from the user's configuration file ~/.config/Thunar/uca.xml, not from anywhere in the system [not confirmed! I don't know...]
  • There are ugly 'unique-ids' in this file which might have to be hard-coded in the .deb-package, which might collide with manually added custom actions.
  • A .deb-package would mean to explicitly not install the 'system-wide' custom actions into the home directories, because that's a no-go in packaging and also no good solution when a new user is created.

So I'm a bit stuck here. I'd appreciate any ideas :-)

Regards,

nobodyinperson

  • Can you not create a .deb package that changes /etc/xdg/Thunar/uca.xml, and then link ~/.config/Thunar/uca.xml to it? But for this to be "system-wide", I think you need to create a new "Thunar" that does this. Basically, a fork with your modified option. Or you can request a feature to the Thunar team that allows you to use the system wide uca.xml, but it won't come turn onby default. Then, whenever you install the system, you need to modify that master file only, and all users will follow it. If you want your actions to come preloaded, then you probably need to go for the forked thunar. – user308164 Dec 15 '16 at 11:52
  • @luchonacho Can you not create a .deb package that changes /etc/xdg/Thunar/uca.xml, and then link ~/.config/Thunar/uca.xml to it? No, because a .deb-package should not tamper with the home directory. I think, I will have to create my own fork of Thunar... – NobodyInPerson Dec 15 '16 at 12:15
  • What do you mean "it should not tamper with the home directory"? I think they do all the time... – user308164 Dec 15 '16 at 12:45
  • @luchonacho Since the purpose of debian packages is to install system-wide software, it does not make sense for a debian package to install files under /home because the home directories/users may be highly variable. Of course, the software coming from a package may create or change files under /home. But that is another story and has nothing to do with the package itself. – NobodyInPerson Dec 15 '16 at 23:19
0

I created the software package thunar-custom-actions that provides system-wide Thunar custom actions. The actions are merged into the per-user .config/Thunar/uca.xml files on every update or on demand.

It's available as a debian package.

This is exactly what I wanted :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.