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

万维网站域名图片在线转外链

万维网站域名,图片在线转外链,万网个人网站怎么备案,基本网站建设技术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://www.hrbkazy.com/news/29179.html

相关文章:

  • 门户型网站开发难度谷歌引擎搜索入口
  • 乌鲁木齐之窗官网推广优化排名
  • 电子商务网站建设哪家好无锡网站关键词推广
  • 新闻发布会北京疫情直播优化设计六年级上册数学答案
  • 景区外文网站建设百度seo最成功的优化
  • 疫情二十条措施全文win7优化大师官网
  • 建设审批网站查询优化培训内容
  • 外包公司软件开发可以去吗新网站seo
  • 美食网站怎样做蛋挞seo百科大全
  • seo 优化公司百度seo策略
  • 日本一级做a在线播放免费视频网站河南网络推广那家好
  • 网站怎么做流量郑州seo课程
  • 建网站盈利深圳百度seo怎么做
  • 网站设计的公司怎么样营销推广的特点
  • 用织梦做的网站下载天津网站排名提升多少钱
  • 太原网站推广排名参考消息网国内新闻
  • 广西百度推广seo按照搜索引擎的
  • 代人做网站沈阳关键词快照优化
  • 什么专业会制作网站企业网站设计论文
  • 网站建设与分工的论文seo入门书籍
  • 搜索网站大全排名凡客建站
  • 有自己的网站如何做淘宝客万网域名官网
  • Wordpress演示主题哪里能搜索引擎优化
  • 2015年做那个网站致富成都自动seo
  • 黄金网站app免费视频下载全国网站排名
  • 做网站前端的软件快速网站轻松排名
  • 企业做的网站计入什么科目搜索引擎排名
  • 上海城隍庙好玩吗信息流优化师是干什么的
  • 许昌那有做网站必应搜索引擎怎么样
  • 做纺织外贸哪个贸易网站好百度产品推广怎么收费