Author Topic: [ SOLVED ] Kill a Process ... some help needed  (Read 5037 times)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: Kill a Process ... some help needed
« Reply #15 on: December 02, 2011, 11:33:48 AM »
This is the selection screen to choose the source of the recording ....


MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline parnote

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4436
  • The truth is out there ... PCLinuxOS!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #16 on: December 02, 2011, 05:12:09 PM »
Hmmm ... I'm curious, Just18 ... you think this could find its way to the repos? Maybe someone could package it up?
PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #17 on: December 02, 2011, 05:40:02 PM »
Hmmm ... I'm curious, Just18 ... you think this could find its way to the repos? Maybe someone could package it up?

It would need the hard work done first  :D  The easy bit is there .....  but it should have more options for things like audio presets or whatever to make it widely useful.

.....  or that is what I think ....

as it is it is a nice simple recorder for my needs ......  something that is sadly missing in KDE .....

Maybe you would like to take it and put a nice 'face' on it?  :)

I still have not been able to figure out how best to convert stuff like this to 'proper' GUI ...

Let me know if you try recording with it and how it works for you?



Thanks.
« Last Edit: December 03, 2011, 06:45:27 AM by Just18 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline parnote

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4436
  • The truth is out there ... PCLinuxOS!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #18 on: December 02, 2011, 07:01:12 PM »
I think "simple" works just fine!
PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #19 on: December 03, 2011, 06:58:58 AM »
Of course I could not let well enough be ....  I had to go at it and make changes ....  apparently just for the sake of it  :D   Maybe because it is too small and I think it deserves to be bigger  ;D  ;D
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #20 on: December 03, 2011, 07:03:37 AM »
Of course I could not let well enough be ....  I had to go at it and make changes ....  apparently just for the sake of it  :D   Maybe because it is too small and I think it deserves to be bigger  ;D  ;D

<Enter>
<Enter>
<Enter>
<Enter>
<Enter>
<Enter>
# comment: making this larger
# this way, the script is generating better results
<Enter>
<Enter>
<Enter>
<Enter>
<Enter>
<Enter>
<Enter>
# so don't remove them (this way, my post is also improving  :P)
<Enter>
<Enter>
echo you can see that version 0.2 of this script is much better with this spaces...
<Enter>
<Enter>
<Enter>
#.... and so on....  ::) :P :D ;D 8)

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #21 on: December 03, 2011, 07:05:51 AM »
mmmh, not in Sandbox  ::) :-\
(not too  >:( please)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #22 on: December 03, 2011, 07:07:42 AM »
;D  ;D 
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #23 on: December 03, 2011, 08:08:44 AM »
Update:

               For those with an interest I would ask that you consider supporting a package request I made for
PulseCaster

which I have just discovered already existing and it seems to do everything I and most others would want of a recording app.

Package request here
http://www.pclinuxos.com/forum/index.php/topic,100254

No point in trying to reinvent the wheel ......  ;D :D

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #24 on: December 03, 2011, 08:12:46 AM »
Call me biased, but I'd rather have your script, written for PCLinuxOS, than something written by someone else.     

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #25 on: December 03, 2011, 08:37:42 AM »
Call me biased, but I'd rather have your script, written for PCLinuxOS, than something written by someone else.     

Thank you for the vote of confidence Neal, but there is no hope that I would ever develop this wee script to the point of being able to do what PulseCaster does, so I think PulseCaster would be a greater addition to PCLOS.

Of course there is nothing much preventing us from also having a very simple script like the one here in addition to PulseCaster .....  if that is seen as useful.

I am presently tidying it up a little bit which is why I withdrew it from this thread for the moment.

regards.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #26 on: December 03, 2011, 08:42:59 AM »
Of course there is nothing much preventing us from also having a very simple script like the one here in addition to PulseCaster .....  if that is seen as useful.
     
My opinion is that it would be useful. PulseCaster may be great and do 10 dozen things your script doesn't, but it might be too much for some of us.     

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #27 on: December 03, 2011, 06:46:08 PM »
I would appreciate it those reading here could check this out to make sure it works on their install.
You do need to have Pulse Audio installed and working properly.

Thanks for any feedback ..  negative and positive. ;)

regards.

http://min.us/lvy4vWpRxsCze

Oh yes ....  almost forgot .....  I managed to get a more understandable selection of sources than previously ...

« Last Edit: December 03, 2011, 07:07:38 PM by Just18 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10641
  • MLUs Forever!
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #28 on: January 28, 2012, 03:21:28 PM »
I want to resurrect this thread ........  hope ye don't mind ........  same problem with a slight twist.

I posted my previous solution of killing a process which was running within a Zenity progress window .....  a process of sound recording. The script is on the previous page of this thread.
The relevant part was

Code: [Select]
# Zenity progress wrapper
(
echo
parec -d "$MONITOR" | sox -t raw -r 44.1k -sLb 16 -c 2 - "$SoundFile" &
) |
zenity --window-icon=$ICON --progress --pulsate --title="   $TITLE   " --text $"   
<b>Recording</b>
 Sound is being recorded to $SoundFile file.
                  Press "Cancel" to stop recording." ;

PARECPID=$(pgrep parec); kill $PARECPID

So now instead of recording sound, lets say I want to record video and do something like this ....

Code: [Select]
(
        echo
mencoder tv:// -tv device=/dev/video0 -ovc lavc -ofps 25 -nosound -o ~/Recordings/CamVid.mp4 &
) | zenity --window-icon=$ICON --progress --pulsate --title="   $TITLE   " --text $"   
<b>Recording</b>   

 Your webcam is being recorded to ~/Recordings/CamVid.

                  Press "Cancel"  to stop recording." ;
MENCPID=$(pgrep mencoder); kill $MENCPID

Selecting "Cancel" on the Zenity window has no effect on anything .....  the recording continues as does the zenity progress window.

Can someone explain to me what the difference is and how it is affecting the ending of the Zenity window, and thus the recording?

I am puzzled as to why I cannot kill the Zenity window with the Cancel button.

Thanks.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: [ SOLVED ] Kill a Process ... some help needed
« Reply #29 on: January 28, 2012, 03:31:15 PM »
I want to resurrect this thread ........  hope ye don't mind ........  same problem with a slight twist.

I posted my previous solution of killing a process which was running within a Zenity progress window .....  a process of sound recording. The script is on the previous page of this thread.
The relevant part was

Code: [Select]
# Zenity progress wrapper
(
echo
parec -d "$MONITOR" | sox -t raw -r 44.1k -sLb 16 -c 2 - "$SoundFile" &
) |
zenity --window-icon=$ICON --progress --pulsate --title="   $TITLE   " --text $"   
<b>Recording</b>
 Sound is being recorded to $SoundFile file.
                  Press "Cancel" to stop recording." ;

PARECPID=$(pgrep parec); kill $PARECPID

So now instead of recording sound, lets say I want to record video and do something like this ....

Code: [Select]
(
        echo
mencoder tv:// -tv device=/dev/video0 -ovc lavc -ofps 25 -nosound -o ~/Recordings/CamVid.mp4 &
) | zenity --window-icon=$ICON --progress --pulsate --title="   $TITLE   " --text $"   
<b>Recording</b>   

 Your webcam is being recorded to ~/Recordings/CamVid.

                  Press "Cancel"  to stop recording." ;
MENCPID=$(pgrep mencoder); kill $MENCPID

Selecting "Cancel" on the Zenity window has no effect on anything .....  the recording continues as does the zenity progress window.

Can someone explain to me what the difference is and how it is affecting the ending of the Zenity window, and thus the recording?

I am puzzled as to why I cannot kill the Zenity window with the Cancel button.

Thanks.

this is, why i switch all my scripts to yad...
If you want, we can move your script, too