0

I can't find any way to launch the kali-linux GUI with a shortcut and I've tried a lot of methods!
I don't want everytime to search for "Kali Linux" on Start, then open it, run the two commands everytime,
⠀$ sudo mount -o remount,rw /tmp/.X11-unix
⠀$ kex
I just want it to open directly!
I've already tried changing the .json file of Windows Terminal settings or creating a batch file
but I've no succeeded.
I basically need a shortcut to open the kali-linux terminal with pre-loaded those two commands,
so the GUI will open directly.
(note that I've set Ubuntu as the default WSL 2 distro and I don't want to change this option)
Please help, thanks!

1
  • 1
    Have you set this up and do you start Kali as described in Kali documentation? If not, or if you're not sure, I'd suggest deleting the current installation and reinstalling it exactly as described there. Also you should explain what exactly you've tried, and give a step-by-step workflow how exactly you start it so others can see if your issues are reproducible. Commented Apr 7, 2023 at 15:45

2 Answers 2

1

Kali is not well suited to command - non-GUI as you have and WSL is for running Linux commands and is not well suited to be a virtual machine app.

Run Kali in a Virtual Machine App (VMware, Hyper-V) and that works very well.

I am in Kali 2023.1 now running as a VM inside VMware. Works splendidly well.

Remember that Kali is a different kind of OS and known to be unfriendly. It is Linux, but heavy on security Apps and short on GUI user tools. Most Kali users are interested in the Security Apps.

4
  • No, I just want to use the GUI offered by them via Win-kex, the problem isn't kali-linux, but the usage of the Windows Terminal! I have to find a successful way to pass commands on the kali-linux profile on the Terminal Commented Apr 7, 2023 at 14:14
  • 1
    WSL is not suited to that. I have used Ubuntu (Store) for this but Kali did not work.
    – anon
    Commented Apr 7, 2023 at 14:14
  • @martinotecco - What exactly is "Win-kex"?
    – Ramhound
    Commented Apr 7, 2023 at 15:22
  • win-kex has been a way to start Kali. in WSL As noted, I did not find it to work very well.
    – anon
    Commented Apr 7, 2023 at 15:23
1

I've just solved it by myself... I've looked better through the Win-kex documentation and I found that they provide Windows Terminal profile configs you can paste directly in the .json settings file: I used the Advanced Window Mode.

From the Windows Terminal settings, I duplicated the kali-linux profile just to obtain a new unique profile guid, then from the .json settings file I've edited the profile name from kali-linux (Copy) to Win-kex and I also edited the commandline and the startingDirectory by pasting those entries on the documentation.

I created a batch file where I coded a way to start Win-kex and exit the Terminal automatically, then finally I converted it to an .exe using Advanced BAT to EXE Converter PRO, I stored it in a folder located to Program Files and I added a shortcut to it called "kali-linux" to my Start Menu.

So now, when I want to open kali-linux distro, I just search for "kali-linux" on Start Menu and open the program.


Windows Terminal profile - add this code to the .json settings file, along with the other profiles:

            {
                "guid": "{32blc95n-e814-739i-064t-w794h53755f4}",
                "hidden": true,
                "name": "Win-kex",
                "icon": "ms-appx:///ProfileIcons/{32blc95n-e814-739i-064t-w794h53755f4}.png",
                "commandline": "wsl -d kali-linux sudo mount -o remount,rw /tmp/.X11-unix; kex --wtstart -s",
                "startingDirectory": "//wsl$/kali-linux/home/<username>"
            }

program [klLauncher.exe] - store it in C:\Program Files\klLauncher: download


shortcut - rename its extension to .lnk and place it in the Start Menu: download


.ico file - it's the icon, store it somewhere and add it to the Start Menu shortcut: download

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .