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.

I'am using this script -- lightsOn, to delay screensaver when flash playing.

However, the script provides only the Chromuim way:

flash_process=`pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"`

I am using the official Google Chrome in xfce. Not familiar with shell programming, the screenshot of my process running in Chrome.

screenshot of my process running in *Chrome*

I want to know how to detect the process of flash player to make this script running? Thanks.

share|improve this question
    
Have you tried changing it to flash_process=pgrep -lfc "google-chrome --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"`` ? (although this might not work because chrome uses its own brand of flash) –  Glutanimate Nov 17 '12 at 16:25
    
/opt/google/chrome/PepperFlash/libpepflashplayer.so is what I see in Chrome 23 in chrome://plugins. –  user25656 Nov 17 '12 at 18:28
    
@MHC Yeah, I have tried flash_process=pgrep -lfc "google-chrome --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"``. It doesn't work still. –  zfz Nov 18 '12 at 3:12

2 Answers 2

As Chrome uses the Pepper API, you can find the process referring to the chrome parameter 'type=ppapi'. You can do that using top/htop on the cmd line.

pgrep -lf "chrome --type=ppapi "

share|improve this answer
up vote 3 down vote accepted

I have found a solution to disable xscreensaver when flash playing in Chrome.

Firstly, disable shockwave flash plugin at '/opt/google/chrome/PepperFlash/libpepflashplayer.so' in chrome://plugins as follows:

disable shockwave flash plugin

Then the command can detect flash process in chrome:

flash_process=`pgrep -lfc "chrome --type=plugin --plugin-path=/usr/lib/flashplugin-installer/libflashplayer.so"`

I have forked the script from github, and push the new one with Chrome flash detection. Here is the new script.

Well, the version of my google Chrome: chrome version

share|improve this answer

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.