Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using Ubuntu 10.0.4. I'm running a background process on system startup (Selenium) that needs to launch browsers (e.g. Firefox, Google Chrome). What settings do I need to enable in order to do this? Currently, even if I SSH in as a user, I'm not able to launch a browser and get this error ...
Code:
selenium@selenium-chi:~$ /usr/bin/google-chrome
No protocol specified
(chromium-browser:2156): Gtk-WARNING **: cannot open display: :0.0
Anyway, thanks for any insights you can provide, - Dave
If you ssh in with X forwarding enabled, then you'll be to launch a browser or whatever GUI app you want to launch. The icon on your post indicates you were using a Mac at the time and the good news is that Mac OS X comes with an X windows implementation. So to run GUI applications over ssh you can just do
Oh hang on, is X11.app installed by default in Mac OS X these days? I can't remember. Look in Applications > Utilities and see if X11.app is there. If it's not, dig out the discs which came with your Mac or your Mac OS X installation disk and you should find X11.app on there somewhere. Unless you're using a really old version of Mac OS X, X11.app should launch automatically when you establish an ssh connection with X forwarding enabled.
A couple of clarifications. I'm posting from a Mac, but I'm using Ubuntu 10.0.4 installed on Intel x64 hardware.
The X-forwarding is valuable info, but ultimately, I want to be able to spawn browser windows from a service that I run on system startup. So, I'm not SSH'ing and launching the service, it is being run at system startup, courtesy of my script in /etc/init.d.
Given this, how do I give the service the ability to spawn browser windows? Thanks, - Dave
su selenium -c 'java -jar /opt/selenium/selenium-server-standalone-2.0b3.jar -userExtensions /opt/selenium/user-extensions.js &>/dev/null &'
Arizonagroovejet, Selenium will attempt to launch a web browser before a user has logged in but after the boot up process has completed. I tried your suggestion, but was unable to launch xvfb ...
Code:
selenium@selenium-chi:~$ xvfb :99 &
[1] 1623
selenium@selenium-chi:~$ No command 'xvfb' found, did you mean:
Command 'qvfb' from package 'qt4-dev-tools' (main)
Command 'qvfb' from package 'qt3-dev-tools-embedded' (universe)
xvfb: command not found
[1]+ Exit 127 xvfb :99
selenium@selenium-chi:~$ sudo apt-get install xvfb
Reading package lists... Done
Building dependency tree
Reading state information... Done
xvfb is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
selenium@selenium-chi:~$
selenium@selenium-chi:~$ xvfb :99 &
[1] 2607
selenium@selenium-chi:~$ No command 'xvfb' found, did you mean:
Command 'qvfb' from package 'qt4-dev-tools' (main)
Command 'qvfb' from package 'qt3-dev-tools-embedded' (universe)
xvfb: command not found
[1]+ Exit 127 xvfb :99
selenium@selenium-chi:~$
Further, I can't find an xvfb binary on my system. - Dave
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.