Error accessing X.Org commands with ruby shell command scripts

G

Gregory Mazurek

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

I am trying to run an X.Org command from within ruby's shell commands and am
receiving "Command Not Found" errors.

As a walk through, I first start my X server (xvfb) and then start irb. In
irb, if I type:

`ls -al`

I get the results I'd expect. But, if I type:

`DISPLAY=:1 firefox`

I receive "command not found" error for the entire command. At first, I
thought that X11 permissions were preventing me from accessing such
commands; but, I shouldn't see the "command not found" error if this was the
case. When I close irb and run the same command DISPLAY=:1 firefox, I get
the results that I expect. I've tried this with several X11 commands from
within irb and receive the same error. I thought about whether a ruby
binding would fix this issue but I'm under the assumption that the shell
scripts (I've tried ``, %x[], system) only run the raw command... i.e.
`DISPLAY:=1 firefox` translates to DISPLAY:=1 firefox in the shell.

Would anyone know how I can access such a command from within a ruby shell
command?

Any help would be greatly appreciated.

Thanks,
Greg
 
G

Gregory Mazurek

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

Joel, thank you.
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top