Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can it be did using Python(in Ubuntu)?

share|improve this question
    
You should ask on StackOverflow. There are some smart py people over there. –  Chris K Jun 17 '12 at 20:31
    
Please check: stackoverflow.com/questions/3983946/… –  Javier Rivera Jun 18 '12 at 14:15
add comment

1 Answer 1

import wnck
screen = wnck.screen_get_default()
window = screen.get_active_window()
pid = window.get_pid()
share|improve this answer
    
This gets the ID of the process, but not the process' name. If you know the process ID, however, you could then open the System Monitor and match the ID to the process name in the table under the "Processes" tab. –  WarriorIng64 Aug 7 '12 at 21:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.