Wednesday, April 24, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 7229  / 1 Year ago, fri, january 20, 2023, 9:48:19

In Ubuntu 11.04 I usually edit my *.fig files by clicking on the icons. The application (script) which opened the file was texfig. This script was chosen by "open with..." in nautilus. But now there is no possibilities to choose other applications than the predefined ones appropriate to the mimetype. How can I define a default application (or a self made script) in nautilus for the x-xfig mimetype?


More From » 11.10

 Answers
1

You can create a .desktop file that will be listed on 'Open with other application' tab:




  • Navigate to ~/.local/share/applications

  • Create a file called textfig.desktop with these contents:




[Desktop Entry]
Encoding=UTF-8
Name=Textfig
Comment=Edit fig files using custom textfig script
Exec=<path to your script> %u
Terminal=true
Type=Application
Icon=
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true



After this you will see Textfig in your Open with other application tab, select it and when you double click the file you will be able to open it using your program.



Just adjust the rest of the values a bit more to fit your needs. The %u will tell nautilus to execute it on the currently selected file.


[#42626] Saturday, January 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
girdleas

Total Points: 1
Total Questions: 112
Total Answers: 114

Location: Lesotho
Member since Wed, Jun 2, 2021
3 Years ago
girdleas questions
;