質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
WSL(Windows Subsystem for Linux)

WSL (Windows Subsystem for Linux) は、Windows10のOS上でLinux向けのバイナリプログラムを実行可能にする機能です。また、WindowsOSのAPIを用いた仕組みを提供しており、Linux側からWindowsOSへのファイルアクセスもできます。

Q&A

2回答

2992閲覧

wslでXサーバ起動時にエラーが発生してしまう。

taka198725

総合スコア0

WSL(Windows Subsystem for Linux)

WSL (Windows Subsystem for Linux) は、Windows10のOS上でLinux向けのバイナリプログラムを実行可能にする機能です。また、WindowsOSのAPIを用いた仕組みを提供しており、Linux側からWindowsOSへのファイルアクセスもできます。

0グッド

0クリップ

投稿2020/07/05 16:55

WSL上で「sudo startx」コマンドでXサーバを起動するとエラーが発生してしまいます。
起動するためにはどのようにすればよろしいでしょうか?

発生している問題・エラーメッセージ

$ sudo startx X.Org X Server 1.20.8 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-179-generic x86_64 Ubuntu Current Operating System: Linux DESKTOP-7C5EM1S 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 Kernel command line: initrd=\initrd.img panic=-1 pty.legacy_count=0 nr_cpus=4 Build Date: 21 May 2020 08:22:15AM xorg-server 2:1.20.8-2ubuntu2.1 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.38.4 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jul 4 11:45:09 2020 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) no screens found(EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error

エラーログ内に吐き出されている「/var/log/Xorg.0.log」は以下になります。(一部省略)

$ cat /var/log/Xorg.0.log [ 9473.904] X.Org X Server 1.20.8 X Protocol Version 11, Revision 0 [ 9473.904] Build Operating System: Linux 4.4.0-179-generic x86_64 Ubuntu [ 9473.905] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 9473.905] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. [ 9473.905] Entry deleted from font path. [ 9473.905] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist. [ 9473.905] Entry deleted from font path. [ 9473.906] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist. [ 9473.906] Entry deleted from font path. [ 9473.906] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist. [ 9473.906] Entry deleted from font path. [ 9473.906] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist. [ 9473.906] Entry deleted from font path. [ 9473.906] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory) [ 9473.906] (--) using VT number 3 [ 9473.906] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration [ 9473.906] (II) no primary bus or device found [ 9473.906] (II) LoadModule: "glx" [ 9473.906] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [ 9473.907] (II) Module glx: vendor="X.Org Foundation" [ 9473.907] compiled for 1.20.8, module version = 1.0.0 [ 9473.907] ABI class: X.Org Server Extension, version 10.0 [ 9473.907] (==) Matched modesetting as autoconfigured driver 0 [ 9473.907] (==) Matched fbdev as autoconfigured driver 1 [ 9473.907] (==) Matched vesa as autoconfigured driver 2 [ 9473.907] (==) Assigned the driver to the xf86ConfigLayout [ 9473.907] (II) LoadModule: "modesetting" [ 9473.907] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [ 9473.907] (II) Module modesetting: vendor="X.Org Foundation" [ 9473.907] compiled for 1.20.8, module version = 1.20.8 [ 9473.907] Module class: X.Org Video Driver [ 9473.907] ABI class: X.Org Video Driver, version 24.1 [ 9473.907] (II) LoadModule: "fbdev" [ 9473.907] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so [ 9473.907] (II) Module fbdev: vendor="X.Org Foundation" [ 9473.907] compiled for 1.20.1, module version = 0.5.0 [ 9473.907] Module class: X.Org Video Driver [ 9473.907] ABI class: X.Org Video Driver, version 24.0 [ 9473.907] (II) LoadModule: "vesa" [ 9473.907] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so [ 9473.908] (II) Module vesa: vendor="X.Org Foundation" [ 9473.908] compiled for 1.20.4, module version = 2.4.0 [ 9473.908] Module class: X.Org Video Driver [ 9473.908] ABI class: X.Org Video Driver, version 24.0 [ 9473.908] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 9473.908] (II) FBDEV: driver for framebuffer: fbdev [ 9473.908] (II) VESA: driver for VESA chipsets: vesa [ 9473.908] (WW) Falling back to old probe method for modesetting [ 9473.908] (EE) open /dev/dri/card0: No such file or directory [ 9473.908] (WW) Falling back to old probe method for fbdev [ 9473.908] (II) Loading sub module "fbdevhw" [ 9473.908] (II) LoadModule: "fbdevhw" [ 9473.908] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 9473.908] (II) Module fbdevhw: vendor="X.Org Foundation" [ 9473.908] compiled for 1.20.8, module version = 0.0.2 [ 9473.908] ABI class: X.Org Video Driver, version 24.1 [ 9473.908] (EE) open /dev/fb0: No such file or directory [ 9473.908] (WW) Falling back to old probe method for modesetting [ 9473.908] (EE) open /dev/dri/card0: No such file or directory [ 9473.908] (WW) Falling back to old probe method for fbdev [ 9473.908] (II) Loading sub module "fbdevhw" [ 9473.908] (II) LoadModule: "fbdevhw" [ 9473.909] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 9473.909] (II) Module fbdevhw: vendor="X.Org Foundation" [ 9473.909] compiled for 1.20.8, module version = 0.0.2 [ 9473.909] ABI class: X.Org Video Driver, version 24.1 [ 9473.909] (EE) open /dev/fb0: No such file or directory [ 9473.909] (EE) No devices detected. [ 9473.909] (==) Matched modesetting as autoconfigured driver 0 [ 9473.909] (==) Matched fbdev as autoconfigured driver 1 [ 9473.909] (==) Matched vesa as autoconfigured driver 2 [ 9473.909] (==) Assigned the driver to the xf86ConfigLayout [ 9473.909] (II) LoadModule: "modesetting" [ 9473.909] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [ 9473.909] (II) Module modesetting: vendor="X.Org Foundation" [ 9473.909] compiled for 1.20.8, module version = 1.20.8 [ 9473.909] Module class: X.Org Video Driver [ 9473.909] ABI class: X.Org Video Driver, version 24.1 [ 9473.909] (II) UnloadModule: "modesetting" [ 9473.909] (II) Unloading modesetting [ 9473.909] (II) Failed to load module "modesetting" (already loaded, 0) [ 9473.909] (II) LoadModule: "fbdev" [ 9473.909] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so [ 9473.909] (II) Module fbdev: vendor="X.Org Foundation" [ 9473.909] compiled for 1.20.1, module version = 0.5.0 [ 9473.909] Module class: X.Org Video Driver [ 9473.909] ABI class: X.Org Video Driver, version 24.0 [ 9473.909] (II) UnloadModule: "fbdev" [ 9473.909] (II) Unloading fbdev [ 9473.909] (II) Failed to load module "fbdev" (already loaded, 0) [ 9473.909] (II) LoadModule: "vesa" [ 9473.909] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so [ 9473.909] (II) Module vesa: vendor="X.Org Foundation" [ 9473.909] compiled for 1.20.4, module version = 2.4.0 [ 9473.909] Module class: X.Org Video Driver [ 9473.909] ABI class: X.Org Video Driver, version 24.0 [ 9473.909] (II) UnloadModule: "vesa" [ 9473.909] (II) Unloading vesa [ 9473.909] (II) Failed to load module "vesa" (already loaded, 0) [ 9473.909] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 9473.909] (II) FBDEV: driver for framebuffer: fbdev [ 9473.909] (II) VESA: driver for VESA chipsets: vesa [ 9473.909] (WW) xf86OpenConsole: setpgid failed: Operation not permitted [ 9473.909] (WW) xf86OpenConsole: setsid failed: Operation not permitted [ 9473.909] (WW) Falling back to old probe method for modesetting [ 9473.909] (EE) open /dev/dri/card0: No such file or directory [ 9473.909] (WW) Falling back to old probe method for fbdev [ 9473.909] (II) Loading sub module "fbdevhw" [ 9473.909] (II) LoadModule: "fbdevhw" [ 9473.909] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 9473.909] (II) Module fbdevhw: vendor="X.Org Foundation" [ 9473.909] compiled for 1.20.8, module version = 0.0.2 [ 9473.909] ABI class: X.Org Video Driver, version 24.1 [ 9473.909] (EE) open /dev/fb0: No such file or directory [ 9473.909] (WW) Falling back to old probe method for modesetting [ 9473.909] (EE) open /dev/dri/card0: No such file or directory [ 9473.909] (WW) Falling back to old probe method for fbdev [ 9473.909] (II) Loading sub module "fbdevhw" [ 9473.909] (II) LoadModule: "fbdevhw" [ 9473.909] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 9473.909] (II) Module fbdevhw: vendor="X.Org Foundation" [ 9473.909] compiled for 1.20.8, module version = 0.0.2 [ 9473.909] ABI class: X.Org Video Driver, version 24.1 [ 9473.909] (EE) open /dev/fb0: No such file or directory [ 9473.909] (EE) No devices detected. [ 9473.910] (EE) Fatal server error: [ 9473.910] (EE) no screens found(EE) [ 9473.910] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 9473.910] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 9473.910] (EE) [ 9473.910] (EE) Server terminated with error (1). Closing log file.

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

otn

2020/07/05 17:10

> WSL上で「sudo startx」コマンドでXサーバを起動する そもそもそんなこと出来ないのでは?
guest

回答2

0

一般的な「サーバー」という言葉のイメージとは異なり、通常、Xサーバーは手元のパソコンで動して、ネットワーク越しに接続したコンピューターで動作するXクライアントの画面を(手元のパソコンで)表示するものです(役割を考えると用語は間違っていない)。

WSLはサブシステムであり仮想マシンではありませんが、現在のところ自前でWindowsにGUIを表示する機能も持たない(WSL2のロードマップにはある)ので、いまのところはWindows側で動くXサーバーをインストールしてください。
VcXsrvやMobaXtermなど、(利用条件を守れば)無料で使えるものもあります。

投稿2020/07/05 22:39

編集2020/07/06 01:00
Daregada

総合スコア11990

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

otn

2020/07/06 00:41

同じOSの中の話なので、前半の説明はおかしいです。WSLは仮想マシンじゃ無いです。
Daregada

2020/07/06 00:53

前半の説明はWSLに対するものではなくて、リモートで動作するLinuxに対してXサーバーを使うという一般的な利用方法を説明する意図でした。確かにわかりにくいので説明を修正します。
guest

0

WSL上で「sudo startx」コマンドでXサーバを起動する

そもそもそんなこと出来ないのでは?

もしかして、WSL2で出来るようになったのかと思ってググってみましたが、そういう情報が無い。
WSL上でXserverが動くというのは勘違いでしょう。

素直に、Windows用XServerを動かしましょう。
こっちは、ググればいくらでも情報があります。

投稿2020/07/05 17:28

編集2020/07/06 00:21
otn

総合スコア84507

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問