public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problems with mintty jump list
@ 2018-05-12 14:05 Michael Schaap
  2018-05-13  7:47 ` Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Schaap @ 2018-05-12 14:05 UTC (permalink / raw)
  To: cygwin

I'm experimenting with the new mintty jump list feature, but I'm having 
trouble getting things working.

I've added the following to my .minttyrc:

     TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o 
BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o 
ServerAliveInterval=60 myserver.example.org

I then started mintty with:

     mintty -o AppID=minttytest

The MinTTY window appeared, with a new icon on the task bar.  I pinned 
that icon, and closed this new window.
A right click on the taskbar icon now indeed shows two jump list 
entries: default and myserver.

But when I click on "default", a MinTTY window does open and runs my 
shell (which is zsh), but the environment is different than normal: for 
instance, /usr/bin is not in the $PATH and most commands are therefore 
not found.  (It's not running as a login shell?)

When I close all MinTTY windows, the icon remains on the taskbar (as it 
should), but the jump list entries are gone.

What am I doing wrong?

Thanks,

  - Michael

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with mintty jump list
  2018-05-12 14:05 Problems with mintty jump list Michael Schaap
@ 2018-05-13  7:47 ` Brian Inglis
  2018-05-13  9:57   ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2018-05-13  7:47 UTC (permalink / raw)
  To: cygwin

On 2018-05-12 06:28, Michael Schaap wrote:
> I'm experimenting with the new mintty jump list feature, but I'm having trouble
> getting things working.
> I've added the following to my .minttyrc:
>     TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o
> BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o ServerAliveInterval=60
> myserver.example.org
> I then started mintty with:
>     mintty -o AppID=minttytest
> The MinTTY window appeared, with a new icon on the task bar.  I pinned that
> icon, and closed this new window.
> A right click on the taskbar icon now indeed shows two jump list entries:
> default and myserver.
> But when I click on "default", a MinTTY window does open and runs my shell
> (which is zsh), but the environment is different than normal: for instance,
> /usr/bin is not in the $PATH and most commands are therefore not found.  (It's
> not running as a login shell?)
> When I close all MinTTY windows, the icon remains on the taskbar (as it should),
> but the jump list entries are gone.
> What am I doing wrong?

Why would you even expect jump lists to be shown on console window icons?
Jump lists show (some) recent items opened by an app thru Explorer shell
interactions, but mintty does not open files dropped from Explorer, just
converts the Windows path to a Cygwin path, and pastes that.

If you man mintty and search for Taskbar, you can find out more about how you
can preset jump list items for mintty, and the requirements and limitations.
You may also want to search for more info about jump lists on the mintty project
site at https://github.com/mintty/mintty/

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with mintty jump list
  2018-05-13  7:47 ` Brian Inglis
@ 2018-05-13  9:57   ` Thomas Wolff
  2018-05-13 14:38     ` Michael Schaap
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Wolff @ 2018-05-13  9:57 UTC (permalink / raw)
  To: cygwin

Am 12.05.2018 um 19:15 schrieb Brian Inglis:
> On 2018-05-12 06:28, Michael Schaap wrote:
>> I'm experimenting with the new mintty jump list feature, but I'm having trouble
>> getting things working.
>> I've added the following to my .minttyrc:
>>      TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o
>> BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o ServerAliveInterval=60
>> myserver.example.org
>> I then started mintty with:
>>      mintty -o AppID=minttytest
>> The MinTTY window appeared, with a new icon on the task bar.  I pinned that
>> icon, and closed this new window.
>> A right click on the taskbar icon now indeed shows two jump list entries:
>> default and myserver.
>> But when I click on "default", a MinTTY window does open and runs my shell
>> (which is zsh), but the environment is different than normal: for instance,
>> /usr/bin is not in the $PATH and most commands are therefore not found.  (It's
>> not running as a login shell?)
Yes, as you most likely want to run a login shell, you should add a bare 
'-' to the arguments list, like

TaskCommands=default:-p 100,100 -;...

>> When I close all MinTTY windows, the icon remains on the taskbar (as it should),
>> but the jump list entries are gone.
>> What am I doing wrong?
Nothing. I have no idea why this fails, in my testing it worked. On the 
other hand, the whole jump list showed up on only 2 of 3 test systems 
and failed on one. Mozilla applications (Thunderbird, Firefox) manage to 
establish a task list on all of these systems, but their jumplist code 
looks much more complex. If someone finds out by what cursed Microsoft 
magic this is further affected, I'd consider an enhancement...

> Why would you even expect jump lists to be shown on console window icons?
> Jump lists show (some) recent items opened by an app thru Explorer shell
> interactions, but mintty does not open files dropped from Explorer, just
> converts the Windows path to a Cygwin path, and pastes that.
The feature configured by TaskCommands=... is about the "Tasks" section 
of the jump list, not the "Recent" section.

> If you man mintty and search for Taskbar, you can find out more about how you
> can preset jump list items for mintty, and the requirements and limitations.
> You may also want to search for more info about jump lists on the mintty project
> site at https://github.com/mintty/mintty/
He actually configured mintty properly for the jump list (save the 
missing dash), it's just that the mintty jumplist implementation is not 
perfect because this is one of the dark areas of incredibly complex and 
incredibly poorly documented Windows APIs.

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with mintty jump list
  2018-05-13  9:57   ` Thomas Wolff
@ 2018-05-13 14:38     ` Michael Schaap
  2018-05-13 21:05       ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Schaap @ 2018-05-13 14:38 UTC (permalink / raw)
  To: cygwin

On 13 May 18 11:45, Thomas Wolff wrote:
> Am 12.05.2018 um 19:15 schrieb Brian Inglis:
>> On 2018-05-12 06:28, Michael Schaap wrote:
>>> I'm experimenting with the new mintty jump list feature, but I'm 
>>> having trouble
>>> getting things working.
>>> I've added the following to my .minttyrc:
>>>      TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o
>>> BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o 
>>> ServerAliveInterval=60
>>> myserver.example.org
>>> I then started mintty with:
>>>      mintty -o AppID=minttytest
>>> The MinTTY window appeared, with a new icon on the task bar. I 
>>> pinned that
>>> icon, and closed this new window.
>>> A right click on the taskbar icon now indeed shows two jump list 
>>> entries:
>>> default and myserver.
>>> But when I click on "default", a MinTTY window does open and runs my 
>>> shell
>>> (which is zsh), but the environment is different than normal: for 
>>> instance,
>>> /usr/bin is not in the $PATH and most commands are therefore not 
>>> found.  (It's
>>> not running as a login shell?)
> Yes, as you most likely want to run a login shell, you should add a 
> bare '-' to the arguments list, like
>
> TaskCommands=default:-p 100,100 -;...

Indeed, that helped.
I was a bit confused about why I needed this here, and not when running 
MinTTY "normally", but then I saw that the default shortcut also had 
this argument.

>
>>> When I close all MinTTY windows, the icon remains on the taskbar (as 
>>> it should),
>>> but the jump list entries are gone.
>>> What am I doing wrong?
> Nothing. I have no idea why this fails, in my testing it worked. On 
> the other hand, the whole jump list showed up on only 2 of 3 test 
> systems and failed on one. Mozilla applications (Thunderbird, Firefox) 
> manage to establish a task list on all of these systems, but their 
> jumplist code looks much more complex. If someone finds out by what 
> cursed Microsoft magic this is further affected, I'd consider an 
> enhancement...

I got things working.  :-)
I noted that the entries disappeared from the list as soon as I clicked 
on one of them.  I eventually tried adding "-o AppID=..." to the 
arguments in TaskCommands, and that helped: the entries remained.
The only remaining problem was that the entries still disappeared when 
clicking on "Terminal" (or simply clicking on the pinned taskbar item 
with no terminal windows open), so I added AppName and AppLaunchCmd 
options to .minttyrc, and that did the trick.

So, in the end, I added these lines to ~/.minttyrc:

     TaskCommands=default:-o AppID=mymintty -p 1170,605 -;myserver:-o 
AppID=mymintty -p bottom -p right -o BackgroundColour=255,250,230 -e 
/usr/bin/ssh -C -Y -o ServerAliveInterval=60 myserver.example.org
     AppName=Terminal
     AppLaunchCmd=C:\cygwin64\bin\mintty.exe -o AppID=mymintty -

then started MinTTY with this shortcut:

     C:\cygwin64\bin\mintty.exe -o AppID=mymintty 
--store-taskbar-properties -

and pinned it to the taskbar.

Thanks for your help (and for providing the awesome MinTTY in general!),

  – Michael

PS: PuTTY also supports the jump list, both "Recent Sessions" and a 
couple of fixed "Tasks", this appears to work fine.  I'm sure you're 
more familiar with the PuTTY source code than that of Mozilla apps, so 
perhaps it helps to take a look at how PuTTY's doing this?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with mintty jump list
  2018-05-13 14:38     ` Michael Schaap
@ 2018-05-13 21:05       ` Thomas Wolff
  2018-05-13 21:54         ` Michael Schaap
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Wolff @ 2018-05-13 21:05 UTC (permalink / raw)
  To: cygwin

Am 13.05.2018 um 16:37 schrieb Michael Schaap:
> On 13 May 18 11:45, Thomas Wolff wrote:
>> Am 12.05.2018 um 19:15 schrieb Brian Inglis:
>>> On 2018-05-12 06:28, Michael Schaap wrote:
>>>> I'm experimenting with the new mintty jump list feature, but I'm 
>>>> having trouble
>>>> getting things working.
>>>> I've added the following to my .minttyrc:
>>>>      TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o
>>>> BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o 
>>>> ServerAliveInterval=60
>>>> myserver.example.org
>>>> I then started mintty with:
>>>>      mintty -o AppID=minttytest
>>>> The MinTTY window appeared, with a new icon on the task bar. I 
>>>> pinned that
>>>> icon, and closed this new window.
>>>> A right click on the taskbar icon now indeed shows two jump list 
>>>> entries:
>>>> default and myserver.
>>>> But when I click on "default", a MinTTY window does open and runs 
>>>> my shell
>>>> (which is zsh), but the environment is different than normal: for 
>>>> instance,
>>>> /usr/bin is not in the $PATH and most commands are therefore not 
>>>> found.  (It's
>>>> not running as a login shell?)
>> Yes, as you most likely want to run a login shell, you should add a 
>> bare '-' to the arguments list, like
>>
>> TaskCommands=default:-p 100,100 -;...
>
> Indeed, that helped.
> I was a bit confused about why I needed this here, and not when 
> running MinTTY "normally", but then I saw that the default shortcut 
> also had this argument.
>
>>
>>>> When I close all MinTTY windows, the icon remains on the taskbar 
>>>> (as it should),
>>>> but the jump list entries are gone.
>>>> What am I doing wrong?
>> Nothing. I have no idea why this fails, in my testing it worked. On 
>> the other hand, the whole jump list showed up on only 2 of 3 test 
>> systems and failed on one. Mozilla applications (Thunderbird, 
>> Firefox) manage to establish a task list on all of these systems, but 
>> their jumplist code looks much more complex. If someone finds out by 
>> what cursed Microsoft magic this is further affected, I'd consider an 
>> enhancement...
>
> I got things working.  :-)
> I noted that the entries disappeared from the list as soon as I 
> clicked on one of them.  I eventually tried adding "-o AppID=..." to 
> the arguments in TaskCommands, and that helped: the entries remained.
> The only remaining problem was that the entries still disappeared when 
> clicking on "Terminal" (or simply clicking on the pinned taskbar item 
> with no terminal windows open), so I added AppName and AppLaunchCmd 
> options to .minttyrc, and that did the trick.
>
> So, in the end, I added these lines to ~/.minttyrc:
>
>     TaskCommands=default:-o AppID=mymintty -p 1170,605 -;myserver:-o 
> AppID=mymintty -p bottom -p right -o BackgroundColour=255,250,230 -e 
> /usr/bin/ssh -C -Y -o ServerAliveInterval=60 myserver.example.org
>     AppName=Terminal
>     AppLaunchCmd=C:\cygwin64\bin\mintty.exe -o AppID=mymintty -
>
> then started MinTTY with this shortcut:
>
>     C:\cygwin64\bin\mintty.exe -o AppID=mymintty 
> --store-taskbar-properties -
>
> and pinned it to the taskbar.
>
> Thanks for your help (and for providing the awesome MinTTY in general!),
>
>  – Michael
>
> PS: PuTTY also supports the jump list, both "Recent Sessions" and a 
> couple of fixed "Tasks", this appears to work fine.  I'm sure you're 
> more familiar with the PuTTY source code than that of Mozilla apps, so 
> perhaps it helps to take a look at how PuTTY's doing this?
Thanks, maybe jumplist-started instances should implicitly inherit AppID.
Are you sure --store-taskbar-properties is needed to get the jumplist 
stable? This would have additional implications, to be checked.
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with mintty jump list
  2018-05-13 21:05       ` Thomas Wolff
@ 2018-05-13 21:54         ` Michael Schaap
  2018-07-01 13:59           ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Schaap @ 2018-05-13 21:54 UTC (permalink / raw)
  To: cygwin

On 13 May 18 22:04, Thomas Wolff wrote:
> Thanks, maybe jumplist-started instances should implicitly inherit AppID.
Probably, yes.  In fact, not just jumplist-started instances, but any 
instance (also the default one) opened from the task bar icon.

> Are you sure --store-taskbar-properties is needed to get the jumplist 
> stable? This would have additional implications, to be checked.
No, I'm not sure at all.  I just added this because the man page told me 
for AppLaunchCmd: "This is only effective if combined with an AppName 
option and the command-line option --store-taskbar-properties to make it 
persistent.".  And I *did* have to add an AppLaunchCmd to the .minttyrc, 
otherwise the default task bar icon action would open a window without 
the AppID, but also without a login shell.

- Michael

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with mintty jump list
  2018-05-13 21:54         ` Michael Schaap
@ 2018-07-01 13:59           ` Thomas Wolff
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Wolff @ 2018-07-01 13:59 UTC (permalink / raw)
  To: cygwin

Am 13.05.2018 um 23:05 schrieb Michael Schaap:
> On 13 May 18 22:04, Thomas Wolff wrote:
>> Thanks, maybe jumplist-started instances should implicitly inherit AppID.
> Probably, yes.  In fact, not just jumplist-started instances, but any 
> instance (also the default one) opened from the task bar icon.
>
>> Are you sure --store-taskbar-properties is needed to get the jumplist 
>> stable? This would have additional implications, to be checked.
> No, I'm not sure at all.  I just added this because the man page told 
> me for AppLaunchCmd: "This is only effective if combined with an 
> AppName option and the command-line option --store-taskbar-properties 
> to make it persistent.".  And I *did* have to add an AppLaunchCmd to 
> the .minttyrc, otherwise the default task bar icon action would open a 
> window without the AppID, but also without a login shell.
There does not seem to be a way to determine anything like an inherited 
AppID when run from a jump list.
This makes things unnecessarily complicated. I'm adding the following to 
the manual page as a note to option TaskCommands:

Note: To make the jump list persistent, it is necessary to carefully 
apply additional tricks to satisfy the insane taskbar configuration 
paradigm of Windows.
First, also configure a default taskbar icon command using options 
AppName and AppLaunchCmd.
Second, choose a unique value for AppID and also add it to the (default) 
launch command and all (jumplist) task commands.
Third, invoke mintty with the chosen AppID and option 
--store-taskbar-properties.

Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-01 13:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-12 14:05 Problems with mintty jump list Michael Schaap
2018-05-13  7:47 ` Brian Inglis
2018-05-13  9:57   ` Thomas Wolff
2018-05-13 14:38     ` Michael Schaap
2018-05-13 21:05       ` Thomas Wolff
2018-05-13 21:54         ` Michael Schaap
2018-07-01 13:59           ` Thomas Wolff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).