# Ubuntu 18.04 installation (and remote desktop) ###### tags: `2022/06` `ubuntu18.04` `installation` `remote desktop` :::info <ins>(2022/6/6)</ins> It took some time to set up remote desktop for Ubuntu 18.04. Checked many articles on web talking about 'issue' on remote desktop since Ubuntu 18.04. Finally, figured out the root cause and solve it. :smile: ::: --- ## :memo: Table of Contents [TOC] --- ## :memo: Contents --- #### Enable ssh ``` sudo apt-get install openssh-server sudo systemctl enable ssh sudo systemctl start ssh ``` --- #### Add user You will know later why we need to create another user. ``` # sudo adduser <newuser> $ sudo adduser marconi # sudo usermod -aG sudo <newuser> $ sudo usermod -aG sudo marconi ``` --- #### Install_xRDP Before installing xRDP, please be noted that there are so many web articles tried to explained and solved "Blank screen after login Ubuntu 18.04 xRDP from Windows 10" . Most of them are wrong. ![Blank screen after login Ubuntu 18.04 xRDP from Windows 10](https://i.stack.imgur.com/jhQLP.png) The ultimate 'resolution' is explained in this [xRDP github issue explained the root cause](https://github.com/neutrinolabs/xrdp/issues/1358#issuecomment-949477501) - The root cause is that ```systemd --user``` is not designed to cope with the same user logging on at the graphical machine console, and also over RDP. It's a systemd limitation. - The recommended solution is such instances is to use a separate user for console access. Easiest (and correct) way to install xRDP on Ubuntu is using this script, suggested by this article [如何在Ubuntu 18.04與20.04上使用RDP遠端GNOME桌面](https://peterli.website/%E5%A6%82%E4%BD%95%E5%9C%A8ubuntu-18-04%E8%88%8720-04%E4%B8%8A%E4%BD%BF%E7%94%A8rdp%E9%81%A0%E7%AB%AFgnome%E6%A1%8C%E9%9D%A2/), and make sure to log in with different user, `marconi` as I created earlier, from the one you did the Ubuntu installation, maybe `admin` used. ``` $ wget https://gist.githubusercontent.com/peter279k/259f71b3a8cef3aa66e9af90e6800f2b/raw/c373ddee0d407dac850dc326c268e5df6d8c93f1/Std-Xrdp-install-0.2.sh $ sudo chmod +x Std-Xrdp-install-0.2.sh $ ./Std-Xrdp-install-0.2.sh ``` --- #### Install_git ``` $ sudo apt install -y git # config the user name and email $ git config --global user.name "Marconi Jiang" $ git config --global user.email marconi1964@yahoo.com # generate ssh key in ed25519 format $ ssh-keygen -t ed25519 -C "marconi1964@yahoo.com" # cat the public key, and copy the key to github.com $ cat .ssh/id_ed25519.pub ssh-ed25519 AAAAC7GhhND/IWnagt4mEHdduup1H3NzaC1lZDI1NTE5AAAAII3oZCu211C7/iYrds+i ``` The RSA key after ssh-ed25519 contains exactly 80 characters. Copy this string, including ssh-ed25519, to `github.com - setting - SSH and GPG keys - New SSH key`, then you can start using git. --- [:arrow_left:Previous article - Back to marconi's blog](https://marconi1964.github.io/) [:arrow_right:Next article - Install NVIDIA GPU](https://hackmd.io/@MarconiJiang/nvidia_v100_ubuntu1804) [:arrow_up:back to marconi's blog](https://marconi1964.github.io/)