diff options
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | chrome-remote-desktop.install | 32 | ||||
-rwxr-xr-x | crd | 279 |
4 files changed, 154 insertions, 179 deletions
@@ -1,7 +1,7 @@ pkgbase = chrome-remote-desktop pkgdesc = Allows you to securely access your computer over the Internet through Chrome. - pkgver = 65.0.3325.39 - pkgrel = 2 + pkgver = 66.0.3359.12 + pkgrel = 1 url = https://chrome.google.com/webstore/detail/gbchcmhmhahfdphkhkmpfmihenigjmpp install = chrome-remote-desktop.install arch = x86_64 @@ -15,12 +15,12 @@ pkgbase = chrome-remote-desktop depends = xorg-setxkbmap depends = xorg-xauth depends = xorg-xdpyinfo - source = chrome-remote-desktop-65.0.3325.39.deb::http://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb + source = chrome-remote-desktop.deb::http://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb source = chrome-remote-desktop.service source = crd - sha256sums = 098b877306269200c3e8044c34222db5c1724274f39b171585ad8b2248eaede5 + sha256sums = SKIP sha256sums = e5da5ae89b5bc599f72f415d1523341b25357931b0de46159fce50ab83615a4b - sha256sums = d9c082c89371539877f0d9d167d73be32c5d9de99ba655be036232e606dcf1c8 + sha256sums = 27dee2d383e6bd993fe0557d5c222fa80ab6d16d43775dedff6218713c7a1c06 pkgname = chrome-remote-desktop @@ -5,20 +5,20 @@ # Contributor: Mateus Rodrigues Costa <charles [dot] costar [at] gmail [dot] com> pkgname=chrome-remote-desktop -pkgver=65.0.3325.39 -pkgrel=2 +pkgver=66.0.3359.12 +pkgrel=1 pkgdesc="Allows you to securely access your computer over the Internet through Chrome." url="https://chrome.google.com/webstore/detail/gbchcmhmhahfdphkhkmpfmihenigjmpp" arch=("x86_64") license=("BSD") install="${pkgname}.install" depends=("gconf" "gtk3" "nss" "python2" "python2-psutil" "xorg-server-xvfb" "xorg-setxkbmap" "xorg-xauth" "xorg-xdpyinfo") -source=("${pkgname}-${pkgver}.deb::http://dl.google.com/linux/direct/${pkgname}_current_amd64.deb" +source=("${pkgname}.deb::http://dl.google.com/linux/direct/${pkgname}_current_amd64.deb" "${pkgname}.service" "crd") -sha256sums=("098b877306269200c3e8044c34222db5c1724274f39b171585ad8b2248eaede5" +sha256sums=("SKIP" "e5da5ae89b5bc599f72f415d1523341b25357931b0de46159fce50ab83615a4b" - "d9c082c89371539877f0d9d167d73be32c5d9de99ba655be036232e606dcf1c8") + "27dee2d383e6bd993fe0557d5c222fa80ab6d16d43775dedff6218713c7a1c06") pkgver() { bsdtar -xf control.tar.gz -O control | grep "^Version: " | cut -f2 -d' ' @@ -65,5 +65,5 @@ package() { done msg2 "Setting uid root to user-session command" - chmod u+s "${pkgdir}/opt/google/chrome-remote-desktop/user-session" + chmod u+s "${pkgdir}/opt/google/${pkgname}/user-session" } diff --git a/chrome-remote-desktop.install b/chrome-remote-desktop.install index f64cf17ac6ad..5a0990817fba 100644 --- a/chrome-remote-desktop.install +++ b/chrome-remote-desktop.install @@ -2,22 +2,18 @@ post_install() { # Create chrome-remote-desktop group [[ $(cat /etc/group) == *chrome-remote-desktop* ]] || groupadd -r chrome-remote-desktop - echo "Set up CRD by issuing the command:" - echo "crd --setup" - echo "as a normal user." - echo "" - echo "After that, enable access to CRD in your chrome or chromium browser." - echo "" - echo "To {enable,start} the service, issue the command:" - echo "systemctl --user {enable,start} chrome-remote-desktop" - echo "This only really makes sense for servers." - echo "" - echo "You can also start the chrome remote desktop server by issuing the command:" - echo "crd" - echo "as a normal user. " - echo "This will prompt you to set up your CRD if it hasn't been set up already." - echo "" - echo "Go to https://support.google.com/chrome/answer/1649523 for more information." + printf "$(tput setaf 4)Set up CRD by issuing the command:$(tput sgr0)\n" + printf "$(tput setaf 2)crd --setup$(tput sgr0)\n" + printf "$(tput setaf 4)as a normal user.$(tput sgr0)\n\n" + printf "$(tput setaf 4)After that, enable access to CRD in your chrome or chromium browser.$(tput sgr0)\n\n" + printf "$(tput setaf 4)To {enable,start} the service, issue the command:$(tput sgr0)\n" + printf "$(tput setaf 2)systemctl --user {enable,start} chrome-remote-desktop$(tput sgr0)\n" + printf "$(tput setaf 4)This only really makes sense for servers.$(tput sgr0)\n\n" + printf "$(tput setaf 4)You can also start the chrome remote desktop server by issuing the command:$(tput sgr0)\n" + printf "$(tput setaf 2)crd --start$(tput sgr0)\n" + printf "$(tput setaf 4)as a normal user. $(tput sgr0)\n" + printf "$(tput setaf 4)This will prompt you to set up your CRD if it hasn't been set up already.$(tput sgr0)\n\n" + printf "$(tput setaf 4)Go to https://support.google.com/chrome/answer/1649523 for more information.$(tput sgr0)\n" } post_upgrade() { @@ -25,7 +21,5 @@ post_upgrade() { } post_remove() { - echo "" - echo "Please remove ~/.config/chrome-remote-desktop folder manually" - echo "" + printf "\n$(tput setaf 4)Please remove ~/.config/chrome-remote-desktop folder manually$(tput sgr0)\n\n" } @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/bash if [[ $(whoami) = "root" ]] then @@ -6,186 +6,167 @@ then exit fi -crd_status=$(/opt/google/chrome-remote-desktop/chrome-remote-desktop --get-status) +function print_red() { + printf "$(tput setaf 1)$1$(tput sgr0)" +} -case $1 in +function print_green() { + printf "$(tput setaf 2)$1$(tput sgr0)" +} ---status) - echo "CRD status: ${crd_status}" - exit - ;; +function print_blue() { + printf "$(tput setaf 4)$1$(tput sgr0)" +} ---restart) +function status() { + crd_status=$(/opt/google/chrome-remote-desktop/chrome-remote-desktop --get-status) + print_blue "CRD status: ${crd_status}\n" +} + +function restart() { /opt/google/chrome-remote-desktop/chrome-remote-desktop --stop - rm -rf $HOME/.config/chrome-remote-desktop/pulseaudio* - crd_size=$(cat $HOME/.config/chrome-remote-desktop/Size) - /opt/google/chrome-remote-desktop/chrome-remote-desktop --size="$crd_size" --start - ;; + rm -rf ${HOME}/.config/chrome-remote-desktop/pulseaudio* + crd_size=$(cat ${HOME}/.config/chrome-remote-desktop/Size) + /opt/google/chrome-remote-desktop/chrome-remote-desktop --size="${crd_size}" --start +} ---reload) +function reload() { /opt/google/chrome-remote-desktop/chrome-remote-desktop --reload - exit - ;; +} ---stop) +function stop() { /opt/google/chrome-remote-desktop/chrome-remote-desktop --stop - rm -rf $HOME/.config/chrome-remote-desktop/pulseaudio* - exit - ;; + rm -rf ${HOME}/.config/chrome-remote-desktop/pulseaudio* +} ---start) - if [ ! -f $HOME/.chrome-remote-desktop-session ] | [ ! -f $HOME/.config/chrome-remote-desktop/Size ] +function start() { + if [ ! -f ${HOME}/.chrome-remote-desktop-session ] | [ ! -f ${HOME}/.config/chrome-remote-desktop/Size ] then - echo "Seems like you haven't set this up yet. Try running crd --setup." + print_red "Seems like you haven't set this up yet. Try running "; print_green "crd --setup"; print_red ".\n" exit fi - if [ ! -f $HOME/.config/chrome-remote-desktop/host#*.json ] + if [ ! -f ${HOME}/.config/chrome-remote-desktop/host#*.json ] then - echo "Seems like you haven't activated CRD in your browser. Please do" - echo "that before trying to run the server." + print_red "Seems like you haven't activated CRD in your browser. Please do that before trying to run the server.\n" exit fi - - rm -rf $HOME/.config/chrome-remote-desktop/pulseaudio* - crd_size=$(cat $HOME/.config/chrome-remote-desktop/Size) - /opt/google/chrome-remote-desktop/chrome-remote-desktop --size="$crd_size" --start - exit - ;; - ---setup) - sudo gpasswd -a $USER chrome-remote-desktop - echo "Checking working directory and session file are present" - echo "That would be $HOME/.config/chrome-remote-desktop and" - echo "$HOME/.chrome-remote-desktop-session" - [ -d $HOME/.config/chrome-remote-desktop ] || mkdir $HOME/.config/chrome-remote-desktop - touch $HOME/.chrome-remote-desktop-session - touch $HOME/.config/chrome-remote-desktop/Size - - if [[ -z $(cat $HOME/.chrome-remote-desktop-session) ]] + rm -rf ${HOME}/.config/chrome-remote-desktop/pulseaudio* + crd_size=$(cat ${HOME}/.config/chrome-remote-desktop/Size) + /opt/google/chrome-remote-desktop/chrome-remote-desktop --size="${crd_size}" --start +} + +function setup() { + sudo gpasswd -a ${USER} chrome-remote-desktop + print_blue "Checking working directory and session file are present\n" + print_blue "That would be ${HOME}/.config/chrome-remote-desktop and\n" + print_blue "${HOME}/.chrome-remote-desktop-session\n" + [ -d ${HOME}/.config/chrome-remote-desktop ] || mkdir ${HOME}/.config/chrome-remote-desktop + touch ${HOME}/.chrome-remote-desktop-session + touch ${HOME}/.config/chrome-remote-desktop/Size + + if [[ -z $(cat ${HOME}/.chrome-remote-desktop-session) ]] then - echo '# You will have to uncomment one of the following lines for CRD to work' > $HOME/.chrome-remote-desktop-session - echo '# Remove the # and select ctrl-X to finish.' >> $HOME/.chrome-remote-desktop-session - echo '# ' >> $HOME/.chrome-remote-desktop-session - echo 'export $(dbus-launch)' >> $HOME/.chrome-remote-desktop-session - grep -R '^Exec=' /usr/share/xsessions/ | sed 's|/usr/.*=|# exec |' >> $HOME/.chrome-remote-desktop-session - echo 'Now entering the editor to make the appropriate changes to' - echo 'your session file.' + echo '# You will have to uncomment one of the following lines for CRD to work' > ${HOME}/.chrome-remote-desktop-session + echo '# Remove the # and select ctrl-X to finish.' >> ${HOME}/.chrome-remote-desktop-session + echo '# ' >> ${HOME}/.chrome-remote-desktop-session + echo 'export $(dbus-launch)' >> ${HOME}/.chrome-remote-desktop-session + grep -R '^Exec=' /usr/share/xsessions/ | sed 's|/usr/.*=|# exec |' >> ${HOME}/.chrome-remote-desktop-session + print_blue 'Now entering the editor to make the appropriate changes to your session file.\n' read -rsp $'Press any key to continue...\n' -n1 key - nano $HOME/.chrome-remote-desktop-session + nano ${HOME}/.chrome-remote-desktop-session fi - if [[ -z $(cat $HOME/.config/chrome-remote-desktop/Size) ]] + if [[ -z $(cat ${HOME}/.config/chrome-remote-desktop/Size) ]] then - echo "1366x768" > $HOME/.config/chrome-remote-desktop/Size - echo "Default size is set to 1366x768 in" - echo "$HOME/.config/chrome-remote-desktop/Size." - echo "Change this if you want another screen size on your client." - echo "Remember that this will affect all clients you use." - echo "Now entering the editor to make the appropriate changes to" - echo "your Size file. Do not enter any comments to this file" + echo "1366x768" > ${HOME}/.config/chrome-remote-desktop/Size + print_blue "Default size is set to 1366x768 in\n" + print_blue "${HOME}/.config/chrome-remote-desktop/Size.\n" + print_blue "Change this if you want another screen size on your client.\n" + print_blue "Remember that this will affect all clients you use.\n" + print_blue "Now entering the editor to make the appropriate changes to\n" + print_blue "your Size file. Do not enter any comments to this file\n" read -rsp $'Press any key to continue...\n' -n1 key - nano $HOME/.config/chrome-remote-desktop/Size + nano ${HOME}/.config/chrome-remote-desktop/Size fi - echo "This completes the setup." - echo "" - echo "Please remember that you will need to allow Chrome or Chromium" - echo "to act as a server for this to work at all." - echo "" - echo "To do that, open CRD in your chrome or chromium browser" - echo "and follow the instructions. Clicking the computer will open" - echo "it in the browser window in default resolution." - echo "For a more pleasant chromoting experience, just issue the command" - echo "crd --restart" - echo "" - echo "Happy chromoting! :)" + print_blue "This completes the setup.\n\n" + print_blue "Please remember that you will need to allow Chrome or Chromium\n" + print_blue "to act as a server for this to work at all.\n\n" + print_blue "To do that, open CRD in your chrome or chromium browser\n" + print_blue "and follow the instructions. Clicking the computer will open\n" + print_blue "it in the browser window in default resolution.\n" + print_blue "For a more pleasant chromoting experience, just issue the command\n" + print_green "crd --restart" + print_blue "\nHappy chromoting! :)\n" +} + +function help() { + print_blue "Note: You will have to go into chrome or chromium to enable remote\n" + print_blue "connections to this computer before you can run CRD on this machine.\n\n" + print_blue "Usage: "; print_green "crd [option]"; print_blue "\n\n" + print_blue "Options:\n\n" + print_green "--status" + print_blue "\nChecks whether CRD is running and returns its status\n\n" + print_green "--start" + print_blue "\nStarts CRD after destroying old pulse files\n\n" + print_green "--stop" + print_blue "\nStops CRD if running, deletes old pulse files\n\n" + print_green "--restart" + print_blue "\nStops and starts CRD, destroying non-functioning pulse files\n\n" + print_green "--reload" + print_blue "\nJust reloads CRD\n\n" + print_green "--help, -h" + print_blue "\nThis help message\n\n" + print_green "--setup" + print_blue "\nSets up CRD for your system by adding folders, sessions, users\n" + print_blue "and stuff. You should do this first, after a fresh install. This\n" + print_blue "will be done automatically if you just run crd without options.\n\n" + print_blue "No sound on client? Try returning the files /etc/pulse/daemon.conf\n" + print_blue "and /etc/pulse/client.conf to their default values, that is, the\n" + print_blue "values commented out with a ';' – deleting any uncommented settings\n" + print_blue "might do the trick, but use your common sense here.\n\n" + print_blue "Need another resolution and your Display function on the client\n" + print_blue "throws an error? You can change the client resolution in th host by\n" + print_blue "issuing the command:\n\n" + print_green "nano ${HOME}/.config/chrome-remote-desktop/Size" + print_blue "\n\nand adjusting it to whatever resolution you need.\n" + print_blue "This will affect all clients though.\n" +} - exit +case $1 in + +--status) + status ;; ---help|-h) - echo "Note: You will have to go into chrome or chromium to enable remote" - echo "connections to this computer before you can run CRD on this machine." - echo "" - echo "Usage: crd [option]" - echo "" - echo "Options:" - echo "" - echo "--status" - echo "Checks whether CRD is running and returns its status" - echo "" - echo "--start" - echo "Starts CRD after destroying old pulse files" - echo "" - echo "--stop" - echo "Stops CRD if running, deletes old pulse files" - echo "" - echo "--restart" - echo "Stops and restarts CRD, destroying non-functioning pulse files" - echo "" - echo "--reload" - echo "Just reloads CRD" - echo "" - echo "--help, -h" - echo "This help message" - echo "" - echo "--setup" - echo "Sets up CRD for your system by adding folders, sessions, users" - echo "and stuff. You should do this first, after a fresh install. This" - echo "will be done automatically if you just run crd without options." - echo "" - echo "No options given" - echo "If CRD running, stop it. Otherwise start it. Checks that CRD" - echo "has been set up, or it won't start." - echo "" - echo "No sound on client? Try returning the files /etc/pulse/daemon.conf" - echo "and /etc/pulse/client.conf to their default values, that is, the" - echo "values commented out with a ';' – deleting any uncommented settings" - echo "might do the trick, but use your common sense here." - echo "" - echo "Need another resolution and your Display function on the client " - echo "throws an error? You can change the client resolution in th host by" - echo "issuing the command:" - echo "" - echo "nano $HOME/.config/chrome-remote-desktop/Size" - echo "" - echo "and adjusting it to whatever resolution you need." - echo "This will affect all clients though." - echo "" - exit +--restart) + restart ;; -*) - if [ ! -f $HOME/.chrome-remote-desktop-session ] | [ ! -f $HOME/.config/chrome-remote-desktop/Size ] - then - echo "Seems like you haven't set this up yet. Try running crd --setup." - exit - fi +--reload) + reload + ;; - if [ ! -f $HOME/.config/chrome-remote-desktop/host#*.json ] - then - echo "Seems like you haven't activated CRD in your browser. Please do" - echo "that before trying to run the server." - exit - fi +--stop) + stop + ;; - if [[ $crd_status = "STARTED" ]] - then - echo "CRD is already running; stopping." - /opt/google/chrome-remote-desktop/chrome-remote-desktop --stop - rm -rf $HOME/.config/chrome-remote-desktop/pulseaudio* - echo "Deleted old pulse audio files" - exit - else - echo "CRD is not running; starting." - echo "Deleting old pulse audio files" - rm -rf $HOME/.config/chrome-remote-desktop/pulseaudio* - crd_size=$(cat $HOME/.config/chrome-remote-desktop/Size) - /opt/google/chrome-remote-desktop/chrome-remote-desktop --size="$crd_size" --start - exit - fi +--start) + start + ;; + +--setup) + setup + ;; + +--help|-h) + help + ;; + +*) + help ;; esac |