Une Distrib Linux Ubuntu Desktop dans le Cloud

Créer un VMs  à partir d’une distribution ubuntu serveur en bureau sur le cloud

sudo -i
apt update && apt-get upgrade -y
reboot now
#OR -> apt install -y xfce4 xfce4-goodies
apt install -y ubuntu-core^ ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal tightvncserver
#OR -> apt install -y ubuntu-core^ ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal vnc4server
#OR -> vncinitconfig -enable-system-xorg
#Or -> nano /etc/gdm3/custom.conf
#Or -> #uncomment
#Or -> WaylandEnable=false
#Or -> wget https://www.realvnc.com/download/file/vnc.files/VNC-Server-6.7.2-Linux-x64.deb
#Or -> dpkg -i VNC-Server-6.7.2-Linux-x64.deb
#Or -> systemctl start vncserver-x11-serviced.service #systemd
#Or -> /etc/init.d/vncserver-x11-serviced start #initd
#Or -> systemctl enable vncserver-x11-serviced.service
#Or -> #ADD lincense
#Or -> sudo vnclicense -add KEY
vncserver
ps -ef | grep Xtightvnc
#Or -> ps -ef | grep Xvnc4
vncserver -kill :X
=====vnc4server+GNOME======
#Or -> cp /home/alexonbstudio/.vnc/xstartup /home/alexonbstudio/.vnc/xstartup.bak
#Or -> nano /home/alexonbstudio/.vnc/xstartup
#Or -> #!/bin/sh
 
#Or -> # Uncomment the following two lines for normal desktop:
#Or -> unset SESSION_MANAGER
#Or -> # exec /etc/X11/xinit/xinitrc
 
#Or -> #[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#Or -> #[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#Or -> #xsetroot -solid grey
#Or -> #vncconfig -iconic &
#Or -> #x-terminal-emulator -geometry 80×24+10+10 -ls -title « $VNCDESKTOP Desktop » &
#Or -> #x-window-manager &
#Or -> nautilus &
#Or -> gnome-panel &
#Or -> gnome-settings-daemon &
#Or -> metacity &
====XFCE=======
#Or -> cp /home/alexonbstudio/.vnc/xstartup /home/alexonbstudio/.vnc/xstartup.bak
#Or -> nano /home/alexonbstudio/.vnc/xstartup
#Or -> #!/bin/sh
#Or -> def
#Or -> export XKL_XMODMAP_DISABLE=1
#Or -> unset SESSION_MANAGER
#Or -> unset DBUS_SESSION_BUS_ADDRESS
#Or -> xrdb $HOME/.Xresources
#Or -> xsetroot -solid grey
#Or -> #startxfce4 &
#Or -> thunar &
#Or -> xfce4-panel &
#Or -> xterm &
============tight+GNOME (testé)==================
cp /home/alexonbstudio/.vnc/xstartup /home/alexonbstudio/.vnc/xstartup.bak
nano /home/alexonbstudio/.vnc/xtartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80×24+10+10 -ls -title « $VNCDESKTOP Desktop » &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
==============================
vncserver
vncserver -geometry 1280×720 -depth 24
ps -ef | grep Xtightvnc
#Or -> ps -ef | grep Xvnc4
crontab -e
@reboot vncserver -geometry 1280×720 -depth 24 :X
nano /etc/systemd/system/vncserverD.service
===================================
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=alexonbstudio
PAMName=login
PIDFile=/home/alexonbstudio/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280×720 :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
========================
sudo systemctl daemon-reload
sudo systemctl enable vncserverD.service
systemctl start vncserverD.service
systemctl stop vncserverD.service
#####PORT
TCP/5901 # tightvnc & vnc4server default
TCP/5900 # realvnc default
TCP/5980 # vnc default
#Test
ssh -L 5901:localhost:5901 -N -f -l alexonbstudio 123.123.123.123
#Replace all username (alexonbstudio) by your own USER
#Replace 123.123.123.123 to your own IP
#Replace :X by your own PID system
Copyright Ⓒ AlexonbStudio

Laisser un commentaire

%d blogueurs aiment cette page :