On Sun, Feb 25, 2018 at 02:35:28PM -0500, Jeremy Bicha wrote:
> I suggest looking into what xdg-utils does.

Looks like xdg-utils, or at least xdg-open is not the one to blame since
it is calling gio open:

$ sh -x  $( which xdg-open) video.mp4
+ check_common_commands video.mp4
+ [ 1 -gt 0 ]
+ parm=video.mp4
+ shift
+ [ 0 -gt 0 ]
+ [ -z  ]
+ unset XDG_UTILS_DEBUG_LEVEL
+ [ 0 -lt 1 ]
+ xdg_redirect_output= > /dev/null 2> /dev/null
+ [ xvideo.mp4 != x ]
+ url=
+ [ 1 -gt 0 ]
+ parm=video.mp4
+ shift
+ [ -n  ]
+ url=video.mp4
+ [ 0 -gt 0 ]
+ [ -z video.mp4 ]
+ detectDE
+ unset GREP_OPTIONS
+ [ -n GNOME ]
+ DE=gnome
+ [ xgnome = x ]
+ [ xgnome = x ]
+ [ xgnome = x ]
+ [ xgnome = xgnome ]
+ which gnome-default-applications-properties
+ DE=gnome3
+ [ -f /run/user/1000/flatpak-info ]
+ [ xgnome3 = x ]
+ DEBUG 2 Selected DE gnome3
+ [ -z  ]
+ return 0
+ open_gnome3 video.mp4
+ gio help open
+ gio open video.mp4
+ [ 0 -eq 0 ]
+ exit_success
+ [ 0 -gt 0 ]
+ exit 0

** (exo-helper-1:20332): WARNING **: Could not open X display
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

My mime setup for video files is mplayer and that seems to correctly there:

$ xdg-mime query default video/mp4
userapp-mplayer-9GFM9U.desktop

Testing changes to desktop files shows that exo-file-manager.desktop
is to blame for this behavior. It does correctly set OnlyShowIn=XFCE; so
I don't get why it gets used in a Gnome session:

$ cat /usr/share/applications/exo-file-manager.desktop
[Desktop Entry]
Version=1.0
Type=Application
Exec=exo-open --launch FileManager %u
Icon=system-file-manager
StartupNotify=true
Terminal=false
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
X-XFCE-MimeType=inode/directory;x-scheme-handler/trash;
Name=File Manager
...

But moving this file away from /usr/share/applications
fixes external application starting from nautilus:

# mv /usr/share/applications/exo-file-manager.desktop /root/

-Mikko

Reply via email to