bash not fully featured if launched from taskbar shortcut
As the title says. It works fine if launched through Run or cmd, but if you pin bash to the taskbar to launch, it seems to fail to not be able to interact with the Windows filesystem. pwd will return /home/<user>, but ls will not output anything. cd fails to work completely.
Also the text is grey rather than green, not sure why.
Hey thanks. Hadn't thought of doing it that way. It works fine for me.
Are you starting it from the shortcut on the start menu, then pinning it? I think the shortcut has some sort of magical attribute not available when starting it from CMD or that sort of thing.
I also suspect the text color is part of the standard color options of the console. Click in the upper left corner and choose "defaults".
Yeah, it still has weird behavior when pinned from start. The only reason I mentioned the color thing was because the color is green on black when launched from Run or cmd, and grey on black when launched from taskbar.
A few questions:
-
How are you pinning bash to the command prompt? Are you using the ready - made "Bash on Ubuntu on Windows" shortcut, or something else?
-
What happens if you type "bash ~" on a command prompt? This should be the same command as "Bash on Ubuntu on Windows"
- I tried pinning it both ways.
- The same glitchy bash comes up if I do it this way.
On an unrelated note, I was fiddling with my .bashrc file and now whenever bash starts it says bash: /home/<user>/.bashrc: Input/output error. What could be causing this?
bash not fully featured if launched
Do you by any chance have git-bash installed? I did and was very confused why I was not getting a fully functioning bash (I couldn't run apt-get, my drives were mounted under / instead /mnt, etc.). I uninstalled git-bash and now when I run bash I get the real WSL bash.
No, that isn't it. apt-get works fine. It's not git-bash.
Wondering if this has anything to do with your user. Can you try a different one? To do this:
- At the command prompt type
lxrun /setdefaultuser <newusername> - Follow the steps of creating a password
- Try
bash ~again
The same thing happens. It's still grey when launched from the taskbar.
Although I realized something; cd works fine to get out, but ls does nothing when used from the home directory. This happens regardless of how I launch bash. ls -l properly displays the files, however. So maybe the only difference is in the color? I'm not sure. Let me know if you need more info.
Regarding the color, do you have force_color_prompt set in your ~/.bashrc? I have also experienced some different looks when running bash from cmd or using the Bash on Ubuntu on Windows entry.
@omni Do you have any files in your home directory that don't begin with a '.'? ls without arguments by default hides files that begin with '.'
@cvelten I turned on force_color_prompt, but there is still a minor difference. The $ and the text I type into the terminal are still grey.

@benhillis That would answer my question, thanks.
Closing out this thread, if you're continuing to have issues please feel free to reopen.