So I have just started using Auto Hotkeys to shortcut some things I have to do. One of these is to make Windows+Shift+L a shortcut to launch my virtual desktop.
Some notes:
- I am on Windows 10 Home (Version 2004)
- I am using WSL2
- I am using Ubuntu 20.04
- I am using XLaunch for XServer
The AHK file looks like:
; Global hotkeys
#+l::Run, C:\Users\conne\WSL\linuxmachine.bat
This file runs my batch file which is where the issues are coming from.
To get my virtual desktop to run, I have to run my XLaunch file to run XServer, then (in Ubuntu 20.04) run
startxfce4
I have tried doing this through a batch file as shown below.
START C:\Users\conne\WSL\XLaunch.xlaunch
wsl.exe startxfce4
This will start the XServer fine, but when it has to run the xfce4 startup, I get an error message:
/usr/bin/startxfce4: Starting X server
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
My guess is the machine is denying me access to run the command unless I am actually using Ubuntu, instead of this method.
Any suggestions would be greatly appreciated!