I've followed the instructions on
https://support.google.com/a/answer/2906017?hl=en
to set up a Google Cloud printer using a headless F19 server.
I used ssh -Y -C <servername> to log into the service, install Chrome and set up the printer.
I then ran
nohup /usr/bin/google-chrome \ --type=service \ --enable-cloud-print-proxy \ --no-service-autorun \ --noerrdialogs \ --user-data-dir=/home/gary/.GoogleCloudPrint &
NOTE: different path to google-chrome used as the one specified on the web page just generated library errors.
Which started Chrome in the background. However, when I logged out Chrome died. To get it working quickly (it was home time after all) I logged in text mode on the console and ran the same command. However that just core dumped immediately.
If I log into the server using SSH but don't specify the -Y and therefore don't have X forwarding, it does the same:
[gary@lou ~]$ nohup /usr/bin/google-chrome --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=/home/gary/.GoogleCloudPrint & [1] 6204 [gary@lou ~]$ nohup: ignoring input and appending output to ‘nohup.out’
[1]+ Aborted (core dumped) nohup /usr/bin/google-chrome --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=/home/gary/.GoogleCloudPrint [gary@lou ~]$
Does anyone know how to get round this problem? Does anyone have a systemctl unit written so that I can do this at startup?
Cheers
Gary
Apparently there is a problem with the current stable version google-chrome-stable-35.0.1916.153-1.x86_64
I downloaded the current BETA and that's working as expected, works in a text only session and doesn't die when logging out.
Now all I need is a systemctl system unit to start it up on system boot. Does anyone have a suitable template I can use?
Gary
On 3 July 2014 14:59, Gary Stainburn gary.stainburn@ringways.co.uk wrote:
Apparently there is a problem with the current stable version google-chrome-stable-35.0.1916.153-1.x86_64
I downloaded the current BETA and that's working as expected, works in a text only session and doesn't die when logging out.
Now all I need is a systemctl system unit to start it up on system boot. Does anyone have a suitable template I can use?
Gary
Errm, I wrote this some time ago so beware :-) it starts my service after the network is up:
[16:37:00][dexter@BigIron:~]$ cat /usr/lib/systemd/system/noip.service # # dexter's noip service # [Unit] Description=Noip Dynamic DNS Update Client,Keep your current IP address in sync After=network.target
[Service] Type=forking # drops to user/group noip after startup ExecStart=/usr/sbin/noip2 ExecReload=/usr/sbin/noip2 -K `pidof noip2` && /usr/sbin/noip2
[Install] WantedBy=multi-user.target
...dex
I decided to have a go at writing a .service file for this and I don't think I've done bad. The only problem I have is that according to the syslog output it appears to be running as root and not as gary.
Can anyone see what I've missed?
Jul 4 11:53:48 lou systemd[1]: Starting Google Chrome running headless as Cloud Print Server... Jul 4 11:53:48 lou systemd[1]: Started Google Chrome running headless as Cloud Print Server. Jul 4 11:53:48 lou CloudPrint[8816]: [8821:8821:0704/115348:ERROR:browser_main_loop.cc(209)] Gtk: cannot open display: Jul 4 11:53:48 lou CloudPrint[8816]: [8816:8837:0704/115348:WARNING:proxy_service.cc(904)] PAC support disabled because there is no system implementation Jul 4 11:53:48 lou CloudPrint[8816]: The setuid sandbox is not running as root. Common causes: Jul 4 11:53:48 lou CloudPrint[8816]: * An unprivileged process using ptrace on it, like a debugger. Jul 4 11:53:48 lou CloudPrint[8816]: * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...) Jul 4 11:53:48 lou CloudPrint[8816]: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted Jul 4 11:53:48 lou CloudPrint[8816]: [8816:8839:0704/115348:WARNING:print_system_cups.cc(464)] No print server specified. Using default print server.
/usr/lib/systemd/googleCloudPrint.service
[Unit] Description=Google Chrome running headless as Cloud Print Server After=network.target
[Service] Type=simple User=gary Group=gary WorkingDirectory=/home/gary/.GoogleCloudPrint ExecStart=/usr/bin/google-chrome \ --type=service --enable-cloud-print-proxy \ --no-service-autorun \ --log-level 2 \ --enable-logging=stderr \ --user-data-dir=/home/gary/.GoogleCloudPrint Restart=always StandardInput=null StandardOutput=syslog StandardError=inherit SyslogIdentifier=CloudPrint SyslogFacility=lpr SyslogLevel=err PrivateTmp=true
[Install] WantedBy=multi-user.target