public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Persistent and same Cygwin session for Windows login and ssh login?
@ 2023-08-17 17:30 Cedric Blancher
  2023-08-17 21:38 ` Dr Bean
  2023-08-18  8:47 ` Corinna Vinschen
  0 siblings, 2 replies; 6+ messages in thread
From: Cedric Blancher @ 2023-08-17 17:30 UTC (permalink / raw)
  To: cygwin

Good evening!

How can I get a Cygwin session for one Windows login, and get the same
Cygwin session when I log into the same Windows machine via ssh?

Also, where does Cygwin store session information?

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

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

* Re: Persistent and same Cygwin session for Windows login and ssh login?
  2023-08-17 17:30 Persistent and same Cygwin session for Windows login and ssh login? Cedric Blancher
@ 2023-08-17 21:38 ` Dr Bean
  2023-08-19  9:25   ` Dr Bean
  2023-08-18  8:47 ` Corinna Vinschen
  1 sibling, 1 reply; 6+ messages in thread
From: Dr Bean @ 2023-08-17 21:38 UTC (permalink / raw)
  To: Cedric Blancher via Cygwin

On Thu, 17 Aug 2023, Cedric Blancher via Cygwin wrote:

> Good evening!
> 
> How can I get a Cygwin session for one Windows login, and get the same
> Cygwin session when I log into the same Windows machine via ssh?


Following 
https://learn.microsoft.com/ja-jp/windows-server/administration/openssh/openssh_server_configuration

and substituting cygwin bash's
path for powershell's, I get
a cygwin bash shell.

But $HOME is Window's and .bashrc
is not executed.

Let me see if I can set HOME.

> 
> Also, where does Cygwin store session information?
> 
> Ced
> -- 
> Cedric Blancher <cedric.blancher@gmail.com>
> [https://plus.google.com/u/0/+CedricBlancher/]
> Institute Pasteur
> 
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
-- 
Greg Matheson          Theory and practice. In theory, they are the same thing.
http://drbean.sdf.org  In practice, they are different.
drbean@freeshell.org   --https://quoteinvestigator.com/2018/04/14/theory/

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

* Re: Persistent and same Cygwin session for Windows login and ssh login?
  2023-08-17 17:30 Persistent and same Cygwin session for Windows login and ssh login? Cedric Blancher
  2023-08-17 21:38 ` Dr Bean
@ 2023-08-18  8:47 ` Corinna Vinschen
  2023-08-18 10:23   ` Thomas Wolff
  1 sibling, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-18  8:47 UTC (permalink / raw)
  To: cygwin

On Aug 17 19:30, Cedric Blancher via Cygwin wrote:
> Good evening!
> 
> How can I get a Cygwin session for one Windows login, and get the same
> Cygwin session when I log into the same Windows machine via ssh?

You can't.  Windows isolates sessions from each other.

> Also, where does Cygwin store session information?

Nowhere, really.  Sessions are a Windows thing.  We only keep a bit of
transient stuff in various shared memory regions.


Corinna

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

* Re: Persistent and same Cygwin session for Windows login and ssh login?
  2023-08-18  8:47 ` Corinna Vinschen
@ 2023-08-18 10:23   ` Thomas Wolff
  2023-08-18 11:50     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Wolff @ 2023-08-18 10:23 UTC (permalink / raw)
  To: cygwin



Am 18.08.2023 um 10:47 schrieb Corinna Vinschen via Cygwin:
> On Aug 17 19:30, Cedric Blancher via Cygwin wrote:
>> Good evening!
>>
>> How can I get a Cygwin session for one Windows login, and get the same
>> Cygwin session when I log into the same Windows machine via ssh?
> You can't.  Windows isolates sessions from each other.
Not quite sure what you mean by session. Maybe you want to multiplex a 
session among terminals (and thus initial logins) with 'tmux' or 'screen'.

Thomas

>> Also, where does Cygwin store session information?
> Nowhere, really.  Sessions are a Windows thing.  We only keep a bit of
> transient stuff in various shared memory regions.
>
>
> Corinna
>


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

* Re: Persistent and same Cygwin session for Windows login and ssh login?
  2023-08-18 10:23   ` Thomas Wolff
@ 2023-08-18 11:50     ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-18 11:50 UTC (permalink / raw)
  To: cygwin

On Aug 18 12:23, Thomas Wolff via Cygwin wrote:
> 
> 
> Am 18.08.2023 um 10:47 schrieb Corinna Vinschen via Cygwin:
> > On Aug 17 19:30, Cedric Blancher via Cygwin wrote:
> > > Good evening!
> > > 
> > > How can I get a Cygwin session for one Windows login, and get the same
> > > Cygwin session when I log into the same Windows machine via ssh?
> > You can't.  Windows isolates sessions from each other.
> Not quite sure what you mean by session. Maybe you want to multiplex a
> session among terminals (and thus initial logins) with 'tmux' or 'screen'.

I was talking about Windows terminal server sessions, as they show up in
the Windows user token.  I'm not aware that the Cygwin DLL is concerned
with tty session handling apart from keeping track of ptys in use, but
there's a good chance I'm missing something.


Corinna

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

* Re: Persistent and same Cygwin session for Windows login and ssh login?
  2023-08-17 21:38 ` Dr Bean
@ 2023-08-19  9:25   ` Dr Bean
  0 siblings, 0 replies; 6+ messages in thread
From: Dr Bean @ 2023-08-19  9:25 UTC (permalink / raw)
  To: Dr Bean via Cygwin

On Thu, 17 Aug 2023, Dr Bean via Cygwin wrote:

> On Thu, 17 Aug 2023, Cedric Blancher via Cygwin wrote:
> 
> > Good evening!
> > 
> > How can I get a Cygwin session for one Windows login, and get the same
> > Cygwin session when I log into the same Windows machine via ssh?
> 
> 
> Following 
> https://learn.microsoft.com/ja-jp/windows-server/administration/openssh/openssh_server_configuration
> 
> and substituting cygwin bash's
> path for powershell's, I get
> a cygwin bash shell.
> 
> But $HOME is Window's and .bashrc
> is not executed.
> 
> Let me see if I can set HOME.

I appear to have answered a
question which wasn't asked,
how to get Microsoft's
implementation of sshd working.

i have run up against the problem 
of the OP, trying and failing
to reattach a detached screen
session over ssh.

Solving my own problem of wrong
HOME and no execution of bashrc,
a Windows batch file that sets HOME
and invokes bash with
interactive, login and rcfile
options did the trick.

But is there an official way
to run cygwin with MS's sshd?

> > Cedric Blancher <cedric.blancher@gmail.com>
> > [https://plus.google.com/u/0/+CedricBlancher/]
> > Institute Pasteur
> > 
> > -- 
> > Problem reports:      https://cygwin.com/problems.html
> > FAQ:                  https://cygwin.com/faq/
> > Documentation:        https://cygwin.com/docs.html
> > Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
> -- 
> Greg Matheson          Theory and practice. In theory, they are the same thing.
> http://drbean.sdf.org  In practice, they are different.
> drbean@freeshell.org   --https://quoteinvestigator.com/2018/04/14/theory/

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

end of thread, other threads:[~2023-08-19  9:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 17:30 Persistent and same Cygwin session for Windows login and ssh login? Cedric Blancher
2023-08-17 21:38 ` Dr Bean
2023-08-19  9:25   ` Dr Bean
2023-08-18  8:47 ` Corinna Vinschen
2023-08-18 10:23   ` Thomas Wolff
2023-08-18 11:50     ` Corinna Vinschen

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