LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kill specific Wine program from Command Line (https://www.linuxquestions.org/questions/linux-software-2/kill-specific-wine-program-from-command-line-314334/)

Brian114 04-17-2005 10:01 PM

Kill specific Wine program from Command Line
 
Hey Guys!
Here's my problem, I'm running Internet Call Manager (when I'm on the internet it monitors for incoming calls and notifies me) under wine.

Problem: I have it start when I'm connected, but need it to end when I disconnect (otherwise I get multiple 'your connection is broken' messages)

I can kill wine to end it, but if I have another wine program running it kills it too.

Can I 'kill' a specific wine program without killing the entire emulator? or can i start the process with a certain pid?


Any ideas?
Thanks

Linux.tar.gz 04-17-2005 11:49 PM

As a workaround, you can start each programs in a different terminal, then control+c to kill each separately...

megaspaz 04-18-2005 01:06 AM

answer:

ps axwww | grep wine

that will bring up a list of processes that have wine in them. look for the lowest number process id (the first column) that says something like '/usr/bin/wine-pthread some_windows_program.exe'.

example (killing IconEdit.exe)
Code:

[vjong@Tron vjong]$ ps axwww | grep wine
 2126 ?        S      0:00 /bin/bash /usr/bin/IconEdit_wine.sh
 2127 ?        S      0:09 /usr/bin/wine-pthread IconEdit.exe
 2131 ?        S      0:02 /usr/bin/wineserver
 2136 ?        S      0:00 /usr/bin/wine-pthread IconEdit.exe
 2137 ?        S      0:00 /usr/bin/wine-pthread IconEdit.exe
 2139 ?        S      0:03 /usr/bin/wine-pthread winrar.exe
 2144 ?        S      0:00 /usr/bin/wine-pthread winrar.exe
[vjong@Tron vjong]$ kill -9 2127
[vjong@Tron vjong]$ ps axwww | grep wine
 2131 ?        S      0:02 /usr/bin/wineserver
 2139 ?        S      0:04 /usr/bin/wine-pthread winrar.exe
 2144 ?        S      0:00 /usr/bin/wine-pthread winrar.exe
[vjong@Tron vjong]$

it looks like that works.

Brian114 04-18-2005 06:46 AM

Thanks for the quick replies,

But how can I do this from a script?

I need my 'run on disconnect' script to end the program automatically, not do it manually.
Doing it manually works, but how do I write a script to find the right pid?

I trying to make Linux 'Wife friendly'
:D

uptoeleven 06-07-2011 04:02 AM

Wine has a task manager
 
1.) click the "new terminal" icon - (provide one for your users if you don't have one!)
2.) type "wine taskmgr" then hit enter.

Windows Task Manager starts.


All times are GMT -5. The time now is 11:59 AM.