Re: how find name of terminal emulator?
On 2022-06-28, Vincent Lefevre <vincent@vinc17.net> wrote:
> On 2022-06-28 10:14:48 -0400, Greg Wooledge wrote:
>> On Tue, Jun 28, 2022 at 01:53:17PM +0000, visqajin@yahoo.com wrote:
>> > so if i start uxterm or xterm, how do i find name using command?
>>
>> ps -p "$PPID"
>
> But note that you won't be able to tell the difference between
> xterm and uxterm like that, since uxterm is just xterm using a
> different resource class. "xprop -id $WINDOWID" gives additional
> information, in particular WM_CLASS.
>
This seems to work (without all the superfluous output of xprop ...)
ps -p $(ps -p $$ -o ppid=) o args=
curty@einstein:~$ ps -p $(ps -p $$ -o ppid=) o args=
xterm -class UXTerm -title uxterm -u8
curty@einstein:~$ ps -p $(ps -p $$ -o ppid=) o args=
xterm
Reply to: