c - X11 改变屏幕方向 Debian

标签 c linux shell debian x11

我想通过 Debian 命令行、shell 脚本或 C 代码在纵向和横向之间更改屏幕方向。窗口系统是X11。我在网上搜索过但没有成功。

xrandr -o left

响应:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  2 (RRSetScreenConfig)
  Serial number of failed request:  14
  Current serial number in output stream:  14

如果我想对 xrandr 做任何事情,它只会显示“xrandr:无法获取默认输出的 Gamma 大小”。

LCD 连接在 LVDS 连接器上。我的 xorg.conf 是

Section "ServerFlags"
    Option "BlankTime"  "0"
    Option "StandbyTime"  "0"
    Option "SuspendTime"  "0"
    Option "OffTime"  "0"
EndSection

Section "Device"
    Identifier      "fbdev display"
    Driver          "fbdev"
    #Option "Rotate" "CCW"
    Option "Rotate" "RandRRotation" "On"
EndSection

是否可以旋转我的显示器?

最佳答案

并非所有 X11 驱动程序都支持 Xrandr API。一些驱动程序根本不支持在运行时更改它,而其他驱动程序有非标准的方法来执行此操作。一个示例是具有自己的实用程序的二进制闭源驱动程序。

关于c - X11 改变屏幕方向 Debian,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36547753/

相关文章:

C - 移除并替换打印的项目

c - 允许在 C 程序的终端中给出参数

java - Eclipse Java SOAP 在 Linux 上调用非常慢,但在 PC 上很好

linux - 通过 If 语句判断数值是否超出范围

凯撒密码不解密

在两个指针的地址相同的情况下更改指针之一的值

C - 从数组中的文件加载数据

bash - Shell 脚本中的命令行参数?

linux - 停止和关机

ruby - 使用适当的参数转义从 ruby​​ 调用 shell 命令