-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chrome-remote-desktop: init at 120.0.6099.24 #283285
base: master
Are you sure you want to change the base?
chrome-remote-desktop: init at 120.0.6099.24 #283285
Conversation
Based on the work from this Gist by @sepiabrown: https://gist.github.com/sepiabrown/0dbca7da5610055991ad04bbeb461fed And also from AUR package: https://aur.archlinux.org/packages/chrome-remote-desktop
51cc64f
to
e1c8a3c
Compare
Hey @sepiabrown, would like some help here if you still are interested in this package getting in nixpkgs. |
I can't remember seeing the file $HOME/.config/chrome-remote-desktop/host#.json. Have you tried using other working linux machine to retrieve the JSON file and putting it under the above path in the NixOS machine? |
I'd like to share my result. My machine can boot Windows or NixOS. Both OS share the same static IP (I don't know whether this is relevant) and "hostname" (Important, when each OS was given its own hostname, the following copying method did not work). I copied "host.json" and "host_unprivileged.json" from "C:\ProgramData\Google\Chrome Remote Desktop" in Windows, to "host#xxx.json" and "host#xxx.settings.json" in NixOS respectively. CRD on NixOS now stops complaining about "host#xxx.json". For those who doesn't have Windows. I didn't try this but I would like to suggest running Ubuntu in VM/Docker on NixOS, with the same "hostname" as NixOS. Setup CRD on the VM, then copy its "host#xxx.json" to NixOS. However, CRD complains that it cannot open display ":1", both on Wayland & X11. Result on Plasma Wayland: $ journalctl -b -u chrome-remote-desktop@namin Result on Plasma X11. $ /nix/store/...hash...-chrome-remote-desktop/opt/google/chrome-remote-desktop/chrome-remote-desktop --start --new-session (chrome-remote-desktop-host:20486): Gtk-WARNING **: 23:37:32.885: cannot open display: :1 |
@naminx can you post the contents of your Maybe I can create a script that generate this file and get it working without needing another operational system. |
Hi, here are the files. Please note that "xxx" in the file name changes when your "hostname" changes. My first attempt to copy host#xxx.settings.json: host#xxx.json: |
@naminx this is great, thank you. I have an idea of what the hash from the hostname is, will give it a try later. For everything that is a hash in the file, can you show it to me if they're the same or different? |
Sorry. I misslooked one field in "host#xxx.json". There is one more field named "private_key". { The field "host_id" in "host#xxx.settings.json" and "host#xxx.json" are identical. I check the host.json and host_unprivileged.json from another Windows machine. |
Hi all, I think I have found the way to create "host#xxx.json".
In order to make https://remotedesktop.google.com/access show that your host is "Online", When I examine the service log, I get:
|
Hi all, We are in business!
Update 27 Feb: |
replacePrefix = "/opt/google/chrome-remote-desktop"; | ||
in | ||
stdenvNoCC.mkDerivation rec { | ||
name = "chrome-remote-desktop"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "chrome-remote-desktop"; | |
pname = "chrome-remote-desktop"; |
or any special reason to use name
here?
--replace ${replacePrefix}/remote-assistance-host $out/${replacePrefix}/remote-assistance-host | ||
|
||
substituteInPlace $out/${replacePrefix}/chrome-remote-desktop \ | ||
--replace /usr/bin/python3 ${python3.withPackages (ps: with ps; [ psutil pyxdg packaging ])}/bin/python3 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be in the let-in
above, like
--replace /usr/bin/python3 ${python3.withPackages (ps: with ps; [ psutil pyxdg packaging ])}/bin/python3 \ | |
--replace /usr/bin/python3 ${lib.getBin pythonEnv}/bin/python3 \ |
mesa | ||
nss | ||
pam | ||
xorg.libX11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not use the packages directly?
|
||
substituteInPlace $out/${replacePrefix}/chrome-remote-desktop \ | ||
--replace /usr/bin/python3 ${python3.withPackages (ps: with ps; [ psutil pyxdg packaging ])}/bin/python3 \ | ||
--replace '"Xvfb"' '"${xorg.xorgserver}/bin/Xvfb"' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use lib.getExe'
.
It works like
lib.getExe' pkgs.imagemagick "convert" => /nix/store/<imagemagick-id>/bin/convert
Description of changes
Fixes: #34084.
Previous attempt: #157962
Based on this gist from @sepiabrown.
There are some differences between this approach and the previous attempt from @sepiabrown. This one will not use our own infrastructure to create a systemd service, instead relying on the files shipped upstream. So you can use
systemctl start chrome-remote-desktop@<user>.service
to start it foruser
.Not working yet, the following issues needs to be fixed:
The whole issue seems to be the
~/.config/chrome-remote-desktop/host#<hash>.json
configuration file, that I have zero ideas on how to generate. Would like some help here.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.