Bug 1096011 - Launches desktop items in gnome-terminal or xterm
Summary: Launches desktop items in gnome-terminal or xterm
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-09 05:14 UTC by John Morris
Modified: 2015-04-09 03:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-09 03:17:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John Morris 2014-05-09 05:14:16 UTC
Description of problem:

If you make a launcher that runs in a terminal it insists on gnome-terminal and failing that uses a bare xterm instead of mate-terminal.

Version-Release number of selected component (if applicable):

mate-file-manager-1.6.4-4.fc20.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Install mate, remove gnome-terminal.
2. Make a desktop launcher, say to run vim in a terminal or ssh somewhere.
3. Launch it, see xterm appear.
4. Go make a symlink pointing /usr/local/bin/gnome-terminal to /usr/bin/mate-terminal
5. Try launching again.

Additional info:

Default terminal app is correctly set to mate-terminal in "Preferred Applications" and ALT-F2's option to launch in a terminal does give mate-terminal without the presence of the syslink.

Comment 1 Wolfgang Ulbrich 2014-05-09 09:30:45 UTC
Without to know which command you used exactly it's difficult to reproduce the issue.
A vim or shh only command doesn't open any terminal here, xterm and gnome-terminal are installed.
But why not creating launchers with a command line like this?
mate-terminal -e 'ssh 192.168.101.240'
mate-terminal -e vim /home/rave/test5

Comment 2 John Morris 2014-05-10 03:02:04 UTC
An example:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Odin
Name[en_US]=Odin
Exec=ssh odin.beau.lib.la.us
Icon=/usr/share/pixmaps/gnome-term.png
Terminal=true
MultipleArgs=false
Type=Application
Comment=
Path=
StartupNotify=false

Yes I could just modify them all to add an explicit call to mate-terminal but that would just be a workaround.  I already worked around it by nuking gnome-terminal and adding a symlink.  Now it is time to report the bug and fix it right for everyone else.  The whole point of the Terminal= line in a .desktop file is to let the system fire up the DEFAULT terminal emulation.  The idea being that switching from GNOME to XFCE automatically lauched those items in it's xterm replacement and now switching to MATE should do likewise. And so on.

Oh, I already looked and the phrase 'gnome-terminal' doesn't appear anywhere in the tarball.  It appears to look for six other explicitly named terminals, yet it somehow is getting gnome-terminal.  So I gave up on providing a patch at that point.  :)

Comment 3 Stefano Karapetsas 2014-05-10 13:53:37 UTC
John, please paste output of 

gsettings get org.mate.applications-terminal exec

Comment 4 Stefano Karapetsas 2014-05-10 14:02:43 UTC
Ok, I understand the problem, we use glib to launch desktop files, and glib has this hackish function:

https://git.gnome.org/browse/glib/tree/gio/gdesktopappinfo.c#n2393

Comment 5 Wolfgang Ulbrich 2014-05-10 14:39:56 UTC
re-asigned to glib, maybe it helps.

Comment 6 Patrick Monnerat 2014-07-29 17:55:30 UTC
I'm not 100% sure about that, but caja now seems to use mate_desktop_prepend_terminal_to_vector() which is supposed to try the preferred terminal first... However this bug still occurs in rawhide :-(
Just my 2 cents.

Comment 7 Matthias Clasen 2015-04-09 03:16:37 UTC
Lets keep this discussion in the upstream bug, https://bugzilla.gnome.org/show_bug.cgi?id=627943


Note You need to log in before you can comment on or make changes to this bug.