Advertisement
ava1ar

chrome-remote-desktop arch compatibility patch

Jul 10th, 2014
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.42 KB | None | 0 0
  1. --- a/opt/google/chrome-remote-desktop/chrome-remote-desktop    2014-07-10 01:40:27.000000000 -0400
  2. +++ b/opt/google/chrome-remote-desktop/chrome-remote-desktop    2014-07-10 01:38:04.836328458 -0400
  3. @@ -493,7 +493,7 @@
  4.      # during iteration over the list.
  5.      try:
  6.        # Skip other users' processes.
  7. -      if process.uids.real != uid:
  8. +      if process.uids().real != uid:
  9.          continue
  10.  
  11.        # Skip the process for this instance.
  12. @@ -501,12 +501,12 @@
  13.          continue
  14.  
  15.        # |cmdline| will be [python-interpreter, script-file, other arguments...]
  16. -      cmdline = process.cmdline
  17. +      cmdline = process.cmdline()
  18.        if len(cmdline) < 2:
  19.          continue
  20.        if cmdline[0] == sys.executable and cmdline[1] == sys.argv[0]:
  21.          return process.pid
  22. -    except psutil.error.Error:
  23. +    except psutil.NoSuchProcess:
  24.        continue
  25.  
  26.    return 0
  27. @@ -994,10 +994,10 @@
  28.        logging.info("Group '%s' not found." % CHROME_REMOTING_GROUP_NAME)
  29.  
  30.      if os.getenv("DISPLAY"):
  31. -      sudo_command = "gksudo --description \"Chrome Remote Desktop\""
  32. +      sudo_command = "pkexec"
  33.      else:
  34.        sudo_command = "sudo"
  35. -    command = ("sudo -k && exec %(sudo)s -- sh -c "
  36. +    command = ("sudo -k && exec %(sudo)s sh -c "
  37.                 "\"groupadd -f %(group)s && gpasswd --add %(user)s %(group)s\"" %
  38.                 { 'group': CHROME_REMOTING_GROUP_NAME,
  39.                   'user': user,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement