:: Re: [DNG] ID which /dev/pts/? runni…
Top Page
Delete this message
Reply to this message
Author: Jakub Juszczakiewicz
Date:  
To: dng
Subject: Re: [DNG] ID which /dev/pts/? running just bash?
Hi all,

     Did you try something like this:
$ lsof -a -p $$ +d /dev/pts


---
Regards,
Jakub Juszczakiewicz
Krypto-IT

W dniu 2024-02-12 02:04, Mike McClain napisał(a):
> Howdy,
>     Most of what I do on the computer is text so I keep several VTs
> open, /dev/tty{1-10}, but now and then want to send some text to an 
> open
> xterm window on the desktop. Since I've never managed to get
> copy/paste to work between a tty and an xterm window I have to go to X
> and see what the xterm running bash thinks it is then go back to a tty
> and '$ echo "something" > /dev/pts/X'.

>
>     Though I normally have 1 xterm running just bash, one running mc
> and firefox running, the pts running bash moves around.
> One time when I launch X it's /dev/pts/0 the next time it may be pts/1
> or pts/2. It is totally unpredictable even though I launch xterm, then
> mc, then firefox in that order consistantly.

>
>     At this moment "$ ps | grep 'pts.*bash'" shows bash running on
> /dev/pts/{0,1,3,4}. "$ ps | grep 'pts.*mc'" shows mc on pts/2, Firefox
> has many tasks running on pts/1 and by looking in X I can see that my
> single xterm window today is on pts/0. I've no clue what is going on
> on /dev/pts/{3,4} as ps doesn't tell me anything other than
> 'bash -rcfile .bashrc' for them both yet I have no other windows open
> in X.

>
>     Unfortunately '$ ps | grep xterm' shows '?' for the tty and
> "'$ ps | grep 'pst.*xterm'" returns nada.

>
>     If anyone can tell me how from a tty to know which pts is the open
> xterm I'd be most grateful.

>
> Thanks and Be Well,
> Mike
> --
> I reserve the right to be completely wrong.
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng