Giter VIP home page Giter VIP logo

Comments (28)

oliver-joos avatar oliver-joos commented on August 28, 2024 4

Until this issue is fixed you can use the workaround I wrote a year ago (see above):

sudo ln -s /usr/bin/mate-terminal /usr/bin/gnome-terminal

from mate-panel.

raveit65 avatar raveit65 commented on August 28, 2024 1

Thanks for clarification.
Indeed, normal vim package does not ship a desktop file in fedora, only vim-x11 gui package ships one.
But honestly does vim need a desktop file for working ;)
For me vim is a terminal editor , so no desktop file is needed.

from mate-panel.

oliver-joos avatar oliver-joos commented on August 28, 2024 1

Unfortunately this issue still exists in MATE 1.14 of Linux Mint 18.0

@MoonSweep: thanks for your in-depth summery of the problem on Aug 3, 2015! Lets hope your solution will be merged upstream soon.

Meanwhile I use this workaround:
sudo ln -s /usr/bin/mate-terminal /usr/bin/gnome-terminal

from mate-panel.

AndriusWild avatar AndriusWild commented on August 28, 2024 1

The issue still exists on Mint MATE 18.2. Installing xterm and running sudo ln -s mate-terminal xterm helped (the script being open in xterm though). I also had to delete quotes in the Exec path in order to make the script run Exec=/path/to/script.sh %F

from mate-panel.

monsta avatar monsta commented on August 28, 2024 1

Wow.
https://gitlab.gnome.org/GNOME/glib/merge_requests/795

They've agreed to add MATE and Xfce terminals support.

from mate-panel.

mahiuchun avatar mahiuchun commented on August 28, 2024

What's your result of running 'x-terminal-emulator'?

from mate-panel.

stefano-k avatar stefano-k commented on August 28, 2024

mate-panel creates a .desktop file with the following content:

#!/usr/bin/env xdg-open
[Desktop Entry]
...
Terminal=true

so the default terminal is managed by xdg-open

from mate-panel.

themainliner avatar themainliner commented on August 28, 2024

That's the thread I opened. xD

Another factor not reported above is that in 'Preferred Applications' the 'Terminal Emulator' section under 'System' is "greyed out" and you cannot change it, it's blank too.

The full workaround is to submit 'sudo ln -s mate-terminal xterm' first. Then "Custom Application Launchers" that are also "Application in Terminal" are all prefixed with 'mate-terminal -e'.

I opened up mate-terminal and submitted 'x-terminal-emulator' and another mate-terminal opened. But this result may be invalid since I already applied the workaround above. I could re-test in a virtual or new 'flat' install. Tell me what you need by way of additional information. This occurs in Linux Mint 13 'Maya' x64 and 14 'Nadia' x64.

Cross posted with stefano-k (above) - no idea what that means.

from mate-panel.

 avatar commented on August 28, 2024

For the record, this is not a MATE issue neither XDG issue, this is a pure Mint issue that should be addressed to Clement.

xdg-open uses whatever is defined on TERM environment variable, which is set to xterm. By using this default and not having xterm installed by default, they have a broken dependency tree.

If you want to use gnome-terminal, just add to your bashrc:

export TERM=gnome-terminal

Reload your profile information and you're done. Otherwise convince Mint and clement to change the default TERM var to whatever they choose or make xterm a part of the default installation.

Other solution besides this one in my humble opinion is a witch hunt.

from mate-panel.

clefebvre avatar clefebvre commented on August 28, 2024

Closing, it's a Mint issue indeed.

We might be able to fix it in an update (default mime type handlers can convince xdg-open to use mate-terminal here), I'll have to check.

from mate-panel.

oliver-joos avatar oliver-joos commented on August 28, 2024

@ketheriel: I don't know the details of xdg-open. In my Ubuntu 11.04 the variable TERM="xterm", xterm is installed (not just a symbolic link), but panel launchers open gnome-terminal! Furthermore I was not able to fix it in Mint 14 by setting TERM="mate-terminal" in .bashrc. This makes it even worse because command line tools like nano then complain "Error opening terminal: mate-terminal". BTW: I also tried to set TERM in .gnomerc or .materc, but those are not executed upon login.

@clefebvre: Fixing it by remapping mime types sounds nice, although I didn't figure out how yet. Sorry for reporting a Mint bug to Mate. I am still learning where Mate ends and Mint begins. Anyway I'd like to say, both projects are so encouraging! Thank you very much for your work!

from mate-panel.

gpolitis avatar gpolitis commented on August 28, 2024

I'm sorry for necroposting but this thread contains inaccurate information that may lead to confusion.

@ketheriel what makes you say xdg-open uses whatever is defined on TERM environment variable? I don't see anything like that in the xdg-open code and it wouldn't make any sense anyway because the TERM variable serves a different purpose.

I'm not reopening the issue since it's not a bug in mate-terminal, but It's not a Mint issue either, it's a Glib issue.

In Glib, the code that prepends the terminal command line is in the function prepend_terminal_to_vector. It contains some nasty hard coded stuff and there's no mate-terminal there.

from mate-panel.

MoonSweep avatar MoonSweep commented on August 28, 2024

Sorry too for necroposting (didn't know this word...). Gpolitis, thanks a lot for spotting this issue. For people interested, I filed a bug report on the Debian BTS and provided a patch to fix it (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773915).

from mate-panel.

MarioMey avatar MarioMey commented on August 28, 2024

I just made a clean instalation of Ubuntu Mate 14.04 (from http://ubuntu-mate.org/) and this bug is still here. So, I think it's not only a Mint bug.

I tried:

sudo ln -s mate-terminal xterm ----> Doesn't work.

sudo ln -s /usr/bin/mate-terminal /usr/bin/xterm && sudo chmod +x /usr/bin/xterm ---> The error message isn't shown... but the app doesn't launch (I don't know why)

In Custom Application Launchers, there is Mate Terminal.

By doing "export TERM=mate-terminal", it doesn't fix anything.

Any news...?

from mate-panel.

kacernator avatar kacernator commented on August 28, 2024

This bug still exists in Linux Mint 17.2 Mate.

from mate-panel.

MoonSweep avatar MoonSweep commented on August 28, 2024

So, to summarize:

Contrary to what was said at the beginning of this thread, this is not a Mint-only issue, and this has nothing to do with the TERM variable. This is a known bug from GLib which has a hard-coded set of terminals to try and launch, and several of them are missing from this list (not only mate-terminal, but xfce-terminal or konsole for example are also missing).

Knowing how the Gnome guys are oblivious to anything outside of Gnome, I think it's no use to ask them to fix this issue in GLib, that's why I made a patch handling mate-terminal and posted it in the Debian BTS, then when mate-terminal's package started to provide a wrapper compatible with xterm, I updated the patch to handle x-terminal-emulator (which is a Debian alternative for all terminal emulators compatible with xterm), thus allowing GLib in Debian (and derivatives) to handle not only mate-terminal but all terminals which can be set as this alternative.

Now we have to wait for the patch to be included in the Debian package, which will automatically fix the bug in the next versions of Ubuntu and Mint as well. I'll ping the Debian bug right now.

Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773915
Ubuntu bug: https://bugs.launchpad.net/linuxmint/+bug/1238964

from mate-panel.

infirit avatar infirit commented on August 28, 2024

mate-desktop/mate-desktop#121 (comment)

I tracked it down to panel_app_info_launch_uris in https://github.com/mate-desktop/mate-panel/blob/master/mate-panel/libpanel-util/panel-launch.c#L97

re-opening this one even-though this is a glib problem.

from mate-panel.

jakabk avatar jakabk commented on August 28, 2024

debian jessie / MATE Desktop Environment 1.8.1

If I try open a text file from the context menu (right click) and I choose vim,
it is opened with xterm instead of mate-terminal.
Is this related with this issue?

  • the vim.desktop contains exec=vim %F
  • echo $TERM shows xterm-256color
  • x-terminal-emulators opens mate-terminal
  • update-alternatives --config x-terminal emulator is set to /usr/bin/mate-terminal.wrapper

update
But if I open vim from ALT+F2 application runner, it starts with mate-terminal.

from mate-panel.

raveit65 avatar raveit65 commented on August 28, 2024

Why using a desktop file for Vim?
I can use Vim without any problems inside mate-terminal here in fedora.
And if your vim version with desktop file use xterm than please file out a report against vim.

from mate-panel.

jakabk avatar jakabk commented on August 28, 2024

I don't use the desktop file, it's created by the system. I'd try to find out why vim opened from caja's context menu starts with xterm instead of mate-terminal. I googled a lot and found this is issue as the only one clue for this. Because it shows some similarity.

from mate-panel.

raveit65 avatar raveit65 commented on August 28, 2024

I'd try to find out why vim opened from caja's context menu starts with xterm instead of mate-terminal

I don't have any entry in context-menu about vim, because i don't have a desktop file for vim ;)
Maybe you find a hint in this desktop file.

from mate-panel.

jakabk avatar jakabk commented on August 28, 2024

No. It's wrong direction. There is nothing.

[Desktop Entry]
Name=Vim
GenericName=Text Editor
GenericName[de]=Texteditor
Comment=Edit text files
--- languages ---
[Desktop Entry]
Name=Vim
GenericName=Text Editor
GenericName[de]=Texteditor
Comment=Edit text files

from mate-panel.

MoonSweep avatar MoonSweep commented on August 28, 2024

@charisz This is precisely the same problem, read my previous comment for a summary of the situation. It's a GLib bug, and it's obvious that neither the Gnome developers (upstream for GLib) nor the Debian Gnome maintainers (who have several members in common, which I didn't know at the time I wrote my previous comment) are in a hurry to fix it (see how the Debian bug report I filled turned out).

@raveit65 The desktop file is part of vim's source tarball. If what you say is true, then Fedora probably doesn't ship it in their binary package; Debian (and its derivatives) do.

from mate-panel.

jakabk avatar jakabk commented on August 28, 2024

@MoonSweep Thank you, I calmed down, and am waiting patiently for some soultion.
@raveit65 For me vim is the text editor for everything, and if I use graphical file manager (such as caja), I'd open files with vim as well; the desktop files support this.

from mate-panel.

monsta avatar monsta commented on August 28, 2024

Ok, we have our own mate_desktop_prepend_terminal_to_vector function in libmate-desktop, and it's already used in panel's Run dialog. We can try using it in the code that handles custom app launcher as well.

from mate-panel.

ganitau avatar ganitau commented on August 28, 2024

On Ubuntu mate I had the same problem so I looked in synaptic manager and xterm was not installed so I sudo apt-get install xterm and it worked for me..

from mate-panel.

vkhodygo avatar vkhodygo commented on August 28, 2024

I have the same problem with Fedora 25 (Mate). The only way is to run apps from the mate terminal directly.

from mate-panel.

raveit65 avatar raveit65 commented on August 28, 2024

Does the issue still exits nowadays?
Glib MR is merged, so closing this.

from mate-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.