Yes you can.
Today I needed to test an openconnect VPN connection while inside a LAN. At this site my desktop is Windows but I needed to check connectivity from outside for Linux users, using the openconnect and NetworkManager-openconnect packages.
Let's see, I could plug my smartphone into the USB port of the desktop, forward the USB connection to Fedora 16 inside VirtualBox and I should be able to connect to usb0 and I would have a WAN connection from outside. Right?
To cut to the chase, it just works.
In the VirtualBox, make sure USB forwarding is enabled in the VM settings. Plug in the smartphone and turn on USB tethering. Ignore Windows suggestions to install hardware drivers for your smartphone. When the VM is running, there will be a USB icon on the bottom bar. Choose the USB device that is your smartphone. Windows will suggest installing a VirtualBox USB driver. Do that. On Linux a usb0 device should appear in the network manager and after disabling the eth0 device which forwards to Windows, you can connect to it. You should then get a DHCP lease from your smartphone and be connected to the outside world.
It seems you have to install the VirtualBox USB driver every time the VM is started, not sure why.
This should work on other distros. For example I know openconnect works on Debian and Ubuntu. It should also work for other VPN technologies, such as openvpn. The USB network driver is called cdc-ether, by the way.
Showing posts with label smartphone. Show all posts
Showing posts with label smartphone. Show all posts
Thursday, 29 March 2012
Thursday, 9 February 2012
Selecting a text region on Android 2.3+
I often need to select a region of text on my smartphone, to delete, or to copy to the clipboard. What to do when you have a small screen and few input devices, unlike a desktop? I figured it out.
Touch and hold the screen until the popup menu appears. Choose Select Word or Select All. Which one you use depends on how much you want to include or exclude. You will get two "paddles" surrounding the selection. Drag them to surround the region you want, then hit backspace to delete, or tap the screen to copy to clipboard. Depending on the app, there might be other options accessible from the menu to check the text in dictionary, etc.
This is actually explained in detail in this Android guide. I wish I had found that guide when I was first looking.
Hope this helps.
Touch and hold the screen until the popup menu appears. Choose Select Word or Select All. Which one you use depends on how much you want to include or exclude. You will get two "paddles" surrounding the selection. Drag them to surround the region you want, then hit backspace to delete, or tap the screen to copy to clipboard. Depending on the app, there might be other options accessible from the menu to check the text in dictionary, etc.
This is actually explained in detail in this Android guide. I wish I had found that guide when I was first looking.
Hope this helps.
Subscribe to:
Posts (Atom)