I'm trying to use my MacBook to Remote Desktop connect to my Ubuntu server. I am able to ssh, but I can't seem to figure out how to Remote Desktop connect.
Any suggestions? Also my Ubuntu workstation is 1200 miles away so I can't physically access it but I can access it through ssh so hopefully I can configure what I need through ssh.
I tried the instructions in the first answer on here, but when I tried to RDP from a windows PC, ti stated that: Remote Desktop can't connect to the remote computer for one of these reasons:
- Remote access to the server is not enabled
- The remote computer is turned off
- The remote computer is not available on the network
It shouldn't be #2 and 3 since I can ssh to the server just fine. So I suspect #1 is the culprit.
64 Answers
You can use Microsoft Remote Desktop from App Store. Set up your Ubuntu this way:
From DigitalOcean community page.
sudo apt-get update
If you don't have desktop installed:
sudo apt-get install ubuntu-desktop
After that install XRDP:
sudo apt-get install xrdp
Enable XRDP to start on boot:
sudo systemctl enable xrdp
If you have a firewall make sure that the 3389 port is open:
sudo ufw allow 3389/tcp
Now connect with Microsoft Remote desktop to your Linux machine.
I successfully logged-in remotely from my iMac macOS Mojave desktop into my hackintosh, which is a retrofitted 2012 Apple Macbook Pro running smoothly Ubuntu 16.04:
From the Ubuntu Desktop in 16.04
- Download and install vino by running
sudo apt-get install vinowithin the Ubuntu terminal. - Next run
vino-preferences. - After the vino application preferences window prompts, ensure that the "Allow other users to view your desktop" and "Allow other users to control your desktop" options are selected beneath the "Sharing" field; it is also recommended to select the "You must confirm each access to the this machine" and "Require the user to enter system-password".
- Run
sudo-rebootand then log-in to the Ubuntu 16.04 desktop. - Retrieve and the device-IP address by running
ifconfig -a; the local-IP address of the device will be returned within the terminal-output under the field: "inet addr:" (e.g.inet addr: 10.3.1.233). After noting the local-IP address of the device, proceed with the next set of instructions from your macOS desktop.
From Ubuntu 18.04-2 LTS
- Evidently, vino functionality was merged in Ubuntu 18.04.2 LTS Gnome Control Center, so it's much easier- simply go to "Settings".
- Within "Settings", scroll down to the "Sharing" tab within the left-hand side of the window.
- Turn on "Screen Sharing"- select "Allow connections to control the screen" and "Require a password" underneath "Access Options" then proceed with the below instructions to remotely access your Ubuntu 18.04.2 LTS desktop from your macOS desktop.
Logging-in From macOS Mojave
- Access the "Spotlight" by hitting CMD + Space-bar
- Within the Spotlight field, enter
vnc://your_server_ip:5900(e.g.vnc://10.3.1.233:5900). - If successful, the Screen Sharing application should automatically launch within your macOS desktop to remotely view your Ubuntu 16.04 or Ubuntu 18.04.2-LTS device on your local-network as depicted by the screen-shot below- enjoy!
You need to enable Remote Desktop Connection on your Ubuntu machine. You can do
To enable Remote Desktop Connection on a host computer from terminal you should do the following (assumign the host is an Ubuntu):
- Connect to the host with X forwarding,
ssh -Y username@hostwhereusernameandhostare the ones you use to connect to your host. - Enable remote desktop sharing
- set the authentication method to vnc
- Restart lightdm
export DISPLAY=:0
dconf write /org/gnome/desktop/remote-access/enabled true
dconf write /org/gnome/desktop/remote-access/prompt-enabled false
dconf write /org/gnome/desktop/remote-access/authentication-methods "['vnc']"
dconf write /org/gnome/desktop/remote-access/require-encryption false
sudo service lightdm restartAnd then try conecting to it via Remote desktop.
Let me know how it goes and if any problem arises, I can refine the answer to your need.
i found some of these answers overly complicated.
in ubuntu, enable sharing on the network. Settings / Sharing / Screen Sharing
on the mac, use VNC Viewer.
make a connection in VNCViewer from the mac to the ubuntu box.
2