今天,我们来介绍一下我自己写的一个一键shell脚本。使用此脚本,您可以在您的Linux服务器上一键搭建一个可以随时随地用浏览器访问的Linux桌面环境,让您便捷地管理服务器。
本文及脚本程序作者为香菇肥牛,原文链接为https://qing.su/article/oneclick-desktop.html, 转载需注明原文链接。谢谢!
Github项目地址https://github.com/Har-Kuun/OneClickDesktop/ 欢迎大家星星叉叉
1, 脚本特色
- 从源码编译安装Guacamole服务器
- 配置Guacamole Web APP
- 安装Tomcat 9, XRDP/TigerVNC, XFCE4桌面环境,火狐浏览器
- 一键安装配置Let’s Encrypt安全证书,开启OCSP装订
- 安装Nginx反代Tomcat
- 安装完毕后,您可以使用任意浏览器访问远程桌面,无需再使用VNC/RDP客户端
2, 安装系统需求
目前,本程序仅支持在Ubuntu 18.04/20.04 LTS以及Debian 10的64位操作系统上运行。您的服务器或者VPS最好是全新安装的系统,不带LAMP/LEMP等组件或cPanel/DirectAdmin/宝塔等用户面板。
本程序支持Ubuntu 18.04/20.04 LTS, Debian 10, 以及CentOS 7/8 64位操作系统上运行。您的服务器或者VPS最好是全新安装的系统。如果您想要和宝塔或者其他面板共存,那么安装时请选择不安装Nginx反代,然后用您的面板来对服务器的http://IP_addr:8080/guacamole这个地址反代。
您的服务器需要有外网IP地址。在安装之前,您需要解析一个域名(可以用三级域名或者一个免费域名)到您的服务器上。如果您使用Debian或者Ubuntu系统,安装桌面环境需要至少1 GB的内存,推荐1.5 GB内存或以上。如果您使用CentOS系统,安装桌面环境需要至少1.5 GB内存,推荐2 GB内存或以上。
3, 安装教程
您可以使用sudo权限用户或root用户(不建议)登录服务器SSH,然后执行下面的命令即可。
英文版:
1 | wget https://raw.githubusercontent.com/Har-Kuun/OneClickDesktop/master/OneClickDesktop.sh && sudo bash OneClickDesktop.sh |
中文版:
1 | wget https://raw.githubusercontent.com/Har-Kuun/OneClickDesktop/master/OneClickDesktop_zh-CN.sh && sudo bash OneClickDesktop_zh-CN.sh |
程序将自动安装需要的各部分组件,并引导您选择RDP/VNC方式,设置用户名,密码以及域名。
如果安装过程中有报错,您可以检查同目录下的OneClickDesktop.log日志文件。同时建议您在这里留言汇报一下错误信息,或者在Github上提交issue, 这样我就可以即时更新脚本,修复问题。
4, 安装示例
安装好后,我们可以可以直接从浏览器里访问服务器上搭建的桌面程序,如下图。
综上,使用OneClickDesktop一键脚本,您可以自由方便地在Linux服务器上搭建随时随地用浏览器即可访问的桌面环境,让您便捷地管理您的Linux服务器,无需再使用繁琐的命令行。如果您喜欢此脚本,欢迎给Github项目https://github.com/Har-Kuun/OneClickDesktop/加星星加叉叉,或者把本文分享给朋友们。如果您有任何疑问,也欢迎在这里留言。
本文及脚本程序作者为香菇肥牛,原文链接为https://qing.su/article/oneclick-desktop.html, 转载需注明原文链接。谢谢!
注1:添加中文支持
1, 重新配置系统locales
1 | sudo dpkg-reconfigure locales |
2, 安装亚洲语言包
1 2 | sudo apt-get install language-pack-ja language-pack-zh* language-pack-ko sudo apt-get install japan* chinese* korean* |
3, 安装亚洲语言字体
1 | sudo apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core |
是否支持arm设备,比如树莓派
在Github上回你了哈,理论上是可以的,但是我手头没有ARM设备用来测试,可能有些依赖环境需要更改。
膜拜大佬,
大佬上一个赞助收款码!
哈哈,目前暂时用爱发电就好,感谢大佬支持!
mjj, 流畅吗,怕动画片。
目前rdp才能用, vnc很慢
看网络环境吧,我这里用延迟100ms的小鸡反正是不卡…
firefox 打开不支持显示中文
正在研究怎么解决~
大佬你怎么什么都会
没事儿就折腾折腾,感谢支持~
最后面SSL证书安装失败,打开链接变成nginx默认页面
可以使用IP地址:8080/guacamole的方式访问页面。
方便的话可以把日志文件发送给我,帮你看一下。一般情况下,SSL证书安装失败都是因为解析没生效。
为什么我安装出现 erro错误,悲催!
可以加我QQ 694082200, 然后把下载安装脚本同目录下的OneClickDesktop.log文件发给我,我可以帮你看下哪里出问题了
安装好的guacamole,除了能通过浏览器访问这台机器的图形化界面。
应该也可以配置去访问其他远程Windows系统吧?
因为guacamole本身就是有这个功能的。
可以的,需要修改/etc/guacamole/user-mapping.xml这个文件哈
安装好了guacamole之后,电脑访问鼠标无法移动,一直在左上角,但是手机访问却可以移动,求解
额,没有遇到过这样的问题,电脑换个浏览器试试?
已经好了,确定是反代配置的问题和chrome的问题,没有证书chrome判定为不安全网页,屏蔽部分权限,需要在chrome://flags/#unsafely-treat-insecure-origin-as-secure里面添加访问域名强制解禁权限,或者通过ip地址直接访问一切正常,毕竟我反代只写了一行
原来是这样~!
Screen Size 默认 1280px X 800px
貌似没有我的 1366px X 768px 大
左右两边都有黑框
在那修改 让它 显示和我的一样大 ?
这个是在/etc/systemd/system/vncserver@.service这个文件里面设置的哈。修改之后,执行
2
systemctl restart vncserver@1.service
Debian10安装不能选择语言 有乱码,怎么调成中文
2
dpkg-reconfigure locales
请问:
怎么把8080端口改成别的.
….
还有bt怎么反代8080/guacamole
编辑文件/etc/tomcat9/server.xml, 可以把8080改成别的端口,然后
我没用过宝塔,你可以去他们官方论坛里面问一下
There is evidently a bundle to realize about this. I consider you made some good points in features also. Natka Tristan Johm
Way cool! Some extremely valid points! I appreciate you penning this post plus the rest of the website is very good. Robby Humfrey Motch
Permainan bandarq juga memiliki daya tarik tersendiri. Shirlene Orland Pirozzo
Superb, what a website it is! This website presents valuable facts to us, keep it up. Sybyl Yance Pernick
Oto swoje sprawdzone sposoby na podrywanie dziewczyn. Kamilah Fran Kuska
Curabitur ut sem finibus sapien consectetur scelerisque sit amet ut enim. Duis eget pulvinar tortor. Vestibulum id purus risus. Ebonee Alister Cown
Great line up. We will be linking to this great article on our site. Keep up the good writing. Bell Benn Shank
Awesome article. Really looking forward to read more. Cool. Karrie Erhard Ruddy
Ahaa, its nicepleasantgoodfastidious discussionconversationdialogue regardingconcerningabouton the topic of this articlepostpiece of writingparagraph hereat this place at this blogweblogwebpagewebsiteweb site, I have read all that, so nowat this time me also commenting hereat this place. Marita Dallon Isma
Hi there! I just wish to offer you a big thumbs up for your great info you have got here on this post. I will be coming back to your site for more soon. Ailey Shaine Slosberg
Why visitors still make use of to read news papers when in this technological globe the whole thing is accessible on net? Verene Lewes Rahm
This is one awesome blog post. Much thanks again. Great. Valaria Barrett Beach
The two countries should work together to promote free trade and facilitate investment, continue to enhance communication on major global issues, help push reform of the World Trade Organization, fight climate change, safeguard global governance as well as jointly uphold multilateralism, men said. Myranda Herc Cynera
Beautiful lines sweeter than honey. Gud luck write some more kavithai. Appolonia Tate O’Dell
I have been surfing online more than three hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.| Quinn Allin Mariellen
Necessity knows no law.