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.

Last time I was on my laptop I set the default folders for Ubuntu to directories on another computer with SSHFS, but every time I restart my laptop, it just resets everything to /home/thomas (since I've deleted the respective directories on my laptop). I'm assuming this is because it starts SSHFS in the fstab after it loads the locations to the default folders. How can I fix this?

These are the default folders I'm referring to, by the way: enter image description here

They get reset back to /home/thomas after being set to folders in the directory mounted for SSHFS, /home/thomas/Files/.

share|improve this question

1 Answer 1

up vote 1 down vote accepted
+100

If you want to relocate the Documents, Pictures, etc. directories, you can use xdg-user-dirs-update. The syntax is xdg-user-dirs-update --set TYPE /path/to/directory. Type is one of "DESKTOP DOWNLOAD TEMPLATES DOCUMENTS MUSIC PICTURES VIDEOS PUBLICSHARE". The configuration is stored in ~/.config/user-dirs.dirs. If you manually edit that file, changes will take effect after a restart.

(Old answer preserved for the record.) If you're mounting the home directory somewhere other than /home/thomas, you can use usermod to tell the system to look for your home directory elsewhere:

usermod -d /sshfs/thomas thomas

Substitute /sshfs/thomas with where the sshfs home directory is being mounted.

share|improve this answer
    
The home directory isn't being mounted in a different location, but the folders that would normally be in it are (excluding all of the hidden application config folders). –  Thomas Boxley Oct 10 '11 at 1:27
    
I've tested the revised version above on a virtual machine and it worked for me. In my testing, the SSHFS was always mounted before I logged in to the desktop, and it did not get set back to anything else. –  David Oct 10 '11 at 4:17
    
Thanks for updating your answer, but every time I restart, it looks for the /path/to/directory/ before it mounts it for SSHFS. Therefore, it can't find the directory and resets it back to /home/thomas –  Thomas Boxley Oct 10 '11 at 4:18
    
Yep, @David, I just restarted and they're all set to /home/thomas again. –  Thomas Boxley Oct 10 '11 at 4:27
    
It shouldn't look for those paths until you login. Is the SSHFS being started automatically on boot? Do you have automatic login turned on? –  David Oct 10 '11 at 4:30

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.