[Lubuntu] HDMI Sound Output

When connecting to a HDMI TV with freshly installed Lubuntu 14.04, though the screen display is connected automatically, the sound output is still coming out from the computer. To change the sound output to HDMI, we need to install paulse audio volume control (which will replace the original alsamixer).

1. Open terminal (CTRL+ALT+T) and type in:

sudo apt-get update
sudo apt-get install pavucontrol

2. Right click on the Speaker icon on the system bar

3. Select “Volume Control Systems”

4. Go into Configuration tab and set Built-in Audio to off

2014-06-03-211601_643x290_scrot

Notes

Make sure you restart the program (e.g. browser) to reset the settings.

If you get a screen as shown below, you have not run the command from step 1.

2015-02-09-154246_486x346_scrot

[lubuntu] Arandr – multi monitor setting

Lubuntu does not have multi-display settings by default (see source). The one suggested by the forum is using Arandr, which is available on Lubuntu Software Center.

The interface is a bit confusing to work with. (Keep forgetting how to do this every time after a fresh install..) So this is just a short tutorial on how this Arandr program works.

 

How to’s:

1. Go to Menu -> Preferences -> Arandr

2. On the Menu bar, click on Output -> HDMI1 -> Active
2014-06-03-200325_556x404_scrot

Another rectangular box labeled HDM-1 overlayed the original one should show up. You can then drag around the boxes to the desired positions.

3. To turn off the monitor, right click on the monitor box and de-select “Active”
2014-06-03-200904_556x404_scrot

4. Final step, MUST click on the check mark below ‘Layout’ after you got your desired display settings done.
2014-06-03-201221_556x404_scrot

Hope this kinda help! 😀

Useful Java Classes

Object Class

public boolean equals (Object obj)

This is comparing the references (though we can customize the equal() function if we want..).

Sphere s1 = new Sphere(2.0);
Sphere s2 = s1;
Sphere s3 = new Sphere(2.0);

s1.equals(s2) <- returns true
s1.equals(s3) <- returns false even though they are both defined in the same way.

 

public void finalize()

For destroying objects: The garbage collector calls this finalize() method to determine whether there are more references to the object.

 

public int hashCode()

Returns the hash code (a unique value) for the object as an integer.

 

public String toString()

Returns a textually represnted string of the object. ==> ClassName@#hashcode