WSL icon indicating copy to clipboard operation
WSL copied to clipboard

bash not fully featured if launched from taskbar shortcut

Open omni- opened this issue 10 years ago • 12 comments

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.

omni- avatar May 10 '16 18:05 omni-

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".

rodrymbo avatar May 10 '16 19:05 rodrymbo

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.

omni- avatar May 10 '16 19:05 omni-

A few questions:

  1. How are you pinning bash to the command prompt? Are you using the ready - made "Bash on Ubuntu on Windows" shortcut, or something else?

  2. What happens if you type "bash ~" on a command prompt? This should be the same command as "Bash on Ubuntu on Windows"

russalex avatar May 10 '16 19:05 russalex

  1. I tried pinning it both ways.
  2. 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?

omni- avatar May 10 '16 22:05 omni-

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.

TigerLeep avatar May 11 '16 03:05 TigerLeep

No, that isn't it. apt-get works fine. It's not git-bash.

omni- avatar May 11 '16 04:05 omni-

Wondering if this has anything to do with your user. Can you try a different one? To do this:

  1. At the command prompt type lxrun /setdefaultuser <newusername>
  2. Follow the steps of creating a password
  3. Try bash ~again

russalex avatar May 11 '16 19:05 russalex

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.

omni- avatar May 11 '16 20:05 omni-

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.

cvelten avatar May 13 '16 05:05 cvelten

@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 '.'

benhillis avatar May 13 '16 21:05 benhillis

@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.

omni- avatar May 13 '16 21:05 omni-

Closing out this thread, if you're continuing to have issues please feel free to reopen.

benhillis avatar May 27 '16 00:05 benhillis