
kodi가 포함된 Linux 상자와 부팅 시 kodi를 시작하는 다음 시스템 스크립트가 있습니다.
[Unit]
Description = kodi-standalone using xinit
After = systemd-user-sessions.service network.target sound.target network-online.target
[Service]
User = kodi
Group = kodi
Type = simple
PAMName=login
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/openbox-session -- :0 -nolisten tcp vt7
Restart = on-abort
[Install]
WantedBy = multi-user.target
이것은 Ubuntu 15.10에서는 제대로 작동했지만 업그레이드 후에는 더 이상 작동하지 않습니다. 서비스가 시작되지 않습니다.
Apr 24 17:30:19 rasnas sudo[3644]: kodi : TTY=pts/0 ; PWD=/home/kodi ; USER=root ; COMMAND=/usr/sbin/service kodi start Apr 24 17:30:19 rasnas sudo[3644]: pam_unix(sudo:session): session opened for user root by kodi(uid=0) Apr 24 17:30:19 rasnas systemd[1]: Starting Detect the available GPUs and deal with any system changes... Apr 24 17:30:19 rasnas gpu-manager[3671]: /etc/modprobe.d is not a file Apr 24 17:30:19 rasnas gpu-manager[3671]: /etc/modprobe.d is not a file Apr 24 17:30:19 rasnas gpu-manager[3671]: /etc/modprobe.d is not a file Apr 24 17:30:19 rasnas gpu-manager[3671]: /etc/modprobe.d is not a file Apr 24 17:30:19 rasnas gpu-manager[3671]: /etc/modprobe.d is not a file Apr 24 17:30:19 rasnas gpu-manager[3671]: update-alternatives: error: no alternatives for x86_64-linux-gnu_gfxcore_conf Apr 24 17:30:19 rasnas systemd[1]: Started Detect the available GPUs and deal with any system changes. Apr 24 17:30:19 rasnas systemd[1]: Started kodi-standalone using xinit. Apr 24 17:30:19 rasnas sudo[3644]: pam_unix(sudo:session): session closed for user root Apr 24 17:30:19 rasnas systemd[3692]: pam_unix(login:session): session opened for user kodi by (uid=0) Apr 24 17:30:19 rasnas systemd[1]: Started Session 11 of user kodi. Apr 24 17:30:19 rasnas systemd[3692]: pam_ck_connector(login:session): cannot determine display-device Apr 24 17:30:19 rasnas xinit[3692]: X.Org X Server 1.18.3 Apr 24 17:30:19 rasnas xinit[3692]: Release Date: 2016-04-04 Apr 24 17:30:19 rasnas xinit[3692]: X Protocol Version 11, Revision 0 Apr 24 17:30:19 rasnas xinit[3692]: Build Operating System: Linux 3.13.0-85-generic x86_64 Ubuntu Apr 24 17:30:19 rasnas xinit[3692]: Current Operating System: Linux rasnas 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 Apr 24 17:30:19 rasnas xinit[3692]: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-21-generic root=UUID=1bca803d-6ad4-4e76-bc0d-10d37e041d51 ro quiet splash vt.handoff=7 Apr 24 17:30:19 rasnas xinit[3692]: Build Date: 07 April 2016 09:18:50AM Apr 24 17:30:19 rasnas xinit[3692]: xorg-server 2:1.18.3-1ubuntu2 (For technical support please see http://www.ubuntu.com/support) Apr 24 17:30:19 rasnas xinit[3692]: Current version of pixman: 0.33.6 Apr 24 17:30:19 rasnas xinit[3692]: Before reporting problems, check http://wiki.x.org
Apr 24 17:30:19 rasnas xinit[3692]: to make sure that you have the latest version. Apr 24 17:30:19 rasnas xinit[3692]: Markers: (--) probed, (**) from config file, (==) default setting, Apr 24 17:30:19 rasnas xinit[3692]: (++) from command line, (!!) notice, (II) informational, Apr 24 17:30:19 rasnas xinit[3692]: (WW) warning, (EE) error, (NI) not implemented, (??) unknown. Apr 24 17:30:19 rasnas xinit[3692]: (==) Log file: "/home/kodi/.local/share/xorg/Xorg.0.log", Time: Sun Apr 24 17:30:19 2016 Apr 24 17:30:19 rasnas xinit[3692]: (==) Using system config directory "/usr/share/X11/xorg.conf.d" Apr 24 17:30:19 rasnas xinit[3692]: (EE) Apr 24 17:30:19 rasnas xinit[3692]: Fatal server error: Apr 24 17:30:19 rasnas xinit[3692]: (EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied) Apr 24 17:30:19 rasnas xinit[3692]: (EE) Apr 24 17:30:19 rasnas xinit[3692]: (EE) Apr 24 17:30:19 rasnas xinit[3692]: Please consult the The X.Org Foundation support Apr 24 17:30:19 rasnas xinit[3692]: at http://wiki.x.org
Apr 24 17:30:19 rasnas xinit[3692]: for help. Apr 24 17:30:19 rasnas xinit[3692]: (EE) Please also check the log file at "/home/kodi/.local/share/xorg/Xorg.0.log" for additional information. Apr 24 17:30:19 rasnas xinit[3692]: (EE) Apr 24 17:30:19 rasnas xinit[3692]: (EE) Server terminated with error (1). Closing log file. Apr 24 17:30:23 rasnas hyperiond[853]: V4L2 Grabber: Signal lost Apr 24 17:30:34 rasnas xinit[3692]: /usr/bin/xinit: giving up Apr 24 17:30:34 rasnas xinit[3692]: /usr/bin/xinit: unable to connect to X server: Connection refused Apr 24 17:30:34 rasnas xinit[3692]: /usr/bin/xinit: server error Apr 24 17:30:34 rasnas systemd[3697]: pam_unix(login:session): session closed for user kodi
그러면 이 문제를 어떻게 해결할 수 있나요? 15.10을 사용하면 모든 것이 잘 작동했습니다!
감사해요!
답변1
오늘 이 오류가 발생했습니다. 약간의 조사 후에 솔루션이 제공됩니다.Kodi 방법으로. 5장에서는 이렇게 말합니다.
Ubuntu 16.04(Xenial Xerus)부터는
xserver-xorg-legacy
대신 패키지를 설치하고 재구성해야 합니다.
내 장비에서는 잘 작동합니다.
답변2
실제로 최고의 솔루션은 아니지만 /dev/tty7
kodi를 시작하기 전에 시스템 시작 작업을 chmod로 변경하면 문제가 "수정"되는 것 같습니다. 누구든지 더 나은 우분투 방법이 있다면 저에게 알려주세요 :D
[단위] 설명 = xinit를 사용한 kodi-독립형 이후 = systemd-user-sessions.service network.target sound.target network-online.target [서비스] 사용자 = 코디 그룹=코디 유형 = 단순 PAM이름=로그인 ExecStartPre=/bin/chmod 777 /dev/tty7 권한StartOnly=true ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/openbox-session -- :0 -nolisten tcp vt7 다시 시작 = 중단 중 [설치하다] WantedBy = 다중 사용자.대상
답변3
어쨌든 systemd를 사용하는 경우 이를 작동시킬 수 있는 또 다른 아이디어는 systemd가 X와 루트 권한 사이의 프록시 역할을 하도록 하는 것입니다.
콘솔에서 올바르게 작동 libpam-systemd
하려면 설치가 필요합니다 (참조.systemd-logind
더 이상 루트가 필요하지 않은 Xorg 서버에 대한 Debian 9 릴리스 노트xinit
), 일반 사용에서 래퍼 사용으로 전환합니다 startx
(참조:데비안 버그 #801401).
저는 이 Kodi 사용 사례의 구체적인 내용을 모르지만 일반적인 문제를 조사하는 동안 이 질문을 우연히 발견했습니다. 그래서 다른 사람이 점을 연결하는 데 도움이 되도록 이 글을 작성하는 것이 가장 좋다고 생각했습니다.