python - 如何在 GCP -linux 中使用显示设备?

标签 python linux google-cloud-platform display

我正在使用 GCP。启动镜像:c3-deeplearning-tf-1-14-cu100-20191004

Debian GNU/Linux 9.11(延伸)(GNU/Linux 4.9.0-11-amd64 x86_64\n)

错误信息: _tkinter.TclError:没有显示名称,也没有 $DISPLAY 环境变量

我想使用显示设备。

https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display?hl=en

我看到了这个文档。但是,只有窗口服务器解决方案。

我可以获得有关在 linux 服务器中运行 tkinter 的帮助吗?

最佳答案

如果我理解您想要实现的目标,那就是使用远程桌面。为此,您必须遵循以下步骤:

通过 SSH 连接到您的实例

安装 Debian Linux Chrome 远程桌面软件包

wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb

更新包管理器数据:

sudo apt update.

安装包及其依赖项

sudo dpkg --install chrome-remote-desktop_current_amd64.deb
sudo apt install --assume-yes --fix-broken

安装 XCFECinnnamon

使用 Chrome 远程桌面连接到实例 web site

我建议您查看Official Documentation供进一步引用

关于python - 如何在 GCP -linux 中使用显示设备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58396620/

相关文章:

python - Opencv将接触的圈子划分为单个

python - 用于查找值索引的递归和返回

python - 强制转换为 Unicode 的 Django Admin 问题

linux - 如何在我的 Google Cloud Ubuntu 实例上设置我的用户密码?

python - 在删除低方差之前对数据进行归一化,会出错

linux - 通过inode恢复文件

.net - 如何在 Windows 上编写 C# 但在 Linux 上运行?

python - 如何以像素为单位计算 Windows CMD shell 的宽度?

google-cloud-platform - 区域 X 没有足够的资源

node.js - 将 nodejs 应用程序部署到谷歌云平台