! 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 !
unable to use percent sign in menu commands
Status:
RESOLVED: INVALID
Product:
Xfdesktop
Component:
General

Comments

Description Udo Rader 2007-12-27 16:01:54 CET
some commands, eg. rdesktop can be invoked like this:

% rdesktop -g90% $SOME_SERVER

this tells rdesktop to take over 90% of the screen.

"Some earlier versions" of xfce allowed the percent sign to be used inside menus, yet now (4.4.2) it does not work anymore and I see this in the logs:

(xfdesktop:4432): libxfcegui4-WARNING **: Invalid field code in Exec line: %
Comment 1 Brian J. Tarricone (not reading bugmail) 2007-12-27 21:11:33 CET
http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s06.html
Comment 2 Udo Rader 2007-12-28 09:42:33 CET
Hmm, before I reopen it ... the standard says this:

---------CUT--------
Field codes consist of the percentage character ("%") followed by an alpha character.
---------CUT--------

I don't see where an "alpha character" follows the percent character in my commandline, unless "alpha" contains whitespaces as well. Unfortunately the spec does not define "alpha character", but usually whitespaces are not included.

So are you really sure that the behaviour is correct?
Comment 3 Brian J. Tarricone (not reading bugmail) 2007-12-28 13:26:26 CET
(In reply to comment #2)
> I don't see where an "alpha character" follows the percent character in my
> commandline, unless "alpha" contains whitespaces as well.

The reason you don't see one is because your commandline is invalid per the spec.  If you want to include a single literal percent sign, you need to put '%%' in the commandline.  Read the page I referenced; it's all in there.
Comment 4 Udo Rader 2007-12-28 13:35:59 CET
Yes, I read the specs. 

But the specs say "percentage character ("%") FOLLOWED by an ALPHA character". 

The commandline I try to invoke looks like this:

rdesktop -g90% $SOME_SERVER

So what I have is a percentage character FOLLOWED by a WHITESPACE and _not_ an alpha character. According to the specs, I should be able to do so ...

Comment 5 Brian J. Tarricone (not reading bugmail) 2007-12-28 13:51:01 CET
I interpret the spec to mean that the only valid character to come after a percent character is an alpha character.  This is consistent with the use of % as a 'format string character' in other contexts.  I think "Literal percentage characters must be escaped as %%" is pretty clear, though.
Comment 6 Udo Rader 2007-12-28 13:59:34 CET
OK, then I'll take it like this :-)

Bug #3766

Reported by:
Udo Rader
Reported on: 2007-12-27
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

Additional information