Re: recognizing an xterm running only bash from the CLI
On Mon, Aug 11, 2025 at 04:23:36PM +0200, Nicolas George wrote:
<snip>
> So this was a XY problem.
If you say so but I don't see it that way.
> Do not try to guess which terminal is running ???only bash???, have the
I wasn't trying to guess and you gave me the answer, Thank You.
> Before bash: xterm -e 'something ; $SHELL'
So I made a tiny script in /mc/bin/Xpts whose sole contents are:
tty > ~/.Xpts
In ~/.xinitrc:
xterm -geometry 111x40+1+1 -e '/mc/bin/Xpts; $SHELL' &
The function toX() { echo $* > $(< ~/.Xpts) }
now allows me to put some text in the open xterm running bash
regardless where the xserver puts it.
Again, Thank you,
Mike
--
Take no thought for the morrow; that's your privilege.
But don't complain if when it gets here you're off guard.
_The_Shockwave_Rider_ by John Brunner
Reply to: