Do

Fails to open file

Asked by geirgluckstad

This is what I do:

* Starts gnome-do in terminal to view debug output
* Opens gnome-do with <super> + space
* Types 'customer.rb' (A ruby file on my system) => right pane shows the 'Open' action
* Clicks enter => Console shows "Error showing url: There is no default action associated with this location"

My system is Ubuntu 8.04, and .rb files are associated with the Scribes editor (opens in correctly when double-clicked in Nautilus). Have installed gome-do using the package manager and the version is 4.0.1

A also get the same error msg when typing gnome-open with the same file in the console.

Any idea why this doesn't work? Any help would be appreciated :-)

Question information

Language:
English Edit question
Status:
Solved
For:
Do Edit question
Assignee:
No assignee Edit question
Solved by:
geirgluckstad
Solved:
Last query:
Last reply:
Revision history for this message
David Siegel (djsiegel-deactivatedaccount) said :
#1

You need to configure your environment to know how to open Ruby source files. I'm not exactly sure how to do this -- I get the same problem with Haskell files :) Maybe try opening the properties window for a Ruby file and setting its default application. I know someone who had this problem before was able to resolve it.

Revision history for this message
geirgluckstad (geirgluckstad) said :
#2

Found the solution :)

It turns out that gnome-do uses xdg-mime to descide which application to use (cannot remember where I read this). Needed to register a default application for the application/x-ruby mime type:

xdg-mime default scribes.desktop application/x-ruby

xdg-mime can also be used to query about a files mime-type: xdg-mime query filetype <filename>

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) said :
#3

Would you mind adding an explanation of this solution to the wiki?
https://wiki.ubuntu.com/GnomeDo/Plugins/Files

Thanks!

Revision history for this message
BrokenTusk (dave-meyer) said :
#4

Here is the bare-bones solution to defining what app Gnome-do uses to OPEN:

Adding this env variable to a session (ie: add to ~/.profile):
export DE="gnome"
makes the OPEN action (using xdg-open) default to Gnome's preferred application settings
which will use the MIME associations set in ~/.local/share/applications/defaults.list

NOTE: you must kill and restart gnome-do for chgs to take affect