Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong xdg-terminal call #355

Closed
jubalh opened this issue Mar 7, 2016 · 11 comments
Closed

wrong xdg-terminal call #355

jubalh opened this issue Mar 7, 2016 · 11 comments

Comments

@jubalh
Copy link
Contributor

jubalh commented Mar 7, 2016

Version

Version: 0.15.12

Configuration

Default

Steps to reproduce

  • rofi -key-run F2
  • press F2
  • type: vim
  • press shift+enter

What behaviour you see

rofi -key-run F2
Rofi is launched in daemon mode.
listening to the following keys:
* window on
* run on F2
* ssh on
xdg-terminal: unexpected option '-e'
Try 'xdg-terminal --help' for more information.

What behaviour you expect to see

  • rofi opening vim in my terminal emulator

I have discussed this already in #201
xdg-terminal doesnt support the -e option.
Still xdg-* is the way to go if one wants portable opening solutions under Linux.

@DaveDavenport
Copy link
Collaborator

I still don't see how I can fix this to work with all terminals.. You can fix it by updating your rofi configuration.

xdg-terminal still is not available on my distro's.

Not sure what has changed since previous time.

@jubalh
Copy link
Contributor Author

jubalh commented Mar 7, 2016

I wonder on which distro xdg-terminal is not available.
The package might be xdg-utils, have you searched your package manager for xdg-*?

Anyways, since xdg-terminal is included in rofi-sensible-script. but later will be called with -e this is a bug. So basically I wanted to report that one ;-) Because it makes xdg-terminal not usable and it should be either implemented correctly or removed, unfortunately.

So what changed since previous time is that xdg-terminal is listed in rofi-sensible-script. But is runs xdg-terminal -e command which is not the right way to use xdg-terminal. It should be xdg-terminal command. This is the problem. You might have to put the -e at another place so that it only works for terminal emulators who support that and not for all scripts you add to rofi-sensible-terminal, or something like that.

I patched rofi to use xdg-terminal directly on my distribution and will ship it like that for now.

@DaveDavenport
Copy link
Collaborator

I am on debian testing and apt-file search xdg-terminal returns nothing. Same goes for ubuntu 14.04.

We are going back into the same discussion again.. If I 'fix' xdg-terminal I will break a lot of other (more commonly used) terminals.
So the sane thing is just to remove xdg-terminal from the list?

WHY THE BASDRF!@#!@#!@ CANT TERMINALS FOLLOW A STANDARD.

(I am not happy with distributions shipping 'patched' rofi's. We have a config file for a reason, if people want to use it, they can tweak it themself)

@DaveDavenport
Copy link
Collaborator

might be better to make rofi see if there is a /etc/rofi.conf and read that first as 'defaults'.

@sardemff7
Copy link
Collaborator

xdg-terminal is not in xdg-utils because they never added it in the correct list: the line is commented-out ; it was added as a draft script and nobody moved it to the install list.

Another important point: it only accepts one argument. So it is not fully usable for rofi, as you can have several words (ssh mode, or run mode by typing them, or drun mode).

@jubalh
Copy link
Contributor Author

jubalh commented Mar 7, 2016

@DaveDavenport Okay. Thanks for that hint.
@sardemff7 I see. On openSUSE it is packaged in xdg-utils anyways. The freedesktop guys are known to be not the most..fast so its added there anyway.

I don't see what you mean with one argument. Could you explain a little more please?
I can use xdg-terminal vim hello as usual. So I can pass arguments to the program which I call.

If you mean launching several programs this doesn't seem to work with xterm either afaik. There is no xterm -e vim -e nano.

@DaveDavenport
Copy link
Collaborator

I will remove xdg-terminal from the rofi-sensible-terminal things and I will make rofi read the /etc/rofi.conf file

This way distro can force default behavior in a sane way.

@jubalh
Copy link
Contributor Author

jubalh commented Mar 7, 2016

Very good. Thank you.

@sardemff7
Copy link
Collaborator

@jubalh openSUSE is just patching xdg-utils heavily. Freedesktop.org one can only use one argument. Fedora is not shipping xdg-terminal, nor does Ubuntu/Debian as @DaveDavenport told you. Same goes for Gentoo and ArchLinux.
In short: openSUSE is the only one to ship it, in a non-upstream form, and they did not even “fixed” your use case.

Accumulating rofi configuration is good, but you better make openSUSE fix your broken xdg-terminal too…

@jubalh
Copy link
Contributor Author

jubalh commented Mar 7, 2016

@sardemff7 It seems you are right. Its only available because they patch it. Well heavily is still a bit exaggerated in my opinion :-)

I will see if it makes sense to propose another patch to openSUSE's xdg-utils to make xdg-terminal accept -e and see if it gets accepted.

Anyways I think @DaveDavenport solution is good here.

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants