Cygwin opening wrong terminal from taskbar

1

1

I've installed Cygwin on a Windows 7 machine. The other day, I used the Cygwin installer to update and install a new package. After that, the Cygwin icon on my taskbar opens some other terminal that doesn't have any of the commands that it should. However, the Cygwin icon in the Start menu does open up the correct terminal.

This is the Cygwin terminal that I opened from the start menu:

Cygwin working correctly

And this is the Cygwin (but not really Cygwin) terminal that I opened from the taskbar:

Cygwin but not Cygwin

Note the different icon on the not-Cygwin terminal and the fact that the ls command is not found.

That icon matches what I'm seeing in my taskbar. If I don't have Cygwin open, I have the "standard" terminal image in the taskbar:

terminal in taskbar

But if I go to the start menu and open Cygwin, I see this in the taskbar:

Cygwin open in taskbar

I have tried uninstalling and reinstalling Cygwin, but it made no difference.

What could be causing this and how can I fix it?

jimchristie

Posted 2015-11-09T13:32:33.147

Reputation: 113

Answers

1

I was having a similar issue this week; the icon was missing entirely when I opened it, and when I had it pinned to the taskbar, it just spawned off to another area of the taskbar.

There was a package update yesterday or today for mintty, and that seems to have fixed my issue. Can you update and see if that fixes yours?

Scythril

Posted 2015-11-09T13:32:33.147

Reputation: 26

2

Cygwin icon on my taskbar opens some other terminal

The icon on the taskbar is running cygwin.bat:

@echo off

C:
chdir C:\cygwin\bin

bash --login -i

This is a batch file that open a cmd shell and then runs bash.

The icon in the start menu is a shortcut to the cygwin terminal mintty that is running the following command:

C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -

This is a shortcut the runs the Cygwin terminal mintty and then logs in to your default shell (this is usually bash but could be another shell).

You can delete the shortcut to cygwin.bat from the taskbar and then pin the Cygwin terminal mintty icon to the taskbar instead:

  • Right click "Cygwin64 Terminal"

  • Select "Pin to Taskbar"

Note:

  • This is for the 64 bit version of Cygwin, the 32 bit version may have a different name.

enter image description here

DavidPostill

Posted 2015-11-09T13:32:33.147

Reputation: 118 938

This is definitely a step in the right direction, but I'm still getting some weird behavior. When clicking on the new taskbar icon, it opens Cygwin as a new item in the taskbar, i.e., tacks it on to the end of the taskbar instead of expanding the existing icon. And when I right click the instance of Cygwin that is running as if I were going to open another instance, it shows the cygwin.bat terminal. – jimchristie – 2015-11-09T14:19:24.290

Your comment is not very clear :/ Have you followed my suggestion? – DavidPostill – 2015-11-09T14:30:36.690

Sorry about that. Yes, I followed your suggestion. When doing so, it added the proper Cygwin icon to the taskbar. However, when I click on that new icon it opens Cygwin as a new icon in the taskbar instead of expanding the existing icon. Also, if I right click on the "running" icon and try to open a second terminal, it still opens the cygwin.bat terminal. Is that clearer? – jimchristie – 2015-11-09T14:50:42.023

It doesn't help. When I pin Cygwin terminal mintty icon to the taskbar it works as expected. – DavidPostill – 2015-11-09T16:51:55.700