WSL icon indicating copy to clipboard operation
WSL copied to clipboard

startx fails on bash using xming

Open paladox opened this issue 10 years ago • 7 comments

Hi using xming and doing DISPLAY=:0 fail.

Brings up this error

[120062.115] [config] failed to pre-init udev [120062.116] X.Org X Server 1.15.1 Release Date: 2014-04-13 [120062.117] X Protocol Version 11, Revision 0 [120062.118] Build Operating System: Linux 3.2.0-76-generic x86_64 Ubuntu [120062.118] Current Operating System: Linux PATRICKM 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 [120062.119] Kernel command line: BOOT_IMAGE=/kernel roBuild Date: 12 February 2015 02:49:29PM [120062.120] xorg-server 2:1.15.1-0ubuntu2.7 (For technical support please see http://www.ubuntu.com/support) [120062.120] Current version of pixman: 0.30.2 [120062.121] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [120062.123] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. 120062.128 Log file: "/var/log/Xorg.0.log", Time: Fri Jun 10 17:09:03 2016 120062.172 Using system config directory "/usr/share/X11/xorg.conf.d" 120062.222 No Layout section. Using the first Screen section. 120062.236 No screen section available. Using defaults. 120062.236 |-->Screen "Default Screen Section" (0) 120062.236 | |-->Monitor "" 120062.239 No monitor specified for screen "Default Screen Section". Using a default monitor configuration. 120062.239 Automatically adding devices 120062.239 Automatically enabling devices 120062.239 Automatically adding GPU devices 120062.300 The directory "/usr/share/fonts/X11/cyrillic" does not exist. [120062.300] Entry deleted from font path. 120062.300 The directory "/usr/share/fonts/X11/100dpi/" does not exist. [120062.300] Entry deleted from font path. 120062.301 The directory "/usr/share/fonts/X11/75dpi/" does not exist. [120062.301] Entry deleted from font path. 120062.321 The directory "/usr/share/fonts/X11/100dpi" does not exist. [120062.321] Entry deleted from font path. 120062.322 The directory "/usr/share/fonts/X11/75dpi" does not exist. [120062.322] Entry deleted from font path. 120062.322 FontPath set to: /usr/share/fonts/X11/misc, /usr/share/fonts/X11/Type1, built-ins 120062.322 ModulePath set to "/usr/lib/x86_64-linux-gnu/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules" 120062.322 The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. 120062.322 Loader magic: 0x7f9e79e2dd40 120062.323 Module ABI versions: [120062.323] X.Org ANSI C Emulation: 0.4 [120062.323] X.Org Video Driver: 15.0 [120062.323] X.Org XInput driver : 20.0 [120062.323] X.Org Server Extension : 8.0 [120062.337] Initializing built-in extension Generic Event Extension [120062.338] Initializing built-in extension SHAPE [120062.338] Initializing built-in extension MIT-SHM [120062.339] Initializing built-in extension XInputExtension [120062.339] Initializing built-in extension XTEST [120062.339] Initializing built-in extension BIG-REQUESTS [120062.340] Initializing built-in extension SYNC [120062.340] Initializing built-in extension XKEYBOARD [120062.341] Initializing built-in extension XC-MISC [120062.341] Initializing built-in extension SECURITY [120062.343] Initializing built-in extension XINERAMA [120062.345] Initializing built-in extension XFIXES [120062.347] Initializing built-in extension RENDER [120062.349] Initializing built-in extension RANDR [120062.354] Initializing built-in extension COMPOSITE [120062.354] Initializing built-in extension DAMAGE [120062.356] Initializing built-in extension MIT-SCREEN-SAVER [120062.360] Initializing built-in extension DOUBLE-BUFFER [120062.365] Initializing built-in extension RECORD [120062.367] Initializing built-in extension DPMS [120062.370] Initializing built-in extension Present [120062.371] Initializing built-in extension DRI3 [120062.373] Initializing built-in extension X-Resource [120062.374] Initializing built-in extension XVideo [120062.375] Initializing built-in extension XVideo-MotionCompensation [120062.376] Initializing built-in extension SELinux [120062.377] Initializing built-in extension XFree86-VidModeExtension [120062.378] Initializing built-in extension XFree86-DGA [120062.379] Initializing built-in extension XFree86-DRI [120062.379] Initializing built-in extension DRI2 120062.380 LoadModule: "glx" 120062.425 Loading /usr/lib/xorg/modules/extensions/libglx.so 120062.638 Module glx: vendor="X.Org Foundation" [120062.639] compiled for 1.15.1, module version = 1.0.0 [120062.639] ABI class: X.Org Server Extension, version 8.0 120062.639 AIGLX enabled [120062.650] Loading extension GLX 120062.650 Matched modesetting as autoconfigured driver 0 120062.650 Matched fbdev as autoconfigured driver 1 120062.651 Matched vesa as autoconfigured driver 2 120062.651 Assigned the driver to the xf86ConfigLayout 120062.651 LoadModule: "modesetting" 120062.664 Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so 120062.674 Module modesetting: vendor="X.Org Foundation" [120062.674] compiled for 1.15.0, module version = 0.8.1 [120062.674] Module class: X.Org Video Driver [120062.674] ABI class: X.Org Video Driver, version 15.0 120062.674 LoadModule: "fbdev" 120062.680 Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so 120062.694 Module fbdev: vendor="X.Org Foundation" [120062.694] compiled for 1.15.0, module version = 0.4.4 [120062.694] Module class: X.Org Video Driver [120062.694] ABI class: X.Org Video Driver, version 15.0 120062.694 LoadModule: "vesa" 120062.701 Loading /usr/lib/xorg/modules/drivers/vesa_drv.so 120062.714 Module vesa: vendor="X.Org Foundation" [120062.714] compiled for 1.15.0, module version = 2.3.3 [120062.714] Module class: X.Org Video Driver [120062.714] ABI class: X.Org Video Driver, version 15.0 120062.714 modesetting: Driver for Modesetting Kernel Drivers: kms 120062.714 FBDEV: driver for framebuffer: fbdev 120062.714 VESA: driver for VESA chipsets: vesa 120062.715 Fatal server error: 120062.717 xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory) 120062.719 120062.720 Please consult the The X.Org Foundation support at http://wiki.x.org for help. 120062.725 Please also check the log file at "/var/log/Xorg.0.log" for additional information. 120062.727 120062.731 xf86CloseConsole: KDSETMODE failed: Bad file descriptor 120062.731 xf86CloseConsole: VT_GETMODE failed: Bad file descriptor 120062.731 Server terminated with error (1). Closing log file.

paladox avatar Jun 10 '16 16:06 paladox

Thanks @paladox for posting -- could you elaborate a bit on what you're trying to do? startx doesn't "use" xming. xming is an X server; startx launches its own (different) X server.

Are you just trying to launch a graphical environment? If so, you don't need to run startx if you already have xming installed and configured. You can just directly run the applications that you want to run.

Note that graphical stuff may not work well yet -- WSL has not yet implemented 100% of the Linux kernel's functionality, and kernel features that are used mostly or entirely by graphical applications have not been a priority so far. (WSL's initial target applications are command-line development tools.)

aseering avatar Jun 10 '16 16:06 aseering

@aseering Hi, thanks for replying. Yes I would like to start the graphical interface. I know about launching the apps but I want to try the desktop.

I'm wondering how I can do it through xming please.

paladox avatar Jun 10 '16 16:06 paladox

You could try running "unity"; I think that'll attempt to start launching the environment that you're looking for?

Please keep in mind that this is not expected to work right now. Getting it to work will likely be an adventure. Ubuntu doesn't support non-Ubuntu X servers such as xming, and WSL doesn't support graphics hardware natively right now so you can't run Ubuntu's X server. Also, dbus is known to not work well right now under WSL ( #376 ) and many graphical Ubuntu applications depend on dbus. Some also depend on FUSE, which also doesn't work yet ( #412 ).

If you really want to do this, I would suggest as a starting point that you read through the following page in detail to understand how the components of X Windows work on a standard Linux system:

http://www.tldp.org/HOWTO/XWindow-User-HOWTO/runningx.html

Then figure out how that simple setup maps to your hybrid setup with X Windows running as a Windows application, and make the appropriate adjustments.

aseering avatar Jun 10 '16 17:06 aseering

If you think this use case is important and should be supported, you should up-vote it here:

https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13250499-support-for-x-server-running-in-windows-on-the-sam

aseering avatar Jun 10 '16 17:06 aseering

@paladox Before X window works, there're many tasks to resolve known/unknown issues, even if you just want to use X client on WSL. Although the client doesn't work well, I can launch firefox and some tiny GUI applications with:

$ DISPLAY=:0.0 firefox
$ DISPLAY=:0.0 gvim

It doesn't work perfectly but you can see that it works. For connect to X Server via protocol, tty and dbus issues must be resolved. These could be first step because many window mangers and environments depending on them.

lateau avatar Jun 10 '16 17:06 lateau

I am using Ubuntu 16.04 LTS with Unity on VCXSrv and WSL. There's an error: "XFree86-VidModeExtension" is missing on display on ":0.0"

Verld avatar Jun 11 '17 02:06 Verld

The original poster in this (old) post was going for:

Yes I would like to start the graphical interface. I know about launching the apps but I want to try the desktop.

Hang-out for that has become long-running #637.

therealkenc avatar Dec 01 '17 21:12 therealkenc