Search

Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, October 05, 2017

Remote Ubuntu desktop on Azure

image

For the past many months I have moved to have my dev boxes on the cloud. I am happily using a monster Windows VM and an utility Ubuntu desktop in the cloud. I realized after talking to a few people that they don’t realize how easy it is to setup Linux remote desktop in Azure cloud. Here goes the steps.

For VM configuration I needed a small sized VM with large enough network bandwidth to support remoting. Unfortunately on Azure you cannot choose networking bandwidth but rather all the VMs in a box gets networking bandwidth proportional to the number of cores they have. So I just created a VM based on the “Standard DS4 v2 Promo (8 vcpus, 28 GB memory)” and connected it to Microsoft ExpressRoute. If you are ok with public IP you skip setting the express route and ensure your VM has a public IP.

Then went to the Portal and enabled RDP. For that in the portal choose VM –> Networking and add rule to enable RDP.

image

Finally I sshed into my VM with

c:\bin\putty.exe abhinaba@AbhiUbuntu

Time to now install a bunch of tools

sudo apt-get update
sudo apt-get install xrdp
sudo apt-get install ubuntu-desktop
sudo apt-get install xfce4
sudo apt-get update

Setup xsession

echo xfce4-session > ~/.xsession

Open the following file

sudo gvim /etc/xrdp/startwm.sh

Set the content to

#!/bin/sh

if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
fi

startxfce4

start the xrdp service

sudo /etc/init.d/xrdp start

And then from my windows machine mstsc /v:machine_ip. I am presented with the login screen

image

then I have full Ubuntu desktop on Azure :)

image

Tuesday, November 17, 2015

Dual Booting Ubuntu and Windows 10

Even though I hit a ton of online resources outlining the details, I struggled a lot getting this to work. So in this blog I am outlining what worked for me.

My setup was a office laptop (Lenovo X1 Carbon) with Trusted Platform Module (TPM), secure boot and Bit-locker enabled. My goal is to dual boot Ubuntu 15.10 with Windows 10.

Setup the installer USB

Get a USB thumb drive and format it as FAT32. NOTE: Do NOT use NTFS, otherwise the installation will completely fail with Kernel Panic

image

I downloaded my Ubuntu 15.10 from http://www.ubuntu.com/desktop. Then I downloaded the Universal USB Installer from http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/. I used the following setting to create the installer pen drive

image

Setup your PC for Dual Boot

If you do not have secure boot (UEFI or bitlocker) life is simple. But if you are reading this blog, then definitely you are not in that boat.

First of all disable boot-locker before making any changes into startup settings. Just type Bitlocker in the search box and choose Manage Bitlocker. In that turn it off.

image

Also ensure you have a empty partition to install Ubuntu onto. If you do not you need to partition your disk. There are various freeware and even Windows Disk Management can do that for you. I have the following D drive that I intended to install Ubuntu onto

Capture

Disable Secure Boot

From WinKey+R run the command

shutdown.exe /r /o /f /t 00

Windows will restart with the following screen, choose Troubleshoot

20151112_200310

In the next, advanced options screen choose UEFI Firmware settings

20151112_200348

The use the restart button

20151112_200423

This will bring up the BIOS window. It will differ for different PC/Laptop, but in any case you need to disable various secure boot options. In my Lenovo Thinkpad, I followed the following screen.

Go to Security –> Secure Boot and Disable Secure Boot

20151112_201347

20151112_201409

Then in startup enable legacy boot.

20151112_202504

Save the changes and exit (F10) and boot into windows

Installing Ubuntu

Now in Windows run the same command as before

shutdown.exe /r /o /f /t 00

This will bring up the following options, choose “Use a Device”

20151113_180925

In that use “Boot Menu”

20151113_180946

If you have done everything right the machine will restart and offer a boot menu with your USB thumb drive listed as an option.

20151113_181034

Selecting the bootable thumb drive should launch Ubuntu installer. Choose Install Ubuntu to start installing. Follow through the installer wizard.

20151113_181101

Once you have installed Ubuntu and dual boot is set, you can boot into Windows and then enable Bit-locker.