Bodhi Linux Forums: xdg-open oddity - Bodhi Linux Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

xdg-open oddity

#1 User is offline   Jeff 

  • Lead Developer
  • Group: Developer
  • Posts: 8031
  • Joined: 23-November 10
  • LocationBloomington, IL

Posted 24 March 2012 - 04:44 AM

OK so for some reason the command:

xdg-open /usr/share/bodhi/quickstart/quickstartEN/index.html


Now tries to open the file /home/username/usr/share/bodhi/quickstart/quickstartEN/index.html

Thoughts, ideas? This is causing the quick start button in the menu to no longer function properly.

~Jeff
0

#2 User is offline   smurfslover 

  • Member
  • Group: Members
  • Posts: 178
  • Joined: 29-December 11

Posted 24 March 2012 - 07:55 AM

View PostJeff, on 24 March 2012 - 04:44 AM, said:

OK so for some reason the command:

xdg-open /usr/share/bodhi/quickstart/quickstartEN/index.html


Now tries to open the file /home/username/usr/share/bodhi/quickstart/quickstartEN/index.html

Thoughts, ideas? This is causing the quick start button in the menu to no longer function properly.

~Jeff

Still works for me in updated bodhi linux. But i would like to find out how to determine which application is used to open a specific file type. xdg-open does not follow the preference set in pcmanfm.

Maybe there's a way to edit the xdg-open script so it follows preferences set in pcmanfm??
0

#3 User is offline   ylee 

  • King of the Software Page
  • Group: Moderators
  • Posts: 1209
  • Joined: 11-April 11
  • LocationWest Virginia, USA

Posted 24 March 2012 - 12:40 PM

View PostJeff, on 24 March 2012 - 04:44 AM, said:

OK so for some reason the command:

xdg-open /usr/share/bodhi/quickstart/quickstartEN/index.html


Now tries to open the file /home/username/usr/share/bodhi/quickstart/quickstartEN/index.html

Thoughts, ideas? This is causing the quick start button in the menu to no longer function properly.

~Jeff


I have looked at this for way too long this morning.

Observations.
  • This is indeed broke in a default install of Bodhi1.4 :(
  • People claiming it works probably have x-www-browser set to another browser such as firefox
  • Install firefox and the quickstart link works and so does xdg-open /usr/share/bodhi/quickstart/quickstartEN/index.html
  • midori /usr/share/bodhi/quickstart/quickstartEN/index.html fails in the same way
  • midori file:///usr/share/bodhi/quickstart/quickstartEN/index.html works
  • bash -x xdg-open /usr/share/bodhi/quickstart/quickstartEN/index.html reveals that the function really called is run-mailcap --action=view /usr/share/bodhi/quickstart/quickstartEN/index.html


I took a brief look at run-mailcap but it is in perl and I have no fondness of perl so it was a very brief look.

But anyway my conclusion was that

  • xdg-open is working correctly
  • and that this is a midori 0.4.4 bug


In my bodhized debian install xdg-open works correctly with midori 0.4.3. Can you downgrade midori on a machine as a test and see if this fixes the issue?

Of course downgrading midori is not a good fix. A better fix would to patch midori if this is indeed the problem.

Another hackish fix that may work is to modify the bodhi e17 menu patch to use xdg-open file:///usr/...
Eight Linux Tech Tips for Beginners The Bodhi Guide to Enlightenment

"No technology can ever be too arcane or complicated for the black t-shirt crowd."
0

#4 User is offline   Jeff 

  • Lead Developer
  • Group: Developer
  • Posts: 8031
  • Joined: 23-November 10
  • LocationBloomington, IL

Posted 24 March 2012 - 01:25 PM

View Postylee, on 24 March 2012 - 12:40 PM, said:

Another hackish fix that may work is to modify the bodhi e17 menu patch to use xdg-open file:///usr/...


I'm going to do this in the next set of E updates for sure - going to go ahead and file a bug report with Midori as well right now. Thanks for doing the leg work on this one ylee.

~Jeff
0

#5 User is offline   ylee 

  • King of the Software Page
  • Group: Moderators
  • Posts: 1209
  • Joined: 11-April 11
  • LocationWest Virginia, USA

Posted 24 March 2012 - 02:42 PM

View Postsmurfslover, on 24 March 2012 - 07:55 AM, said:

...
Maybe there's a way to edit the xdg-open script so it follows preferences set in pcmanfm??


This is off topic but it appears PcManFm preferences for user customized application opening is set in /home/bodhi/.local/share/applications/mimeapps.list, the system list is /usr/share/applications/defaults.list


I would not recommend altering xdg-open unless you really know what you are doing. Major breakage could occur.
Eight Linux Tech Tips for Beginners The Bodhi Guide to Enlightenment

"No technology can ever be too arcane or complicated for the black t-shirt crowd."
0

#6 User is offline   ylee 

  • King of the Software Page
  • Group: Moderators
  • Posts: 1209
  • Joined: 11-April 11
  • LocationWest Virginia, USA

Posted 24 March 2012 - 03:46 PM

View PostJeff, on 24 March 2012 - 01:25 PM, said:

I'm going to do this in the next set of E updates for sure - going to go ahead and file a bug report with Midori as well right now. Thanks for doing the leg work on this one ylee.

~Jeff


This is an update for those interested. (Jeff already knows this, but I am posting it for the community):

It does appear to be a bug with midori related to this patch.

However, it appears the way xdg-open handles this case has changed in xdg-open 1.1.0~rc1 and Midori functions correctly with xdg-utils 1.1.0~rc1 installed instead of our current version. In my limited brief testing. This is probably why the Midori developers did not notice the bug with the patch above and older versions of xdg-utils.

So at this point I am not sure whether to call it a bug with Midori or with xdg-utils. I suppose if backwards compatibility is desired by the Midori developers then it is a Midori bug. If they are like some developers and say one should have updated libraries and stuff then it is a bug with xdg-open.

If updating to xdg-utils 1.1.0~rc1 does not break things then perhaps that would be a better fix. Hopefully Jeff posting a bug report on this issue will prompt the Midori devs to fix this as I would suspect many users are using older versions of xdg-utils like we are. Either way I hope we have a fix for Bodhi 1.4 soon as possible.

EDIT: Midori devs definitely consider it a bug with midori as midori /path/to/file.html does not work as expected.
Eight Linux Tech Tips for Beginners The Bodhi Guide to Enlightenment

"No technology can ever be too arcane or complicated for the black t-shirt crowd."
0

#7 User is offline   Jeff 

  • Lead Developer
  • Group: Developer
  • Posts: 8031
  • Joined: 23-November 10
  • LocationBloomington, IL

Posted 24 March 2012 - 08:02 PM

Bug report -> https://bugs.launchp...ori/+bug/963899

~Jeff
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users