Skip to content

Commit

Permalink
verify that we can access the X11 display for all non-proxy servers o…
Browse files Browse the repository at this point in the history
…n posix systems

git-svn-id: https://xpra.org/svn/Xpra/trunk@12742 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 4, 2016
1 parent 9286b68 commit 4cc5a54
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/xpra/scripts/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,16 +1119,17 @@ def run_server(error_cb, opts, mode, xpra_file, extra_args, desktop_display=None
return 1

display = None
if start_vfb:
if not verify_display_ready(xvfb, display_name, shadowing):
return 1
if nested and not verify_display_ready(nested, child_display, False):
return 1
if not proxying:
no_gtk()
if os.name=="posix" and starting or starting_desktop:
#check that we can access the X11 display:
if not verify_display_ready(xvfb, display_name, shadowing):
return 1
if nested and not verify_display_ready(nested, child_display, False):
return 1
display = verify_gdk_display(display_name)
if not display:
return 1
elif not proxying:
no_gtk()
import gtk #@Reimport
assert gtk

Expand Down Expand Up @@ -1249,10 +1250,11 @@ def kill_xvfb():
except:
pass
# Close our display(s) first, so the server dying won't kill us.
if display:
import gtk #@Reimport
for display in gtk.gdk.display_manager_get().list_displays():
display.close()
log.info("killing xvfb with pid %s" % xvfb_pid)
import gtk #@Reimport
for display in gtk.gdk.display_manager_get().list_displays():
display.close()
os.kill(xvfb_pid, signal.SIGTERM)

if xvfb_pid is not None and not opts.use_display and not shadowing:
Expand Down

0 comments on commit 4cc5a54

Please sign in to comment.