Last active
June 21, 2021 15:54
-
-
Save Kalki5/9f70d13621f6581f0b366ac265e021ff to your computer and use it in GitHub Desktop.
Install VNC server on Ubuntu with GCC, Gedit, Mate terminal and Google Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
adduser hadoop | |
usermod -aG sudo hadoop | |
su - hadoop | |
sudo vim /etc/ssh/sshd_config | |
PasswordAuthentication yes | |
sudo service sshd restart | |
sudo apt update | |
sudo apt install -y --no-install-recommends ubuntu-desktop | |
sudo apt install -y gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal | |
sudo apt install -y vnc4server | |
sudo cp /usr/bin/vncserver /usr/bin/vncserver.bkp | |
sudo vim /usr/bin/vncserver | |
(Find this line) | |
"# exec /etc/X11/xinit/xinitrc\n\n". | |
(And add these lines below.) | |
"gnome-session &\n". | |
"gnome-panel &\n". | |
"gnome-settings-daemon &\n". | |
"metacity &\n". | |
"nautilus &\n". | |
"gnome-terminal &\n". | |
(Ensure current username is hadoop) | |
vncserver | |
sudo vim /etc/systemd/system/[email protected] | |
[Unit] | |
Description=Start VNC service at startup | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
User=hadoop | |
PAMName=login | |
PIDFile=/home/hadoop/.vnc/%H:%i.pid | |
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 | |
ExecStart=/usr/bin/vncserver -depth 24 :%i | |
ExecStop=/usr/bin/vncserver -kill :%i | |
[Install] | |
WantedBy=multi-user.target | |
sudo systemctl daemon-reload | |
sudo systemctl start [email protected] | |
sudo systemctl status [email protected] | |
sudo systemctl enable [email protected] | |
# Install GCC | |
sudo apt-get install gcc | |
# Install Google Chrome | |
sudo vim /etc/apt/sources.list | |
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main | |
wget https://dl.google.com/linux/linux_signing_key.pub | |
sudo apt-key add linux_signing_key.pub | |
rm linux_signing_key.pub | |
sudo apt update | |
sudo apt install -y google-chrome-stable | |
sudo rm /etc/apt/sources.list.d/google-chrome.list | |
# Install gedit | |
sudo apt-get install -y gedit | |
# Install Mate terminal | |
sudo apt-get install mate-terminal | |
#!/bin/bash -x | |
echo -e "\n$(hostname -i) \t $(hostname)\n" >> /etc/hosts | |
ping -c2 $(hostname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment