LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 10:44 AM   #1
jinx13
LQ Newbie
 
Registered: Aug 2012
Posts: 4

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, 11:14 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
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, 11:27 AM   #3
jinx13
LQ Newbie
 
Registered: Aug 2012
Posts: 4

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, 12:09 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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, 12:44 PM   #5
jinx13
LQ Newbie
 
Registered: Aug 2012
Posts: 4

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

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:32 PM
wget with the user firefox cookies? Xeratul Linux - General 2 10-11-2011 10:41 AM
downloads stalling using firefox, wget, etc Radelix Linux - Networking 6 03-18-2008 11:49 AM
it downloads in firefox, not in wget moob8 Linux - Desktop 3 02-10-2007 10:40 AM
script for wget EmOuBi Linux - Software 11 08-02-2005 02:03 PM


All times are GMT -5. The time now is 09:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration