Space in username breaks wsl integration cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wslu (Ubuntu) |
Fix Released
|
Critical
|
Patrick Wu |
Bug Description
* What you're doing and what's happening: launching bash from a user whose name includes a space breaks /etc/profile.
* What's wrong / what should be happening instead:
> PS C:\Users\Jack Troughton\
> -bash: [: /mnt/c/Users/Jack: binary operator expected
> mkdir: cannot create directory ë/mnt/c/
> -bash: $WSL_INTEGRATIO
>
>
The reason it breaks is due to incorrect quoting around $HOME and things derived from it. It looks like you have parallel issues as well which could break pulse audio on a machine with a space in its hostname (is that legal in windows-land?)
I have created a zip file containing a fix, both the complete script and a unified context diff. I hereby place my changes in the public domain, free for use by anybody for anything.
The fix is at http://
Windows build number: Microsoft Windows [Version 10.0.18362.720]
My WSL is the Ubuntu flavour of
Linux version 4.4.0-18362-
lsb_release -rd says
Description: Ubuntu 18.04.4 LTS
Release: 18.04
apt-cache policy wslu says
wslu:
Installed: (none)
Candidate: 2.3.2-0ubuntu2~
Version table:
2.
500 http://
500 http://
Related branches
- Sebastien Bacher: Approve
-
Diff: 56 lines (+7/-4) (has conflicts)4 files modifieddebian/changelog (+4/-0)
debian/patches/0008-Set-up-sound-when-starting-GUI-programs-via-Windows-.patch (+2/-2)
debian/patches/0009-Fix-empty-.config-wslu-baseexec.patch (+0/-1)
debian/patches/0010-Matching-original-Windows-username-space-fix.patch (+1/-1)
tags: | added: regression-update |
Changed in wslu (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Critical |
Changed in wslu (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in wslu (Ubuntu): | |
assignee: | nobody → Patrick Wu (callmepk) |
Changed in wslu (Ubuntu): | |
status: | In Progress → Fix Committed |
This bug was fixed in the package wslu - 2.3.6-0ubuntu1
---------------
wslu (2.3.6-0ubuntu1) focal; urgency=medium
[ Patrick Wu ] wsl-integration .sh: removal links in profile.d as requested by MSFT. wsl-integration .sh: Fix issue that space in username breaks integration. sh. (LP: #1869878) wsl-integration .sh: Use /tmp folder for system users who do not have
* Upstream update to 2.3.6 to address critical issues (LP: #1871986)
- wslupath manpage update
- fixes that imported distro cannot be properly handled by baseexec_gen
- fix an issue in handling dirty output in regenerate baseexec
- fix an issue in generating ~/.config/baseexec
- wslusc: fix an issue that will cause generated shortcut cannot be opened
for some users
* Update patches
* debian/
* debian/
wsl-
* debian/
$HOME. (LP: #1859509)
[ Balint Reczey ] wsl-integration .sh: Suppress errors when saving $HOME/.cache. wsl-integration .sh: debian/ wsl-integration .sh unset the right
* debian/
(LP: #1859509)
* debian/
variable at the end of script. (LP: #1857426)
-- Patrick Wu <email address hidden> Thu, 09 Apr 2020 20:27:13 +0800