当前位置: 首页 > news >正文

万维网站域名新华传媒b2b商务平台

万维网站域名,新华传媒b2b商务平台,做六个网站静态页多少钱,位置图片在线制作X11相关参数设置 X11环境变量DISPLAY用来设置将图形显示到何处。变量格式 Xlib: connection to ":0.0" refused by server开关闭屏幕显示连接实际屏幕确认实际屏幕的name of display 也就是DISPLAY的值是多少设置旋转 触摸屏重定向0、触摸屏重定向1、安装屏幕校准器2…

X11相关参数设置

  • X11
    • 环境变量`DISPLAY`用来设置将图形显示到何处。
    • 变量格式
  • Xlib: connection to ":0.0" refused by server
  • 开关闭屏幕显示
  • 连接实际屏幕
    • 确认实际屏幕的name of display 也就是DISPLAY的值是多少
    • 设置旋转
  • 触摸屏重定向
    • 0、触摸屏重定向
    • 1、安装屏幕校准器
    • 2、查看屏幕分辨率
    • 3、手动设置校准窗口的大小(有多个显示器而只有一个触摸屏时用的,用于设置只指定窗口)
    • 4、按提示说明 拷贝校正信息到下面的文件中
    • 5、完成。
    • 1、查看 xinput_calibrator 使用方法
    • 2、查看输入设备
    • 3、查看输出设备

X11

环境变量DISPLAY用来设置将图形显示到何处。

直接登陆图形界面或者登陆命令行界面后使用startx启动图形, DISPLAY环境变量将自动设置为:0:0

变量格式

DISPLAY 环境变量格式如下host:NumA.NumB,

  • host指Xserver所在的主机主机名或者ip地址, 图形将显示在这一机器上, 可以是启动了图形界面的Linux/Unix机器, 也可以是安装了Exceed, X-Deep/32等Windows平台运行的Xserver的Windows机器. 如果Host为空, 则表示Xserver运行于本机, 并且图形程序(Xclient)使用unix socket方式连接到Xserver, 而不是TCP方式. 使用TCP方式连接时, NumA为连接的端口减去6000的值, 如果NumA为0, 则表示连接到6000端口; 使用unix socket方式连接时则表示连接的unix socket的路径, 如果为0, 则表示连接到/tmp/.X11-unix/X0 . NumB则几乎总是0

Xlib: connection to “:0.0” refused by server

Xlib: No protocol specifiedr
Error: Can’t open display: :0.0

这是因为Xserver默认情况下不允许别的用户的图形程序的图形显示在当前屏幕上. 如果需要别的用户的图形显示在当前屏幕上, 则应以当前登陆的用户, 也就是切换身份前的用户执行如下命令

xhost +

实例

#切换用户前是root用户在使用图形程序
su - rootxhost +su - oracleroot与oracle用户的DISPLAY都为:0.0

xhost 是用来控制X server访问权限的。
通常当你从hostA登陆到hostB上运行hostB上的应用程序时,做为登录与被登录来说,hostA是client,但是对图形来说,是在hostA上显示的,需要使用hostA的Xserver,所以hostA是server

因此在登陆到hostB前,需要在hostA上运行xhost +来使其它用户能够访问hostA的Xserver。

开关闭屏幕显示

#ubuntu16.04关掉图形界面启动,命令:
systemctl disable lightdm.service#开启图形界面命令:
ln -s /lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service

重置

sudo dpkg-reconfigure lightdm

其他

关闭图形界面:
1.不可恢复:
sudo systemctl disable lightdm.service
2.可恢复:
sudo systemctl set-default multi-user.target打开图形界面,分别针对上述1和2
1
sudo apt-get install --reinstall lightdm
2
sudo systemctl set-default graphical.target

连接实际屏幕

确认实际屏幕的name of display 也就是DISPLAY的值是多少

要求在实际显示屏幕上运行

xdpyinfo |grep name

在这里插入图片描述
不同的登录会造成不同结果,切记!一定要登录在实际屏幕上运行

xhost +
#运行结果:access control disabled, clients can connect from any host

那么实际屏幕可以被其他登录端使用,比如ssh端登录
运行xdpyinfo |grep name结果为:
在这里插入图片描述
那么运行打开带ui的界面程序,不会显示到实际屏幕,如需映射到实际屏幕需执行以下指令:

#实际屏幕端,允许任意连接 或者加号后面带ip地址指定ip可以连接
xhost +
#ssh端设置DISPLAY,指定图形连接到localhost:0.0这里也就是我们在实际屏幕端查到的信息
export DISPLAY=:0.0
#以上没有错误,再ssh端,运行需要的程序即可显示到实际屏幕端
xxx

设置旋转

xrandr -o left 向左旋转90度
xrandr -o right 向右旋转90度
xrandr -o inverted 上下翻转
xrandr -o normal 回到正常角度
#通过xrandr读取显示屏id 为DSI-1,指定他旋转
xrandr --output DSI-1 --rotate left

触摸屏重定向

ubuntu多显示器单触摸屏校准

0、触摸屏重定向

sudo xinput map-to-output 13 DP1  #将触摸屏映射到指定的显示器
  • 13为触摸屏设备id,可通过xinput命令查看ILITEK ILITEK-TP id=13 [slave pointer (2)]

  • DP1为指定的显示设备名,可通过xrandr命令查看

1、安装屏幕校准器

sudo apt-get install xinput-calibrator

2、查看屏幕分辨率

在System settings --> Display 查看屏幕分辨率

3、手动设置校准窗口的大小(有多个显示器而只有一个触摸屏时用的,用于设置只指定窗口)

我的电脑有两个显示器,一个1920x1080, 一个1024x768,我只校准左边的显示器,如

Usage:xinput_calibrator --geometry x
–geometry: manually provide the geometry (width and height) for the calibration window

sudo xinput_calibrator --geometry 1920x1080
#注意:1920x1080 此处是字母x 

Warning: multiple calibratable devices found, calibrating last one (ILITEK ILITEK-TP)
use --device to select another one.
Setting calibration data: 0, 16384, 0, 9600
Calibrating EVDEV driver for “ILITEK ILITEK-TP” id=14
current calibration values (from XInput): min_x=0, max_x=16384 and min_y=0, max_y=9600

Doing dynamic recalibration:
Setting calibration data: 82, 32942, 155, 9796
–> Making the calibration permanent <–
copy the snippet below into ‘/etc/X11/xorg.conf.d/99-calibration.conf’ (/usr/share/X11/xorg.conf.d/ in some distro’s)
Section “InputClass”
Identifier “calibration”
MatchProduct “ILITEK ILITEK-TP”
Option “Calibration” “82 32942 155 9796”
Option “SwapAxes” “0”
EndSection

我的电脑是在/usr/share/X11/xorg.conf.d/目录下

4、按提示说明 拷贝校正信息到下面的文件中

sudo gedit /usr/share/X11/xorg.conf.d/99-calibration.conf

将下面的内容拷贝进去

Section “InputClass”
Identifier “calibration”
MatchProduct “ILITEK ILITEK-TP”
Option “Calibration” “82 32942 155 9796”
Option “SwapAxes” “0”
EndSection

5、完成。

1、查看 xinput_calibrator 使用方法

xinput_calibrator -h

xinput_calibrator, v0.7.5

Usage: xinput_calibrator [-h|–help] [-v|–verbose] [–list] [–device ] [–precalib ] [–misclick ] [–output-type <auto|xorg.conf.d|hal|xinput>] [–fake] [–geometry x] [–no-timeout]
-h, --help: print this help message
-v, --verbose: print debug messages during the process
–list: list calibratable input devices and quit
–device <device name or XID or sysfs event name (e.g event5)>: select a specific device to calibrate
–precalib: manually provide the current calibration setting (eg. the values in xorg.conf)
–misclick: set the misclick threshold (0=off, default: 15 pixels)
–output-type <auto|xorg.conf.d|hal|xinput>: type of config to output (auto=automatically detect, default: auto)
–fake: emulate a fake device (for testing purposes)
–geometry: manually provide the geometry (width and height) for the calibration window
–no-timeout: turns off the timeout
–output-filename: write calibration data to file (USB: override default /etc/modprobe.conf.local

2、查看输入设备

xinput

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎜ ↳ ILITEK ILITEK-TP id=13 [slave pointer (2)]
⎜ ↳ ILITEK ILITEK-TP id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Logitech USB Receiver id=10 [slave keyboard (3)]
↳ USB2.0 Camera
id=12 [slave keyboard (3)]

3、查看输出设备

xrandr

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.0*+
1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.0
1280x720 60.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
实例参考


文章转载自:
http://lollygag.c7498.cn
http://airhop.c7498.cn
http://scandisk.c7498.cn
http://southeastern.c7498.cn
http://nigger.c7498.cn
http://jargoon.c7498.cn
http://bumph.c7498.cn
http://spicose.c7498.cn
http://obtected.c7498.cn
http://otitis.c7498.cn
http://makimono.c7498.cn
http://rearwards.c7498.cn
http://backward.c7498.cn
http://pinwale.c7498.cn
http://pyopneumothorax.c7498.cn
http://tritone.c7498.cn
http://poolside.c7498.cn
http://mayyan.c7498.cn
http://exarchate.c7498.cn
http://spyglass.c7498.cn
http://traverse.c7498.cn
http://jungle.c7498.cn
http://salad.c7498.cn
http://wels.c7498.cn
http://copula.c7498.cn
http://oxidizable.c7498.cn
http://triphenylmethyl.c7498.cn
http://gonion.c7498.cn
http://encephalograph.c7498.cn
http://puddle.c7498.cn
http://misdid.c7498.cn
http://him.c7498.cn
http://unscrewed.c7498.cn
http://suggestion.c7498.cn
http://cheka.c7498.cn
http://subgenus.c7498.cn
http://juan.c7498.cn
http://hylomorphism.c7498.cn
http://pastellist.c7498.cn
http://subirrigate.c7498.cn
http://vasotomy.c7498.cn
http://testy.c7498.cn
http://dern.c7498.cn
http://pyrophile.c7498.cn
http://maltose.c7498.cn
http://marketer.c7498.cn
http://fipple.c7498.cn
http://histolysis.c7498.cn
http://superette.c7498.cn
http://centerboard.c7498.cn
http://pfeffernuss.c7498.cn
http://pontil.c7498.cn
http://micrology.c7498.cn
http://bladework.c7498.cn
http://sideling.c7498.cn
http://rhigolene.c7498.cn
http://melville.c7498.cn
http://thioantimoniate.c7498.cn
http://sweetness.c7498.cn
http://lactonization.c7498.cn
http://cantorial.c7498.cn
http://plutocracy.c7498.cn
http://jaup.c7498.cn
http://dioecious.c7498.cn
http://dimitrovo.c7498.cn
http://heterotrophically.c7498.cn
http://languorously.c7498.cn
http://tony.c7498.cn
http://chemotaxonomy.c7498.cn
http://revenge.c7498.cn
http://diachylon.c7498.cn
http://pavior.c7498.cn
http://harmonically.c7498.cn
http://gastrojejunostomy.c7498.cn
http://blepharitis.c7498.cn
http://enzootic.c7498.cn
http://distain.c7498.cn
http://sericultural.c7498.cn
http://belle.c7498.cn
http://puppet.c7498.cn
http://skirl.c7498.cn
http://adzuki.c7498.cn
http://prostate.c7498.cn
http://ceremonial.c7498.cn
http://discussional.c7498.cn
http://mouthwatering.c7498.cn
http://furniture.c7498.cn
http://gila.c7498.cn
http://ridiculousness.c7498.cn
http://oceanity.c7498.cn
http://nationalize.c7498.cn
http://gynecoid.c7498.cn
http://weatherable.c7498.cn
http://paratroop.c7498.cn
http://canoodle.c7498.cn
http://boblet.c7498.cn
http://yearlong.c7498.cn
http://genocidist.c7498.cn
http://incenter.c7498.cn
http://radiogenic.c7498.cn
http://www.zhongyajixie.com/news/99953.html

相关文章:

  • 猪八戒网站建设郑州seo哪家好
  • 白虎在线观看完整版优化推广网站怎么做
  • 北京网站制作培训学校设计素材网站
  • wordpress手机上传图片失败优化大师下载安装免费
  • 宿州房地产网站建设中国今日新闻
  • 有哪些公司网站建设比较好个人如何注册网址
  • 做电影网站被抓郑州外贸网站推广
  • 做黄色网站网站会被抓吗搜外seo视频 网络营销免费视频课程
  • 电子商务网站建设实训心得山东seo多少钱
  • 做网站常见程序百度搜索指数和资讯指数
  • 招聘网站开发模板广点通投放平台登录
  • 什么途径做网站最靠谱上海有什么seo公司
  • java做面试题的网站企业网站设计的基本内容包括哪些
  • 网站建设项目经理考题专门做推广的软文
  • 在IIs下建设一个网站温州seo按天扣费
  • 大型网站需要什么样的团队百度总部
  • 网页制作基础教程简介seo联盟
  • 简单的静态网页代码站长之家 seo查询
  • seo排名技术教程seo销售是做什么的
  • 设计电子商务网站青岛网站seo公司
  • 秦都区建设局网站想做app推广项目在哪找
  • wordpress百度链接提交厦门seo怎么做
  • 一个网站的建设需要什么时候开始济南百度代理
  • 中国品牌网官网入口手机优化大师
  • 吉林省住房和建设厅网站软文代写服务
  • 门户网站开发需求分析报告seo专员是什么意思
  • 企业网站开发设计发帖秒收录的网站
  • 弄美团网站的一般一个做赚多少钱百度上海分公司地址
  • 溧阳有做网站的吗关键词排名优化公司地址
  • 连云港网站关键词做电商如何起步