#793 closed System Defect (fixed)

Media Tray > More Options > Open Media Directory uses Web Browser

Reported by: bridger Owned by: ken
Priority: minor Milestone:
Component: System Tool Version: 9.2-RELEASE
Keywords: Media Tray Cc: trac-bugs@…


Hi all,

The Media Tray's 'Open Media Directory' will open the /media/ in the GNOME Web Browser instead of the DE's file manager.

FreeBSD rook 9.2-RELEASE-p8 FreeBSD 9.2-RELEASE-p8 #0: Mon Sep 23 16:26:45 UTC 2013 root@amd64-builder.pcbsd.org:/usr/obj/usr/src/sys/GENERIC amd64


I've never (knowingly) installed any of the GNOME applications. I'll try to reproduce this on my workstation (also LXDE (+KDE)), but I don't know if I'll be able to replicate it.


Change History (5)

comment:1 Changed 16 months ago by bridger

Hi all,

I can confirm that Media Tray will try to open /media in a web browser (FireFox? on this particular machine). Maybe this is just a peculiarity with LXDE?

`> uname -a
FreeBSD dispanner.lib.utk.edu 9.2-RELEASE-p8 FreeBSD 9.2-RELEASE-p8 #0: Mon Sep 23 16:26:45 UTC 2013 root@…:/usr/obj/usr/src/sys/GENERIC amd64`


Version 0, edited 16 months ago by bridger (next)

comment:2 Changed 16 months ago by joshms

  • Owner set to ken

comment:3 Changed 16 months ago by kenmoore

  • Resolution set to 3rdpartybug
  • Status changed from new to closed

This is a known bug with the "xdg-open" utility (how it detects the running DE). It is currently setup to look for environment variables, but those EV do not exist yet when the mount-tray is first started. If a DE could not be determined, xdg-open cycles through a list of web browsers to fall back on (causing firefox/epiphany to be opened instead).

Solution: The xdg-open script needs to look for particular active processes instead of environment variables to determine which DE is running. This is outside the scope of the PC-BSD project, looking for someone to patch the FreeBSD port (there rumors that this is being worked on).

Temporary workarounds:
1) Use XFCE - xdg-open already looks for a process to detect XFCE, so this DE works perfectly fine with it.
2) Close the mount-tray and re-open it from the control panel. This will force the utility to start over with the current batch of environment variables (including the DE-specific ones) and might let xdg-open work properly. This will need to be done every time you log in.

comment:4 Changed 16 months ago by kris

  • Resolution 3rdpartybug deleted
  • Status changed from closed to reopened

Ken, this really should be fixed.

Maybe have the mount-tray check process list and determine which DE is opened that way? If it detect LXDE running, it can export the right ENV variables so that xdg-open will pick them up.

comment:5 Changed 16 months ago by kenmoore

  • Resolution set to fixed
  • Status changed from reopened to closed

OK, I just patched the xdg-open script myself so that it will now look at the running processes to determine the running DE (and fall back to the previous checks if the new ones don't work).
I added it to the PC-BSD ports overlay, so it should be available with the next package update.

[1] https://github.com/pcbsd/pcbsd/commit/192923c46b6a5e4dcf791902035f70953111719e (move to overlay)
[2] https://github.com/pcbsd/pcbsd/commit/f29fddc888b835db95e8cddbebfb3fe02c2b041c (initial copy/patch of the script)

Note: See TracTickets for help on using tickets.