Skip to content

A one-click script that installs a remote desktop environment on a Linux server with browser/RDP/VNC access.

Notifications You must be signed in to change notification settings

Soul566345/OneClickDesktop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OneClickDesktop 一个一键脚本,可以在 Linux 服务器上安装远程桌面环境,支持浏览器/VNC/RDP 访问。

该脚本的特点 从源代码构建 Guacamole Server。 设置 Guacamole Web APP。 安装 Tomcat 9、XRDP(或 TigerVNC)、XFCE4 桌面、Firefox。 一键免费 SSL 证书来自 Let's Encrypt 您可以通过浏览器访问远程桌面,无需 RDP 或 VNC 软件。 系统要求 一台新安装的服务器,运行 Ubuntu 18.04/20.04 LTS 64 位、Debian 10 64 位或 CentOS 7/8 64 位系统。 请勿安装任何网页服务器程序(例如,Apache、Nginx、LiteSpeed、Caddy)。请勿安装 LAMP 或 LEMP 堆栈。请勿安装任何管理面板(例如,cPanel、DirectAdmin、BTcn、VestaCP)。它们与此脚本不兼容。 1 IPv4 对于 Debian/Ubuntu 用户,至少需要 1.0 GB 的 RAM;推荐 1.5 GB 或更多。 对于 CentOS 用户,至少需要 1.5 GB 的 RAM;推荐使用 2.0 GB 或更高。 根访问或 sudo 用户 如何使用 首先,您需要找到一个至少有 1 个 IPv4 的备用 VPS,并安装 Ubuntu 18.04/20.04 LTS 64 位(推荐)、Debian 10 64 位或 CentOS 7/8 64 位操作系统。 您需要一个域名(可以是子域名),指向您服务器的 IP 地址。 然后,请在 SSH 中以 sudo 用户身份运行以下命令。

  • 中文报错
wget https://raw.githubusercontent.com/Soul566345/OneClickDesktop/master/OneClickDesktop_zh-CN.sh && sudo bash OneClickDesktop_zh-CN.sh

英文不报错

wget https://raw.githubusercontent.com/Soul566345/OneClickDesktop/master/OneClickDesktop.sh && sudo bash OneClickDesktop.sh
  • The script will guide you through the installation process.
  • If you encounter any errors, please check the OneClickDesktop.log file that's located within the same directory where you download this script.
  • Please consider reporting the error log at https://github.com/Har-Kuun/OneClickDesktop/issues so that I can fix any underlying issues.
  • Copy/paste between client and server should have been enabled by default. If you have any problems with copy/paste when using VNC method, please try to run the EnableCopyPaste.sh file on your Desktop.

Plugins

There is a few plugin scripts/addons available.

Please submit an issue if you want more plugins to be written.

Contact me

You can open an issue here if there is any problem/bug when you use it, or would like a new feature to be implemented. For faster response, you can leave a message on this project webpage https://qing.su/article/oneclick-desktop.html

中文支持请访问 https://qing.su/article/oneclick-desktop.html

Thank you!

Frequently Asked Questions (FAQ)

General

  1. Q: Should I choose RDP or VNC?
  • A: I'd always choose RDP. It performs better than VNC by all means.
  1. Q: Which OS should I use?
  • A: This script supports Ubuntu 18/20, Debian 10, and CentOS 7/8. OS choice mainly comes down to personal preferences. There are a couple points that I'd love to note here. If you choose Debian 10, LibreOffice will be installed out-of-the-box after running this script. If you choose CentOS 7/8, the script will install GNOME instead of XFCE4 desktop environment (hence the extra 0.5 GB RAM consumption); GNOME is fancier than XFCE4, but renders a bit slower. Also note that for CentOS 7/8, a lot of packages will be downloaded from third-party repositories (rpmfusion, rpmfind, etc.), or cloned from Github; if that is an issue to you, please use Debian or Ubuntu instead.
  1. Q: Should I use my root user or a non-root user to use my desktop?
  • A: For RDP, you should always use a non-root user, unless you wish to install some certain software on your desktop. To create a non-root user, simply run adduser USERNAME in your terminal or SSH. For VNC, there is no option to select an user unless you modify the script itself, so you don't have to worry about this.
  1. Q: Should I choose to set up Nginx reverse proxy and Let's Encrypt SSL?
  • A: Unless you are installing your desktop environment alongside a production environment (which is highly discouraged), you should always choose to set up Nginx reverse proxy and Let's Encrypt SSL. Please note that unless you enable SSL for your desktop access, your browser probably won't let you copy-paste between the remote desktop and your local computer. If you are installing this desktop environment alongside a production environment, you should set up your current webserver software (Apache, Nginx, Litespeed, Caddy, etc.) as a reverse proxy of http://127.0.0.1:8080/guacamole and set up SSL for it.
  1. Q: Are there any security measures that can be taken to make this desktop environment safer?
  • A: Yes. First of all, RDP is safer than VNC in this special case, so I would always choose RDP if possible. Secondly, I will set up firewall rules to only allow traffic through port 80 and 443, unless you need to connect to your desktop using other VNC/RDP client software other than your browser, and if that's the case, please change the default port (3389 for RDP and 5901 for VNC) to something else.

Installation

  1. Q: My installation failed; why?
  • A: I am not able to anwser this question unless you provide more details. Please check the OneClickDesktop.log file which is located in the same folder where you run this script, and check for any errors. Please then check the following questions for an anwser or report these errors/logs by opening an Iuuse in this repository, and I can then respond accordingly.
  1. Q: My Nginx installation failed, why?
  • A: This is most likely due to you have another webserver installed and running (for example, Apache2). You need to uninstall all other webserver programs before running this script, or skip the Nginx reverse proxy part of the installation and set up reverse proxy manually after the installation.
  1. Q: My Let's Encrypt SSL installation failed, why?
  • A: One possibility is that you did not enter a valid e-mail address when you asked you to; but most likely, this problem is because the domain name you are using is not (yet) pointing to the IP address of your server. Note that it may take up to 48 hours for DNS changes to propagate throughout the world. If you are using Cloudflare DNS, you will need to use the "DNS Only" mode in order to provision a Let's Encrypt SSL; you can otherwise use the free SSL from Cloudflare, and skip the SSL step here instead. A very rare case is that if you have provisioned too many Let's Encrypt SSL certificates recently for this domain name, the Let's Encrypt SSL installation may also fail; in this case, please use another domain instead, or wait a couple of days.
  1. Q: My Tomcat server fails to start, why?
  • A: This usually happens on CentOS when Selinux is enabled. Selinux might prohibit Tomcat from running. If this happens, you should consider disabling Selinux or changing its rules, then start Tomcat9 server manually by running service tomcat9 start.
  1. Q: The script tells me that I am missing dependencies. Shouldn't dependencies be handled already in the script?
  • A: This happens frequently to Chinese users who use Aliyun mirrors. Aliyun mirrors have some sort of disgusting rate limitations, which might leads to incomplete installation of dependencies through apt/yum/dnf. Please change your mirror source to another source, then run this script again. If you are not using Aliyun mirror and still saw the missing dependencies notice, please report it by rasing an issue here so that I can fix it.
  1. Q: The script got killed during compilation; what happened?
  • A: This is very unusual, but may happen if your server does not have enough RAM; please add some SWAP and run the script again.

Post-Installation

  1. Q: Can I change my Guacamole username and password?
  1. Q: My desktop is laggy; can I improve the user experience?
  • A: Yes, to some extent. Firstly, if you are still using VNC, I'd recommend you reinstall your server and run the script again using the RDP mode; it makes your life easier. Secondly, if you are using CentOS, switching to Ubuntu or Debian might help, because the desktop of CentOS is fancier and renders slower. Thirdly, you can decrease the screen resolution by editting /etc/guacamole/user-mapping.xml file. Of course, if you are able to use a server that's nearer to you physically, that will help a lot.
  1. Q: I cannot copy-paste between my server's desktop and my own computer, why?
  • A: As mentioned before, you have to set up SSL for your Guacamole; otherwise your browser will not allow you to copy-paste between the two servers.
  1. Q: I cannot hear anything when I use my server desktop to watch videos, why?
  1. Q: Can I install Software XXX/YYY/ZZZ on this desktop?
  • A: Most likely, yes. If you are using CentOS, there is an APP store on your desktop, and you can search for the software you want; if you are using Debian/Ubuntu, you can simply google "How to install XXX on ubuntu 20" and you can usually find a dozen tutorials.
  1. Q: Is there a clean way to uninstall everything installed by this script?
  • A: Not at this moment. I'd recommend a reinstallation of your server. I might write an uninstallation script in the future though.

References

Update log

Current version: v0.1.0

Date Version Changes
08/02/2020 v0.0.1 Script created
08/03/2020 v0.0.2 Enable copy/paste; add Asian characters support.
09/25/2020 v0.1.0 Add RDP feature; improve installation experience.
09/29/2020 v0.2.0 Add CentOS 7/8 support.

About

A one-click script that installs a remote desktop environment on a Linux server with browser/RDP/VNC access.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%