Most of the times after installing ubuntu, we forget to enable Remote Desktop. How ever we have installed ssh in all the ubuntu systems. Is it possible to enable Remote Desktop remotely? It will be helpful for us if it is possible.. I hope someone will write a possible solution, thanks in advance..
Ubuntu – How to enable remote desktop from remote
remote desktop
Related Solutions
You should not need a GUI installed on the server (just the "skeleton" files installed with the package xserver-common
), nor remote desktop, in order to use graphical package management tools. You can instead use ssh -X
to connect to the server and run the application:
ssh -c blowfish -C -X username@hostname
You can leave off the -c blowfish
and or -C
, but if you do, your connection will likely be noticeably slower when running graphical programs. But if you were on a LAN with the machine, then I'd recommend leaving out -C
and keeping -c blowfish
.
(-c blowfish
makes ssh
use the blowfish
cipher, which is as secure as the 128-bit AES cipher which is otherwise the default, but which tends to be computationally faster, decreasing latency. -C
enables compression, if it's available, which increases speed on slow connections--including just about any connection over the Internet--by making it so that there is less data that needs to be transferred. However, -C
is not usually helpful on very fast connections such as when the client and server are on the same local area network, because in that case the increased latency caused by performing the computational operations of data compression and decompression can more than cancel out the benefit of transferring a smaller volume of data. See the descriptions of the -c
and -C
options on the ssh(1) manpage, and Ciphers in the ssh_config(5) manpage, for more details about how to use those flags. And in general, if you are curious about how a command works, you can look at its manual page by issuing the command man command-name
or online.)
Then you can install whatever graphical package management utility you want:
sudo apt-get update; sudo apt-get install software-center
Or: sudo apt-get update; sudo apt-get install synaptic
Or: sudo apt-get update; sudo apt-get install update-manager
(You can, of course, install more than one--after running sudo apt-get update
, run a command like sudo apt-get install update-manager synaptic
.)
Then run whichever utility you want to use, by typing its name (they all have the same executable names as package names...though that is not true for all software in Ubuntu) and pressing enter.
Since you're logged in with ssh -X
, programs that you run on the remote server will display their windows and other graphical user interface element on the local (client) machine.
This will likely work out of the box when connecting from another Unix-like system. However, if the client is Windows, then you'll need to use an SSH client that supports X11 forwarding, and you'll need to have an X11 installed and running on the client machine. You can achieve this pretty easily with Cygwin (see the Cygwin/X User's Guide).
It is possible (and quite easy) to install GUI's on an Ubuntu Server system, though it is considered inadvisable to do so for a production system. You can do this yourself (assuming you have administrative rights on the system, and if you don't, then you cannot perform any package management at all!). See the Server GUI documentation. But please take note of the (good) reasons, explained on that page, for why you probably should not do this.
Using this solution to rdp in my vm's in AWS and GCE clouds.
To remote desktop your Ubuntu machine, Install xrdp and xfce.
sudo apt-get update && sudo apt-get install xrdp && sudo apt-get install xfce4
Configure xrdp:
Create
.xsession
in home directory.echo xfce4-session >~/.xsession
Edit startup file for xrdp (notice that the last line is
startxfce4
)nano /etc/xrdp/startwm.sh
Restart xrdp service
sudo service xrdp restart
Log in:
RDP to your remote machine and enter your Ubuntu credentials. You will be able to log in.
Note:
By default, each time you login with xrdp , it starts a new session.
To resume your previous session that you are already using:
edit
xrdp.ini
file,sudo nano /etc/xrdp/xrdp.ini
Search the
[xrdp]
section for the namesesman-Xvnc
. (In my case it's[xrdp1]
).Change port value to
ask
(default is-1
), then save and exit.Restart xrdp server
sudo service xrdp restart
RDP to your remote machine. You will see a login screen:
Log in with username, password and enter port as -1(for the first immediate session after xrdp restart).
Note port number allocated carefully.
Next time use this port number to login to resume session.
Best Answer
The GNOME VNC-server vino is started from the command line with:
This can also be done remotely in a SSH session.
Settings for vino need to be made on the remote, e.g. by editing
/desktop/gnome/remote_access
with gconftool-2, from the GUI, or by using gconf-editor, or in a GUI withThis can also be done from an X-forwarding enabled SSH session.