{"action":"created","issue":{"url":"https://api.github.com/repos/voidlinux/void-packages/issues/14187","repository_url":"https://api.github.com/repos/voidlinux/void-packages","labels_url":"https://api.github.com/repos/voidlinux/void-packages/issues/14187/labels{/name}","comments_url":"https://api.github.com/repos/voidlinux/void-packages/issues/14187/comments","events_url":"https://api.github.com/repos/voidlinux/void-packages/issues/14187/events","html_url":"https://github.com/voidlinux/void-packages/issues/14187","id":320673980,"number":14187,"title":"xorg-server: xinit not working with default configuration","user":{"login":"dan-santana","id":6091633,"avatar_url":"https://avatars1.githubusercontent.com/u/6091633?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-santana","html_url":"https://github.com/dan-santana","followers_url":"https://api.github.com/users/dan-santana/followers","following_url":"https://api.github.com/users/dan-santana/following{/other_user}","gists_url":"https://api.github.com/users/dan-santana/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-santana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-santana/subscriptions","organizations_url":"https://api.github.com/users/dan-santana/orgs","repos_url":"https://api.github.com/users/dan-santana/repos","events_url":"https://api.github.com/users/dan-santana/events{/privacy}","received_events_url":"https://api.github.com/users/dan-santana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-05-07T04:59:06Z","updated_at":"2018-05-25T07:45:44Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### System\r\n\r\n* xuname:\r\n  Void 4.16.6_1 x86_64 GenuineIntel uptodate rFFFFFFFFF\r\n* package:  \r\n  xorg-server-1.19.6_4 and xinit-1.4.0_3 \r\n\r\n### Expected behavior\r\nWhen running `xinit` as a non-root user on any TTY it should launch the X server accordingly.\r\n\r\n### Actual behavior\r\nIt doesn't run, instead it outputs the following errors:\r\n```\r\n...\r\n(EE) Error compiling keymap (server-0) executing '\"/usr/bin/xkbcomp\" -w 1 \"-R/usr/share/X11/xkb\" -xkm \"-\" -em1 \"The XKEYBOARD keymap compiler (xkbcomp) reports:\" -emp \"> \" -eml \"Errors from xkbcomp are not fatal to the X server\" \"/var/lib/xkb/server-0.xkm\"'\r\n(EE) XKB: Couldn't compile keymap\r\n(EE) XKB: Failed to load keymap. Loading default keymap instead.\r\n(EE) Error compiling keymap (server-0) executing '\"/usr/bin/xkbcomp\" -w 1 \"-R/usr/share/X11/xkb\" -xkm \"-\" -em1 \"The XKEYBOARD keymap compiler (xkbcomp) reports:\" -emp \"> \" -eml \"Errors from xkbcomp are not fatal to the X server\" \"/var/lib/xkb/server-0.xkm\"'\r\n(EE) XKB: Couldn't compile keymap\r\nXKB: Failed to compile keymap\r\nKeyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.\r\n(EE) \r\nerror:\r\n(EE) Failed to activate virtual core keyboard: 2(EE) \r\n(EE) \r\nt the The X.Org Foundation support \r\nwiki.x.org\r\n\r\n(EE) Please also check the log file at \"/var/log/Xorg.0.log\" for additional information.\r\n(EE) \r\n(II) AIGLX: Suspending AIGLX clients for VT switch\r\n(EE) Server terminated with error (1). Closing log file.\r\n```\r\nIt seems to happen because `/usr/bin/Xorg` runs as root due to the default configuration on `/etc/X11/Xwrapper.config` (`needs_root_rights = yes`) introduced on https://github.com/voidlinux/void-packages/commit/eff2c9d30bd4cb7061159873086c52859f0a871c, detects the `/var/lib/xkb/` directory as writable (from `OutputDirectory` function at `xkb/ddxLoad.c`) and uses it as the output directory for `xkbcomp` which will run without root privileges, hence not being able to write the .xkm file.\r\n\r\nI'm not sure if the real issue is the non-default `--with-xkb-output=/var/lib/xkm` or its 755 permissions, the included `/etc/X11/Xwrapper.config` file, the `xkbcomp` being launched by Xorg with a non-root RUID/EUID or the Xorg checking on directory availability (if so, should be reported upstream).\r\n\r\n### Steps to reproduce the behavior\r\n\r\n```\r\nsudo usermod -a -G input $(id -un)\r\nxinit /usr/bin/sleep 10 -- vtX\r\n```"},"comment":{"url":"https://api.github.com/repos/voidlinux/void-packages/issues/comments/391970785","html_url":"https://github.com/voidlinux/void-packages/issues/14187#issuecomment-391970785","issue_url":"https://api.github.com/repos/voidlinux/void-packages/issues/14187","id":391970785,"user":{"login":"cr6git","id":28527256,"avatar_url":"https://avatars3.githubusercontent.com/u/28527256?v=4","gravatar_id":"","url":"https://api.github.com/users/cr6git","html_url":"https://github.com/cr6git","followers_url":"https://api.github.com/users/cr6git/followers","following_url":"https://api.github.com/users/cr6git/following{/other_user}","gists_url":"https://api.github.com/users/cr6git/gists{/gist_id}","starred_url":"https://api.github.com/users/cr6git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cr6git/subscriptions","organizations_url":"https://api.github.com/users/cr6git/orgs","repos_url":"https://api.github.com/users/cr6git/repos","events_url":"https://api.github.com/users/cr6git/events{/privacy}","received_events_url":"https://api.github.com/users/cr6git/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T07:45:44Z","updated_at":"2018-05-25T07:45:44Z","author_association":"CONTRIBUTOR","body":"@thypon I don' think @dan-santana 's question was about how to use a custom `.xinitrc`"}}
{"actor":{"display_login":"cr6git"}}