Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my desk top are a couple of icons. One is for reading the contents of the floppy drive while the other does the cdrom drive. Well, it mounts them nicely yet it does not unmount them. How would one write a script which when invoked would unmount the cdrom or the floppy?
PS~ I plan on creating a link to these files on the desktop.
My idea is that I would open my favorite editor (jpico) and:
# file to unmount (floppy/cdrom)
umount /mnt/floppy
end
Unfortunately, that is to simple to be right. What is the right method?
actually am i not correct when i say you can right click the icon on your desktop and go to "eject" or "unmount" or whatever it says??
i dont' know what distro your using so this may not be the case in your scenerio.
or you can just write an alias in your .bashrc file and if you are actually not up for typing umount /mnt/floppy then you can add something like this to your .bashrc :
alias uf='umount /mnt/floppy'
where when you type "uf" in the terminal it will unmount it
or you can just open up a blank file with pico or whatever your using and just type:
umount /mnt/floppy
and then :
chmod 777 filename
and then just run :
./filename
whenever you want to unmount and you can also create a desktop link to that file
Howdy Doc! Well, since posting my original question I have learned that I was wrong; the desktop shortcuts do not mount the floppy or cdrom. So i modified your instructions to say:
#mountfloppy
mount /mnt/floppy
Unfortunately it did not work. Infact, the icon for the file shows it to be merely a text file. So what do I do now?
Ok ,
After I added Kewpie's line the text page icon turned into a <?> executable file <?> (it is a page with a green arrow on it). But when I click on that icon the 'open with' box appears. I tried opening it with an editor but all that did was open the text editor with the lines in it. What should I open it with? One thing further: if I open a terminal and mount the floppy and then clic the floppy icon it takes around 2 minutes and forty seconds for the floppy GUI window to appear with all the icons in it. Is there any way to speed that up?
Following are the lines for the two files I created.
#mountcdrom
[code]#!/bin/bash{/code]
mount /mnt/cdrom
&
#mountfloppy
[code]#!/bin/bash[/code}
mount /mnt/floppy
what distro are you using?
for the simplicity of this command a simple :
mount /mnt/floppy in an empty file and saving it and then chmod'ing it to being executable will suffice...
anyways it was a misprint in acids post, and you don't type them code tags as he was implying it to look like this:
Sorry I haven't told you the distro I am using yet; it is Debian. As for the misprint in Acid's post it was done so it wouldn't be read as html tags.
Post # 5 has included within it exactly (except the } & { are reaally a] & [) what I have written in said files. Are they incorrect? How so?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.