ltsp-localapps can not open files with accents in URI

Bug #1451915 reported by Tom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Low
Alkis Georgopoulos

Bug Description

If I try to open a file in a localapp, and the filename (or path) contains accented letters, the URI is not passed correctly to that local app.

For example if I run:
ltsp-localapps vlc /home/user/testé/video.mov

Then on the client, in syslog, i see:
ltsp-localappsd: Executing command as username user: vlc "/home/user/test303251/video.mov"

And vlc gives an error saying that this URI is not valid.

The problem seems to be located in the way this filename is passed:
# xprop is used to set the X property LTSP_COMMAND:
xprop -root -f LTSP_COMMAND 8s -set LTSP_COMMAND "/usr/bin/vlc --started-from-file %U"

which is read by the daemon /usr/bin/ltsp-localappsd

# Poll for LTSP_COMMAND changes and execute
xprop -notype -root -spy LTSP_COMMAND | while read junk_x junk_y LTSP_COMMAND ; do
  # Strip off leading and trailing double-quotes.
    LTSP_COMMAND=${LTSP_COMMAND%\"}
    LTSP_COMMAND=${LTSP_COMMAND#\"}

Revision history for this message
Tom (x-tom-5) wrote :

Changing "8s" to "8u" fixes this:

xprop -root -f LTSP_COMMAND 8u -set LTSP_COMMAND "/usr/bin/vlc --started-from-file %U"

Revision history for this message
Tom (x-tom-5) wrote :

This is the patch for
/usr/bin/ltsp-localapps

Revision history for this message
Tom (x-tom-5) wrote :

And this is the second patch, for
/opt/ltsp/i386/usr/bin/ltsp-genmenu

Tom (x-tom-5)
affects: ltsp (Ubuntu) → ltsp
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Thank you Tom, fix committed in http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2643

Btw, even 8u won't work if one has LANG=C, the locale needs to be unicode-enabled, so at least LANG=C.UTF-8 or LANG=en_US.UTF-8 etc.

Changed in ltsp:
assignee: nobody → Alkis Georgopoulos (alkisg)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

There's a problem in Ubuntu Precise which has x11-utils 7.6+4ubuntu0.1, `xprop 8u` doesn't work there and `xprop 8s` is needed instead.

That was a bug in xprop which was solved later on:
https://sources.debian.net/src/x11-utils/7.7%2B3/xprop/ChangeLog/
commit 0d069c0edae83f70ac10fab1a3c04d8197e277c4
Date: Tue Jan 10 23:39:04 2012 -0500
    Enable setting property of type UTF8_STRING.
    Fix "bad format character: u" error for format '8u', e.g.:
        xprop -root -f _NET_WM_NAME 8u -set _NET_WM_NAME LG3D

LTSP users that have applied the patch mentioned in this bug report, and are using Ubuntu Precise, should try to SRU the aforementioned xprop fix,

or, as a quick workaround, they could put this in lts.conf:
INIT_COMMAND_01="sed 's/8u/8s/' -i /usr/bin/ltsp-localapps -i /usr/bin/ltsp-remoteapps -i /usr/bin/ltsp-localappsd -i /usr/share/ltsp/ltsp-remoteappsd"

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I filed an SRU for x11-utils, it should be published soon in precise-updates:
https://bugs.launchpad.net/ubuntu/+source/x11-utils/+bug/1463663

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Fix released in LTSP 5.5.5.

Changed in ltsp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.