作者roccqqck (Rochelle)
看板Linux
标题[分享] Chrome远端 ubuntu 设定
时间Tue Nov 6 16:02:22 2018
http://robotslam.blogspot.com/2018/03/ubuntu-chrome-remote-desktop-setting.html
来源是这里
linux照windows mac 方法安装chrome远端
无法像windows mac一定连到本地萤幕桌面
会像xrdp一样 连到一个新的桌面
至於要怎麽设定连到本地桌面
$ sudo apt-get update
$ sudo apt-get upgrade
如要在 Linux 电脑上使用 Chrome,您的系统需符合以下条件:
64 位元 Ubuntu 14.04 以上版本
Debian 8 以上版本
openSUSE 13.3 以上版本
Fedora Linux 24 以上版本
Intel Pentium 4 以上版本处理器 (可支援 SSE2)
安装chrome 浏览器 stable
https://www.google.com/chrome/browser/desktop/index.html
安装 chrome远端app
https://chrome.google.com/webstore/detail/gbchcmhmhahfdphkhkmpfmihenigjmpp
安装 chrome远端主机
https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
停止 Chrome Remote Desktop:
$ /opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
再来这指令很长 是一行喔 Backup the original configuration:
$ sudo cp /opt/google/chrome-remote-desktop/chrome-remote-desktop/opt/google/
chrome-remote-desktop/chrome-remote-desktop.orig
编辑config file (sudo vim, gksudo gedit, nano都可):
$ sudo vim /opt/google/chrome-remote-desktop/chrome-remote-desktop
进去vim编辑後
找到 DEFAULT_SIZES 改参数
DEFAULT_SIZES = "1920x1080"
找到FIRST_X_DISPLAY_NUMBER 改参数
FIRST_X_DISPLAY_NUMBER = 0
找到这函数 用#注解下面两行
def get_unused_display_number():
"""Return a candidate display numbre for which ther is currently no
X server lock file"""
display = FIRST_X_DISPLAY_NUMBER
# while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
return display
找到这个函数 用#注解某两行 再加display跟self.child两行
def launch_session(self, x_args):
self._init_child_env()
self._setup_pulseaudio()
self._setup_gnubby()
# self._launch_x_server(x_args)
# self._launch_x_session()
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display
储存vim 或 nano
下指令
$ /opt/google/chrome-remote-desktop/chrome-remote-desktop --start
这样你chrome远端 就跟一般windows mac一样了
如何想要重开机也可以远端
要去设定 user account 开启auto login
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自:
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1541491345.A.DE8.html
※ 编辑: roccqqck (223.136.78.222), 11/07/2018 00:41:12
1F:推 Meshif: 前一阵子试很久 11/09 14:35
2F:→ roccqqck: ubuntu16.04.5 我测试要software更新 apt upgrade後才可 11/09 17:15
3F:→ roccqqck: 我也不知为何 11/09 17:21
4F:推 HMKRL: 18.04装了这个gnome-terminal就打不开了 继续teamviewer 11/11 18:07
5F:→ roccqqck: 市唷?可能我是重新安装18.04.1最新版本测试 11/12 19:01
6F:推 MATAO: 16.04 LTS可依教学正常使用 感谢大大分享 04/06 20:08
7F:推 terryc: 後来因故升级chrome_remote_desktop至134.0.x.x 修改的 02/25 15:11
8F:→ terryc: 地方只有def launch_session()不同 02/25 15:12
9F:→ terryc: 在logging.info("Setting...")底下 02/25 15:15
10F:→ terryc: 新增 self._init_child_env() 02/25 15:16
11F:→ terryc: 在 self._setup_gnubby() 下新增文章中的 02/25 15:17
12F:→ terryc: display = self.get_unused_display_number() 02/25 15:17
13F:→ terryc: self.child_env["DISPLAY"] = ":%d" % display 02/25 15:17
14F:→ terryc: 注解掉 #self._launch_server() 02/25 15:18
15F:→ terryc: #if not self._launch_pre_session(): 02/25 15:18
16F:→ terryc: # self.launch_desktop_session() 02/25 15:18
17F:→ terryc: 配合文章中其他的修改即可正常使用ubuntu 20.04 02/25 15:19