Accessing programs through the terminal with ruby

K

Kaspir Ghost

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
 
R

Richard Conroy

[Note: parts of this message were removed to make it a legal post.]

You could try the launchy gem, its specifically for launching the default
browser,
but the documentation might hint at other uses.
 
K

Kaspir Ghost

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top