Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Debian squeeze with Gnome Desktop for all my users. I have a group of machines to set up so that all users should use xpdf as a default viewer (rather than evince).

I want this set up to be done by command line (even better, using puppet).

I know about xpg-mime command, but the man page says that the default command should not be used as root.

I could manually tweak the /etc/gnome/defaults.list files, but I'm looking for a single command I could run to perform the setting without an editor interaction.

Any ideas?

share|improve this question

1 Answer 1

Well, Linux defaults are set by editing text files. I doubt you can avoid that. You can however automate it. The following sed command will change /etc/gnome/defaults.list in the way that you need:

sed -i '/pdf/s/evince./xpdf./g' 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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