参考上面两个博客,找到电脑屏幕和拓展屏幕代号,用xrandr(查看显示屏设置)
yeqiuyi@yeqiuyi-hp:~$ xrandr
运行结果:
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 294mm x 165mm
1920x1080 60.01*+ 59.97 59.96 59.93 40.00
1680x1050 59.95 59.88
...
320x180 59.84 59.32
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 195mm
1920x1080 60.00 + 60.00* 50.00 59.94 30.00 25.00 24.00 29.97 23.98
...
720x400 70.08
所以我的电脑屏幕是eDP-1,拓展屏幕是DP-2
yeqiuyi@yeqiuyi-hp:~$ xrandr--output eDP-1--top-of DP-2--auto
运行结果:
xrandr: unrecognized option '--top-of'
Try 'xrandr --help' for more information.
看来用top不行!查看xrandr的帮助信息:
yeqiuyi@yeqiuyi-hp:~$ xrandr --help
运行结果:
usage: xrandr [options]
where options are:
--display <display> or -d <display>
--help
-o <normal,inverted,left,right,0,1,2,3>
or --orientation <normal,inverted,left,right,0,1,2,3>
-q or --query
-s <size>/<width>x<height> or --size <size>/<width>x<height>
-r <rate> or --rate <rate> or --refresh <rate>
-v or --version
-x (reflect in x)
-y (reflect in y)
--screen <screen>
--verbose
--current
--dryrun
--nograb
--prop or --properties
--fb <width>x<height>
--fbmm <width>x<height>
--dpi <dpi>/<output>
--output <output>
--auto
--mode <mode>
--preferred
--pos <x>x<y>
--rate <rate> or --refresh <rate>
--reflect normal,x,y,xy
--rotate normal,inverted,left,right
--left-of <output>
--right-of <output>
--above <output>
--below <output>
--same-as <output>
--set <property> <value>
--scale <x>x<y>
--scale-from <w>x<h>
--transform <a>,<b>,<c>,<d>,<e>,<f>,<g>,<h>,<i>
--off
--crtc <crtc>
--panning <w>x<h>[+<x>+<y>[/<track:w>x<h>+<x>+<y>[/<border:l>/<t>/<r>/<b>]]]
--gamma <r>:<g>:<b>
--brightness <value>
--primary
--noprimary
--newmode <name> <clock MHz>
<hdisp> <hsync-start> <hsync-end> <htotal>
<vdisp> <vsync-start> <vsync-end> <vtotal>
[flags...]
Valid flags: +HSync -HSync +VSync -VSync
+CSync -CSync CSync Interlace DoubleScan
--rmmode <name>
--addmode <output> <name>
--delmode <output> <name>
--listproviders
--setprovideroutputsource <prov-xid> <source-xid>
--setprovideroffloadsink <prov-xid> <sink-xid>
--listmonitors
--listactivemonitors
--setmonitor <name> {auto|<w>/<mmw>x<h>/<mmh>+<x>+<y>} {none|<output>,<output>,...}
--delmonitor <name>
原来是用below,成了。
yeqiuyi@yeqiuyi-hp:~$ xrandr--output eDP-1--below DP-2--auto