Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: How do I change the default library path(s)?

  1. #1
    Join Date
    Dec 2013
    Location
    South Africa
    Beans
    13

    How do I change the default library path(s)?

    Hi All,

    I am completely new to ubuntu so please be patient with me :P :) I recently installed ubuntu 13.01 on my Dell Inspirion laptop alongside the already installed Windows 8.1. Both 64bit.

    I made a separate partition on my hard drive called "Shared" for all my movies, music etc. so that I can easily access them from both OS's. In windows this drive shows up as "Shared(A:)". I managed to change the library path in windows so that when I click on the "Music" library icon it goes to A:\Music and the same for Documents etc. How do I do the same thing in ubuntu? If I right click on the Shared drive in ubuntu and select properties is says "Location: media/myname". This would indicate that I need to change the path of the Music library, for example, to media/myname/Shared. The current location of the Music library is "home/myname". How do I change it?

    I tried clicking Files>Bookmarks in the Files title bar. This brought up a "Bookmarks" window where I could edit the names and locations of Documents, Music, Pictures, Videos and Downloads. Surely this is exactly what I'm looking for? However I tried it with Music first and typed in /media/myname/Shared/Music where it currently said /home/myname/Music but all it did was create a new bookmark that never existed before under the heading Bookmarks in the navigation pane on the left. Is my computer malfunctioning or is this supposed to happen? When I click on this new bookmark it goes to the correct location but I haven't changed the destination location of the system library which is what I want to do.

    Any help would be appreciated :)

    Thanks in advance.
    Last edited by wpbdry; December 17th, 2013 at 11:40 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    /home/paris
    Beans
    690
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: How do I change the default library path(s)?

    hi wpbdry,

    welcome to the world of linux.

    the 'music'. location points to the following path on my system
    Code:
    /home/{myName}/Music
    you will access your shared drive with a path such as
    [code]
    /media/{yourName}/{nameOfDevice}/
    [code]
    or
    [code]
    /media/{nameOfDevice}/
    [code]
    This seems to be a 'default' location inside the media folder. note that ubuntu doesn't see 'hard drives' it considers everything as a folder (or ultimately a file), if you insert a USB key it will likely appear in the
    Code:
    /media/{yourName}/{diskLabel}/
    folder. it is possible to make it appear elsewhere, (I won't go into that now suffice to say look up fstab and mount points).

    So when you navigate to the media folder you should be seeing your shared drive as a sub directory in here, again possibly inside the
    Code:
    {yourName}
    sub folder.
    Alternatively if you are using nautilus file browser (or similar) you will likely have the little icon for your disk, if you click on it you will see the full path to this disk.

    Now that you are well located inside your shared drive, and you can see your
    Code:
    /Music
    sub folder, navigate your way inside.

    In nautilus, or your prefered file browser, you will have an option to 'add to bookmarks' your current location, or you should be able to simply drag the folder into your bookmarks toolbar.

    Once the bookmark is added you can right click to modify the name of the item.

    You should now be good. If not shout back into this thread with what went wrong.

    David
    Eee pc via Wubi install.
    evertying works straight out of the box

    My Launchpad page

  3. #3
    Join Date
    Oct 2006
    Beans
    57,591

    Re: How do I change the default library path(s)?

    You could remove your existing ~/Music folder (making sure there is nothing in it that you want to keep) and replace it with a link to the folder on the shared drive, eg

    Code:
    rm -r ~/Music
    Code:
    ln -s /pathtomusicfolder

  4. #4
    Join Date
    Feb 2007
    Location
    /home/paris
    Beans
    690
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: How do I change the default library path(s)?

    @howefield,

    I was going to suggest that, but I got the impression that the exact location of the shared drive wasn't certain, also I wanted to avoid the use of the terminal.

    If you wanted to be really clever, the OP could make a the disk mount directly into his ~home/{userName}/Music folder. But again, I figured that was going to be doing too much terminal, and file modifications for something that didn't require that level of expertise.

    David
    Eee pc via Wubi install.
    evertying works straight out of the box

    My Launchpad page

  5. #5
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: How do I change the default library path(s)?

    Using the above as an example, and assuming that all your music is now on the shared partition which you mount automatically at boot it is easiest to remove the empty Music folder from your current ubuntu home, and then make a soft link from the shared partition Music folder to your ubuntu home with the command
    Code:
    ln -s /media/username/sharedpartition/Music /home/username/Music
    This does depend on the shared partition being mounted all the time when you boot or you will get error messages when you login to your user-session. Also if you do not remove your empty Music folder in ubuntu's home first you will end up with all the music appearing in a /Music/Music folder which is not particularly helpful.

    Any problems or uncertainties, come back and ask again.

  6. #6
    Join Date
    Dec 2013
    Location
    South Africa
    Beans
    13

    Re: How do I change the default library path(s)?

    Hi theDaveTheRave, that sounds good but I think that is what I already did when I created that bookmark I was talking about (I'm not sure) which is not what I wanted because it is not tidy. I didn't realise that I can delete the folders in /home but even so it would still be down at the bottom below all my drives, including my windows drives which I never look at, and not at the top like the original folders.

    However ajgreeny, I followed your suggestion and it worked perfectly I have not yet tried rebooting my system to see if it still works but the drive is always there so I think it should. If not I'll be right back.

    Thanks all for your help!

  7. #7
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: How do I change the default library path(s)?

    Quote Originally Posted by wpbdry View Post
    However ajgreeny, I followed your suggestion and it worked perfectly I have not yet tried rebooting my system to see if it still works but the drive is always there so I think it should. If not I'll be right back.

    Thanks all for your help!
    If the partition with all the data files is not mounted at boot we can quickly tell you how to ensure it is with an edit of the /etc/fstab file, so come back again if necessary.

  8. #8
    Join Date
    Dec 2013
    Location
    South Africa
    Beans
    13

    Re: How do I change the default library path(s)?

    After I rebooted my computer the links in the navigation pane listed under "Places" have disappeared.

    It now reads:

    Places
    Recent
    Home
    Desktop
    Downloads
    Trash

    It used to read:

    Places
    Recent
    Home
    Desktop
    Documents
    Music
    Pictures
    Videos
    Downloads
    Trash

    Presumably this is because there is no longer a folder called "Documents" or "Music" etc in the folder /home but there is a soft link. Is there not a way that I can create a link under "Places" that goes to this soft link? Ideally with the specialized icons for documents or music or whatever so it looks the same as it did before I started any of this? If I create bookmarks they go under a new heading called "Bookmarks"and I can't find any way of dragging them to under the heading "Places".

    As before any help will be appreciated

    Thanks.

  9. #9
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: How do I change the default library path(s)?

    As I said, you will need to edit fstab, but for now you can just mount the partition with all your data on it and all the soft links should mend again. It is too late at night here to answer in detail, but will.come back again tomorrow morning and try to help sort this out for you.

  10. #10
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: How do I change the default library path(s)?

    OK, I'm back. Are you now sorted or does the problem of broken links happen every time?

    What we will need to sort this out is the output of command
    Code:
    sudo blkid -c /dev/null
    which will give us the UUID and labels of all your partitions. If the partition we are trying to deal with is not labelled, I suggest you give it one that tells you what it is (use gparted) as it can make life a lot easier when it needs mounting; you will recognise it much easier than a long alphanumeric string.

    Now we know what the partition UUID is we can make a mountpoint folder in media or mnt, I prefer mnt but it's up to you, with command sudo mkdir /mnt/LABEL[/code] where LABEL is the label you gave the partition earlier (eg storage). Now backup then edit fstab with
    Code:
    sudo cp /etc/fstab /etc/fstabbak
    then
    Code:
    gksudo gedit /etc/fstab
    and add a line similar to
    Code:
    UUID=66E53AEC54455DB2 /mnt/storage/    ntfs-3g        auto,user,rw 0 0
    where you will use the UUID gleaned from the blkid command earlier. Finally to check all is well run command
    Code:
    sudo mount -a
    and if there is no output and the terminal goes straight back to the prompt, everything is OK.

    Now when you boot the machine the storage partition will be automounted and all those links should work, but bear in mind that the original links you made may now be to the wrong source folders so you may need to delete them and make new ones with
    Code:
    ln -s /mnt/storage/Music Music
    I hope this all makes sense to you. Good luck!

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •