I have a little problem. In my laptop, I have 3 partitions, one for Windows 10, one for storage and one (plus swap) for Ubuntu 14.04. Windows partition can't be reduced much, so I've created some storage folders in Windows. I can't create a link to those folders in C:\, and I'm looking for a solution that allows me to not mount automatically during the boot. Is it possible to create a command files (a launcher) including the instructions to mount C:\ partition and open graphically the folder I want?
1 Answer
Here is what you can do..
Prerequisite : For only this time, mount that partition normally and note down its default mountpoint and partition number like this :
creating a
sh
file to write commands to do your job
Create a folder in your home director for convenience..
i.e, Create a folder named
direct
in your home.Inside that create a new Empty document and name it as
launch.sh
Inside that write this : (may vary according to your username, sda/b/c number, and mount point )
udisksctl mount -b /dev/sda5 nautilus /media/severus/Studies
Save it and close.
Give it execution permission : chmod +x /home/username/Desktop/direct/launch.sh
*your username
Now place any icon file inside that folder direct. say icon.png
Now in your desktop, create an empty file and name it as
my-launch.desktop
Paste the following inside it : (please modify according to your details)
[Desktop Entry] Type=Application Terminal=false Icon=/home/severus/direct/icon.png Name=Studieslaunch Exec=/home/severus/direct/launch.sh Name[en_US]=Studieslaunchs
save it and close
Provide execute permission to my-launch.desktop
chmod +x /home/username/Desktop/my-launch.desktop
Now you will be seeing the Icon of your .deaktop file is changed. Next time you boot , just double click it and enjoy
-
This answer has one possible downside: when the directory is opened with no nautilus window open, additional windows will be opened, appearing under the icon of this launcher. Feb 26, 2016 at 16:10
-
@JacobVlijm Thanks for showing interest. When I tried it on my laptop, when I double click on my
my-launch
the usualFiles
(nautilus) opens with required place. (not with this launcher's icon) Feb 26, 2016 at 16:16 -
Possibly, but then you are lucky :)and the behaviour can be unpredictable. In general, it is bad practice to have multiple launchers, calling the same application (be it in an indirect way) call the same application. Better add your script as a right-click option to the existing (nautilus) Files- launcher. Feb 26, 2016 at 16:20
-
It works perfectly, without the icon of the luncher as predicted by Jacob. Feb 27, 2016 at 11:20