[Pkg-xfce-devel] Bug#470412: Bug#470412: exo-utils: extra mount options not supported

Alexander E. Patrakov patrakov at gmail.com
Tue Mar 11 15:34:01 UTC 2008

Yves-Alexis Perez wrote:
> On Tue, Mar 11, 2008 at 02:38:17PM +0000, Alexander E. Patrakov wrote:
>> How can policykit, which is, according to the description on its web page, just 
>> a parser for configuration similar to that one in /etc/sudoers, help here?
> Well, upstream said that. I didn't investigate, but it seems they're right.
>> In my opinion, the best place to configure it is in the kernel. See 
>> http://lkml.org/lkml/2007/3/18/100 and help me to improve this patch, by 
>> addressing the objection about not covering hfs and ncphs filesystems.
> I disagree. Not all token should have the same codepage/charset, so having to
> change stuff in the kernel isn't a good idea imho. Fstab _can_ help in your
> situation, and then I'll guess you'll have to wait for policykit support.

Apparently, you have misunderstood the patch. It is specifically written so that 
all filesystems have the same iocharset/codepage default, selectable at runtime 
(e.g., from bootscripts), as opposed to compile-time. And all different storage 
devices (e.g, all USB flash drives) should have the same iocharset when 
connected to the same machine. I make this statement because the needed 
conversion (from the on-disk UCS-2 representation to the user's locale 
charset--and this conversion is what's driven by the iocharset parameter) is 
always the same (the user doesn't change his locale when swapping flash drives). 
The opposite would mean that the flash drive contents are not readable correctly 
under Windows XP (which pays attention only to long names, that are always in UCS-2.

In other words:

Windows: writes long file names to FAT, NTFS, ISO-9660 and UDF in UCS-2 (this is 
not configurable), and also sends them in UCS-2 down the wire when speaking CIFS.
Linux kernel: converts from UCS-2 to "iocharset" when exporting the result to 
Linux "ls" binary: sends the filename to the terminal exactly as it is received 
from the kernel.
Terminal: displays the string, and the LC_CTYPE locale category is used by other 
applications to get the correct encoding for terminal output.

I.e., the above can work if and only if iocharset is the same as the charset 
implied by LC_CTYPE. Please ignore the broken "filenames are always in UTF-8" 
default from glib2, it violates POSIX requirements (read tar and cpio 
pages--they wouldn't speak about recoding otherwise) and is incompatible with 
"ls" behavior in non-UTF-8 locales (use G_FILENAME_ENCODING=@locale, or 
G_BROKEN_FILENAMES=1 to teach Glib2).

As for the fstab, this solution indeed works. But it defeats the whole point of 
installing HAL in order to support arbitrary removable storage devices.

Alexander E. Patrakov

More information about the Pkg-xfce-devel mailing list