Open theotheroracle opened 7 years ago
to clarify, I installed AppEditor to check if this option was checked by default.
I installed another terminal, xterm, to test if I could launch xterm with a program as an argument. then I tested to see if the "launch in terminal" option worked, and it did. so I guess the problem is that xterm should be installed by default? or should pantheon terminal support command arguments?
perhaps the menu could give you a warning when a problem like this occurs? telling them that they can launch the program without the terminal, or to install xterm?
Perhaps this is related: https://github.com/elementary/terminal/issues/158
ok. I will post this there as well.
--
-PiFi 🍍
Terminal does need to be launched with fairly strict requirements for the --execute flag at the moment. The app menu needs to be checked that it is complying.
Any news? I hate this bug. I Can't use Super key+space and keyboard to start some terminal commands.
Just in case I will put this here:https://github.com/mate-desktop/mate-panel/issues/57
Sorry this does not seem to have attracted any attention. I'll try and look into it soon.
I can confirm that UCK does not launch unless an alternative terminal is installed.
At the moment the appmenu launches the app using a Gtk.AppInfo with a NEEDS_TERMINAL flag so it looks like that is not compatible with the elementary terminal.
Part of the problem seems to be that the environment variable "TERM" is set to "xterm" not "io.elementary.terminal"
Unfortunately making sure that TERM=io.elementary.terminal in the environment with which appinfo.launch () is called makes no difference - Gtk still tries to launch in "xterm" - which fails if that is not installed. Not sure yet why this is.
Installing other terminals which are not named "xterm" (e.g. Mate terminal or Konsole) also causes this problem. May be an upstream issue - the terminal set in the environment is not being used by Gtk.
It may be possible for the application menu to work around this by reading the settings itself and constructing the correct commandline. Whether this is the correct approach rather than fixing upstream is open to question.
A workround for this particular case is to create a custom shortcut using the keyboard settings plug.
This command works: io.elementary.terminal -e uck-gui --wait-before-exit
That way you can launch the app with e.g. <Alt>U
or whatever shortcut you would like that does not clash with an existing one.
Yes It's not looking very attractive but It gives a lot of power to app menu. And make it fast app launches.
You mean modify applications .desktop files "Exec=" key manually? There must be a better way :(
@queeup What I mean is
io.elementary.terminal -e uck-gui --wait-before-exit
and press enter.Ooo boy. Please don't make me do this. :(
I hope this powerful feature of app menu can be fixed someday.
OK just to be sure we are talking about same things and two different problems:
I want to point out .desktop files with Terminal=true key applications (Htop for example) not working unless xterm installed or fake it like you have installed with ln -s /usr/bin/io.elementary.terminal /usr/bin/xterm
.
"Launch in terminal" is looking like the same thing but code base different thing. That is why symbolic link trick not working on this.
Two different problem for doing almost same job. Do I need to open another issue for "Terminal=true" apps?
For the Terminal=true thing need gnome patch like mate team did:
Problem is this lines:
Strange but "Launch in terminal" accualy works but printing commands result to the to DEBUG log instead open terminal and pring on it.
python3 --version
command from app menu::
** (wingpanel:6568): DEBUG: 00:35:23.362: relevancy-service.vala:72: application launched
Python 3.6.8
uname -a
command from app menu:
** (wingpanel:6568): DEBUG: 00:49:48.198: relevancy-service.vala:72: application launched
Linux sony-desktop 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Not sure whether https://github.com/elementary/terminal/pull/397 might help with this.
@queeup I think that if the issues are due to bugs in different parts of the code and require separate solutions (as appears to be the case) then two issue need to be opened.
@queeup Just to clarify - when you say "Launch in Terminal" ticked, which app is supplying this option?
Sorry for confusing. I mixed up things. When I say "Launch in Terminal" I was trying to say "Run command". Write terminal command (ls -ll
or cat .bashrc
etc.) to app menu and expected to see terminal window opening and print out commands results on terminal. I think I am wrong about that right? There is no such a thing.
I guess my #232 issue is duplicate of this issue. I am confused. Sorry. You can tag it as duplicate.
In that case I think #232 may well be a duplicate, however I think the problem is more clearly state in that report as it mentions the problem is fundamentally linked to the "Terminal" key in the desktop file.
I have changed the description of this to distinguish it from #232. I am looking into the related code and it may have a different cause in the case of bash commands as opposed to apps requiring a terminal.
It seems that if wingpanel is launched from a terminal (it needs to be removed from cerbere monitor list and killed first), the entering a bash command produces output in that terminal rather than launching a new terminal which would explain why it is not normally seen.
After further investigation, I think that the root cause of all these problems is gdesktopappinfo only supporting specific named terminal programs before falling back to xterm (not including io.elementary.terminal). So until that problem is fixed we can only try and find a work around.
I recently installed UCK which is required to run by default in the terminal. however, elementary would not launch this program as any program with the "Launch in terminal" option checked does not launch. not sure what the problem is but, I assumed it might be the menu.