Wednesday, December 7, 2011

Ubuntu 11.10 GNOME

Several days ago I switched to Ubuntu 11.10, with GNOME desktop. I decided that it is better for me than Unity.

Some applications and configurations have gone, of course.

The following links are usefull:

How To Create Desktop Launchers in Ubuntu 11.10 Oneiric Ocelot
http://shuffleos.com/3274/how-to-create-desktop-launchers-in-ubuntu-11-10-oneiric-ocelot/

Docky
http://wiki.go-docky.com/index.php?title=Installing

Thursday, November 17, 2011

Goodnight Irene

Goodnight Irene

Irene goodnight, Irene goodnight
Goodnight Irene, goodnight Irene
I'll see you in my dreams 

 
Last saturday night I got married

Me and my love settled down
Now me and my love are parted
I'm gonna take another stroll downtown


Irene goodnight, Irene goodnight
Goodnight Irene, goodnight Irene
I'll see you in my dreams


Sometimes I live in the country
Sometimes I live in the town


Sometimes I have a great notion
To jump In the river and drown


Irene goodnight, Irene good night
Good night Irene, good night Irene
I'll see you in my dreams


Ramblin' stop your gamblin'
Stop stayin' out late at night


Go home to your wife and your family
Sit down by the fireside bright


Irene goodnight, Irene good night
Good night Irene, good night Irene
I'll see you in my dreams


Irene goodnight, Irene good night
Good night Irene, good night Irene
I'll see you in my dreams


http://wn.com/Irene_Goodnight# 
http://en.wikipedia.org/wiki/Goodnight,_Irene

Thursday, November 3, 2011

Haskell Plaform from source

The Haskell Platform source file
haskell-platform-2011.2.0.1.tar.gz
is downloaded to <username>/Software and extracted to
<username>/Software/haskell-platform-2011.2.0.1

I am going to install the Haskell Platform to
/opt/haskell-platform-2011.2.0.1

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo ./configure --prefix=/opt/haskell-platform-2011.2.0.1
**************************************************
*
*     Haskell Platform Source Installer
*
*     For the Haskell Platform 2011.2.0.1 and GHC 7.0.3
*
**************************************************
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for ghc... notfound
configure: error:
  This installer for the Haskell Platform requires ghc to be installed first
  If ghc is installed not on the PATH then use --with-ghc= and --with-ghc-pkg=

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo ./configure --prefix=/opt/haskell-platform-2011.2.0.1 --with-ghc=/opt/haskell-platform-2011.2.0.1/bin/ghc --with-ghc-pkg=/opt/haskell-platform-2011.2.0.1/bin/ghc-pkg

*** *** ***
checking for hsc2hs... notfound
configure: error: The hsc2hs program could not be found.
  It is usually installed along with ghc. You may need to specify --with-hsc2hs=

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo ./configure --prefix=/opt/haskell-platform-2011.2.0.1 --with-ghc=/opt/haskell-platform-2011.2.0.1/bin/ghc --with-ghc-pkg=/opt/haskell-platform-2011.2.0.1/bin/ghc-pkg --with-hsc2hs=/opt/haskell-platform-2011.2.0.1/bin/hsc2hs

*** *** ***
configure: error: Your installation of ghc does not appear to work.
  It cannot compile a simple program (see config.log for the details).
  If you installed ghc from a generic binary tarball then it is worth
  checking that you have the 'gmp' C library and header files installed.
  (On Debian-based systems this package is called libgmp3-dev.)

*** libgmp3-dev is installed ***

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo ./configure --prefix=/opt/haskell-platform-2011.2.0.1 --with-ghc=/opt/haskell-platform-2011.2.0.1/bin/ghc --with-ghc-pkg=/opt/haskell-platform-2011.2.0.1/bin/ghc-pkg --with-hsc2hs=/opt/haskell-platform-2011.2.0.1/bin/hsc2hs

*** *** ***
checking for zlib.h... noconfigure: error: The zlib C library is required

What is zlib C?

The answer is in
http://trac.haskell.org/haskell-platform/ticket/179
You need to install the developer headers for zlib.
On Ubuntu these are: zlib1g-dev

*** zlib1g-dev is installed ***

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo ./configure --prefix=/opt/haskell-platform-2011.2.0.1 --with-ghc=/opt/haskell-platform-2011.2.0.1/bin/ghc --with-ghc-pkg=/opt/haskell-platform-2011.2.0.1/bin/ghc-pkg --with-hsc2hs=/opt/haskell-platform-2011.2.0.1/bin/hsc2hs
**************************************************
checking GL/gl.h usability... nochecking GL/gl.h presence... no
checking for GL/gl.h... no
configure: error: The OpenGL C library is required

What is The OpenGL library?

The answer is, for example, in
http://nathanwiegand.com/blog/2009/07/haskell-platform-on-ubuntu.html
The packages
libgl1-mesa-dev
libglc-dev
freeglut3-dev
libedit-dev
libglw1-mesa libglw1-mesa-dev
are to be installed.

A number of accompanying packages is installed, too.

The following message was displayed on terminal, but I missed it:

The following packages were automatically installed and are no longer required:
  libffi-dev libbsd-dev ghc6
Use 'apt-get autoremove' to remove them.

The final try (successful):

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo ./configure --prefix=/opt/haskell-platform-2011.2.0.1 --with-ghc=/opt/haskell-platform-2011.2.0.1/bin/ghc --with-ghc-pkg=/opt/haskell-platform-2011.2.0.1/bin/ghc-pkg --with-hsc2hs=/opt/haskell-platform-2011.2.0.1/bin/hsc2hs

*** *** ***
...
configure: creating ./config.status
config.status: creating scripts/config
**************************************************
* Configuration completed successfully.         
*                                               
*   Install prefix: /opt/haskell-platform-2011.2.0.1
*     Haskell packages will be registered into  
*     the global ghc package database           
*                                               
*   If you wish to change these settings then   
*   use --prefix= and/or --enable-user-install  
*                                               
* Now do "make" followed by "sudo make install" 
**************************************************

[prompt]:~/Software/haskell-platform-2011.2.0.1$ sudo make install
scripts/build.sh
**************************************************
Scanning system for any installed Haskell Platform components...

Found:None.

New packages to install: None! All done.

**************************************************
Building ... ... ...

The following message appeared several times:
Setup: Haddock's internal GHC version must match the configured GHC version.
The GHC version is 7.0.3 but haddock is using GHC version 6.12.1
Generating the transformers-0.2.2.0 package documentation failed

Preprocessing library haskell-platform-2011.2.0.1...
Building haskell-platform-2011.2.0.1...
Registering haskell-platform-2011.2.0.1...
"./Setup" "register" "--inplace"
Registering haskell-platform-2011.2.0.1...

**************************************************
* Building Haskell Platform completed successfully.
*                                               
* Now do "sudo make install"                    
**************************************************
scripts/install.sh
Installing transformers-0.2.2.0...
Installing library in
/opt/haskell-platform-2011.2.0.1/lib/transformers-0.2.2.0/ghc-7.0.3
Creating package registration file: transformers-0.2.2.0.conf

...

*******************************************************
* Installation completed successfully.          
*
* Programs installed into:                      
*   /opt/haskell-platform-2011.2.0.1/bin
*
* Now do "cabal update" to initialize the package list                        
*
* Additional packages may be found at http://hackage.haskell.org
* or via "cabal list <pattern>"
*
* Use "cabal install <foo>" to install additional packages
*
*******************************************************

[prompt]:~/Software/haskell-platform-2011.2.0.1$ cabal update
Config file path source is default config file.
Config file /home/zigmas/.cabal/config not found.
Writing default configuration to /home/zigmas/.cabal/config
Downloading the latest package list from hackage.haskell.org

Testing if it works:

[prompt]:~/Software/haskell-platform-2011.2.0.1$ ghc --helpUsage:

    ghc [command-line-options-and-input-files]

... ... ...

------------------------------------------------------------------------
[prompt]:~/Software/haskell-platform-2011.2.0.1$ ghci
GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 5+7
12
Prelude> :quit
Leaving GHCi.

[prompt]:~/Software/haskell-platform-2011.2.0.1$ ghci-7.0.3
GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> :quit
Leaving GHCi.

[prompt]:~/Software/haskell-platform-2011.2.0.1$ cabal install hoogle
Resolving dependencies...
Downloading binary-0.5.0.2...
Configuring binary-0.5.0.2...
Preprocessing library binary-0.5.0.2...
Building binary-0.5.0.2...
Linking dist/build/hoogle/hoogle ...

Installing library in /home/zigmas/.cabal/lib/hoogle-4.2.7/ghc-6.12.1
Installing executable(s) in /home/zigmas/.cabal/bin
Registering hoogle-4.2.7...

[prompt]:~/Software/haskell-platform-2011.2.0.1$ cabal --versioncabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library

[prompt]:~/Software/haskell-platform-2011.2.0.1$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1

I remembered that apt-get autoremove should be done, and did it.
After that:

[prompt]:~$ ghci
GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude>

Tuesday, November 1, 2011

TeX and LaTeX books

A remarkable finding: a thorough collection of books about TeX and LaTeX, in English and Russian:

http://karl-karlsson.narod2.ru/

All files are available for free download.
Including all four volumes of Bechtolsheim S. "TeX in Practice".
One can read the review of this unordinary book:
http://www.tug.org/TUGboat/tb15-1/tb42pappas.pdf

Wednesday, October 19, 2011

Eclipse 3.7.1 on Ubuntu 10.4

[0]
The installation file
eclipse-SDK-3.7.1-linux-gtk.tar.gz
is downloaded from the Eclipse site.

[1]
It extracts into the directory "eclipse". The directory "eclipse" is moved to /home/<username>/Applications/eclipse-3.7.1

[2]
The file Eclipse 3.7.1.desktop is created:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=gnome-panel-launcher
Name[en_US]=Eclipse 3.7.1
Exec=/home/<username>/Applications/eclipse-3.7.1/eclipse -data /home/<username>/works/workspace -vm /opt/java/jdk1.6.0_27/bin/java
Name=Eclipse 3.7.1
Icon=/home/<username>/Applications/eclipse-3.7.1/icon.xpm

The use of the options -data and -vm is well described in the documentation file readme_eclipse.html.
The workspace location /works/workspace can be chosen in any other way.

LibreOffice 3.4 on Ubuntu 10.4

Ubuntu 10.4 comes with OpenOffice 3.2

I want to have the newest LibreOffice.
Download the installation file from the LibreOffice homepage.
The file is LibO_3.4.3_Linux_x86_install-deb_en-US.tar.gz.
Extract it somewhere.
Read the file /readmes/README_en-US and follow the installation guide therein. Everything goes perfect.
When I started LibreOffice 3.4, it complained that Java runtime cannot be found (I installed the Oracle Java, not the standard way for Ubuntu).
After several ignoring "OK", LibreOffice started, and then via menu Tools/Options/Java the actual Java runtime could be added to the LibreOffice configuration.
LibreOffice when started without complaints.
LibreOffice is installed in /opt/libreoffice3.4.
Very fast, as compared to my Windows system.

Adobe Reader on Ubuntu 10.4

Adobe Reader is installed on Ubuntu 10.4.

[0]
Go to the Adobe downloads page. The current link is
http://get.adobe.com/reader/
The page suggests to download the Linux, English Adobe Reader.
The current version is AdbeRdr9.4.2-1_i486linux_enu.bin.

[1]
On console (password should be set where required):

[prompt] sudo cp /home/<where_downloaded>/AdbeRdr9.4.2-1_i486linux_enu.bin /opt/AdbeRdr9.4.2-1_i486linux_enu.bin
[prompt] cd /opt

[2]
[prompt] sudo chmod a+x AdbeRdr9.4.2-1_i486linux_enu.bin
[prompt] sudo ./AdbeRdr9.4.2-1_i486linux_enu.bin
Extracting files, please wait. (This may take a while depending on the configuration of your machine)

This installation requires 145 MB of free disk space.

Enter installation directory for Adobe Reader 9.4.2 [/opt] 
/opt

Installing platform independent files ... Done
Installing platform dependent files ... Done
Setting up libraries ... Done
Setting up desktop and menu icons ... Done
Setting up the browser plugin ... Done

[prompt] /opt/adobe$

[3] 
The suggested installation directory /opt is chosen. The program is installed in  
/opt/Adobe/Reader9/
On the desktop and in the Applications/Office group the link (icon) to the Adobe Reader appears.