[Merge] lp:~ogra/phablet-tools/pahblet-shell-dbus-support into lp:phablet-tools
Oliver Grawert
ogra at ubuntu.com
Fri Aug 15 07:54:12 UTC 2014
Diff comments:
> === modified file 'phablet-shell'
> --- phablet-shell 2014-05-28 11:59:44 +0000
> +++ phablet-shell 2014-08-14 12:53:34 +0000
> @@ -62,10 +62,18 @@
>
> check_devices
>
> +toggle_ssh(){
> + DBUS_CALL="sudo -u phablet bash -c '/usr/bin/gdbus call -y \
> + -d com.canonical.PropertyService -o /com/canonical/PropertyService \
> + -m com.canonical.PropertyService.SetProperty ssh ${1} >/dev/null'"
> + adb shell "$DBUS_CALL"
> +}
The user *has* to be phablet, adbd won't provide you anything else.
As I said in the comment at the top, the sudo is only there until adbd runs as phablet by default, the sudo currently just makes sure that I can see if there are any user related issues popping up while the adbd change has not landed. If you insist I can indeed just drop it now so we don't have to remember dropping it later.
> +
> # Start ssh on the device and use port forwarding to connect to it.
> # This means that we'll connect to the device through the USB cable
> # and won't depend on if the device has it's wifi configured or not.
> -adb shell start ssh
> +toggle_ssh true
> +
> for PORT in `seq 2222 2299`; do
> adb forward tcp:$PORT tcp:22 && break
> done
> @@ -92,3 +100,6 @@
>
> # Now connect to the device and provide the user with a shell.
> ssh $SSH_OPTS phablet at localhost
> +
> +# turn off ssh access again
> +toggle_ssh false
>
--
https://code.launchpad.net/~ogra/phablet-tools/pahblet-shell-dbus-support/+merge/230795
Your team Ubuntu Phablet Team is subscribed to branch lp:phablet-tools.
More information about the Ubuntu-reviews
mailing list