Modify

Opened 5 weeks ago

Closed 5 weeks ago

#17824 closed defect (fixed)

Command line substitution in .desktop file uses incorrect pattern

Reported by: mlundblad Owned by: Don-vip
Priority: normal Milestone: 19.06
Component: Core Version:
Keywords: linux desktop Cc:

Description

Hi!

The .desktop file JOSM uses %F for the command line.
Although the application registers as a handler for x-scheme-handler/geo.
In this case the pattern should probably be %U (could be either URLs or bare file paths).
We just added support in gnome-maps for opening a location in any app that lists itself as handling x-scheme-handler/geo. And GIO doesn't expand the argument when calling g_application_launch_uris when the .desktop file has %F (or %f).
Changing %F to %U makes it actually calling JOSM with the geo: URI as an argument. But that isn't quite working, but I'll file another bug for that…

Thanks!

Attachments (0)

Change History (4)

comment:1 Changed 5 weeks ago by Don-vip

Keywords: linux desktop added
Milestone: 19.06

comment:2 Changed 5 weeks ago by Don-vip

Documentation: https://specifications.freedesktop.org/desktop-entry-spec/1.2/ar01s07.html

Code Description
%f A single file name (including the path), even if multiple files are selected. The system reading the desktop entry should recognize that the program in question cannot handle multiple file arguments, and it should should probably spawn and execute multiple copies of a program for each selected file if the program is not able to handle additional file arguments. If files are not on the local file system (i.e. are on HTTP or FTP locations), the files will be copied to the local file system and %f will be expanded to point at the temporary file. Used for programs that do not understand the URL syntax.
%F A list of files. Use for apps that can open several local files at once. Each file is passed as a separate argument to the executable program.
%u A single URL. Local files may either be passed as file: URLs or as file path.
%U A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path.

comment:3 Changed 5 weeks ago by Don-vip

Owner: changed from team to Don-vip
Status: newassigned

comment:4 Changed 5 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15179/josm:

fix #17824 - Use %U code for Linux desktop Exec parameter to allow URLs in addition to file path

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.