linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.45k stars 733 forks source link

Launcher applet ignores the terminal that the user has chosen #9720

Open LinuxOnTheDesktop opened 3 years ago

LinuxOnTheDesktop commented 3 years ago
 * Cinnamon version (cinnamon --version) 4.6.7
 * Distribution - (Mint 17.2, Arch, Fedora 25, etc...) Mint 20
 * Graphics hardware *and* driver used: Intel onboard, UHD Graphics 620, mesa
 * 32 or 64 bit: 64

Issue

Cinnamon's launcher applet (pictured immediately below) ignores the terminal the user has chosen.

image

Steps to reproduce

  1. Set the default terminal to something other than Gnome. So one might set it to the xfce terminal.
  2. Create a launcher with the launcher applet, and in so doing select 'launch in terminal'.
  3. Use the launcher.
  4. See how Gnome terminal appears.

Expected behaviour

The applet should use the terminal that I have set as the default terminal.

Other information

Is this the wrong place to post reports for the launcher applet? That applet declares no author anywhere; I infer that it is considered part of Cinnamon.

Cf. Nemo issue 2571?

LinuxOnTheDesktop commented 3 years ago

Would we nice were this fixed in Mint 20.1, if I may say so.

LinuxOnTheDesktop commented 11 months ago

Unfortunately this papercut persists in Mint 21.2. (I reported the bug almost three years ago.)

rcalixte commented 1 month ago

@LinuxOnTheDesktop I can't seem to replicate this. I was able to add a new launcher with a different terminal and when I clicked on it, it launched the correct terminal. Can you share your panel launcher display and the configuration of the launcher?

LinuxOnTheDesktop commented 1 month ago

@rcalixte: thank you for the attention. Perhaps you misunderstand the problem. Let me explain.

The problem is not that one cannot get a launcher of the following form working.

image

[EDITED to remove the tick from 'launch in terminal' in the screenshot above.]

The problem is that a launcher of the following form launches Gnome-Terminal irrespective of one's default terminal (where the latter is set by 'Preferred Applications').

image

rcalixte commented 1 month ago

Thank you for the explanation. I've been able to replicate this. This does indeed seem related to the code from Nemo and provides an easy test case. It might require some refactoring on the Nemo side but I do think it's doable. I can't commit on a timeline but this will hopefully be resolved at some point.

rcalixte commented 1 month ago

@LinuxOnTheDesktop An update here, there's some good and not so good news here:

The bug in Nemo and the bug with the Panel Launcher applet are independent of each other as they rely on separate code paths. You can resolve the issue with the applet by installing and configuring xdg-terminal-exec. The bug in Nemo will have a pull request opened shortly that hopefully resolves the issue there.

Shout if you have any questions.

LinuxOnTheDesktop commented 1 month ago

@rcalixte

Thank you very much.

'xdg-terminal-exec' puzzles me. Does it fix a bug in xfce4-terminal? Does it fix a bug within Linux Mint? Is it a whole new version of xfce-terminal?

Forthcoming Nemo fix: marvellous! Except, hold on: when I click Nemo's terminal icon, already I get the xfce-terminal.

rcalixte commented 1 month ago

'xdg-terminal-exec' puzzles me. Does it fix a bug in xfce4-terminal? Does it fix a bug within Linux Mint? Is it a whole new version of xfce-terminal?

This is specifically to address the Panel Launcher applet. It uses GLib which has a hard-coded order of terminals that it seeks and otherwise it fails. The solution is to configure xdg-terminal-exec with your desired terminal and the Panel Launcher call to a terminal will evaluate to use that.

Forthcoming Nemo fix: marvellous! Except, hold on: when I click Nemo's terminal icon, already I get the xfce-terminal.

The fix is for the 'Run in terminal' where there are spaces in the file name and that it also does not launch with the default terminal. In the cases where the default terminal is via Flatpak, it will launch with another available installed terminal.

LinuxOnTheDesktop commented 1 month ago

@rcalixte

Thanks again. I have some understanding of what you write. It seems to me that the following question remains. Will a future iteration of Mint in some way incorporate xdg-terminal-exe, such that, with the panel terminal launcher, things will Just WorkTM?

rcalixte commented 1 month ago

Thanks again. I have some understanding of what you write. It seems to me that the following question remains. Will a future iteration of Mint in some way incorporate xdg-terminal-exe, such that, with the panel terminal launcher, things will Just WorkTM?

I am not sure. I would still encourage configuring it locally if you can so that you don't have to wait on anyone else, assuming you want this functionality to work now. The software will be available in the repository starting with Mint 22+ when it is released and LMDE 7 next year.

LinuxOnTheDesktop commented 1 month ago

Right.

I find that, at present, the MintMenu's terminal icon ignores my configured preferred-terminal preference too (i.e., as do applets). So, I think that, now, I will try to get the xdg-terminal-exe thing to work.

Except, er, how does one install it? Oh; it is a shell script; one must download it (or cut and paste it), mark it executable, and then run it . . Er, and determine what syntax to use when running it. This is all getting a bit arch-linux-y. (The documentation for the script is not readily intelligible to anyone below the level of Intermediate Programming God.)

rcalixte commented 1 month ago

This is all getting a bit arch-linux-y.

Agreed that it is a bit unwieldy. For this reason, you can wait until there is a repository package available and try then. Possibly, something could be done elsewhere too. And again, this is just for the Panel Launcher applet. The applet is independent of Nemo. Hopefully, we can resolve the Nemo-specific issues with the next release.