Thursday, January 30, 2014

Default Desktop Crashes in Ubuntu 13.10 (Saucy) as a VM VirtualBox Guest

I created a guest instance using Ubuntu 13.10 (Saucy) in Oracle VM VirtualBox. When I log in using the default Ubuntu Desktop environment, what I got was a nearly blackscreen after a "compiz crashed" message. My suspicion was that the video card is too  primitive and did not have a reasonable OpenGL support.

To fix the issue, I installed Gnome desktop and logged without any problem in using the Gnome Desktop environment. Since the default desktop environment crashes and I could not get a terminal window to do anything, I had to exit to the console to do the installation. The steps are as follows,


1. Press CTRL-ALT-F1 to switch to the console screen
2. Log in on the console screen
3. Install Gnome desktop environment, by running
         $ sudo apt-get install gnome
4. Kill and restart X or simply reboot the machine, by running
         $ sudo reboot
5. When the Graphical Login screen appears, click on the little
   icon to the right of the user name, and choose any of Gnome
   desktop environment, (Gnome Classic, Gnome Classic ...)
6. Then log in. 
You should be in without any problem.

Web Server Video Support

I was playing with HTML 5 video and encountered the following error in Firefox "no video with supported format and MIME type found" and  that in Internet Explorer "Error: Unsupported video type or invalid file path". The HTML file looks like the following,


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>HTML 5 Video Example</title>
</head>
<body>
<h1>Chapter 1: HTML/XHTML</h1>
<h2>Video Example</h2>
<video width="600" height="500"
       autoplay="autoplay"
       controls="controls"
       preload="auto"
       poster="novideo.png">
  <source src="./ex.mp4" type="video/mp4" />
  <source src="./ex.ogv" type="video/ogg" />
  <source src="./ex.webm" type="video/webm" />
  Your browser does not support the video element
</video>
</body>
</html>

The video clip of all 3 formats are at the server and the video plays well at the local machine and fine at another server. After a little bit digging, I found out that the Apache web server has some configuration issue and did not have proper MIME types added. To fix it, simply upload a .htaccess file to the directory where the HTML file is and the .htaccess has the following content,


AddType video/webm .webm
AddType video/mp4 .mp4
AddType video/ogg .ogv

Wednesday, January 22, 2014

Producing PDF document Compatible to Firefox Build-in PDF Viewer

Sometimes Firefox Build-in PDF Viewer does not render some PDF documents well, in which case, the PDF Viewer complains that the PDF document may not be displayed correctly.

A suggested method to correct it is to use external PDF viewer as suggested at Mozilla.

Web searches yield lots of discussions and the discussions are mostly how to find a way to display it correctly just like the above. Those discussions are on the "consumer" side.

However, if you are the on the side of producing and posting PDF documents online, you are probably more interested from beginning with in producing PDF documents that can be displayed correctly by the Firefox Build-in PDF Viewer.

As I investigate, this is not a trivial task. Generally, when the PDF Viewer does not display the document correctly, it is a result that the document contains certain feature which the viewer does not support. To generate a compatible PDF document to the viewer is not to use any unsupported feature that the viewer does not support. However, I failed to locate any document showing which feature is supported and which is not, including the project site at GitHub.

One method that worked for me at least in a few occasions is to use Firefox's Element Inspector.

When a PDF document is not displayed correctly, locate the element that is not displayed correctly or a nearby element to the element that is invisible as a result of not being displayed correctly, right-click the mouse and select "Inspect Element". Examine the element and elements nearby in the Inspector. If you examine them carefully, you may identify something suspicious. For instance, in FireFox 26.0, a PDF file saved in Microsoft PowerPoint is not displayed correctly. Examining it in the Element Inspector, I found out that the location of the problem and suspected that the font "Verdana" somehow could not be displayed correctly, as shown below.
 

By replacing font "Verdana" by a recognizable font, the problem went away.

Tuesday, December 31, 2013

"Uncreative Writing"?

I heard a discussion on "Uncreative writing" from the "On the Media" fro NPR. Host Brooke Gladstone and her guest Kenneth Goldsmith discusses plagiarism. What interests me is what Kenneth Goldsmith's experiments, that includes the "Uncreative Writing" course he has been teaching. See the course description on his website at

The radio episode I was listening is
that also includes the transcript of the program.

Goldsmith has a book bearing the name of "Uncreative Writing".


Find more  of Goldsmith's work at his website at,

Story Told in Photos ... "Faces of Addiction"

I heard the story about Chris Arnade's photographic work, called "Faces of Addiction". I checked it out when I got back to my computer. It was an indeed powerful story. His photographic work has been actually widely reported. Check his work out at Flickr. 

Several related ...

Friday, December 13, 2013

Octave Complains About Termnial ...

When I ran most recent version of octave after the compilation and installation on an Ubuntu host, I observe the following problem,


octave:99> set terminal aqua enhanced title "Figure 1"  font "*,6"
                        ^
     `line 0: unknown or ambiguous terminal type; type just 'set terminal' 
for a list`

Web searches directed me either to add setenv('GNUTERM', 'x11') to $HOME/.octaverc or do add the environment variable in shell, e.g., export GNUTERM=x11. Unfortunately, it did not solve my problem. It turns out the message comes from gnuplot since octave uses gnuplot to plot. To fix the problem, we can install the gnuplot-x11 package, i.e.,
sudo apt-get install gnuplot-x11 

Monday, December 9, 2013

VMWare Tools Failed to Load on Ubuntu 13.10 (Saucy)

I am running a Ubuntu guest OS using VMWare Player. I upgraded my guest Ubuntu to Ubuntu 13.10 through "do-release-upgrade" and upgraded my VMWare player to 6.01. When I was upgrading the VMWare Tools, I encountered a problem that the VMWare Tools cannot be loaded. I did a quite a few web searches and many suggested to disable the vmware-tools-thinprint service. On my guest, it did not help by disabling the vmware-tools-thinprint service. What actually helped was to upgrade vmxnet to vmxnet3, which can be accomplished by directly editing the virtual machine's configuration file. To edit the configuration file, in my case the Ubuntu.vmx file, add a line to the file, e.g.,


ethernet0.virtualDev = "vmxnet3"


The solution was hinted by the error message when I ran vmware-install.pl,


The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

In some case, as indicated by the comment below, you may also need to uninstall (by running vmware-uninstall-tools.pl that should have been installed, by default at the /usr/bin directory) and reinstall VMWare tools.