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.

Environment: Ubuntu 10.04 (64-bit), Eclipse Helios 3.6 (64-bit), Android 2.3 SDK + ADT.

All works great, but I can only select a workspace that's on the local system. Eclipse won't let me select shared folder on a Samba server.

Ubuntu's URI for this share is of the form:


But even if I typed this manually into the edit box, Eclipse won't accept it.

I don't have this problem with Eclipse 3.6 on Windows.

Is there a workaround to solve this?

share|improve this question
add comment

3 Answers

It will help to use CIFS. Does this link help? Ubuntu Wiki? You'll need the smbfs package to start.

sudo apt-get install smbfs

Replicated from the Wiki

Ubuntu 10.10 Maverick Meercat

Using the text editor of your choice, create a file with your remote servers logon credential. Replace the with the local username. The following will open up the GEdit application:

sudo gedit /home/<LOCALUSERNAME>/.smbcredentials

Place your username and password into the file. Replace the and with the appropriate information:


Save and exit.

Change the permissions on the file to prevent unwanted eyes from viewing your remote share's logon information:

sudo chmod 600 /home/<LOCALUSERNAME>/.smbcredentials

Open the file system table file for editing. The following will use GEdit to edit it:

sudo gedit /etc/fstab

Add the remote share to the table on a line by itself. The following line when replaced with appropriate data will mount the share for reading and writing:

//<SERVERNAME>/<REMOTEPATH> /<LOCALMOUNTPOINT>/<LOCALPATH> cifs credentials=/home/<LOCALUSERNAME>/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 

Save and exit.

Finally, test the fstab entry by issuing:

sudo mount -a

If no errors are output, it is likely safe to test with a reboot. Your remote share should now mount automatically every boot.


It may be that you need be to "map" your username and group to the remote file system's username and group, using uid=x,gid=y in /etc/fstab, where x=your_uid and y=your_gid (on the remote server).

//<SERVERNAME>/<REMOTEPATH> /<LOCALMOUNTPOINT>/<LOCALPATH> cifs credentials=/home/<LOCALUSERNAME>/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=YOUR_USERID,gid=YOUR_GROUP_ID 0 0 
share|improve this answer
@Christopher this is a great answer (and +1 for that) but I hate redundancy and I don't understand why I need to run two Samba clients... If GNOME's Windows share support is incomplete, why include it at all? Why not include CIFS instead? –  Android Eve Jan 11 '11 at 5:52
@AndroidEve Gosh, I could only guess. I know CIFS supersedes smbfs. Is there even one network file system installed by default? I don't think I know of any. But I know I like it best whenever I use them - nfs, sshfs, cifs. –  user8290 Jan 11 '11 at 16:30
@Christopher I eventually gave up and took your advice to use the smbfs package to workaround this problem. Alas, as you can see from the thread below, I still can't use it since I need non-root access. Can you help? Your answer will be the accepted one once it works. :) linuxquestions.org/questions/… –  Android Eve Feb 1 '11 at 20:24
@AndroidEve The share should be mounted using your credentials from /etc/fstab's credentials switch - automatically at boot time. You should be able to write. Do we need to 'chown androideve.androideve /mnt/smb-sambaserv-myshare'? –  user8290 Feb 1 '11 at 21:12
@AndroidEve Stab in the dark: is your user in the fuse group? –  user8290 Feb 1 '11 at 21:33
show 12 more comments

As you said smb://userid@ is a URI much like ftp://somesite.com. URIs need programs which understand the protocol mentioned in the URI i.e smb in case of samba share and ftp in case of FTP. We do not expect Eclipse to use an ftp location as a workspace and in the same manner it may not be able to use an smb location as workspace. If you want to use a windows share as workspace first simply mount it locally using a command similar to following:

mount -t smbfs -o username=name,password=password //machinename/sharename /mnt/smbshare

Now you you can use use the folder /mnt/smbshare as your workspace. You dont have to mount it to /mnt/smbshare you can mount it any where you want.

share|improve this answer
I consider this an Eclipse bug, since forcing me to mount the same share twice goes against any design elegance logic... I "solved" the problem by sticking with Windows 7. When either Eclipse or Ubuntu improve in that regard, I will happily consider a switch. +1 for the explanation. –  Android Eve Aug 17 '11 at 18:38
add comment
up vote 1 down vote accepted

Finally found a workaround, without needing to install an additional SMB/CIFS package and/or additional mounts:

The GNOME smb shares are always mounted under the home directory:

~/.gvfs/sharename on 

(make sure you select it using the browse button, not typing the full path by hand)

So simple... :)

share|improve this answer
For complete dummies: .gvfs is a hidden directory; to view it, in the Open File dialog, right click and enable viewing hidden files. –  DReispt Oct 25 '12 at 9:15
add comment

Your Answer


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.