! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Preferred applications doesn't correctly save command when it's prefixed
Status:
RESOLVED: FIXED

Comments

Description Yves-Alexis Perez editbugs 2008-05-17 18:15:42 CEST
Ok, I didn't know how to do a good summary.

Basically, when you set a custom helper for the WebBrowser (for example) in Preferred Applications properties, it stores in .local/share/xfce4/helpers a new .desktop file with some fields like:

X-XFCE-CommandsWithParameter=ktsuss -u corsac epiphany -n "%s"
X-XFCE-Commands=ktsuss

The “CommandsWithParameters” is used when one does stuff like “exo-open http://www.xfce.org” while the latter is used when one just run “exo-open --launch WebBrowser”.

The problem is that, currently, it only keeps the first word in the command, which means in some case, it'll break. This is exactly the case above, where the full command is run through ktsuss (would be the same with sudo, etc.). Anything prefixing the command would break the --launch.

A correct command would be something like:

X-XFCE-Commands=ktsuss -u corsac epiphany -n

I'm not sure it'll not break other stuff, but maybe instead of keeping only the first word, trashing only the “"%s"” would be enough?

Cheers,
Comment 1 Yves-Alexis Perez editbugs 2009-08-20 13:09:50 CEST
Hey, any news on this? :)
Comment 2 Nick Schermer editbugs 2009-08-26 16:48:42 CEST
*** Bug 5209 has been marked as a duplicate of this bug. ***
Comment 3 Nick Schermer editbugs 2009-08-27 06:51:18 CEST
This is a bit tricky since you can also have opera -remote "openURL(%s,new-window)". So if you parse the command to an argv and then append the parts until the string with %s is hit you get something like this:

argv[0] = "opera"; (add)
argv[1] = "-remote"; (add)
argv[2] = "openURL(%s,new-window)"; (stop)

Which will result in the following command: "opera -remote". So I'm not sure there is a good solution to fix this.
Comment 4 Skunnyk editbugs 2017-06-23 22:56:16 CEST
Is it still the case with xfconf ?
Comment 5 Git Bot editbugs 2017-07-17 13:04:57 CEST
Sean Davis referenced this bugreport in commit 3165abbe6dbe04aad75cdda2b4cd0b99231b1404

exo-helper: Use full custom command if parameter is not passed (Bug 4093)

https://git.xfce.org/xfce/exo/commit?id=3165abbe6dbe04aad75cdda2b4cd0b99231b1404
Comment 6 Sean Davis editbugs 2017-07-23 21:07:47 CEST
Resolved with the above commit.

Bug #4093

Reported by:
Yves-Alexis Perez
Reported on: 2008-05-17
Last modified on: 2017-07-23
Duplicates (1):
  • 5209 Cannot open manual page except Firefox

People

Assignee:
Nick Schermer
CC List:
4 users

Version

Version:
unspecified

Attachments

Additional information