以下のコマンドは IRB で機能しますが、Ruby プログラム内からは機能しません。
DISPLAY=:5 nohup firefox youtube.com &
その中irb
で、次のものが正常に返されます。
nohup: redirecting stderr to stdout
バッククォート ("`") 内で Ruby プログラムから呼び出されると、以下が返されます。
** (firefox:12402): WARNING **: Could not connect: Connection refused
** (firefox:12470): CRITICAL **: unable to create '/var/www/.cache/dconf'; dconf will not work properly.
Xlib: extension "RANDR" missing on display ":5".
Failed to stat home directory /var/www: No such file or directory
(firefox:12470): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-989cWYOeP6: Connection refused