Repository navigation
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 |
Replies: 20 comments 63 replies
|
I don't have and answer. I was just gonna say that it does the same for me |
|
After hours of searching to no avail, I have found that you need to:
|
|
Adding to the solution found by Afonso Franco F. (@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. |
|
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! |
How to No matching VNC server Problem working 100% |
|
simply use 'sudo kex' instead of 'kex' seems to work well |
|
I have a similar problem in my win 11, |
|
I've resolved with "kex --esm --ip -sound", working well as non-root account. |
|
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 |
|
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 startxfce4sudo chmod 777 ~/.vnc/xstartup |
|
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. |
|
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. |
|
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! |
|
i find a way to solve this problem,but it will create another problem. i use |
|
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:
***@***.***>
|
|
In my case, restarting computer helped. |
|
Run without docker, ### After start the service --
|
|
An additional fix to this "afonsofrancof do sudo su (all the commands need to be performed by root user) ; Don't stay as root for step 4. sudo su applies sudoers' secure_path, which strips all /mnt/c/... entries from PATH — kex then fails with route.exe: command not found. Run vncserver/kex as your normal user; only the /tmp/.X11-unix removal needs root. If the viewer still times out after all that: in my case vncserver started fine and ss -ltnp | grep 590 showed Xtigervnc listening, but the client got error 10060. Cause was ufw's default INPUT DROP silently discarding the connection. Quick diagnostic: Also worth flagging that WSLg recreates /tmp/.X11-unix on every distro start, so step 2 isn't permanent. Setting guiApplications=false under [wsl2] in .wslconfig stops it coming back, at the cost of native WSLg app support. |




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) ;kexand everything should work.