New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running vedo
on a Server
#64
Comments
I'm reporting what worked for me on ubuntu 18.04 server.
#!/bin/bash
#
set -x
export DISPLAY=:99.0
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
set +x
exec "$@" save the bash script above as
plt = vedo.Plotter(offscreen=True)
plt += vedo.Cube()
plt.show()
plt.screenshot(filename)
plt.close() |
vedo
on a Server
Hi, I tried this on my Ubuntu 22.04 LTS system connected via SSH. Both the test suggested here and my own script failed with the following error: I believe I have installed all the libraries mentioned and set up the rc.local file both in /etc/ and in the folder that I am working in. Is anyone experiencing such an error? Thanks. |
Have you tried running manually the bash script (point 2.) in the server? |
Hi Marco, Thanks very much for your quick reply. I tried that manually and I find my zsh complaining. Then I switched to bash and it seems to be working under bash. I don't know full well what might be the issue behind the failure of zsh. I will simply switch to bash to get things done. |
Hello,
I get:
I installed all the packages suggested by RubendeBruin's answer and executed the bash script. For the bash script I executed on the server
I did
And then, executing the python script, I still have: (Context)
Python: Anyone know how to resolve this? |
Hi Francesco, #!/usr/bin/env python
#
import vtk
import time
cone = vtk.vtkConeSource()
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(cone.GetOutputPort())
actor = vtk.vtkActor()
actor.SetMapper(mapper)
ren = vtk.vtkRenderer()
ren.AddActor(actor)
renWin = vtk.vtkRenderWindow()
renWin.SetSize(500, 500)
renWin.AddRenderer(ren)
# iren = vtk.vtkRenderWindowInteractor()
# iren.SetRenderWindow(renWin)
renWin.SetOffScreenRendering(1)
renWin.Render() |
Hi Marco,
|
uhm i was suspecting that... it looks like your system has some problem with running |
Hello, I have succesfully build a FEniCS Docker container incluiding vedo, but when I try to use vedo I encounter the error:
ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 1223 vtkXOpenGLRenderWindow (0x24992f0): bad X server connection. DISPLAY=Aborted (core dumped)
It appears that vedo or vtk can not run without the X server. Is there any way to solve this issue?
The text was updated successfully, but these errors were encountered: