Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-08-22 07:24:15

ChrisWard
Member
Registered: 2023-08-22
Posts: 9

[SOLVED] xfce4-session doesn't run under WSL2

I am trying to run xfce4 (xfce4-session) under Microsoft Windows WSL2, and getting errors.
About 18 months ago, I was able to run xfce4 to run under Windows Subsystem for Linux v2 with

export DISPLAY=$(ip route|awk '/^default/{print $3}'):0.0
xfce4-session

but now when I try it I get

tjcw@DESKTOP-96STVF3:~/eclipse-workspace/screensavers/bin$ echo $DISPLAY
172.29.176.1:0.0
tjcw@DESKTOP-96STVF3:~/eclipse-workspace/screensavers/bin$ xfce4-session
_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root

(xfwm4:557): Gtk-WARNING **: 19:06:35.018: cannot open display: wayland-0

(xfsettingsd:558): GLib-GObject-WARNING **: 19:06:35.093: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'
xfce4-panel-Message: 19:06:35.177: Unable to open display from environment variable DISPLAY='wayland-0', exiting.

just error messages and no xfce4 session

I know I have my xserver and firewall configured correctly and a viable DISPLAY value, because if I run 'xterm' I get an xterm popping up. I am using VcXsrv as my xserver.

I have seen Microsoft's article about now having a built-in Xserver, but this doesn't work for me because it requires that you install a graphics driver; I have Intel graphics but the Intel driver said I didn't have an adapter that it could install on.

What has changed, what am I doing wrong, and how can I fix it ?

Offline

#2 2023-08-26 17:13:10

ChrisWard
Member
Registered: 2023-08-22
Posts: 9

Re: [SOLVED] xfce4-session doesn't run under WSL2

Here is a session capture of my attempt to run xfce4, captured with 'script'
It looks to me that xfce4 was trying to set DISPLAY to something involving Wayland, i.e. overriding the traditional ip-address:0.0 , and that this isn't working.

Script started on 2023-08-26 16:50:52+01:00 [TERM="xterm-256color" TTY="/dev/pts/0" COLUMNS="120" LINES="30"]
^[[?2004h^[]0;tjcw@DESKTOP-96STVF3: ~^G^[[01;32mtjcw@DESKTOP-96STVF3^[[00m:^[[01;34m~^[[00m$ xfce4-session^M
^[[?2004l^M_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root^M
^M
(xfwm4:154): Gtk-^[[1;33mWARNING^[[0m **: ^[[34m16:51:02.959^[[0m: cannot open display: wayland-0^M
^M
(xfsettingsd:155): GLib-GObject-^[[1;33mWARNING^[[0m **: ^[[34m16:51:03.035^[[0m: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'^M
xfce4-panel-^[[1;32mMessage^[[0m: ^[[34m16:51:03.117^[[0m: Unable to open display from environment variable DISPLAY='wayland-0', exiting.^M
^M
** (agent:179): ^[[1;35mCRITICAL^[[0m **: ^[[34m16:51:11.236^[[0m: Failed to get connection to system bus: Could not connect: No such file or directory^M
Failure: Module initialization failed^M
^M
** (xiccd:187): ^[[1;35mCRITICAL^[[0m **: ^[[34m16:51:11.242^[[0m: Can't open display: wayland-0^M
^M
** (xiccd:187): ^[[1;35mCRITICAL^[[0m **: ^[[34m16:51:11.243^[[0m: Failed to connect to colord: Could not connect: No such file or directory^M
Baloo File Indexing has been disabled^M
qt.qpa.xcb: could not connect to display wayland-0^M
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.^M
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.^M
^M
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.^M
^M
^M
(polkit-gnome-authentication-agent-1:177): polkit-gnome-1-^[[1;33mWARNING^[[0m **: ^[[34m16:51:11.309^[[0m: Error getting authority: Error initializing authority: Could not connect: No such file or directory^M
^M
(xfsettingsd:178): GLib-GObject-^[[1;33mWARNING^[[0m **: ^[[34m16:51:11.319^[[0m: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'^M
^C^M
** (xiccd:187): ^[[1;33mWARNING^[[0m **: ^[[34m16:52:49.117^[[0m: Exiting^M
^M
(xiccd:187): GLib-^[[1;35mCRITICAL^[[0m **: ^[[34m16:52:49.117^[[0m: g_atomic_ref_count_dec: assertion 'old_value > 0' failed^M
^M
^[[?2004h^[]0;tjcw@DESKTOP-96STVF3: ~^G^[[01;32mtjcw@DESKTOP-96STVF3^[[00m:^[[01;34m~^[[00m$ ^[[?2004l^M^M
exit^M

Script done on 2023-08-26 16:52:51+01:00 [COMMAND_EXIT_CODE="130"]

Issuing 'xterm' works, both with DISPLAY set to ip-address:0.0 (using the VCXServe X-server) and with DISPLAY set to :0.0 (using the built-in Windows X-server)

Offline

#3 2023-08-27 00:15:15

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] xfce4-session doesn't run under WSL2

I don't have any experience with WSL2 to offer assistance, but I can say that Xfwm (and Xfce for the most part - current dev excepted) won't run on wayland. Maybe something changed with WSL2?

Also, have a look at this.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2023-08-27 10:37:22

ChrisWard
Member
Registered: 2023-08-22
Posts: 9

Re: [SOLVED] xfce4-session doesn't run under WSL2

Thanks, ToZ !

I looked at those links, but at the moment the only system I have which can run WSL2 is a Windows 10 system, and looking in the https://learn.microsoft.com/en-us/windo … wsl-config link indicates that the "guiApplications" specification applies to Windows 11 only. So, still lookinr for a solution.

I didn't specify wayland in anything I typed; the word "wayland-0" appeared in the error text that I got, which leads me to think that something in the internals was trying to select wayland. But I haven't (yet) looked at the source code to check this.

Offline

#5 2023-08-27 10:50:50

ChrisWard
Member
Registered: 2023-08-22
Posts: 9

Re: [SOLVED] xfce4-session doesn't run under WSL2

Putting the lines into .wslconfig worked for me

PS C:\Users\tjcw> type .\.wslconfig
# Settings apply across all Linux distros running on WSL 2
[wsl2]
guiApplications=false
PS C:\Users\tjcw>

I also stopped and restarted the WSL2 session with "wsl --shutdown", and ran the xserver as 'one large window' and 'access control off'.

So, solved ! Thanks !

Offline

#6 2023-08-27 11:07:03

ChrisWard
Member
Registered: 2023-08-22
Posts: 9

Re: [SOLVED] xfce4-session doesn't run under WSL2

http://tjcw.freeshell.org/xfce-success.png is a screenshot of the solution

Offline

#7 2023-08-27 11:42:04

ChrisWard
Member
Registered: 2023-08-22
Posts: 9

Re: [SOLVED] xfce4-session doesn't run under WSL2

This problem is solved, but I don't know how to update the headline to say "Solved". Please can someone do that for me. Thanks !

Offline

#8 2023-08-27 15:31:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] xfce4-session doesn't run under WSL2

ChrisWard wrote:

This problem is solved, but I don't know how to update the headline to say "Solved". Please can someone do that for me. Thanks !

I've taken care of that. For future reference, just "Edit" your original post and pre-prend [SOLVED] to the subject title. Also, thanks for posting back the solution.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 556.65 KiB (Peak: 573.49 KiB) ]