r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

How To: Partially workaround Adobe Flash plugin issues on Linux

r3dux | December 28, 2011

Flash on Linux has always been a mess, especially on 64-bit, so when I upgraded my flash plugin the other day to the latest 11.2 beta I wasn’t in the least bit surprised when it broke. This time, watching videos with people in them had the people looking like they were from Avatar – all the skin was blue, and in general the colours were well off. For example:

Flash Red/Pink Colour Issue

Flash being, well, Flash...

To fix this up, you need to twiddle with the flash settings at /etc/adobe/mms.cfg, or if you wanted to, do the twiddling through the Flash-Aid plugin like below (in my final working config I actually use the top option of GPU validation as enabled and disable VDPAU):

Flash Plugin Acceleration Options

Flash Plugin Acceleration Options

Once that’s done, restart your browser and hey-presto – correct colours in Youtube:

Flash Colours Restored

Flash Colours Restored

You may have to turn on or off some combination for it to work with your particular machine in a trial & error style, because what might work in YouTube might crash when using other flash video sites (vimeo, gametrailers etc). After some playing around, I’ve decided to live with the bad youtube colours and use the following settings in the /etc/adobe/mms.cfg config file:

$ cat /etc/adobe/mms.cfg 
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0

And as I’m a curious lad, I thought I’d make a table of what works and what doesn’t (on my setup – LMDE w/ NVidia 290 drivers):

Firefox 5.0
Settings YouTube Vimeo GameTrailers
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=1
Works Crashes plugin Crashes plugin
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0
Bad Colours Works Works
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=1
Works Crashes browser Crashes browser
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=0
Bad Colours Works Works


Chrome 16.0.912.63
Settings YouTube Vimeo GameTrailers
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=1
Crashes plugin Crashes plugin Crashes plugin
OverrideGPUValidation=1
EnableLinuxHWVideoDecode=0
Bad Colours Works Works
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=1
Crashes tab Crashes tab Crashes tab
OverrideGPUValidation=0
EnableLinuxHWVideoDecode=0
Bad colours Works Works

Looks like there’s no clear winner that works for everything… Oh wells, there’s a good write-up with alternate solutions and things over on WebUpd8 here – even though they talk about flash 10.2 on Ubuntu, this is the first time I’ve had this issue and it’s on LMDE (Debian based) with the flash 11.2 beta and the same fixes work here. I guess if you’re that bothered, you could always downgrade to some previous flashplugin (like something from the 10.x series) and see how that holds out.

But on the upside, it’s kinda funny watching things in Avatar mode =P

Avatar Flash

Comments
No Comments »
Categories
How-To, Linux
Tags
Channels, Color, Colour, Flash, Glitch, Linux, Pink, Workaround
Comments rss Comments rss
Trackback Trackback

iTunes + Zone Alarm do not mix

r3dux | December 26, 2011

Crapple - Upside-Down Apple LogoJust noting this for future reference, but I finally got iTunes working properly on a Windows PC that would at random:
- transfer some songs to iPod Touch devices successfully,
- transfer some other songs, then crash, then the device reports no music on it, or
- corrupt the device so badly it needed fresh firmware restored.

And the the culprit turned out to be…. Zone Alarm. No kidding. Turn off Zone Alarm and everything worked instantly.

iTunes is still a god-awful PoS though, but at least it’ll now transfer music and apps. If you’re getting “app could not be installed because it is not signed” issues with iTunes, and you’re installing legit apps, chances are that turning off Zone Alarm will fix it right up. Amazing.

Comments
2 Comments »
Categories
How-To, Music, Tech
Tags
App, Apple, Apple Sucks, Crash, Error, Firewall, iTunes, Signed, Zone Alarm
Comments rss Comments rss
Trackback Trackback

How-To: Fix Gnome 3 sessions failing to start

r3dux | November 18, 2011

I recently changed my LMDE repos and did a full update/upgrade/dist-upgrade – which landed me with Gnome 3… only it didn’t work, and only fallback mode was available.

Unfortunately, fallback mode isn’t very good.

When attempting to start a Gnome 3 session proper, I was getting an error message like this:

Oh no! Something has gone wrong.
A problem has occurred and the system can’t recover.
Please log out and try again.
[Log out]

Then you had to click the [Log Out] button and start a fallback mode session if you wanted to actually be able to do anything with the machine.

So, I did a bit of googling and the easiest way to fix it that I’ve found is to go to the folder: ~/.config/autostart/, create file called Gnome-Shell.desktop (the name doesn’t really matter as long as it ends with .desktop) and the put the following contents in it:

[Desktop Entry]
Type=Application
Exec=gnome-shell --replace
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Gnome Shell
Name=Gnome Shell
Comment[en_US]=
Comment=

BUT – for all this to work properly I had to do a little house cleaning first as I already had a “Gnome-Session.desktop” autostart item which was trying to start Gnome 2 (which isn’t even on the system anymore) and was causing mischief with the Gnome 3 session, so the safest way to do this is probably to:

  1. Create a copy of the entire ~/.config/autostart folder,
  2. Now you’ve got a copy in case things go wrong, go into the autostart folder and strip out anything you think might interfere (such as any existing Gnome-Session stuff),
  3. Add the new Gnome-Shell.desktop file with contents as above, and finally
  4. Log out then back in to a proper Gnome 3 session and you should be good to go!
Gnome 3

Gnome 3 window management is a bit different to the norm, but I'm finding it actually keeps things quite uncluttered...

I’ve got to say that apart from a few niggles (like the entire Ctrl+Delete to delete a file, Shift+Ctrl+Delete to permanently delete a file rubbish) I’m actually quite liking Gnome 3 so far – it’s a bit like Unity, but without crashing five times a day…

Not a bad start =D

Comments
No Comments »
Categories
How-To, Linux
Tags
autostart, Desktop, Fallback, Gnome, Gnome 3, Oh no!, Session
Comments rss Comments rss
Trackback Trackback

How-To: Fix LMDE Repo Hell

r3dux | November 12, 2011

LMDE is a great distro, but the repo situation is a bit of a mess, what with all the update packs and tracking testing or sid or romeo or wheezy or… yeah, it gets confusing. As I wanted to build openFrameworks the other day and it was moaning about libavcodec and libavcodec-dev mismatches I did a bit of searching around and found this thread over on the mint forums, and making the following changes fixed up the repo issues in no time:

Change your main repos (in /etc/apt/sources.list) to:

deb http://packages.linuxmint.com/ debian main upstream import
deb-src http://packages.linuxmint.com/ debian main upstream import
# deb http://debian.linuxmint.com/incoming testing main contrib non-free
# deb http://debian.linuxmint.com/incoming/security testing/updates main contrib non-free
# deb http://debian.linuxmint.com/incoming/multimedia testing main non-free
 
## DEBIAN
deb http://ftp.us.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.us.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free
deb http://www.debian-multimedia.org testing main non-free
deb-src http://www.debian-multimedia.org testing main non-free

Update: Added the deb-src repos to the above list because without them you can’t see package change-logs without ‘em.

And then to ensure the mint repos take precedence over the debian ones, make sure the following is in /etc/apt/preferences:

Package: *
Pin: release o=linuxmint
Pin-Priority: 700
 
Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700
 
Package: *
Pin: release o=Debian
Pin-Priority: 500

If you then do and update and upgrade via apt-get or the update manager, all package mismatches should be fixed and you can actually build stuff! Woo! =D

Comments
No Comments »
Categories
Coding, How-To, Linux
Tags
Apt, Debian, LMDE, Repo Hell, Repositories, Synaptic, Tracking
Comments rss Comments rss
Trackback Trackback

How-To: Initialise arrays of objects in Java

r3dux | October 7, 2011

You might think, like I did, that if you create an array of objects in Java then the constructor is automatically called on each object as part of the array creation process. But you’d be wrong.

Creating an array merely creates the object references – you have to instantiate each “inner” object in the array as a separate step if you want to be able to, ya know, do stuff… I think this is because in Java an array is an object – like, quite literally a single object that can be passed around like a single thing.

An example, perhaps?

Person Class

public class Person
{
	private int number = -1; // Each person gets a default number of -1 on creation
 
	// Default constructor
	public Person()
	{
		// The number property is left as -1 as per the default value specified above
	}
 
	// One parameter constructor which overwrites the default number value with a specified value
	public Person(int theNumber)
	{
		number = theNumber;
	}
 
	public void displayNumber()
	{
		System.out.println("My person number is: " + number);
	}
}

PersonTestDrive Class

public class PersonTestDrive
{
	final static public int MAX_PEOPLE = 3;
 
	public static void main(String[] args)
	{
		// Create an array of people. You're not creating any new People objects here - you're creating a new Array object
		Person[] people = new Person[MAX_PEOPLE];
 
		// *** INCORRECT : The Person objects in the people array don't exist yet! They're only references at this point! ***
		// for (Person tempPerson : people)
		// {
		// 	tempPerson.displayNumber(); // This doesn't give "-1" for each person, it gives a NullPointerException!
		// }
 
		// *** CORRECT : Instantiate each Person object in the array before accessing them! ***
		for (int loop = 0; loop < MAX_PEOPLE; loop++)
		{
			people[loop] = new Person(loop+1); // Create the Person object, setting the number property in this case
 
			people[loop].displayNumber();      // Now it'll output "My person number is: 1" etc. as expected
		}
	}
}

Comments
5 Comments »
Categories
Coding, How-To
Tags
Array, Constructor, Exception, Initialise, Java
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Photoshop Problem PS3 Remix Remove Retro script Slides Sound Systems Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“Don't cry because it's over, smile because it happened.”

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox