By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1630 - [patch] xdg-utils compatibility with trinity
Summary: [patch] xdg-utils compatibility with trinity
Status: NEW
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.0.x [Trinity]
Hardware: All All
: P5 normal
Assignee: Timothy Pearson
URL:
: 2809 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-16 05:39 CDT by Alexey Loukianov
Modified: 2017-08-30 10:14 CDT (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
xdg-open with proper trinity support (22.49 KB, application/x-shellscript)
2017-08-29 08:49 CDT, wofgdkncxojef
Details
xdg-screensaver compatible with trinity (34.17 KB, application/x-shellscript)
2017-08-29 16:05 CDT, wofgdkncxojef
Details
xdg-email compatible with trinity (26.30 KB, application/x-shellscript)
2017-08-29 18:12 CDT, wofgdkncxojef
Details
xdg-utils compatibility with trinity (9.48 KB, patch)
2017-08-30 10:11 CDT, wofgdkncxojef
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Loukianov 2013-08-16 05:39:10 CDT
It is really a "sort-of-a-bug" in xdg-open and not a bug in TDE. By default xdg-open opens up files which have no xdg-mime association for them in default system browser (firefox in my case). For kde, gnome and xfce xdg-open has special case branches offloading decision on what app to use to open unknown mime types to the DE. For KDE it uses kfmclient, passing 'openURL "$1"' if KDE_SESSION_VERSION is 4 or 'exec "$1"' otherwise.

As Trinity is de-facto compatible with KDE 3.x style of kfmclient invocation it might be worth to simulate KDE 3.x session existence by exporting KDE_FULL_SESSION and making sure KDE_SESSION_VERSION="4" is not exported.

For me I resolved the problem by including a small shell-script in to ~/.trinity/env directory which exports KDE_FULL_SESSION in case it founds TDE_FULL_SECTION exported in current environment.
Comment 1 Darrell 2013-08-16 12:56:23 CDT
We have discussed xdg-open in the developer mail list:

http://trinity-devel.pearsoncomputing.net/?0::11093

As noted in this report and in the mail list, xdg-open is broken and the true problem.

Starting with R14.0.0, Trinity no longer is "de-facto compatible" with using the same environment variables as KDE. Therefore the xdg-open scripts will default to an "other" desktop environment, whatever those defaults happen to be in those script collections. For example, in Trinity we now use:

TDEDIR
TDEDIRS
TDEHOME
TDEROOTHOME
TDE_FULL_SESSION
TDE_MULTIHEAD
TDE_NO_IPV6
TDE_SESSION_UID

As noted in the mail list discussion, the best long-term solution is to propose patching the xdg scripts to support Trinity. There are other desktop environments that are also not supported in the xdg scripts. Therefore I don't know how successful a patch proposal will be. The xdg script maintainers, if they exist, seem interested only in supporting KDE, GNOME, and "other."

Another idea is to create our own xdg script package that overrides the standard xdg script collection.

Another idea is a Trinity wiki page with various work-arounds.
Comment 2 Alexey Loukianov 2013-08-16 13:47:48 CDT
(In reply to comment #1)
> As noted in this report and in the mail list, xdg-open is broken and the true
> problem.

Yep. That's what I noted also in the first sentence of this bug report.
 
> As noted in the mail list discussion, the best long-term solution is to propose
> patching the xdg scripts to support Trinity. There are other desktop
> environments that are also not supported in the xdg scripts. Therefore I don't
> know how successful a patch proposal will be. The xdg script maintainers, if
> they exist, seem interested only in supporting KDE, GNOME, and "other."

They seem to have a separate entry for xfce4. Nevertheless IMO the "real true way (TM)" to fix it is to patch xdg-opes so it does not use $BROWSER to open up unassigned mime types and rely on some other environment variable to call "Open This File With..." handler - let's call it "XDG_DE_OPENFILE_HANDLER". In case there's no $XDG_DE_OPENFILE_HANDLER it could be programmed to fall back into using current behavior and open up file using browser.
 
> Another idea is to create our own xdg script package that overrides the
> standard xdg script collection.

I think this could be an interim way to go: maintainers of binary packages for various distros could patch distro-supplied source package with Trinity-specific xdg-open patch and provide it as an override package in Trinity repos.

> Another idea is a Trinity wiki page with various work-arounds.

Thing like this won't hurt in any case, no matter what would be the resolution for this bug report.
Comment 3 wofgdkncxojef 2017-08-27 15:32:08 CDT
*** Bug 2809 has been marked as a duplicate of this bug. ***
Comment 4 wofgdkncxojef 2017-08-29 08:49:45 CDT
Created attachment 2812 [details]
xdg-open with proper trinity support

this modified version of xdg-open works properly.
It could even be proposed upstream.

Trinity could use this to mask the system wide version.
Comment 5 wofgdkncxojef 2017-08-29 16:05:32 CDT
Created attachment 2813 [details]
xdg-screensaver compatible with trinity

and xdg-screensaver with trinity compatibility.
Comment 6 wofgdkncxojef 2017-08-29 18:12:38 CDT
Created attachment 2814 [details]
xdg-email compatible with trinity

xdg-email compatible with trinity....
Comment 7 wofgdkncxojef 2017-08-29 18:14:54 CDT
and kmimetypefinder was replaced by what?
i can't find the equivalent...
Comment 8 wofgdkncxojef 2017-08-29 18:35:41 CDT
.... and ktraderclient ?
Comment 9 wofgdkncxojef 2017-08-30 10:11:45 CDT
Created attachment 2815 [details]
xdg-utils compatibility with trinity

forget the above.

Here's a patch, for xdg-utils, that add compatibility for trinity.
It patches open, email, settings, mime, screensaver.
Already proposed it to xdg-utils.
https://bugs.freedesktop.org/show_bug.cgi?id=102395

you apply the patch to xdg-utils 1.1.3
https://cgit.freedesktop.org/xdg/xdg-utils/

git clone https://anongit.freedesktop.org/git/xdg/xdg-utils.git
patch
configure ; make scripts