Skip to content

Instantly share code, notes, and snippets.

@moondev
Last active February 28, 2020 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moondev/d4ba474698bf1ad0a5ce61f5fd8d15b1 to your computer and use it in GitHub Desktop.
Save moondev/d4ba474698bf1ad0a5ce61f5fd8d15b1 to your computer and use it in GitHub Desktop.
virtualhere usb scripts
#!/bin/bash
#apt-get update
#apt-get install -y curl
curl -sL https://www.virtualhere.com/sites/default/files/usbclient/vhclientx86_64 > /usr/local/bin/vhclientx86_64
chmod +x /usr/local/bin/vhclientx86_64
cat > /root/.vhui << EOF
[Transport]
EasyFindId=9F7FVFtG7288cdL1CVszcm
EasyFindPin=CHx4e
[General]
MainFrameWidth=400
MainFrameHeight=250
[AutoShare]
2918d42b-4482-8dd6-aa68-94c691120bb5=1
EOF
cat > /etc/systemd/system/virtualhere.service << EOF
[Unit]
Description=VirtualHere USB Sharing
[Service]
ExecStartPre=/bin/sh -c 'logger VirtualHere settling...;sleep 1s;logger VirtualHere settled'
ExecStart=/usr/local/bin/vhclientx86_64
Type=idle
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable virtualhere
systemctl start virtualhere
systemctl status virtualhere
@moondev
Copy link
Author

moondev commented Feb 28, 2020

curl -sL  https://gist.githubusercontent.com/moondev/d4ba474698bf1ad0a5ce61f5fd8d15b1/raw/e57154e479607a9e8126ac302963403b7a2fb23d/usb.sh > usb.sh
chmod +x usb.sh
sudo ./usb.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment