| View previous topic :: View next topic |
| Author |
Message |
chandra74 Xplorer
Joined: 11 Feb 2008 Posts: 2
|
Posted: Mon Feb 11, 2008 8:53 am Post subject: Samba XFM automount accents problems |
|
|
Hello,
I am using Xandros File Manager to automatically mount my Windows XP shares from a remote computer.
When I startup, the mount operation happens, but I have the following problem: my locale setup is French, and the accents in the filenames are badly handled through samba (I have ? characters instead).
Modifying the /etc/samba/smb.conf file doesn't help as it is for samba server purposes, and AFAIK my problem comes from the client.
I've seen that the mount is not specified in the /etc/fstab file, but rather in the ~/.automount file which seems to be used by XFM to feed an automount command.
I managed to mount manually the share and have the correct accents using:
| Code: | | sudo mount -t cifs //myServer/myShare /mnt/mountDir -o iocharset=utf8 |
But when I look at /etc/mtab once the automount is made by XFM, I see that it uses smbfs and ISO8859-15. My feeling is that smbfs is not working properly in my case.
Now my question is : how do I set the type to CIFS (and iocharset to UTF-8 ) so that XFM uses these settings?
Thanks |
|
| Back to top |
|
 |
ViPetroFF Xplorer
Joined: 06 Feb 2009 Posts: 2
|
Posted: Sat Feb 07, 2009 2:40 pm Post subject: smbmount stub |
|
|
My solution is create shell stub for smbmount:
root> cd /usr/bin
root> ren smbmount smbmountbin
root> nano smbmntsh
| Code: |
#!/bin/sh
MNT_SMBSHARE=$1
shift
MNT_POINT=$1
shift
MNT_OPT_ALL=$*
MNT_OPT_1=${MNT_OPT_ALL/cp850/unicode,unicode}
MNT_OPT_2=${MNT_OPT_1/iso8859-1/utf8}
#echo smbmount "$MNT_SMBSHARE" "$MNT_POINT" $*,unicode,iocharset=utf8,codepage=unicode
exec smbmountbin "$MNT_SMBSHARE" "$MNT_POINT" $MNT_OPT_2
|
root> chmod ug+x smbmntsh
root> ln -s smbmntsh smbmount
That script changes iocharset from iso8859-1 to utf8,
and codepage from cp850 to unicode and set option unicode.
Therefore locale must be utf8 and samba server must know unicode encoding.
If samba server don't known unicode then comments parameter MNT_OPT_1. |
|
| Back to top |
|
 |
ViPetroFF Xplorer
Joined: 06 Feb 2009 Posts: 2
|
Posted: Sat Feb 07, 2009 2:59 pm Post subject: cifs type |
|
|
XFM automount using smbfs type file system and calls smbmount tool.
See following command: CopyAgent mount|umount
If you wish use cifs type then setup autofs daemon.
Or change in script smbmount to cifsmount. |
|
| Back to top |
|
 |
|