forums.xandros.com Forum Index forums.xandros.com
Xandros User Forums
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Samba XFM automount accents problems

 
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Networking and the internet
View previous topic :: View next topic  
Author Message
chandra74
Xplorer


Joined: 11 Feb 2008
Posts: 2

PostPosted: Mon Feb 11, 2008 8:53 am    Post subject: Samba XFM automount accents problems Reply with quote

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
View user's profile Send private message
ViPetroFF
Xplorer


Joined: 06 Feb 2009
Posts: 2

PostPosted: Sat Feb 07, 2009 2:40 pm    Post subject: smbmount stub Reply with quote

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
View user's profile Send private message
ViPetroFF
Xplorer


Joined: 06 Feb 2009
Posts: 2

PostPosted: Sat Feb 07, 2009 2:59 pm    Post subject: cifs type Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Networking and the internet All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group