学习资料
FROM 192.168.3.60:5001/debian-xfce-vnc:latest
COPY . /opt
USER root
RUN dpkg -i /opt/baidunetdisk_4.17.7_amd64.deb
# docker build -t 192.168.3.60:5001/debian-xfce-vnc:latest .
TightVNC , TigerVNC 和 x11vnc
apt-get install tigervnc-standalone-server
1587 ls
1588 apt-get install xterm
1589 ls
1590 vncserver -list
1591 vncserver -localhost no -xstartup /usr/bin/xterm
1592 apt-get install firefox
1593 ls
1594 vim /etc/default/locale
1595 ls
1596 vncserver -kill :1
1597 vncserver -localhost no -xstartup /usr/bin/xterm
1598 vncserver -kill :1
1599 vncserver -localhost no -xstartup /usr/bin/xterm
1600 sudo apt-get install ttf-wqy-microhei
How to Install and Configure VNC on Ubuntu 22.04
vncconfig -nowin&
2.安装fluxbox
yum install -y fluxbox yum groupinstall -y "x window system"
3.安装vnc
yum install -y vnc-server
4.设置vnc密码
vncpasswd
5.配置vnc
vi /root/.vnc/xstartup
将内容改为:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ]
exec /etc/vnc/xstartup [ -r $HOME/.Xresources ]
xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #twm & #gnome-session & exec /usr/bin/fluxbox
6.给xstartup加上权限
chmod +x ~/.vnc/xstartup
7.设置vncserver开机启动
chkconfig vncserver on
8.配置完之后,再重启一下vncserver:
service vncserver restart
9.启动vncserver
vncserver
至此,fluxbox已经安装完毕了~~~
<https://www.cyberciti.biz/faq/install-and-configure-tigervnc-server-on-ubuntu-18-04/ >
<https://help.ubuntu.com/community/ServerGUI >
<https://zvv.me/z/627.html >
<https://askubuntu.com/questions/1209147/tigervncviewer-unable-to-connect-to-socket-connection-refused-10061 >
<https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04 >
<https://blog.csdn.net/qq_43543789/article/details/104211359 >
tigervncserver -xstartup /usr/bin/xterm
vncserver -xstartup /usr/bin/xterm
yum install xorg-x11-server-Xorg
This guide discusses the use of a Graphical User Interface (GUI) and/or desktop environment on Ubuntu servers. Conventional wisdom states that in most cases it is better to not install a GUI on a production server. Several preferable user interface alternatives for managing servers are presented.
Most Ubuntu Server developers recommend not installing a GUI on a server. There are multiple reasons for not installing a GUI.
Some reasons to not install a GUI include:
You'll have more code subject to security vulnerabilities, more packages that need updating, and more server downtime.
Performance may suffer because resources (memory, hard disk space, CPU, etc.) will be consumed by the GUI.
It is best practice to only install needed software on a production server.
The GUI may include other network services that are inappropriate for a server.
One of the goals of Ubuntu Desktop Edition is to make it easier for users to use Linux. When installing some desktop environments, services that you may not specifically want will be installed. For example avahi-daemon, which is used to help configure networking, adds another open port and may introduce unwanted DNS conflicts with a .local domain.
If you're using an Ubuntu LTS release prior to 12.04 LTS, X11 and desktop packages are not supported for the full 5 year lifecycle of the LTS server release.
So for the most secure server it is best to not install a GUI.
But there are many good alternatives for effective server management.
Note that Ubuntu server's command line interface comes with a powerful window manager: the Byobu package which makes it easy to manage multiple terminal sessions. Byobu adds support for status bars, clocks, notifiers (reboot-required, updates-available) etc. The screen program underneath byobu has been in all versions of Ubuntu. Tmux is a nice replacement for screen, and is now used by default in byobu. Screen-profiles (the previous name for byobu) is in Jaunty by default, though the binary package will install and work in Hardy and Intrepid as well.
Juju, Puppet, Chef, Landscape, Cassandra, Fabric, and a host of other remote configuration and management tools are very helpful for servers and can automate lots of tasks.
Instead of installing a full GUI on an Ubuntu server, you might consider using a web based administration package such as Zentyal (formerly named eBox), ISPConfig or Webmin (although not supported any more, see why webmin is not supported).
You may find it preferable to only run specific X11 clients on the server, and forward the X11 connections over ssh to display them on your desktop of choice. This way you avoid the need for an X11 server or desktop environment on the server itself. But note on the other hand that this opens up different vulnerabilities if the remote desktop can be compromised.
To do this, install the xauth pachage, then simply install the applications you need, and apt-get will bring in other packages as needed to satisfy the dependencies.
sudo apt-get install xauth
If you want an X11-server-based GUI there are several light weight desktop environments that may work better than a standard Gnome or KDE environment.
sudo apt-get install xorg
Next install a Window Manager:
sudo apt-get install openbox
Note: you can replace openbox with fluxbox, blackbox, etc.
To install the Gnome desktop on Ubuntu server Edition enter:
For Ubuntu 9.10 (Karmic Koala) and newer:
sudo apt-get install ubuntu-desktop
For Ubuntu 6.06 (Dapper Drake) and Ubuntu 8.04 (Hardy Heron):
sudo apt-get install gnome-desktop-environment
For KDE change gnome-desktop-environment to kubuntu-desktop.
For XFCE enter xubuntu-desktop.
The end result will be very very similar to what you would get if you installed from the ubuntu, kubuntu or xubuntu CD and added server-related packages to it. But the kernel on the server CD is tuned better for the workloads you get when running as a server, e.g. by using the "Deadline" scheduler and less frequent clock interrupts.
Alternative:
If the above is giving you trouble, try the tasksel way.
(Warning: the following can remove packages that have been manually installed via apt-get.)
sudo tasksel
Then choose which package (e.g. Ubuntu Desktop) to install. Downloading the package will take a while (no progress bar for the download portion) so be patient.