running xvfb-run on OS X 10.11 - macos

Is it possible to get xvfb-run to work in the newest version of OS X? I've installed XQuartz and Xvfb runs the scripts with the following command:
Xvfb :4000 & export DISPLAY=:4000 & rspec
instead of this one:
xvfb-run rspec
This is however not without fault, either the temp file "x4000-lock" will not get removed after the script is finished and stop Xvfb to start up again or I'll recieve this error next time the script runs:
[2] 13220
[3] 13221
_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
Run options: include {:focus=>true}
This error is also recieved on a linux system so i Suspect "xvfb-run" is doing something more in the background and thus wondering how to get that running in OS X

Related

Cannot start Fuchsia Emulator on Ubuntu

I am trying to build Fuchsia OS and run it on the Fuchsia Emulator femu, but after waiting for the emulator to start the fx command exists and displays the error below.
failed to create Fuchsia device device health check failed. Unable to ssh due to error:
Error: Cannot start Fuchsia Emulator. Exit status is 1
I have followed the instructions provided by Google at fuchsia.dev, the build completes successfully and the commands used to build the OS were
fx set core.qemu-x64 --with //examples/hello_world
fx build
Subsequently, I tried running in headless mode with fx vdl start -N --headless which results in the same error as above, I also tried build the OS without the --with argument but received the same error.
The log file gives us more details, the second last line of the log file may be of interest and it reads:
emu-system-x86_64-headless: network script /etc/qemu-ifdown failed with status 256
I am using Ubuntu 21.04 on my machine.
It seems that the network configuration scripts /etc/qemu-ifup and /etc/qemu-ifdown are missing. You can work around it by installing the qemu package:
$ sudo apt install qemu

Firefox X11 from Ubuntu on Windows not working

I am trying to run Firefox (or any other browser) through an X11 connection from Bash on Ubuntu on Windows.
I am using VcXsrv 1.20.6.0
My Firefox version I see through the bash terminal is:
(env) flx#pc:/etc/ssh$ firefox --version
Mozilla Firefox 74.0
When I try to start Firefox from the bash I get the following error:
(env) flx#pc:/etc/ssh$ firefox
Exiting due to channel error.
###!!! [Parent][MessageChannel] Error: (msgtype=0x1E0057,name=PBrowser::Msg_UpdateEffects) Channel error: cannot send/recv
(firefox:16625): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Error spawning command line 'dbus-launch --autolaunch=f6c6eb9e4e7543fa90e8fb64fbdd8983 --binary-syntax --close-stderr': Child process exited with code 1
[Parent 16625, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-LE_x6q/firefox-74.0+build3/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
I am quite stuck here, do you have any ideas what I could try to get it to work?
Adding on to #Roudcore's answer
wget https://ftp.mozilla.org/pub/firefox/releases/52.0/firefox-52.0.linux-x86_64.sdk.tar.bz2
sudo tar xjf firefox-52.0.linux-x86_64.sdk.tar.bz2 -C /opt/
sudo ln -s /opt/firefox-sdk/bin/firefox /usr/local/bin/firefox
Try to service dbus start before starting firefox, after that dbus-launch should work properly
As alternative, i would recommend you to use firefox 52.
52 version works correctly.

Run a gui application on cygwin

I am building application that is using OpenCV lib to show images. The application fails at the following line:
cv::namedWindow(....);
I am using cygwin on Windows 10, and using CLion IDE.
The executable is built successfully but when run it shows the following error:
(Display Image:10340): Gtk-WARNING **: cannot open display:
I made sure xinit is installed and its dependencies using cygwin setup.
I've run the x server using a batch file with the following content:
c:\cygwin\bin\run.exe -p /usr/X11R6/bin XWin -listen tcp -multiwindow -clipboard -silent-dup-error
And I can see the 'X' icon in notification icons area, but still getting the error when I try to run the executable. I tried running it both from CLion and from cygwin console but same result.
What is it that I am missing?
To run a program that need access to a X Server you need:
1) a running X Server
2) the variable DISPLAY defined
If you check from Xterm you will have:
$ echo $DISPLAY
:0.0
So your program can run as DISPLAY is defined and the X server is found.

Issues in launching Pentaho Kettle spoon on Ubuntu 12.04.1 LTS

I have untared the latest kettle stable version pdi-ce-4.3.0-stable.tar.gz and then tried to start spoon by typing spoon.sh from the command prompt. But it fails with the following exception
**org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]**
**at org.eclipse.swt.SWT.error(Unknown Source)**
I have spent quite a lot of time searching for the solution and all those pointers in vain till now.
I installed the following based on the instructions on several forums:
Xorg, X11
Gtk
Xinit
Xulrunner
Firefox
gnome
ubuntu-desktop
But none of these helped. Thinking that spoon may depend on the X-Windows server, i tried to check if its running and used the command startx on Xinit to start the X server. But unfortunately, it failed with the error as follows
Fatal server error:
no screens found
xinit: giving up
xinit: unable to connect to X server: No such file or directory
xinit: server error
I am clueless now. Can you please guide me?
Seems you are trying to start kettle spoon from a real console. this is not going to work. you need a real X session. Spoon is a GUI, so login under your X environment (usually GDM).
sudo apt-get install gdm
After that, open a gnome console and execute ./spoon.sh . Maybe you are trying to exetute pan.sh or kitchen.sh? those will run fine under console without graphic envionment.

I would like to find something like gkrellm for the Mac

I have a linux dev server I watch, and lately its chugging at some points so I'd like to keep a better eye on it. I used to use Gkrellm, but its been a pain to try get Gkrellm to build on my Mac.
Besides servering X remotely (which would not be optimal), I guess i'm looking for alternatives to Gkrellm.
I would like a program that will let me watch the I/O CPU, Memory, processes, etc of a remote server running Linux. I am on a Mac.
If you're looking for something simple, and almost certainly already installed on the Linux box, you could SSH into the Linux machine and use tools like top, vmstat, and lsof to see what it's up to.
If you still want to test Gkrellm on Mac, you can follow this procedure
# sudo port install gkrellm
If you have this error :
Error: Target org.macports.activate returned: Registry error: xorg-xproto 7.0.16_0 not registered as installed.
[...]
Error: Status 1 encountered during processing.
Do this
# sudo port clean xorg-xproto
# sudo port install xorg-xproto
And continue install
# sudo port install gkrellm
Now if you have this error :
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gtk-doc/work/gtk-doc-1.11" && ./configure --prefix=/opt/local --with-xml-catalog=/opt/local/etc/xml/catalog " returned error 1
[...]
Error: Status 1 encountered during processing.
Do this
# sudo port clean gtk-doc
# sudo port install gtk-doc
And last
# sudo port install gkrellm
To start gkrellm
# gkrellm
You could use Growl for this purpose. It's possible to send Growl messages from a unix machine by using netgrowl.py, which masquerades as the growlnotify program, but all written in python.
You could then have a process running on the server that monitors the other bits, and posts notifications when limits are exceeded, or whatever.
It would be a hand-coded solution, but we are on Stack Overflow, so programming-related stuff is the go :)
(Oh, and the netgrowl.py page has a few links to similar projects in other languages, if that's your thing, too).
You are propably looking for a more rigid monitoring tool like zabbix. https://zabbix.org

Resources