Electrum: malformed launcher command

Created on 23 Apr 2018  路  11Comments  路  Source: spesmilo/electrum

Linux Mint 18.3 (sylvia)
kernel x86_64 Linux 4.15.0-15-generic
electrum 3.1.3

icon launcher properties
Installed Command: [sh -c "PATH=\"\$HOME/.local/bin:\$PATH\" electrum %u"]
throws error: "unknown command %u"
Please change Command to: [sh -c "PATH=\"\$HOME/.local/bin:\$PATH\" electrum"]
to make it work !

Thank you.

OS-linux 馃惂

Most helpful comment

It doesn't work in kde either. Adding a semi-colon after the path variable fixes it for me:

Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum %u"

All 11 comments

@fliteshare the most important information is missing here: what is the launcher that cannot cope with the %u? I have no issues on Gnome3. Also, the launcher file passes validation:

desktop-file-validate electrum.desktop
electrum.desktop: hint: value item "Finance" in key "Categories" in group "Desktop Entry" can be extended with another category among the following categories: Office

Furthermore, launching electrum from the commandline works too.

gtk-launch electrum.desktop

It doesn't work in kde either. Adding a semi-colon after the path variable fixes it for me:

Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum %u"

One problem is that for KDE users the launcher fails. To reproduce try:

# kioclient5 exec electrum.desktop 
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 7: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 7: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 7: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 7: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."
"KConfigIni: In file /home/david/Projects/electrum/electrum.desktop, line 21: " "Invalid escape sequence \"\\\"\"."

IMHO, just set Exec=electrum %u and let the OS maintainer set the path appropriately.

@dmp1ce what about fixing the KDE laucher?

@toxeus Well, I'm not sure where to report the issue or where the source is. I asked for help here: https://forum.kde.org/viewtopic.php?f=304&t=154126

@toxeus Thanks. I knew about KDE's bugzilla but I didn't know which project to file the bug under and I also couldn't find any previous bugs related to escape sequences which surprised me.

Just wanted to mention what @AbdussamadA wrote above works on the older KDE4 too (adding a semicolon).

KDE4 is end of life (but still has many users I think) so bug reporting is probably not of much help in my case.

Ok.. so with a semicolon there, at least it launches, even if it fails to modify PATH? Anyone against adding a semicolon then?

Well, kioclient5 exec works with the semicolon but launching through the GUI doesn't work for me. I'm not sure why the results are different.

There was another user running into this and getting "stuck" on it today...

I'm testing this now on Manjaro-KDE (17.1.12) which has kioclient 5.13.5.
The original command is

sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\" electrum %u"

but for some reason the launcher actually executes

sh -c "PATH=\\$HOME/.local/bin:\$PATH\ electrum %u"

The semicolon trick works here; let's do that until someone has a better solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dl3br picture dl3br  路  4Comments

Giszmo picture Giszmo  路  5Comments

GuestInCorle picture GuestInCorle  路  3Comments

Javcho2020 picture Javcho2020  路  3Comments

LightSunChen picture LightSunChen  路  4Comments