gnuplot Nautilus file manager

Asked by JacquesB

I have a program for some mathematical calculations. I use gnuplot to plot the results.
My program creates files with the extension .plt, e.g. U10.plt. To plot the results in this file, I open a terminal, cd to the directory of where U10.plt resides, and I type the command
gnuplot U10.plt
That works OK. But it would be easier if I can plot the data in the .plt files by clicking on it in the Nautilus file manger. However, simply associating the file with gnuplot (using the properties of U10.plt) does not work.
How can I start gnuplot by clicking on a .plt file in the Nautilus file manger (Ubuntu)?

Directly associating a .plt file to gnuplot doesn't seem to work. Therefore I tried the following sript file as a work around:

#!/bin/csh
gedit $1
#/usr/bin/gnuplot
#/usr/bin/gnuplot $1

If I associate .plt file with this script, the .plt file will be opened by gedit.
However, if I change the script into:

#!/bin/csh
#gedit $1
/usr/bin/gnuplot
#/usr/bin/gnuplot $1

nothing happens...
(In a terminal /usr/bin/gnuplot starts gnuplot)
It seems that gnuplot is not started by Nautilus

Obviously, for
#!/bin/csh
#gedit $1
#/usr/bin/gnuplot
/usr/bin/gnuplot $1

nothing happens.

How to resolve this?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) said :
#1

Hello,

To do things like that I use nautilus-actions, a package of the universe reposeteries. It will add an entry to the context menu when you right click on a file, you can set it up so it only appears when .plt files are right-clicked.Web page and documentation here : http://www.grumz.net/?q=taxonomy/term/2/9

Go in your system -> preferences menu (not sure of the name i have it in french :) ) and you will find an entry here to configure this. Create an entry using gnuplot as command and %f as parameter, it should work. I don't have any .plt files so I did'nt try put it works with every file type I tried.

Hope it works for you!

See you

Jérôme

Can you help with this problem?

Provide an answer of your own, or ask JacquesB for more information if necessary.

To post a message you must log in.