Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Hello everyone, I'm trying to download "stuff" using a bash script and firefox but the bash script doesn't work.Basically when the "Open with" dialog window from firefox appears I tell it to open that with a bash script that is saved on one of my partitions and it should have started a terminal in a designated folder with wget starting the download for the specific file in that folder; instead the download starts with the firefox download manager and the file gets downloaded in the /temp folder.The bash scripts looks like this:
1. #!/bin/sh
cd /some/folder/
gnome-terminal --tab --hide-menubar --title=wget -x wget -nc $1
2. #!/bin/sh
cd /some/folder/
gnome-terminal --tab --command="wget -nc $1"
3. #!/bin/sh
cd /home/ubuntu/Desktop
exec xterm -e wget --directory-prefix="/some/folder/" $@
Additional notes: I've put sudo in front of gnome-terminal and in front of wget but with no success of working also all of the scripts have full permissions and are made executables.
Can someone tell me what I'm doing wrong or how can I achieve what I want to do ( download files with wget in a terminal window and the new downloads when I click for another file to go in another tab of that same terminal window ).
Hi Firerat, it's not complication but simplicity, Ex:instead of pasting links from the web for some random file (which is actually "mental") why not tell firefox to open with a bash script (that downloads the file) and to remember that option "Do this automatically for ...." and that way you don't have to paste a link in the terminal window.Also I think you misunderstood what I wanted: to download files not a webpage or site, thanks anyway.
Open with will save the file to a temp directory and then open that file using that application. I don't know if the built in download manager can be changed.
Hi Firerat, it's not complication but simplicity, Ex:instead of pasting links from the web for some random file (which is actually "mental") why not tell firefox to open with a bash script (that downloads the file) and to remember that option "Do this automatically for ...." and that way you don't have to paste a link in the terminal window.Also I think you misunderstood what I wanted: to download files not a webpage or site, thanks anyway.
If you simply want to save a file, do not complicate it
wget or curl will do the job just fine
Wget being the easiest solution
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.