Last active
August 19, 2020 19:18
-
-
Save mslinn/0dbce05b1e0997f256eea15cc19b7181 to your computer and use it in GitHub Desktop.
WSL2 XFCE4 setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install xfce4 xfce4-terminal xubuntu-desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Place this script in a directory on the PATH | |
# Launch from Windows with Windows-R then | |
# ubuntu.exe run restartXFCE4 | |
export DISPLAY=`echo $(cat /etc/resolv.conf | grep 'nameserver' | awk '{print $2}')`:0 | |
xfwm4 --replace --daemon --display=$DISPLAY & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Place this script in a directory on the PATH | |
# Launch from Windows with Windows-R then | |
# ubuntu.exe run startGnome | |
sudo /etc/init.d/dbus start &> /dev/null | |
export DISPLAY=`echo $(cat /etc/resolv.conf | grep 'nameserver' | awk '{print $2}')`:0 | |
gnome-session --display=$DISPLAY & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Place this script in a directory on the PATH | |
# Launch from Windows with Windows-R then | |
# ubuntu.exe run startXFCE4 | |
sudo /etc/init.d/dbus start &> /dev/null | |
export DISPLAY=`echo $(cat /etc/resolv.conf | grep 'nameserver' | awk '{print $2}')`:0 | |
xfce4-panel -r --display=$DISPLAY | |
xfce4-session --display=$DISPLAY & | |
# This is the only way to ensure that xfce4-screensaver is truly inactive. | |
# Otherwise the screen will go unresponsive when xfce4-screensaver activates. | |
# Wait a minute before trying to kill it | |
sleep 60 && sudo pkill -9 xfce4-screensaver & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment