DEV Community

Discussion on: Linux on Windows: WSL with Desktop Environment via RDP

Collapse
 
liyiliang13 profile image
liyiliang13

Hello, I had no problem login to the Xrdp desktop. However, when I run gedit in terminal, an error pops out:
(gedit:28949): Gtk-WARNING **: 22:46:09.321: cannot open display: 172.28.240.1:0.0

However it is okay if I double click a text file a gedit GUI would run without problem. I have tried export DISPLAY=:0.0 but no luck. Any ideals?

Collapse
 
darksmile92 profile image
Robin Kretzschmar

You need to find out the display which the X server assigned.
Maybe you have luck with:

cat /proc/$pid/environ | tr '\0' '\n' | grep ^DISPLAY=

Can you try that?