ash*_*496 3 gnome command-line
我正在研究 gnome-screenshot,并且了解了该工具提供的所有基本命令行选项。但我无法理解 --display 选项。我能理解的是,该选项需要一些价值。但是,我不知道我可以在那里输入什么样的值。
我已经做了很多谷歌搜索,但找不到任何帮助。我使用的是 Ubuntu 16.04,bash shell 版本 4.3.42,gnome-screenshot 版本是 3.18.0
从gnome-screenshot 手册:
--display=DISPLAY
X display to use.
Run Code Online (Sandbox Code Playgroud)
如果您有多个显示器,您可以使用它来告诉程序要截取哪一个,例如
--display=HDMI-0
Run Code Online (Sandbox Code Playgroud)
将使用显示 ID HDMI-0 截取屏幕。
HDMI-0 这里是我的显示器的 ID,找到你的运行
xrandr --query
Run Code Online (Sandbox Code Playgroud)
这是一些示例输出,您可以看到我拥有的三个显示端口,HDMI-0、VGA-0 和 DVI-D-0,以及它们是否已连接。
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
1920x1080 60.05 + 59.94* 50.00 23.97 60.00 50.04
1280x960 37.88
1280x768 17.09
1280x720 60.00 59.94 50.00
720x576 50.00 50.08
720x480 59.94 60.05
640x480 59.94 59.93
DVI-D-0 disconnected (normal left inverted right x axis y axis)
Run Code Online (Sandbox Code Playgroud)