I have created a link to some directory on a partition that will not be automaticaly mounted at start-up. Of course, when I restart the computer Ubuntu marks this link as "Broken". Is there a way to tell Ubuntu 14.04 not to check this link's path until I click on the link.
Edit: Is there a way to make Ubuntu recheck the link with some command?
I found a simple way to make broken link work again. Instead of rechecking the link it is easier to remake the link. (Yes I know..LOL..I have little experience in Linux). When the partition is mounted I have done this in Terminal (CTRL+ALT+T) writing the command:
ln -s -f "path_to_Target" "path_to_Link/LINK_NAME"
ln
command is used to make soft or hard links. The-s
option is to make "soft link" and the-f
option is to "force" making it so that it does not give me an error because the link already exists. Theln
command is described in more detail here.Next stage is to make the link run the command by itself when clicked. I posted another question for this.
You could always bind mount the directory to a location that always exists and then link to that location.
So for instance, say you have
/dev/sdb1
mounted on/media/user/sdb1
. This contains the directoryClientDocs
, which you want to have a link to on your desktop at all times.You could then add the directory
/media/permadirs/user/ClientDocs
. Then, when you have your disk mounted, you can dosudo mount --bind /media/user/sdb1/ClientDocs /media/permadirs/user/ClientDocs
.You can then make a link to
/media/permadirs/user/ClientDocs
and this link will always be valid, whether or not the disk is mounted.You'll still need to do the mounting, of course, but the link will always work. Perhaps that helps you in some way.