Posts

Showing posts with the label Ubuntu

How to use RDP to connect to Ubuntu desktop

Problem I’d like to use RD Client app on iPad instead of VNC Viewer to connect to Ubuntu PC. Solution 1. Use the following command via Terminal or SSH (i.e. Termius on iPad) sudo apt install xrdp 2. Use RD Client on iPad to connect to the IP address of the Ubuntu machine. Lower the setting of display resolution on RD Client if you find the retina resolution is slow. Notes:  To uninstall the xrdp use the following command: sudo apt remove xrdp

How to restart VirtualBox VM to certain snapshot via Ubuntu Terminal

Problem I need to restart my VirtualBox headless Virtual Machine and restore it to certain snapshot on every restart. Solution 1. On Ubuntu terminal type the following commands to create a bash script as follows: cd /user/bin sudo nano vboxmanage-restartMyVM 2. On the nano editor type the followings: vboxmanage controlvm " YourVMName " poweroff vboxmanage snapshot " YourVMName " restore " YourVMSnapshotName " vboxmanage startvm " YourVMName " -type headless 3. Press Ctrl-S to save the file and Ctrl-X to exit the editor and return to Ubuntu terminal. 4. Type the following command to allow the script to be executable sudo chmod +x vboxmanage-restartMyVM 5. Finish. Now everytime I type  vboxmanage-restartMyVM  on the Ubuntu terminal my virtual machine will be powered-off if it's on, restored to my preferred snapshot, then started. Happy day😀