A solution that involves minimal hacks, but applies to individual apps one by one is to change the XDG_CURRENT_DESKTOP variable only when launching the problematic programs.
For Kate, for example:
1. Copy the .desktop file (in Ubuntu 17.04, with XFCE, I also have KDE Plasma installed):
> cp /usr/share/applications/org.kde.kate.desktop ~/.local/share/applications/org.kde.kate.desktop
2. Open the file (for example):
> cd ~/.local/share/applications/
> gedit org.kde.kate.desktop
3. Change the launch line from
Exec=kde kate -b %U
to
Exec=env XDG_CURRENT_DESKTOP=kde kate -b %U
4. Make the file executable (in the file properties through Thunar)
As the user launcher files have precedence over the system ones, this works. You might try also to use "gnome" as the value of the XDG_CURRENT_DESKTOP variable. I did not want to change it system-wide becaus it is set by XFCE to "XFCE".
A solution that involves minimal hacks, but applies to individual apps one by one is to change the XDG_CURRENT_DESKTOP variable only when launching the problematic programs.
For Kate, for example:
1. Copy the .desktop file (in Ubuntu 17.04, with XFCE, I also have KDE Plasma installed): applications/ org.kde. kate.desktop ~/.local/ share/applicati ons/org. kde.kate. desktop
> cp /usr/share/
2. Open the file (for example): share/applicati ons/ kate.desktop
> cd ~/.local/
> gedit org.kde.
3. Change the launch line from DESKTOP= kde kate -b %U
Exec=kde kate -b %U
to
Exec=env XDG_CURRENT_
4. Make the file executable (in the file properties through Thunar)
As the user launcher files have precedence over the system ones, this works. You might try also to use "gnome" as the value of the XDG_CURRENT_DESKTOP variable. I did not want to change it system-wide becaus it is set by XFCE to "XFCE".