Categories
Arch Linux Fedora HowTo Linux Posts Ubuntu

Linux Media Players And Flash Not Stopping The Screensaver

It’s a pretty common problem, one which could be solved by pretty much the following sentence: ‘[Insert Linux Distro], [Insert Media Player] not stopping screen saver when playing videos.’ And, yeah, it’s very annoying. Something that should have been fixed thousands of releases ago, just like most common Linux problems. Luckily though there is a fix, it’s easy and it’s awesome.

Introducing: Caffeine, “An application to temporarily prevent the activation of both the screen saver and the “sleep” powersaving mode.” – https://launchpad.net/caffeine

Essentially what this program does is look for processes running on your machine (you can do this too, just run ‘ps -A’ in a terminal emulator to see a list of everything), so you set process names which the program should look out for, for example ‘vlc’ and when there is a process with this name Caffeine disables the screensaver, when the process stops the screensaver is re-enabled. It even comes with a little tray icon which allows you to manual enable or disable the screensaver/power management with a single click.

Installation (Ubuntu):
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine
Usage:

You’ll be able to see if caffeine is running by the tray icon the first time you use it (this can be disabled in the settings).

Caffeine Running (Screensaver / Power Management Enabled)
Caffeine Running (Right Click Settings)
Caffeine Running (Screensaver / Power Management Disabled)
Adding Processes:

To add a process which will disable the screensaver from being activated, for example VLC so we can watch a movie without constantly having to wiggle the mouse:

First, run VLC (or whatever other media player you wish and just replace VLC for that for the other few steps)

Next, right click on the Caffeine tray icon and select “Preference”.

Click the “Add” button.

List of processes already disabling the screensaver, note Totem is added here.

You should be greeted by a list of the running processes, select the name of the media player (this case, vlc) if it isn’t there check under the “Recent Processes” tab or alternatively just write the command you would use to run this program from the command line.

Adding VLC to processes to disable the screensaver.

Finally click the “Add” button and close the preferences window, that pesky screensaver should no longer be bothering you!

Stopping Flash from enabling the screensaver:

Okay, this is actually really easy, if you’re using Chromium or Google Chrome or Firefox, you’ll just want to add the processes ‘npviewer.bin’ to list, you can use the above instructions to do so.

Categories
Command Line Linux Posts Ubuntu

Xfce4 Installed on Ubuntu 11.10, Global Menu Remains.

After installing Ubuntu 11.10 I headed straight for an install of gnome-shell, I’ve been using it for a couple of months without any issue and got used to it enough that it wouldn’t impede on my workflow. That was until this release, when it was officially supported by Canonical and all of a sudden it’s broken and mostly useless. So off to Xfce I go, it’s like gnome2 but way more customisable and actually pretty sweet.

However because I installed from a clean Ubuntu install rather than an xubuntu install I noticed that I still have the global menu (or appmenu-*) floating at the top under the default panel. To remove it, since it’s doing nothing and it looks plain stupid with transparency added to the panel.

It’s pretty simple to uninstall, just open up a terminal window and use the following command:

sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt

Now just re-start X (log out and in again, restart the computer) and when you return, it should be gone.

And if you ever feel the need to want it back, maybe you want to give unity another try then use the following command:

sudo apt-get install appmenu-gtk3 appmenu-gtk appmenu-qt

Source: http://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-global-menu-in-ubuntu-11-10-tip/