Start the selenium server when Linux boots - linux

I am having a linux machine dedicated to run the selenium tests. Now if i restart the linux, i want selenium to start automatically. That is, there is should not be a need to start the selenium manually.
So on linux bootup, "I need to open a terminal, and run the command, java -jar selenium-standaloe-xxx.jar"
How can i do so?
My browser will open in the same box. and i am calling my script remotely from putty terminal.

Put your command into
/etc/rc.local
and reboot, it could be done.

Related

Blank screen appears when i try to open Jmeter in GUI mode in Cent OS

I am setting up a new Jmeter 5.0 on Cent OS. I tried to open it in GUI mode using terminal.
I also tried to replace all lib jars and open Jmeter using terminal.
Jmeter must open in GUI mode so i can debug my scripts.
Navigate to Jmeter/bin/
execute the below command in the terminal
sh jmeter.sh
Hopefully you can see the GUI.

Run a program as a service on Debian/Linux

I have an older jetty server I want to turn into as a service on a Debian OS. It should start automatic each time I restart the computer.
Manually I start the server with the two following commands:
root#myserver:/# cd /opt/jdk/jetty
root#myserver:/opt/jdk/jetty# java jetty
Anyone know how to do this ?
If you want to start any program on booting you can add that entry in rc.local.
java /opt/jdk/jetty/jetty
It will start on reboot

Executing a Script from Linux to a Mac

Is it possible to execute a script from a linux machine to run on a Mac, using either Python or Bash? I have a raspberry pi with an arduino, when a sensor or an even occurs from the arduino i want to run a script to do something, "ie: run a "say" command" on my mac, any way of doing this? and how would it be done? i would not like to connect the arduino to the mac, since location is an issue, so it has to be done from the raspberrypi
ssh. if your mac runs sshd.
you can
rasbery> ssh $account#$mac_IP $command

(Linux) How to run a program of gtk without display environment? Gtk-WARNING **: cannot open display:

I got a program which must run in GTK gui environment.
I can only use ssh.
This program will run on a server(centos 6) and installed gnome X display.
It's no need to see GUI, but after it run finished, i can get the answer.
VNC and Remote screen is disable.
When i start the program in ssh:
Gtk-WARNING **: cannot open display:
Is there any ways to salve this problem???
I known it's bad to run a gui program in this situation, but here we only discuss technology...
Thank you...
The ssh utility has an option -X which enables X11 forwarding.
Have you tried to connect to your destination like that ?
Or the other option is to perform the export DISPLAY=:0.0 after you log-in to your host, then run your app.
This way you'll save some network traffic, will run your app remotely, but the GUI will be displayed on the screen of the remote host.
P.S. Generally speaking your application logic might be invalid if it fails to run GUI.
Are you sure that your application will do the expected stuff when it fails to run the GUI ?

Linux - Avoinding x server message when running .exe with wine

I'm trying to run a .exe file (that uses some other .dll files) with wine, in Ubuntu 11.04, command line, but i get an error regarding the x server not being started and that a window is being created (i attached a screenshot).
When I run it normally (normal ubuntu boot, x server running) everything is ok, but actually, no window is displayed, which is normal because no window is needed for the program to run. So I just want to know if there is a way to avoid that: somehow simulating that the x server is open or to set $DISPLAY in some way to "fool" the program.
Just use Xvfb.
Xvfb :1 &
DISPLAY=:1 wine ...

Resources