You are not logged in.

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

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

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: ಠ_ರೃ
Registered: 2004-05-25
Posts: 4,611
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

Offline

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

cactus
Taco Eater
From: ಠ_ರೃ
Registered: 2004-05-25
Posts: 4,611
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

Offline

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

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

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