kex unable to connect to socket: connection refused(10061) #6675
-
I have installed Now if I try to run
If I run ❯ kex stop
tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user! ~
❯ kex kill tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user! I googled around to find various methods to fix this. Most of the articles/discussion suggest the following ways:
In the 3rd method if I do all that and then start the vncserver by running:
I get:
And if I run |
Beta Was this translation helpful? Give feedback.
Replies: 19 comments 64 replies
-
I don't have and answer. I was just gonna say that it does the same for me |
Beta Was this translation helpful? Give feedback.
-
After hours of searching to no avail, I have found that you need to:
|
Beta Was this translation helpful? Give feedback.
-
Adding to the solution found by @afonsofrancof
I haven't done extensive testing, but I believe the issue resides in the way that the Standard User and associated permissions are created during initial setup through WSL2. As best I can tell, the only way to launch a KeX environment right now is to do so as root. However, this creates another potential issue: The KeX GUI environment's login will be root. Attempting to launch KeX using the user you create during initial setup causes the recurring error quoted above until KeX times out and throws
I recommend posting this discussion as a bug report to the Kali Community and/or appropriate KeX developers. |
Beta Was this translation helpful? Give feedback.
-
Hey, just for your information. I had the same problem, but what worked out for me is i checked my WSL version and i saw that i used Cheers! |
Beta Was this translation helpful? Give feedback.
-
How to No matching VNC server Problem working 100% |
Beta Was this translation helpful? Give feedback.
-
simply use 'sudo kex' instead of 'kex' seems to work well |
Beta Was this translation helpful? Give feedback.
-
I have a similar problem in my win 11, |
Beta Was this translation helpful? Give feedback.
-
I've resolved with "kex --esm --ip -sound", working well as non-root account. |
Beta Was this translation helpful? Give feedback.
-
Let me know these work ? It's properly working on kali linux rootless on android. If your error still exist,then try these cd ~/.vnc/
//Removing log pid files in ~/.vnc directory |
Beta Was this translation helpful? Give feedback.
-
I've resolved with... Run the ps command if there is any process referring to kex finalize it sudo rm -rf /tmp/.X* (if '/tmp/.X11-unix' exists) sudo nano ~/.vnc/xstartup #!/bin/bash
PATH=/usr/bin:/usr/sbin
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
exec startxfce4 sudo chmod 777 ~/.vnc/xstartup |
Beta Was this translation helpful? Give feedback.
-
Ok, took some sleuthing, but there was a lot going on with this error. To be clear, the problem as defined is not being able to run kex as a NON-ADMIN. Because that's what you're supposed to do. Because security matters. You don't wanna be messing around with some of these tools and unwittingly jack your entire box up because you owned yourself, and that stuff happens for many reasons. I tried everything in these suggestions, and nothing worked. In fact some made it worse. There's a crazy interplay of xfce components at work here. DBUS, ICE, PolicyKit, TigerVNC, etc. etc. etc. What I noticed was that DBUS didn't seem to know anything about me. In the .xsessionerrors file in ~ I saw repeated messages akin to "dbus-update-activation-environment: systemd --user not found, ignoring --systemd argument" Kind of beside the point, as wsl doesn't use systemd, but the "user not found" part of that message is very intersting. I needed to let it know how to find me... and that we're not in a systemd init environment.
Checked the logs again, and I was getting a dbus session, which was progress, so I went to the next error in the list. "_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root" So I recreated it with the proper permissions
After that, the ICE error was gone in the ~.xsessionerrors log, but I was seeing "(xfwm4:7394): Gtk-WARNING **: 18:06:13.137: cannot open display: wayland-0 (xfce4-panel:7411): libxfce4ui-WARNING **: 18:06:14.261: ICE I/O Error" Shopped around for the ICE runtime directory, and after I found it, I noticed there was a lock file and a pid for wayland 0, so I deleted them. cd /mnt/wslg/runtime-dir Then I ran kex --win -s, and boom. I have a stable desktop. I wrote a script to fix it. you'll have set it to executable and run it sudo. Not as root. Non-admin account.. sudo...
Then just run "kex --win -s" normally. No insecure localhost options, no geometry in vncserver first.. just run it how it's designed to run. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Kali-win-kex has been updated to version 3.0 and it fixes most of the problems. Now is also compatible with WSLg in Windows 11. |
Beta Was this translation helpful? Give feedback.
-
Very simple fix for WSL. Go to google and download VNCViewer. Install in Windows. Open and when it asks for server to connect to type: localhost:5901. Enter the password you setup earlier for KEX and bam you are in! |
Beta Was this translation helpful? Give feedback.
-
i find a way to solve this problem,but it will create another problem. i use |
Beta Was this translation helpful? Give feedback.
-
i think maybe i find the way to solve my new problem.i just Remove this option and then shutdown my windows system.then i did not appear this problem |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thank for your help if not working thats ok if not your help maybe i Will
quit from wsl linux wsl is suck for Linux
Pada tanggal Rab, 14 Des 2022 13.25, Vagner Silva ***@***.***>
menulis:
… Open de prompt as admin.
netsh winsock reset
restart you windows
In some cases it helps.
I hope it solves your problem.
—
Reply to this email directly, view it on GitHub
<#6675 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4FMJMLCBTFDLUDRAR6IKVLWNFK4VANCNFSM4ZG33LTQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
In my case, restarting computer helped. |
Beta Was this translation helpful? Give feedback.
-
Run without docker, ### After start the service --
|
Beta Was this translation helpful? Give feedback.
After hours of searching to no avail, I have found that you need to:
sudo su
(all the commands need to be performed by root user) ;rm /tmp/.X11-unix
) ;vncserver
(It will now be able to create the server) ;kex
and everything should work.