Skip to content

Commit

Permalink
#1611: check for uinput permission support early
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@17631 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 14, 2017
1 parent ba74f4b commit 5b93ce2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/xpra/server/server_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,19 @@ def has_uinput():
assert uinput
except (ImportError, NameError) as e:
log = get_util_logger()
log("has_uinput()", exc_info=True)
log.info("cannot access python uinput module:")
log.info(" %s", e)
return False
else:
return True
try:
uinput.fdopen()
except Exception as e:
log = get_util_logger()
log("has_uinput()", exc_info=True)
log.info("cannot use uinput for virtual devices:")
log.info(" %s", e)
return False
return True

def create_uinput_pointer_device(uuid, uid):
log = get_util_logger()
Expand Down

0 comments on commit 5b93ce2

Please sign in to comment.