Lock to Launcher doesn't work for paths containing spaces

Bug #1744168 reported by Igor Mikushkin on 2018-01-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity (Ubuntu)

Bug Description

Steps to reproduce:
1. Place an executable in the path with spaces
2. Start it
3. Lock to Launcher in Unity panel
4. Close it
5. Try to start it from panel

Expected results:
Application started

Actual results:
It cannot start

Manual fix:
1. You can open created the file from ~/.local/share/applications
2a. Manually escape spaces in Exec parameter
2b. Or surround this string with quotes

I guess the problem is that the result of get_exec_string is never escaped in src/bamf-legacy-window.c from lp:bamf. But I don't know how to setup testing environment and check it on my machine.

Ubuntu 17.04
libbamf3-2: 0.5.3+17.04.20170406-0ubuntu1

description: updated
Khurshid Alam (khurshid-alam) wrote :

Spaces in exec parameter is against free desktop specification. Also a script should not contain spaces in its name. You need to fix your code. Nothing to be fixed here.

Igor Mikushkin (igor-mikushkin) wrote :

Hmm... Khurshid, do you mean that executable cannot be placed into directory containing spaces? If that's the case I would prefer the library to report an error rather than creating ill-formed file. Or maybe it should be checked in Unity. Or maybe both. But silent creation of such a file looks quite weird. Imagine, you hit "Lock to Launcher" and it simply doesn't work.

Khurshid Alam (khurshid-alam) wrote :

Executable can only placed in either /usr/bin, /usr/local/bin or /$HOME/bin. None of that contains spaces.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers