Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

as a new linux user, used Ubuntu 12.10, I tried several tweaks with the SMB shares. I followed this tutorial to mount permanently 4 SMB shares from my local NAS.

To resume, I :

  • edit /etc/fstab
  • added a line like :

    //servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 
    
  • created a credentials file for security reasons in my home folder (explained in the tutorial)

    ~/.smbcredentials
    

It work perfectly, they are automounted on each reboot, but when I logon, I all the time get 4 file explorer open with each share.

It is possible to avoid these file explorer window to be opened on every reboot ? I guess it's related to X or via a explicit deny or these graphical mount, but I don't have any clues on how to proceed

Thank you for your time,

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Instead of mounting the SMB shares in /media/windowsshare mount it as /mnt/windowsshare. You will have to create the folders there first and then edit the /etc/fstab. Make a copy of /etc/fstab before editing just to be safe.

Then the shares won't open in Nautilus on their own.

Note: /media is for computer generated mounts such as when you plugin an USB drive. /mnt is for admin to mount things manually or by editing fstab etc. See Why have both /mnt and /media?

share|improve this answer
    
Works perfectly ! I knew that /mnt is mostly used for "temporary" mounted devices but I thought it was the only difference with /media. Thank you –  Douda Dec 18 '12 at 21:36
    
You are welcome. /media is for computer generated mounts such as when you plugin an USB drive. /mnt is for admin to mount things manually or by editing fstab etc. See askubuntu.com/questions/22215/why-have-both-mnt-and-media . –  user68186 Dec 18 '12 at 21:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.