GUI on Linux servers(AWS EC2s)
source link: https://towardsdatascience.com/gui-on-linux-servers-aws-ec2s-39ff1d4dda4d?gi=cca915f414f9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Windows users have it easy, they have the RDP. Fret no more, fellow Linux users! Meet VNC, an alternative to the SSH CLI interface to get GUI on Linux servers.
Nov 12 ·2min read
Here is the barebones document I wrote a while back to get a GUI on Linux instances.
how I saw SSH when I was new to CLI.
Log in to the EC2 instance using SSH. The command would be something like this:
ssh -i key server-name
Once logged in, install the necessary dependencies:
sudo apt-get updatesudo apt-get upgradesudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal xfce4 vnc4server
Above steps will take time to finish, let them.
To check if the installation was successful run the following command:
vncserver
If all goes well, you will be able to set a password.
nano ~/.vnc/xstartup
Replace content of this file with this:
#!/bin/sh# Uncomment the following two lines for normal desktop: unset SESSION_MANAGER# exec /etc/X11/xinit/xinitrc unset DBUS_SESSION_BUS_ADDRESS startxfce4 &[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & gnome-panel & gnome-settings-daemon & metacity & nautilus & gnome-terminal &
Logout and the log back in:
ssh -L 5902:localhost:5902 -i key server-name
Run:
vncserver :2 -geometry 1340x750
-geometry is resolution
Install Remmina for your Linux flavour. Fire up Remmina and create a new connection, while keeping the above connection alive. The protocol used will be VNC. Fill the following fields:
Server name: localhost:5902
Password: the one set before
Save and connect. Voila!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK