You are not logged in.

#1 2008-03-06 08:29:20

gunnihinn
Member
From: Torreón, Mexico
Registered: 2007-10-28
Posts: 81

Python script named in output of ps -u user

Does anyone here know how I can have a Python script report it's name in the output of "ps -u user", instead of just showing up as "Python"?

Reason I'm asking is that I just found this nifty little menu program called pytmenu on the Ubuntu forums, and I want it to start in the center of my screen. Problem is, I'm using Evilwm, so I can do it either with switches passed to Evilwm or Devil's Pie, but I need to know the programs name to do it. Passing "Python" as the name will probably not get me the results I want.

Offline

#2 2008-03-06 08:48:47

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Python script named in output of ps -u user

"ps -wwefu user"

if you just want the pid

"pgrep -fu user app-string"


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2008-03-06 09:03:45

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Python script named in output of ps -u user

oh. also.. if you want to change the process name from within python..
http://davyd.livejournal.com/166352.html


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#4 2008-03-06 09:07:04

gunnihinn
Member
From: Torreón, Mexico
Registered: 2007-10-28
Posts: 81

Re: Python script named in output of ps -u user

Brilliant! I'll start using this for evil right away. big_smile

Thanks.

Offline

Board footer

Powered by FluxBB