The tutorial will tell you how to run desktop environment inside Windows Subsystem for Linux. And you don't need to build a developement environment with virtual machines any more. :)
Your PC must be running a 64-bit version of Windows 10 Anniversary Update build 14393 or later.
To find your PC's CPU architecture and Windows version/build number, open Settings>System>About. Look for the OS Build and System Type fields.
In order to run Bash on Windows, you will need to manually:
After you have accepted the License, the Ubuntu user-mode image will be downloaded and a “Bash on Ubuntu on Windows” shortcut will be added to your start menu.
Install the lastest version of VcXsrv.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xfce4-terminal
sudo apt-get install xfce4
Add DISPLAY=:0.0 to your ~/.bashrc
, and don't forget to run source ~/.bashrc
. :)
export DISPLAY=:0.0
export LIBGL_ALWAYS_INDIRECT=1
You need to replace
<listen>unix:tmpdir=/tmp</listen>
with
<listen>tcp:host=localhost,port=0</listen>
in /etc/dbus-1/session.conf.
You need to replace
<auth>EXTERNAL</auth>
with
<auth>ANONYMOUS</auth>
<allow_anonymous/>
in /etc/dbus-1/session.conf.
Open XLaunch, choose “One large window” or “One large window without titlebar” and set the “display number” to 0. Other settings leave as default and finish the configuration.
Execute the following command inside “Bash on Ubuntu on Windows”.
startxfce4
Install the lastest version of Hack fonts.
sudo apt-get install fonts-noto
sudo apt-get install fonts-noto-hinted
sudo apt-get install fonts-noto-mono
sudo apt-get install fonts-noto-unhinted
sudo apt-get install fonts-noto-cjk
Add the following shell code to your bashrc
if grep -q Microsoft /proc/version; then
if [ "$(umask)" == '0000' ]; then
umask 0022
fi
fi
sudo apt-get install fcitx
sudo apt-get install fcitx-pinyin
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
sudo apt-get install guake
Please enjoy your development environment. :)
wsl-tutorial's People
Forkers
aameralduais joshuatee hussainssabir igormusic yfhust hir0rin agentlame phucnguyen81 maxmelander distortedsignal hfmanson onixus74 hasantg ioeory nebulabox techeye220 alexlib dewdad dragonandy 0x8f701 xianjiaodahe91 jordan-stlpro robertus100 pharazone terwer bridgew zymitsky sadpdtchr antonioferrerlopez itsjef alliex2000 dmi3mis 19317362 min27999 ikuibida mindversal two-one-five syxo ggzitha mccoychang adv27 crramirez qtao s123600g jcchikikomori shalevy1 waga43 mrm7moud shakahl faisalnawazmir kid1412621 outta ubuntulover09 stahta01 ninja-fse divdroid2 asm-informatik asrnd eptrvskywsl-tutorial's Issues
/etc/dbus-1/sesson.conf doesn't exist
In the latest wsl (1803) with ubuntu 16.04, sesson.conf can't be located
How to change the resolution?
in xfce the resolutionn is fixed.
`apt-get install` unable to locate font packages
In the font installation step, only sudo apt-get install fonts-noto
succeeds.
The following apt-get install
commands fail with an "E: Unable to locate package fonts-..." error:
sudo apt-get install fonts-hack-otf
sudo apt-get install fonts-hack-ttf
sudo apt-get install fonts-hack-web
sudo apt-get install fonts-noto-hinted
sudo apt-get install fonts-noto-mono
sudo apt-get install fonts-noto-unhinted
sudo apt-get install fonts-noto-cjk
I noticed that this page says:
This package used to contain the web variants of the Hack font, which are now part of the consolidated fonts-hack package.
This package is a dummy transitional package. It can be safely removed.
The other fonts-hack-*
packages are also described as dummy transitional packages that can be safely removed.
However, sudo apt-get install fonts-hack
also fails with an "E: Unable to locate package fonts-hack" error.
xrdb: Can't open display
Following wsl2-tutorial - using ArchLinux instead of Ubuntu - I get the following error when I try to run startxfce4
:
$ startxfce4
/usr/sbin/startxfce4: X server already running on display 192.168.96.1:0
xrdb: Connection timed out
xrdb: Can't open display '192.168.96.1:0'
Failed to connect to bus: No such file or directory
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.
$ env | grep -i dbus
returns an empty result.
So I run $ export $(dbus-launch)
and then:
$ env | grep -i dbus
DBUS_SESSION_BUS_PID=6069
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-LGwJ05xky5,guid=5d62e22c1553514e0ab605f65ef24f39
With that I got rid of the unable to connect to D-Bus error, but then I got another one:
$ startxfce4
/usr/sbin/startxfce4: X server already running on display 192.168.96.1:0
xrdb: Connection timed out
xrdb: Can't open display '192.168.96.1:0'
Failed to import environment: Process org.freedesktop.systemd1 exited with status 1
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.
Some other info:
$ systemctl --user status
Failed to read server status: Process org.freedesktop.systemd1 exited with status 1
$ systemctl --user show-environment
Failed to get environment: Process org.freedesktop.systemd1 exited with status 1
$ systemctl status -l --no-pager user@$(id -u).service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Any idea where the problem could be and how I can fix it?
/etc/dbus-1/session.conf file does not exist
I tried following your tutorial
just wanted to mention the path to the dbus config has been changed to '/usr/share/dbus-1/session.conf'
source
I also wanted to suggest to relocate the paths of the to-edit files to before what needs to be changed
e.g "In file /usr/share/dbus-1/session.conf, replace x with y"
just UX things
nice tutorial anyways
how to add sogoupinyin input method?
In xfce desktop envrionment, I can't setup a chinese input method such as sougou, do you have any suggestions? I have followed your instructions, but it seems not working.
Under the new Ubuntu 18.04, /etc/dbus-1/session.conf no longer exists
Hi,
I installed the new Ubuntu 18.04 from the Windows Store today. WSL works fine for me, and I followed your tutorial until it got to the point where I needed to edit dbus
config. However, I can not find /etc/dbus-1/session.conf
. There are instead two directories: session.d
, which is empty, and system.d
, which has a bunch of unrelated files. Performing a cat * | grep -i listen
and cat * | grep -i auth
turned up nothing. My graphical setup still works well, I can still run gedit and xeyes, but I keep getting complaints about dbus and connection refused. Any help appreciated.
Thanks,
Arjun
xrdp Can't open display.
kamey@DESKTOP-NN9F1DD:~$ startxfce4 /usr/bin/startxfce4: X server already running on display :0.0 xrdb: Connection refused xrdb: Can't open display ':0.0' Unable to init server: Could not connect: Connection refused xfce4-session: Cannot open display: . Type 'xfce4-session --help' for usage.
Does anyone know what is the problem?
GitHub Releases
Hey, I have this repository on watch so I just noticed you pushed information for WSL2, which is great, thanks for that work!
I wonder if you would be willing to start doing GitHub Releases with major changes to content so that people could select "Watch Releases" and get a notification when you do so? Creating a new release is simple through the GitHub web UI.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.