0

I am intresting in launching an xterm window from python code in following way:

cmd = './my_task'
subprocess.Popen(['xterm', '-t', 'my_task', '-e', cmd])

However, I want this xterm session to be set to always on top from command line.

One way I was able to do this is by doing this:

cmd = 'wmcntl -r 'my_task' -b add,above; ./my_task'
subprocess.Popen(['xterm', '-t', 'my_task', '-e', cmd])

But this requires the machine to have wmctrl installed.

Is there a standard way of doing this (I don't need a cross platform solution, just for Linux)

Thanks,

Itay

Itay Marom
  • 801
  • 6
  • 15
  • @shellter - you might be right, but I am thinking the solution might be using the x window protocol if not by passing a secert parameter to xterm – Itay Marom Dec 14 '15 at 21:56
  • Sorry, this first struck me as a user level Q. I see there really is coding involved ;-) . Good luck. – shellter Dec 14 '15 at 21:57
  • Use Python/Xlib: http://stackoverflow.com/a/3297152/1554386 ? – Alastair McCormack Dec 14 '15 at 22:45
  • The suggested answers in the link provided by [@alastair-mccormack](http://stackoverflow.com/users/1554386/alastair-mccormack) would work; if there were an accepted answer, it would make this a duplicate. – Thomas Dickey Dec 14 '15 at 23:39

0 Answers0