AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[xorg](computer)

Martin Hope
Moder New
Asked: 2024-10-31 03:25:49 +0800 CST

Xinput 匹配名称中带有特殊字符的设备

  • 5

我有一个通过 USB 连接到 PC 的触摸屏设备,它的 ID 一直在变化,因为我们没有其他输入设备永久地固定在它上面,所以我无法真正将它映射到它的 xinput ID 上,但是我需要切换它的方向。

我过去的做法是使用一个简单的命令

xinput set-prop "Touchscreen" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1

然而这个问题是它的名字:

Touch Touch Device ^MF40WH00U-CT-A1-6P

中间有一个实际的回车符,这使得它似乎无法匹配xinput。 有办法绕过它吗?

xorg
  • 1 个回答
  • 18 Views
Martin Hope
Digger
Asked: 2024-01-08 14:38:27 +0800 CST

GnuCash - 在不同用户生成的相同报告中看到不同大小的字体

  • 5

GnuCash 版本 3.4;Debian 10(巴斯特);开罗1.16.0;Xorg 1.20.4

在我们的业务中,同一主机上有两个不同的用户(User1 和 User2),它们生成 GnuCash 发票来向客户开具账单。然而,用户 1 的发票比用户 2 生成的发票大了约 10%。两个用户都使用相同的 GnuCash 配置文件(位于/home/user1/.local/share/gnucash,其中有一个指向 User2 主目录中适当位置的所述目录的符号链接)。当我在 Firefox 中打开 User1 和 User2 生成的相同 PDF 报告时,User1 报告中 15.2 大小字体的文本在 User2 报告中显示为 13.6 大小字体。

通常情况下,这不会是什么大问题,但老板希望所有发票的格式相同,包括缩放(她说我们这样看起来更专业)。

报告都是通过 GnuCash 生成的:屏幕上显示所需的发票后,我们点击“打印”按钮,然后选择“打印到文件”选项(因此开罗参与其中)。所有此类 PDF 打印操作均按100%缩放。

我尝试在主机上创建一个原始的新用户,并使用上述步骤生成 GnuCash 报告。它的缩放方式与 User2 生成的报告完全相同(当使用与 User1/User2 相同的stylesheets-2.0文件时),因此我怀疑 User1 帐户中的某处设置了一些配置,导致他的报告比 User1 的报告稍大一些他们应该。

我已经检查了我能想到的所有内容,但这一个让我发疯!

有什么建议么?

xorg
  • 1 个回答
  • 61 Views
Martin Hope
Lucas Scheepers
Asked: 2023-04-19 23:07:25 +0800 CST

Xrandr:无法打开显示(试图添加假显示)

  • 6

我已经在我的电脑上安装了 Ubuntu 22.04.2 LTS。有一种情况,当没有显示器连接到我的 GPU 时,我需要使用 Moonlight 和 Sunshine 访问这台 PC。Sunshine 是主机流媒体服务,Moonlight 是客户端服务。Sunshine 使用 Xorg 和 PulseAudio。当有显示器连接到我的 GPU 时,我已经在我的 PC 上成功启动了 Sunshine。只有这样我才能通过 Moonlight 连接到我的 PC。

如果没有连接监视器,Xorg 将无法启动,Sunshine 也将无法启动。我做了一些研究,我知道可以用一些 Xorg 配置和 edid.bin 文件伪造一个虚拟屏幕。

我事先断开了显示器的连接,并通过 SSH 会话访问了我的 PC。我遵循的步骤:

  1. 我已经为我的屏幕下载了这个 edid.bin 文件
  2. 我运行了以下命令:sudo nvidia-xconfig -a --allow-empty-initial-configuration --use-display-device="DP-0" --connected-monitor="DP-0" --custom-edid="DP-0:/home/$USER/edid-2.bin"
  3. 我查看了/etc/X11/目录,发现创建了一个名为xorg.conf
  4. 该文件的内容如下所示:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 525.105.17

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 3060 Ti"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "UseDisplayDevice" "DP-0"
    Option         "CustomEDID" "DP-0:/home/lucas/edid-2.bin"
    Option         "ConnectedMonitor" "DP-0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

  1. 我通过运行以下命令检查了 Xorg 是否正在运行ps aux | grep xorg::
root        1241  0.1  0.1 25349916 53660 tty1   Sl+  15:48   0:00 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/127/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
lucas       2392  0.0  0.0   9216  2432 pts/0    S+   15:50   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox xorg
  1. 我检查了/var/log/Xorg.0.log文件,没有发现错误。我还验证了屏幕已正确连接。

但是在运行命令后xrandr它返回Can't open display错误。我试过显示数字 0 到 10,但只有在xrandr --display :0它返回时:Authorization required, but no authorization protocol specified. Can't open display :0

我还尝试.Xauthority通过运行以下命令来编辑文件:xauth add :0 . $(xxd -l 16 -p /dev/urandom). 但是xrandr命令返回了Invalid MIT-MAGIC-COOKIE-1 key error

之后我删除了/etc/X11/xorg.conf文件和.Xauthority file. 然后再次连接我的显示器,使用我的显示器一切正常。我删除的那些文件也没有重新生成。没有这些文件怎么可能运行 Xorg?

那么有没有人知道如何在没有连接显示器时正确伪造这个 Xorg 屏幕,以便我可以启动 Sunshine 并通过 Moonlight 连接到我的 PC?如果您需要更多信息;请问!

编辑: 我通过运行命令禁用了 gdm sudo systemctl stop gdm,并使用以下命令手动启动了一个 Xorg 进程Xorg :0 -config xorg.conf -noreset。

所以我现在可以使用 xrandr 命令:

➜  ~ xrandr --display :0
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 disconnected primary (normal left inverted right x axis y axis)
DP-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 500mm x 281mm
   1920x1080     60.00*+
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)

我仍然无法正确配置 gdm,因此它将启动一个 Xorg 进程以使用正确的 Xorg 配置将屏幕显示为数字 0

xorg
  • 1 个回答
  • 48 Views
Martin Hope
newview
Asked: 2022-10-27 16:59:23 +0800 CST

如何组合两个 xclip 命令?

  • 5

将字符串复制到剪贴板:

echo "hello world" | xclip  -sel clip

复制鼠标中键使用的字符串。

echo "hello world" | xclip  

如何将它们合二为一?

echo "hello world" | xclip  -sel clip  &&  echo "hello world" | xclip  

有没有更简单的方法来组合它们?

command-line xorg
  • 1 个回答
  • 15 Views
Martin Hope
Joce NoToPutinsWarInUkraine
Asked: 2021-10-29 01:17:19 +0800 CST

按下 Ctrl-Z 后,窗口管理器因特定鼠标指针形状而停止

  • 5

我已经完全停止了 X 窗口管理器,这发生在我试图通过击键停止进程时。我想知道是否可以确定失速的原因,或者我是否可以以比我所做的不那么苛刻的方式恢复功能。

什么导致了停顿:在终端中,在与远程计算机的 ssh 会话中,我启动了一个进程,我立即意识到这不是我缩进的并且可能有害。具体来说,我跑bash script.py而不是python script.py. 我按ctrl- C,这显示为^C但没有给我返回 bash 提示,所以我也按 ctrl-Z可能还有其他几个ctrl- whatever。

症状:就在那之后,我意识到我无法将焦点转移到任何其他终端或窗口。鼠标指针没有它通常的箭头或 I 光束形状,而是像这样:

在此处输入图像描述

alt像- tab, alt- C-这样的击键arrow来改变工作空间,那些打开的菜单不起作用。alt我可以使用- ctrl-切换到 tty/1 F1,在那里运行top并没有透露太多(顶级进程是ssh,sshfs并且cp因为我在后台运行备份)。我杀firefox了就像一个疯狂的尝试。回到我的 X 窗口会话中,我尝试了更多交互,直到按下crlalt-backspace这结束了图形会话。重新登录,一切正常。

我的问题:如果下次发生这种情况,我能做些什么更好?

一些细节:debian 靶心,xfwm 4.16.1-1,xfce 4.14,xorg 1:7.7+22

xorg window-manager
  • 1 个回答
  • 15 Views
Martin Hope
josephholten
Asked: 2021-10-24 16:59:13 +0800 CST

致命错误:xids (xorg) 用完

  • 5

我刚刚安装了 slock ( https://tools.suckless.org/slock/ ) 一个简单的屏幕储物柜,每当我调用“slock”时,picom 就会停止工作。我通过我的 .xprofile 在后台启动我的合成器 picom 有时我在调用“slock”时也会收到一条错误消息:

[ 2021 年 10 月 24 日 02:30:01.707 x_new_id 致命错误 ] 我们似乎运行了 XID。这要么是 X 服务器中的错误,要么是合成器中的资源泄漏。请打开一个关于这个问题的问题。作曲家会死。

任何帮助表示赞赏!

xorg
  • 1 个回答
  • 112 Views
Martin Hope
dwightjl
Asked: 2021-09-07 09:17:19 +0800 CST

如何使用 cvt 计算 75hz 没有 60hz 的倍数的模式线

  • 5

我正在尝试查看我的LG 32UL500-W显示器是否会超频超过 60hz。看起来 DisplayPort 1.2在 75hz 处理 4k。

当我运行时xrandr --verbose,它显示了 4k 60hz 的默认 VESA 模式:

3840x2160 (0x5a) 533.250MHz +HSync -VSync
        h: width  3840 start 3888 end 3920 total 4000 skew    0 clock 133.31KHz
        v: height 2160 start 2214 end 2219 total 2222           clock  60.00Hz

这工作正常。如果我使用它来计算它,cvt 3840 2160 60 -r我会得到相同的值。

$ cvt 3840 2160 60 -r
# 3840x2160 59.97 Hz (CVT 8.29M9-R) hsync: 133.25 kHz; pclk: 533.00 MHz
Modeline "3840x2160R"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync

但是,如果我尝试计算任何高于 60hz 的值,则此命令不起作用。

$ cvt 3840 2160 75 -r

ERROR: Multiple of 60Hz refresh rate required for  reduced blanking.

如果我在没有减少消隐标志的情况下运行相同的命令,我会得到截然不同的数字,当我将它们添加到显示器并将它们应用到显示器时这些数字不起作用xrandr。

$ cvt 3840 2160 60
# 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHz
Modeline "3840x2160_60.00"  712.75  3840 4160 4576 5312  2160 2163 2168 2237 -hsync +vsync

$ cvt 3840 2160 75
# 3840x2160 74.95 Hz (CVT 8.29M9) hsync: 169.16 kHz; pclk: 904.00 MHz
Modeline "3840x2160_75.00"  904.00  3840 4168 4592 5344  2160 2163 2168 2257 -hsync +vsync

如果我尝试以 60hz 或 75hz 应用这些模式,我的显示器无法理解信号。

真的没有办法为 75hz 计算一组合适的值吗?我希望cvt至少可以让我选择计算 75hz 的值,-r这样我至少可以尝试一下。我知道 120hz 是不可能的,因为 DisplayPort 1.2 不支持 4k,而且我的显示器无法处理这个速率。在线计算器似乎也没有给我合适的值。

linux xorg
  • 1 个回答
  • 749 Views
Martin Hope
vect
Asked: 2021-06-19 02:53:25 +0800 CST

多个 WSL2 发行版连接到单个 X11 服务器

  • 5

我使用 X11 在 WSL2 发行版中启动 GUI 应用程序。例如,下面是使用 xfce4-terminal 的方法:

wsl --distribution foo --user vect /bin/bash -l -c xfce4-terminal

DISPLAY发行版中的 env 变量设置/etc/profile.d/如下:

export DISPLAY="$(sed -n 's/nameserver\ //p' /etc/resolv.conf):0"

当只有一个发行版 GUI 应用程序从其启动时,它工作正常。如果我尝试从多个发行版启动 GUI 应用程序,事情会变得很奇怪。从withbar克隆发行版,foo我有以下内容:wsl --export ...wsl --import ...

在 PowerShell 中

wsl --distribution foo --user vect /bin/bash -l -c xfce4-terminal

在 xfce4-terminal 中的 bash

$ echo $WSL_DISTRO_NAME
foo

在 PowerShell 中

wsl --distribution bar --user vect /bin/bash -l -c xfce4-terminal

在 xfce4-terminal 中的 bash

$ echo $WSL_DISTRO_NAME
foo

正如您在第二种情况下看到的那样,尽管已指定,但仍在xfce4-terminal运行。foobar

同时bash从PowerShell它在正确的发行版中运行开始:

wsl --distribution bar --user vect
$ echo $WSL_DISTRO_NAME
bar

该问题与VcXsrv和 一起重现Cygwin/X。

我究竟做错了什么?如何从多个 WSL2 发行版中并行启动带有 X11 的 GUI 应用程序?

xorg wsl2
  • 1 个回答
  • 107 Views
Martin Hope
user1395406
Asked: 2021-06-05 21:45:06 +0800 CST

启动 X 服务器

  • 6

我用 KDE 等离子安装了 Arch。我想在没有显示管理器的情况下启动 KDE,并按照 Arch wiki https://wiki.archlinux.org/title/KDE#From_the_console的说明配置文件。但是在我重新启动所有配置后,它显示错误

(II) modset(0): Initializing kms color map for depth 24,8 bpc.
(II) modset(60): Initializing kms color map for depth 24, 8bpc.
/home/user/.xinitrc: line 51: twm: command not found
/home/user/.xinitrc: line 52: xclock: command not found
/home/user/.xinitrc: line 53: xterm: command not found
/home/user/.xinitrc: line 55: exec: xterm: not found
/home/user/.xinitrc: line 54: xterm: command not found
xinit: connection to X server lost
waiting for X server to shut down (II) server terminated successfully (0). Closing log files.

然后我回到登录屏幕的 tty1。

我的 .xinitrc 文件

#!/bin/sh

userresources=$HOME/.Xresources 
usermodmap=$HOME/.Xmodmap 
sysresources=/etc/X11/xinit/.Xresources 
sysmodmap=/etc/X11/xinit/.Xmodmap
merge in defaults and keymaps

if [ -f $sysresources ]; then

xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi

if [ -f "$userresources" ]; then

xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi
start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then 
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do 
[ -x "$f" ] && . "$f" 
done unset f 
fi

twm &
xclock -geometry 50x50-1+1 & 
xterm -geometry 80x50+494+51 & 
xterm -geometry 80x20+494-0 & 
exec xterm -geometry 80x66+0+0 -name login
export DESKTOP_SESSION=plasma 
exec startplasma-x11 

我的 .serverrc 文件

#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR

我的 .bash_profile

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
   exec startx
 fi

所有这些文件都来自 /home/user 。我做错了什么?谢谢!

arch-linux xorg
  • 1 个回答
  • 1252 Views
Martin Hope
Henry Henrinson
Asked: 2021-03-22 03:36:54 +0800 CST

为什么我需要将 DISPLAY 变量设置为 10:0?

  • 6

我有一台 Win10 机器,安装了 Xming 6.9.0。我使用 Putty 连接到远程 Ubuntu 18.04 实例。

我看到以下内容:

ubuntu:~$ export DISPLAY=:10.0
ubuntu:~$ xeyes
#xeyes is shown on my windows machine just fine.

然而:

ubuntu:~$ export DISPLAY=:0.0
ubuntu:~$ xeyes
Error: Can't open display: :0.0

为什么会:0.0失败?1:0喜欢或2:0也失败的价值观。

为什么我必须使用10:0,为什么所有在线指南都显示0:0为价值DISPLAY?

putty xorg
  • 1 个回答
  • 330 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve