xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Last modified 3 weeks ago

#1702 assigned enhancement

process data for session info display

Reported by: Boruch Owned by: Antoine Martin
Priority: minor Milestone: 2.3
Component: core Version: trunk
Keywords: PID htop Cc:


It would be nice for the "session information" menu item of the system tray to display information about the processes related to that session, something either similar to htop or pstree, but restricted to processes of that session.

An advantage of some form of htop tab would be an ability to send a signal to a process within the session, without the risk of confusing it with an identical program running in another xpra session.

Change History (2)

comment:1 Changed 3 weeks ago by Antoine Martin

Component: androidcore
Milestone: 2.22.3
Status: newassigned

How would we identify the processes to display here?

  • just the ones we manage with start / start-child and friends?
  • or just the ones that have windows and a valid NET_WM_PID?
  • or both

We could offer different actions for each process:

  • send signal
  • close windows (if any)
  • raise windows (if any)


Some more work in this area is already planned: #1671

comment:2 Changed 3 weeks ago by Boruch

I think what would cover everything would be

htop -p \
  $(for aa in $(pgrep xpra); do pstree -np $aa; done \
    | sed -n 's/^[^(]*(//;s/)[^(]*(/,/g;s/)$//;H;$x;s/\(.\)\n/\1,/gp')

Let me know if the one-liner doesn't work for you. I had to split it over three lines in the comment box in order for it to line-break properly and sometimes the re-formatting messes things up.

Note: See TracTickets for help on using tickets.