Python Forum
xvfb - Python Module - simpe_3dviz - wxpython - gui
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
xvfb - Python Module - simpe_3dviz - wxpython - gui
#3
I suggest that you try
xproc = subprocess.Popen(['sudo',  'Xvfb', ':1'])
You may also consider to terminate the subprocess at some point.

And I did get further, as well it is a new day.

my current code further investigates the main issue: x display

Code:
from solid2 import *
from jupyterscad import view
from simple_3dviz import Mesh
from simple_3dviz.window import show
from simple_3dviz.utils import render
from subprocess import Popen
import os
os.environ['DISPLAY'] = ':1'
cmd = "sudo x11vnc  -rfbport 8087 -create -env FD_PROG=/usr/bin/fluxbox -env X11VNC_FINDDISPLAY_ALWAYS_FAILS=1 -env X11VNC_CREATE_GEOM=${1:-1024x768x16} -gone 'killall Xvfb' -bg -nopw"
xproc = Popen(cmd, shell=True)

d = cube(5) + sphere(5).right(5) - cylinder(r=2, h=6)
scad = (scad_render(d))
view(scad, outfile='/var/www/design.stl')
m = Mesh.from_file('/var/www/design.stl', color=(0.1,0.5,0.1))
show(m, camera_position=(-60., -160, 120), camera_target=(0., 0, 40), light=(-60, -160, 120))

Popen("TASKKILL /F /PID {pid} /T".format(pid=xproc.pid))
and this is my output:
   

Attached Files

Thumbnail(s)
   
Reply


Messages In This Thread
RE: xvfb - Python Module - simpe_3dviz - wxpython - gui - by JayToll - Apr-12-2024, 01:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [WxPython] wxpython and python 3.6 on linux Barrowman 3 6,949 Mar-15-2018, 06:57 PM
Last Post: Larz60+
  wxPython install on raspberry pi3 and python 3.6.2. djdan_23 3 7,258 Sep-13-2017, 11:49 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020