Daily Ubuntu / Linux news and application reviews.

ads

If you are using a multi-monitor setup in Ubuntu, here are a few tips which should help you fix some annoyances, like:
  • get full screen flash videos to be displayed on any monitor
  • get flash videos to remain full screen while working in the other desktop
  • a tweak to move windows to a different display using keyboard shortcuts
  • how to extend the wallpaper across monitors or use a different wallpaper for each monitor


Move window to a specific display using a keyboard shortcut


Ubuntu (with Compiz/Unity) lets you move a window to a specific virtual desktop using keyboard shortcuts, but by default, this doesn't work if you want to move a window to a specific monitor.

There is, however, an easy way of easily moving windows to a specific display using keyboard shortcuts so here's what you must do.

Firstly, install CCSM and Compiz Plugins if they are not already installed:
sudo apt-get install compizconfig-settings-manager compiz-plugins

Then open CompizConfig Settings Manager, search for the "Put" plugin (it's under Window Management) and enable it. Then, click the plugin so we can change some of its settings.

ccsm put plugin

On the "Bindings" tab, click on "Disabled" next to the "Put to Next Output" keyboard shortcut, check the "Enabled" box and then assign it a key combination that's not already in use. I've used Ctrl + Tab (click on "Grab key combination" to set a keyboard shortcut). Then click 'ok' and you're done.

Now, focus a window and press the keyboard combination you've used above: the window should move to the other workspace. If you only have two monitors, this should be enough, as it moves any window from one monitor to the other. If you have more than 2 monitors, you can assign keyboard shortcuts for "Viewport Left" and "Viewport Right" and so on, under "Put to adjacent viewport".

Tip: you can also use the default "Put pointer" keyboard shortcut: "Super + z", which moves the window to the exact pointer position on either of the screens.



Get full screen flash videos to work on any monitor


In some cases (or maybe always?), full screen Flash videos show up on the primary monitor, even if you've clicked the full screen button while using some other monitor. The above solution works with these full screen Adobe Flash videos too: click a video, then press the key combination you've set up and the video should move to the other display.

So there you have it, now you can move the full screen flash videos on any monitor you want.



Get Flash videos to remain full screen when working (clicking) in the other desktop


The above solution fixes full screen Flash video showing up on the wrong display, but there's another annoying issue with Flash: if you're watching a full screen video on one monitor and want to work on another monitor, the flash video exists full screen. Basically, unless the full-screen flash video is focused, it exists full-screen.

There are some fixes and workarounds for this full screen Flash exiting when it's unfocused too:

1. The first one is using an extension which resizes Flash videos to fill the whole browser window and you can then set the browser to full screen by pressing F11 or selecting View > Full screen:
  • for Google Chrome / Chromium: MaximizeFlash
  • for Firefox: Flash Game Maximizer (the button to resize video to fit the whole browser window is on the addon bar so to show it, select View > Toolbars > Addon Bar). This extension doesn't work properly with YouTube though but you can set YouTube to use HTML5 by going to http://youtube.com/html5
firefox flash full window
After getting the video to fill the whole browser window, hit F11 or select View > Full screen



2. Below is another solution for this issue, that fixes Adobe Flash for any browser, except Google Chrome.

The reason flash videos exit full screen when clicking anywhere on the other monitor is because that's the behaviour wanted by Adobe. Adobe Flash is not open source, but we can still modify its code using a tools such as GHex.

To install GHex in Ubuntu, use the following command:
sudo apt-get install ghex

Now, find out where your Flash plugin is installed using the following commands:
sudo updatedb
locate libflashplayer.so

The "locate" command above should return the full path to libflashplayer.so. Copy it because you'll need it for the next command:
gksu ghex /path/to/libflashplayer.so

Where "/path/to/" is the path to libflashplayer.so you've copied above (usually it should be /usr/lib/flashplugin-installer/libflashplayer.so or /usr/lib/adobe-flashplugin/libflashplayer.so)


Now, editing a binary with GHex is tricky, so read everything carefully. 

Once GHex opens the libflashplayer.so file using the command above, select Edit > Find, and in the right square, type (don't paste!) "_NET_ACTIVE_WINDOW" without the quotes, then click find:

ghex

On the right GHex pane, click one letter from "_NET_ACTIVE_WINDOW", let's say the first "N" and enter some other letter, let's say "A". Do not press the backspace key or anything, to replace a letter, simply click it, then press the letter you want to replace it with! Do not modify anything else! 

ghex

Once you've made this change, from the GHex menu select File > Save and restart your browser. You will have to follow these steps again if you update Adobe Flash Player!


If later on you want to revert this change, reinstall Flash Player plugin:
sudo apt-get install --reinstall flashplugin-installer


Note: Google Chrome (does not apply to Chromium) uses its own Adobe Flash Player plugin which doesn't have "_NET_ACTIVE_WINDOW", so if you want this fix to work with Google Chrome, enter "chrome://plugins/" in the url bar, then click "Details" on the right, scroll to the Adobe Flash Player plugin and 2 versions should be listed:

google chrome disable pepper flash

Here, disable the one that has "/opt/google/chrome/PepperFlash/libpepflashplayer.so" as its path. Doing this, Google Chrome will use the system Adobe Flash Player and not the built-in Google Chrome Adobe Flash Player.



Extend wallpaper across monitors or use a different wallpaper for each monitor


Most wallpaper changers don't support spanning a wallpaper across monitors or use a different wallpaper for each monitor, but there are two applications that you can use to do this. (Ubuntu itself supports spanning an image cross monitors but not using different wallpapers for each monitor)

1. The first one is SyncWall. Install it in Ubuntu using the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install syncwall

To set SyncWall to span a wallpaper across all your monitors, select Preferences > Display Parameters, then under Multi Monitor Display, select "Extend image (one file for all monitors)" and check the box next to "share image between monitors":

syncwall

Here's how my desktops looks like after using SyncWall:


SyncWall can also rotate wallpapers, apply effects and more.



2. Another such tool is Nitrogen, which besides being able to set the same wallpaper to extend across displays, it can also be used to set a different wallpaper to each monitor. 

Nitrogen is available in the official Ubuntu repositories so to install it, search for it in Ubuntu Software Center or use the following command:
sudo apt-get install nitrogen
Nitrogen doesn't have a desktop file, so run it from the command line:
nitrogen

In it's Preferences, add your wallpaper folder, then at the bottom, select "Full Screen" to stretch the same wallpaper across monitors or select Screen 1, 2, etc., to set a different wallpaper for each monitor:

nitrogen wallpaper changer

To be able to set a different wallpaper for each monitor, you must disable the file manager from handling the desktop. This means you'll no longer have folders on the desktop.

In GNOME / Unity, install GNOME Tweak Tool:
sudo apt-get install gnome-tweak-tool

Then open GNOME Tweak Tool and on the "Desktop" section, set "Have file manager handle the desktop" to OFF.

And finally, to have the wallpapers restored each time you log in, add "nitrogen --restore" to your startup applications.

Here's how my desktop looks like with different wallpapers for each monitor:

different wallpaper each display ubuntu



Also see: Get Ubuntu NotifyOSD Notifications To Show Up On Active Monitor In Multi-Screen Environments



Some info via AskUbuntu and ubunturoot
«
Next
Newer Post
»
Previous
Older Post
-->