Saturday, May 9, 2015

Chrome Issue: We are having trouble playing this video.

I was using Chromium browser v37 on Mac OSX Lion v10.7 and I was able to play videos on any sites such as Youtube, Facebook, and so on. After I upgraded it to v44, I still could play videos on Youtube but not on Facebook and it showed the message below.


To fix the problems,
1). Type "chrome://flags/#enable-npapi" in browser's address bar
2). Find the item "Enable NPAPI Mac, Windows" and click on Enable link
3). Restart browser






References

https://www.facebook.com/help/community/question/?id=10202758465869794 - commented by Gary Miller.
https://www.java.com/en/download/faq/chrome.xml#npapichrome



Chrome Issue: Adobe Flash Player needs your permission to run

I was using Chromium browser version 37 on Mac OSX Lion v10.7. Then, I upgraded it to version 44. After the upgrade, I could play videos on Youtube but not on Facebook. It said: "Adobe Flash Player needs your permission to run" as in the below screenshot.


To solve this problem:
1). Type "chrome://plugins/" in the browser's address bar
2). Find the item "Adobe Flash Player - Version: xxx" and check "Always allowed to run" checkbox. Note that if we don't enable NPAPI, we might not see the item in the plugins list. To enable NPAPI, see http://myt8chnote.blogspot.com/2015/05/chrome-issue-we-are-having-trouble.html
3). Restart browser




Friday, April 17, 2015

Missing embedded player when sharing Youtube video on Facebook

When I shared a youtube URL, there is thumbnail image instead of an embedded player. Hence, every time you click on the thumbnail, you're redirected to youtube website. You can't play it directly on Facebook. The URL shared might look like following:


What I want it to be is:


The reason is the video owner disabled embedding. We can't do anything about that if we're not the owner. You can see whether the embedding is enabled or not by clicking on the Share icon then Embed and you'll see as in the image below if embedding is disabled.


If embedding is enabled, you'll see as following:


You might have to look for another video that embedding is enabled.


Monday, March 30, 2015

Failed to open or import Maven project in IntelliJ IDEA

I'm using IntelliJ IDEA 14 on Mac OSX Lion and I hadn't had any problems with opening or importing Maven projects before I updated Java from 1.6 to 1.8. The IDE started successfully but every time I opened or imported an existing Maven project, a popup appeared to display the progress of opening or importing process for a short time but after that nothing happened. Then, I opened the Console application and I see the log message below:
3/31/15 1:05:18.637 AM [0x0-0x8d38d3].com.jetbrains.intellij.ce:   Referenced from: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
3/31/15 1:05:18.637 AM [0x0-0x8d38d3].com.jetbrains.intellij.ce:   Reason: image not found
It means that IDEA was still using JDK 1.6 and it no longer existed on my machine after the update. I solved the problem by telling it to use the JDK 1.8 instead when starting and building projects. To do it, I did as followings:

1). Open the IDEA's configuration file:
open -e /Applications/IntelliJ\ IDEA\ 14\ CE.app/Contents/Info.plist 

2). Update the following key
<key>JVMVersion</key>
<string>1.7+</string>
I have both JDK 1.7 and 1.8 on my machine.

3). Restart the IDE



Reference

https://devnet.jetbrains.com/docs/DOC-197


Sunday, February 8, 2015

Lenovo ThinkPad: The labtop does not wake up after suspending

I'm using Ubuntu 14.04 with Lenovo ThinkPad E440 and I'm having the issue that my labtop does not wake up after a suspend. I have to restart the machine. It's a bug of that model, reported here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1340376. I fixed the issue by disabling USB 3.0 in BIOS (note that disabling USB 3.0 in BIOS will make the USB ports work as 2.0). This is not the real solution but it worked.



Reference
http://askubuntu.com/questions/489912/thinkpad-does-not-wake-from-sleep-14-04

Ubuntu: Enabling Hibernate

Hibernate is disabled by default on Ubuntu. To enable Hibernate in System Tray menu, please do as following:

1). Modify the permission of the directory below.
sudo chmod 755 -R /var/lib/polkit-1/

2). Open the file com.ubuntu.enable-hibernate.pkla or create it if it does not exist.
sudo nano /var/lib/polkit-1/var/lib/polkit-1/com.ubuntu.enable-hibernate.pkla
Add the following lines:
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

3). Restart your computer



Reference
http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/

Saturday, February 7, 2015

Ubuntu: Disabling mouse movement while typing

I'm using Ubuntu 14.04 on my labtop Lenovo ThinkPad E440. The problem is mouse is moving while I'm typing. I already disabled it in the Mousepad setting but it didn't work.

Here are the steps to solve it:

1). Kill syndamon processes
killall syndaemon
2). Disable touchpad while typing
syndaemon -i 0.6 -KRd
-i : How many seconds to wait after the last key press before enabling the touchpad. (default is 2.0s).
-K : Ignore modifier keys and Modifier+Key combos when monitoring keyboard activity.
-R : Use the XRecord extension for detecting keyboard activity instead of polling the keyboard state.
-d : Start as a daemon, ie in the background to avoid the command open your terminal.

3). Add the command to /etc/profile file
/usr/bin/syndaemon -i 0.6 -d -K -R

4). Uncheck the option to disable touchpad while typing in System Settings so they don't interfere with each other which may make your mouse not work sometimes.















Reference
http://askubuntu.com/questions/327166/disabling-trackpad-while-typing-does-not-work