LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-31-2014, 09:44 AM   #1
jinx13
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Rep: Reputation: Disabled
Wget and firefox script problem


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 ).
 
Old 08-31-2014, 10:14 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Why the complication?
Personally I'd just
Code:
wget somesite.com/somepage -O /path/to/someoutputfile
I may even use curl, piping to sed awk or whatever

What describe is stupidly simple, I'm lost on what you need.
 
Old 08-31-2014, 10:27 AM   #3
jinx13
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-31-2014, 11:09 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,721

Rep: Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914Reputation: 5914
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.
 
Old 08-31-2014, 11:44 AM   #5
jinx13
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for the info michaelk.
 
Old 08-31-2014, 01:04 PM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by jinx13 View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the cookies.sqlite from Firefox 3 in wget jimbo1708 Linux - Software 18 06-28-2014 11:32 AM
wget with the user firefox cookies? Xeratul Linux - General 2 10-11-2011 09:41 AM
downloads stalling using firefox, wget, etc Radelix Linux - Networking 6 03-18-2008 10:49 AM
it downloads in firefox, not in wget moob8 Linux - Desktop 3 02-10-2007 09:40 AM
script for wget EmOuBi Linux - Software 11 08-02-2005 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration