You are not logged in.

#1 2017-07-17 14:05:28

Registered: 2008-11-14
Posts: 1,652

unable to specify a custom xorg.conf to xinit.

The following ignores my custom xorg configuration file, i can't understand why.

This is what i run:



xinit ./xgame.single_head.xinitrc -- \
/usr/bin/X "$display" "$vt" \
-config xgame.single_head.xorg.conf

when i start it, i get:

koko@Gozer# date
lun 17 lug 2017, 16.01.49, CEST

koko@Gozer# ls -la /var/log/Xorg.1.log 
-rw-r--r-- 1 root koko 24293 lug 17 15:59 /var/log/Xorg.1.log

koko@Gozer# grep EE /var/log/Xorg.1.log
[526308.995] Current Operating System: Linux Gozer 4.9.5-1-ARCH #1 SMP PREEMPT Fri Jan 20 12:11:50 CET 2017 x86_64
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[526308.996] (EE) Unable to locate/open config file: "xgame.single_head.xorg.conf"
[526309.001] (EE) Failed to load module "nv" (module does not exist, 0)
[526309.001] (EE) Failed to load module "fbdev" (module does not exist, 0)

So i ran my script through strace, and see:

koko@Gozer# grep xgame.single_head.xorg.conf /tmp/out.log 
execve("/usr/bin/xinit", ["xinit", "xgame.single_head.xinitrc", "--", "/usr/bin/X", ":1", "vt1", "-config", "xgame.single_head.xorg.conf"], 0x7ffc192c4d90 /* 81 vars */) = 0
[pid  8867] execve("/usr/bin/X", ["/usr/bin/X", ":1", "vt1", "-config", "xgame.single_head.xorg.conf"], 0x7ffcf1ef3300 /* 81 vars */) = 0
[pid  8867] execve("/usr/lib/xorg-server/Xorg.wrap", ["/usr/lib/xorg-server/Xorg.wrap", ":1", "vt1", "-config", "xgame.single_head.xorg.conf"], 0x2101040 /* 78 vars */) = 0
[pid  8867] execve("/usr/lib/xorg-server/Xorg", ["/usr/lib/xorg-server/Xorg", ":1", "vt1", "-config", "xgame.single_head.xorg.conf"], 0x7ffeac85acf8 /* 77 vars */) = 0
[pid  8867] open("xgame.single_head.xorg.conf", O_RDONLY) = 17
[pid  8867] write(2, "(++) Using config file: \"xgame.s"..., 54(++) Using config file: "xgame.single_head.xorg.conf"

open("xgame.single_head.xorg.conf", O_RDONLY) = 17 means it found the file.

Now i'm a bit puzzled on why xorg says it cannot open/locate the config file, and strace says it opened it (??)

If useful, here it is:

koko@Gozer# cat xgame.single_head.xorg.conf 
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 381.22  (builduser@anthraxx)  Mon May 22 13:41:42 CEST 2017

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

Section "Files"

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

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

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 750 Ti"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-D-1: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24

Any idea?

OK, man 5 xorg.conf revealed that the relative path for the configuration file is to /etc/X11 and some other system paths.
* is it not possible for an unprivileged user to use a custom xorg configuration without havig root rights to change system files ?
* why strace output says it opened the file?

Last edited by kokoko3k (2017-07-17 14:12:41)


#2 2017-07-18 11:51:50

From: Netherlands, Europe
Registered: 2005-10-04
Posts: 5,539

Re: unable to specify a custom xorg.conf to xinit.

Unless you give the user rights on those files (plenty of options for that) , root will have to create / change them.
Once the files have been setup, the user only needs read rights on the custom xorg.conf file .

no idea about strace.

Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them


Board footer

Powered by FluxBB