chrome-remote-desktop crashes at startup when the default Python is Python 3. Reproducible: Always Steps to Reproduce: # emerge chrome-remote-desktop # /etc/init.d/chrome-remote-desktop start Actual Results: # /etc/init.d/chrome-remote-desktop status * status: crashed The cause of the crash was unclear, so I patched /etc/init.d/chrome-remote-desktop to set log files for stdout and stderr (with -1 and -2), and I started it again. That gave this output: File "/opt/google/chrome-remote-desktop/chrome-remote-desktop", line 142 old_umask = os.umask(0066) ^ SyntaxError: invalid token File "/opt/google/chrome-remote-desktop/chrome-remote-desktop", line 142 old_umask = os.umask(0066) ^ SyntaxError: invalid token Expected Results: It should have run without crashing :) I presume that the problem is that my default Python is Python 3.3: $ eselect python list Available Python interpreters: [1] python2.7 [2] python3.2 [3] python3.3 * [4] python3.4 Indeed, I can fix it by telling the script to run with Python 2.7: $ diff -u /usr/portage/net-misc/chrome-remote-desktop/chrome-remote-desktop-45.0.2454.17.ebuild chrome-remote-desktop-45.0.2454.17.ebuild --- /usr/portage/net-misc/chrome-remote-desktop/chrome-remote-desktop-45.0.2454.17.ebuild 2015-09-06 04:01:02.000000000 -0400 +++ chrome-remote-desktop-45.0.2454.17.ebuild 2015-09-24 18:36:49.076315995 -0400 @@ -14,9 +14,11 @@ # Use curl to find the answer: # curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages | grep ^Filename -EAPI="4" +EAPI="5" -inherit unpacker eutils +PYTHON_COMPAT=( python2_7 ) + +inherit unpacker eutils python-single-r1 DESCRIPTION="access remote computers via Chrome!" PLUGIN_URL="https://chrome.google.com/remotedesktop" @@ -65,6 +67,7 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-44.0.2403.44-always-sudo.patch #541708 + python_fix_shebang opt/google/chrome-remote-desktop/chrome-remote-desktop } src_install() {
My apologies: The fix should also include a call to python_setup before the call to python_fix_shebang. I thought I had tested without it, but I guess I got confused.
I thought I had included a link to someone else who had the same problem and solution, but I guess I missed it. Here it is: https://plus.google.com/+NickMossie/posts/TB32wTtMSZS
I've also reported this upstream (though I don't have a shareable link), so if they fix it, it may go away on its own in some future release.
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2e9882b8a456f7f1e21fc9d1d317974e331f6e1
Thanks! Here's the public upstream bug that may eventually make this unnecessary: https://code.google.com/p/chromium/issues/detail?id=537436