Prev: modules
Next: Overriding ENV[]
From: Kaspir Ghost on 9 Aug 2010 16:39 Specifically browsers. I'm trying to get a bunch of different browsers (FF, Opera, Safari, IE, Chrome, and Fock) to all open the same url/file location either 1) Simultaneously or 2) One after the other. Meaning one browser open and when you close it out the next one opens. So basically I need to know if it's possible to submit commands to the terminal to open browsers to a specific location. I'm using the gnome-terminal in Ubuntu 10.04 Thanks in advance! :D -- Posted via http://www.ruby-forum.com/.
From: Joseph E. Savard on 9 Aug 2010 16:58 In OS X : open /Applications/Tools/browsers/Firefox.app In Ubuntu : Gnome : gnome-open Firefox From irb: FIREFOX would be opened. Samething in Ubuntu ! irb irb(main):001:0> `open /Applications/Tools/browsers/Firefox.app` => "" irb(main):002:0> > From: Kaspir Ghost <trevor(a)nugendesign.com> > Reply-To: <ruby-talk(a)ruby-lang.org> > Newsgroups: comp.lang.ruby > Date: Tue, 10 Aug 2010 05:39:22 +0900 > To: ruby-talk ML <ruby-talk(a)ruby-lang.org> > Subject: Accessing programs through the terminal with ruby > > Specifically browsers. I'm trying to get a bunch of different browsers > (FF, Opera, Safari, IE, Chrome, and Fock) to all open the same url/file > location either 1) Simultaneously or 2) One after the other. Meaning one > browser open and when you close it out the next one opens. > > So basically I need to know if it's possible to submit commands to the > terminal to open browsers to a specific location. > > I'm using the gnome-terminal in Ubuntu 10.04 > > Thanks in advance! :D > -- > Posted via http://www.ruby-forum.com/. >
From: Joel VanderWerf on 9 Aug 2010 17:03 On 8/9/2010 1:58 PM, Joseph E. Savard wrote: > In Ubuntu : Gnome : gnome-open Firefox gnome-open <url> should work too.
From: Kaspir Ghost on 9 Aug 2010 17:26 Tried all of these. None of them really seemed to work. Came across this though, and it worked great. #!/usr/bin/ruby nugen = "http://www.nugendesign.com" system "firefox #{nugen}" -- Posted via http://www.ruby-forum.com/.
From: Kaspir Ghost on 9 Aug 2010 18:18 Ok so I started working on this a little bit and I basically have this so far: #!/usr/bin/ruby puts "Enter url" url = gets system "firefox #{url}" system "opera #{url}" system "flock #{url}" So far it's doing exactly what I want it to do, but when it gets to flock it does this: flock: bad number: http://www.nugendesign.com -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: modules Next: Overriding ENV[] |