Thursday, December 1, 2011

Perl - Installing Tk on Strawberry Perl

v 0.2

I recently started looking at the options for using Perl on Windows.  One can install it through Cygwin, which may be a good option, or install either the Activestate or Strawberry versions.

I first stumbled across Strawberry when I spotted a random quote that Larry Wall uses it when he has to use Windows, so I looked further.  It is open source and comes with its own C compiler suite for use in installing Cpan modules.  I liked that Strawberry was more closely integrated with Cpan than Activestate, although the latter has its own Perl Package Manager.

Then I thought I'd like to look at using the Tk graphical toolkit with Perl, and discovered that it didn't appear to be included in either product.  I thought it would be a good opportunity to try installing Tk on Strawberry using the " cpan " facility.  So started an adventure that almost had me uninstalling the whole thing and going to Activestate.

Now, I'd installed the 32 bit version of Strawberry 5.12 on my 64 bit Win7 box.  No matter what I did, the installation failed when  " dmake " was unable to recognise some file extensions in the compiler suite.  So in a last ditch effort, I uninstalled the 32 bit version and downloaded the 64 bit Strawberry 5.14 preview and installed that.  The appropriate directories were in the "path" and so I opened a command line window and typed:

cpan Tk

It all downloaded and dmake built the Tk system however when dmake tried to test, the test failed and dumped me back to the command line.  All was not lost however, since there is only one more step needed, the actual install.  I changed to the downloaded and unpacked Tk source directory in " cpan\build " and simply typed:

dmake install

and the installation completed.  Here is some advice I found in my searching to manually install Cpan modules in Strawberry if you need to:

http://www.perlmonks.org/?node_id=841828
-----------------------------------------------------------------------
Try manual installation if CPAN install fails. Try following:
1. Download tar.gz file
2. Extract using Winzip or 7zip
3. go to the folder "Tk-804.028_503" in command prompt
4. type: dmake
5. type: dmake test
5. type: dmake install
----------------------------------------------------------------------

Anyway, I now have a working Tk module in my Perl install - I shall monitor the situation, since this is a little complex if you have a client that needs to install Perl/Tk .....


Later

Thursday, October 27, 2011

Debian Squeeze - X31 and Ati Radeon

v 0.2
27 Oct 11

I was curious how to get the Radeon video card in my IBM X31 laptop working in other than generic mode.  I read the Debian Wiki page on it .. http://wiki.debian.org/AtiHowTo and found it quite interesting.  It seems that in many cases, there is no longer an xorg.conf file but the system probes the hardware on each startup.  I found that the open-source radeon server was already installed and the only thing I needed to do to make the best of it (without using module assistant to install a further module) was to install the non-free firmware.

aptitude install firmware-linux-nonfree

I rebooted and a big improvement ...


Later ....


Debian Squeeze - Webcam

v 0.3
13 Mar 12

Webcam support is built into the Debian kernel.  If your webcam is part of your machine, then very likely it will work out of the box, as in the eeepc.  If however you connect the webcam via USB, then you will have to use module assistant to install the Quickcam-usb module.

Using module assistant is all very straight forward as I've previously written, however you will first need to install the " module-assistant " package.  I found it easiest to simply use it in interactive mode to go through the various steps of preparing, getting the source, compiling and then installing it.

Once that was done - it worked .... except (for the moment) skypeThat I'm still working on.


Later ..


Update 13 Mar:

On revisiting the post, I got Skype sound to work on my Parent's machine by installing the " alsa-oss " package.

I recently installed a Logitech webcam to another machine by installing the Quickcam-usb module as described above, with the sound working in Alsa.

Debian Squeeze - Backports

v 0.2
27 Oct 11

I've known about the "backports" for Debian Stable for some time, but never quite got into using them.  It always seemed too hard to implement and the instructions were just that little too vague.  When the backports were incoropated into a Debian service, a package search engine was implemented, which I found irritating because I couldn't browse the available packages, and the search engine didn't work in any case.

All this has changed for me - I've finally worked out a system that works for me.  The technique needed for Squeeze to incorporate backports is now simpler than Lenny - and it just works.

My first use of backports was when I started to incorporate the current Iceweasel release in my Debian installs.  If you look at the instructions contained in the http://mozilla.debian.net web-page, you will see that there are two repositories that are activated - backports to provide the XULrunner package and the Debian Mozilla repository.  In that installation, only the "main" section is activated, however you can also activate "contrib" and "non-free".

Debian Backports:   http://backports-master.debian.org/

To include all the backports for Squeeze, add this line to your sources.list file:

deb http://backports.debian.org/debian-backports squeeze-backports main 

(add  
contrib non-free
as well if you like ) 

If you want to browse the available packages, then here they are - have a look through and see what takes your fancy:

http://backports.debian.org/debian-backports/pool/

Once you have decided what you want, then go to the search engine and enter the base part of the package name to verify what package you should include in the update .. for example if you search on "linux-image" you will get several kernel packages that may suit you - choose the appropriate one (in this case I chose  " linux-image-2.6-686 "  which is a generic package that at the moment uses the 2.6.39 kernel.  Apt-get (as below) from a root terminal and ....


apt-get -t squeeze-backports install linux-image-2.6-686
 
 
 
Done ..
 
 
Far simpler than I'd thought.
 
 
 
Later. 

Wednesday, October 19, 2011

Debian Squeeze - Wine Binaries

v 0.2
18 Oct 11

For some time, I've been trying to find an easy way to load an up-to-date version of Wine onto my Debian Squeeze installation.  The Wine project has only outdated binaries, and there is no explicit binary for Squeeze available.  I've done some reading on compiling the appropriate debs and whilst I agree this is the ideal solution, there remains debate on the best technique - or at least as far as I can see.  I'll get there with the compiling way, however I want to do it properly the Debian way - there is no point doing otherwise.  I need to do some more reading to understand exactly what I am doing.

In the meantime during my searching, I came upon what seems to be a simple solution that .. just .. works.

Mepis is a Debian-derived distribution that is close to pure Debian.  Whilst v8.5 is based on Lenny with extras, v11 uses Squeeze with additional libraries.  I wasn't keen on upgrading libraries just for this.  Now v 8.5 has the same kernel as Squeeze, and based on the report of a satisfied user, I gave it a go.

I downloaded the "mcr85" versions of Wine-Gecko and Wine from:
http://main.mepis-deb.org/mepiscr/testrepo/pool/test/w/wine-gecko/
and
http://main.mepis-deb.org/mepiscr/testrepo/pool/test/w/wine/

Wine-Gecko needs to be installed first, and that went without a hitch using "GDebi".  Before installing Wine, the " libmpg123-0 " package needs to be installed to satisfy the Wine dependencies.  Then install Wine, again with GDebi.

" winecfg " and you are good to go.

So far, all is well and the packages show up nicely in the package database, so they will be straightforward to remove and upgrade.



Later ......

Tuesday, October 18, 2011

Debian Squeeze for my Parents - Skype, Alsa, OSS

v 0.2
18 Oct 11

I was showing my Father how to use Skype on Debian - he was using a headphone / mic setup plugged into the front of the computer - when I discovered that despite the headphones working, the microphone was not.

I played with settings in Skype, then decided to see what the System could provide.  I found settings for "Front Microphone" and "Front Microphone Boost" in the Gnome Alsa Mixer and activated them.  I then found that I could use the microphone, but still Skype refused to use it.

Then I started to wonder.  Does Skype use ALSA?  Or is it wedded to OSS?  I searched the package database and found a package "alsa-oss".  On a whim I loaded it and then all was well.  I cannot say for sure that this fixed things, but it certainly seemed to do the trick.



Later ........

Friday, October 14, 2011

Finding Emacs - Colours,Toolbar and Variables

v 0.2
14 oct 11


Colours

I was wondering about setting colours in Emacs ... and then started wondering about Themes and even how to find out what variables to set.

Well, here is a website that gives all the colours you can set:


http://raebear.net/comp/emacscolors.html

How can you use them?  Well to start off, try putting this in your init file ....

(set-background-color  "grey95")

It is a very simple change - changes the background to light grey, however you get the idea.


Themes

Try this website to view a few:
http://color-theme-select.heroku.com/

Toolbar

Want to determine whether the toolbar is on or off?

(tool-bar-mode t)


Variables

I found this list this morning, however there are a lot more than this:
http://www.gnu.org/s/libtool/manual/emacs/Variable-Index.html


Later ....

Wednesday, October 12, 2011

Finding Emacs - Aquamacs and Emacs on OSX

v0.2
12 Oct 11

I have both Aquamacs and Emacs on my Mac laptop.  Aquamacs is a really good adaptation of Emacs to the OSX environment, particularly for "non-geeks".

One aspect of Aquamacs has had me wondering about it over the last few weeks - that of initialisation.  If you read the aquamacs manual, it tells that it reads its own customisation and preferences files first and then it reads " .emacs ".

Experimentation tells me that Aquamacs does NOT read the initialisation files contained in " .emacs.d " as per the latest emacs variants.  The only problem with this is if you do not know about it.  Simply overcome - have your " preferences.el " and your " init.el " files load the things you want them to load.

Done!


later.

Finding Emacs - Installation in Windows 7

v 0.2
12 Oct 11

Way back when I started to be interested in Emacs, I posted my installation adventures.  A year has passed, and even though I use Emacs on OSX and Linux, somehow a Windows Desktop has remained in a convenient place and I've often used Emacs on that.  I updated the XP system to Windows 7, and would have to say that if you do use Windows, upgrading would be a wise move.  One thing about Windows 7 that appeals to me is that it has become more "Unix-like" and that makes it easier to have something like Emacs on the go.

The "home" directory in Windows 7 is your username, so if your account is "jane" it would be

c:\Users\jane

I'm the only person who uses the machine, so I've found it convenient to put both the program directory and initialisation files in "jane".

First stop is the Gnu website and downloading the latest Windows version of Emacs.  At the moment it is 23.3.  Then download the manual.  The latest version at the time of writing is 23.3, so you will want to download  emacs-23.3-bin-i386.zip .  In general, when new versions come out, the one to get will be between 35-40 mb in size and with the format  " emacs-XX.x-bin-i386.zip ".  The archive will unzip into an "emacs-23.3" or whatever folder.  I just put this in the home directory as so:


c\Users\jane\emacs-23.3


The program to run is "C:\Users\jane\emacs-23.3\bin\runemacs.exe" .  I made a shortcut, and then pinned it to the taskbar.  Congratulations, you now have a bare-metal Emacs installation.


But wait ... there's more.


Create a new folder in your home directory called  "   .emacs.d  "  .  Note the periods.  In unix terms, the period at the beginning makes the file or directory invisible.  I believe in Windows there are some problems with the period at the beginning, though I've not seen any, and an underscore will suffice, but I've not looked at that.  So you have a new directory as so:


C:\Users\jane\.emacs.d


Inside this directory go initialisation files etc .. notably  " init.el ".  Here is a part of my init.el file to get you going.


-----------------------8<--------------------------------
 ;==================================================
;
;        Geoff's Init.el file
;
;==================================================

(setq inhibit-startup-screen t)

;=================================
;
;         Org Mode
;
;=================================

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only
;
;;(org-remember-insinuate)


;=================================
;
;         Mobileorg
;
;=================================

;; Set to the location of your Org files on your local system
(setq org-directory "~/org")
;; Set to the name of the file where new notes will be stored
;  Filename can be anything you like.
(setq org-mobile-inbox-for-pull "~/org/mobileorg.org")
;; Set to /MobileOrg.
;; Should be as below.  Windows has recently changed to just "Dropbox".
(setq org-mobile-directory "~/Dropbox/MobileOrg")
;  All "index.org" does is set the variable below.
(setq org-mobile-files (quote ("A380Notes.org")))


;=================================
;
;         Yasnippet

;  Requires yasnippet to be installed
;
;=================================

(add-to-list 'load-path
              "~/.emacs.d/plugins/yasnippet-0.6.1c")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")

;; Develop and keep personal snippets under ~/emacs.d/mysnippets
(setq yas/root-directory "~/.emacs.d/plugins/mysnippets")

;; Load the snippets
(yas/load-directory yas/root-directory)



;======================================================================
;
;    Encryption - symmetric gpg
;
; this requires gpg be installed, available from  http://www.gnupg.org/
; To open a " .gpg " file, it will ask for password twice
; To close, will ask for password once.
;
;======================================================================

(require 'epa)
(epa-file-enable)

;======================================================================
;
;             Predictive
;
;         http://www.dr-qubit.org/emacs.php
;
;======================================================================

(setq load-path (cons "~/.emacs.d/plugins/predictive" load-path))
(autoload 'predictive-mode "predictive" "predictive" t)

;======================================================================
;
;;                    Aspell
;
; GNU Aspell is available from: http://aspell.net/
;
;======================================================================

(setq-default ispell-program-name "c:\\Pro\\Aspell\\bin\\aspell.exe")


;=================================
;
;    Norton Commander

; nc.el
;
;=================================

(add-to-list 'load-path "~/.emacs.d/plugins")
(autoload 'nc "nc" "Emulate MS-DOG file shell" t)

;=================================
;
;    Midnight Commander

; mc.el
;
;=================================

(add-to-list 'load-path "~/.emacs.d/plugins")
(autoload 'mc "mc" "Emulate MS-DOG file shell" t)


;=================================
;
;    longlines

;    plugins already in load path

;
;=================================
; (add-to-list 'load-path "~/.emacs.d/plugins")
   (autoload 'longlines-mode
     "longlines.el"
     "Minor mode for automatically wrapping long lines." t)

 
-----------------------------------8<-----------------------------------------

Now much of what I've loaded extra are emacs lisp files I've found, particularly on the Emacs wiki.  I would start with the top couple of customisations, (Orgmode) and go from there.  Longlines.el is readily available on the internet and I'd install that alongsside the init.el file (if you are not going to add to the load path).

Longlines

A word about wordwrap.  What people think of as word-wrap does not exist by default in Emacs.  Visual-line mode and longlines combined give what we think of as proper wordwrap.

This is what I have at the start of my orgmode emacs files:

# -*- mode:org ; mode:visual-line ; mode:longlines -*-

It is a comment with instructions to Emacs to initiate the appropriate modes.


That's it for now



Later ..............

Friday, August 26, 2011

Finding Emacs - Orgmode and PDF, Text, Html export

v 0.2

I have really found Orgmode useful over the last year or so.  I learn a small bit of it as I go and I think it is one of the most useful tools out there.  I normally use the standard text export for its ease of use - it impresses people that you can produce a professional looking document with standard text.

First though, a couple of tips from the manual.  When you export, you can over-ride the defaults to produce the meta-data you want.  Simply make the first lines of the file something like:

 -*- mode:org ; mode:visual-line  -*-
#+STARTUP: indent
#+OPTIONS: H:4
#+TITLE: The Title I want On the Document
#+AUTHOR: Archer of Gorgon
#+DATE: Feb 31
#+EMAIL: archer@gorgon.org.gg


Formatting for HTML and PDF

When you write your orgmode document, make sure it is structured correctly, otherwise when you export to HTML or PDF, lines will run into each other.  I was writing lists of action items to myself such as:

Takeoff RWY 16 Mel
Dosel departure
Tcas event
STAR
RNAV FLS 34
Go Around
RWY 34 VOR  FLS
Land

and it would be exported under HTML and PDF to:

Takeoff RWY 16 MelDosel departureTcas eventSTARRNAV FLS 34Go AroundRWY 34 VOR  FLSLand

Not quite what I wanted.  What I should have done was to use the "table" function, with one cell per row or .. 

#+begin_example

#+end_example

Others are here:
http://orgmode.org/manual/Easy-Templates.html#Easy-Templates

  
Export to PDF

Orgmode CANNOT export from EMACS to PDF by itself.  You need the "pdflatex" program.  I am using my Windows 7 desktop as my main machine, so I haven't checked with Mac or Linux however ... I installed MikTex and all was well .....  There will be equivalent packages ..

Utterly beautiful PDF files.

Note:  The first run, it will take some time however subsequent runs happen within seconds.


That is it.



Later.


Friday, August 12, 2011

Debain Squeeze - Dropbox

v 0.3
28 Oct 11

Dropbox "deb" files are compiled for use under ubuntu.  Whilst Debian Squeeze has all the correct dependencies, they are written for ubuntu, and so give an error when the deb file is installed on Debian.  To fix this, it is a simple exercise in extracting the deb file, editing the control file and then re-building the package.  Works a treat.

Here is the link:


Dropbox for Debian



Update 28 Oct 11

I notice that Debian Backports has the Dropbox package.  Use it.

:)


Later ...


Tuesday, August 2, 2011

Debain Squeeze - IBM / Levono X31 Thinkpad

 v 0.3

I've had an IBM X31 Thinkpad for quite some time and in recent years it has fallen into disuse.  It has Windows XP installed on a 40 gig disk together with 768k of memory - I've found it useful for those odd occasions I need IE6 to do home courses for work over the Internet.  I know ... I know ....

To continue.

A couple of days ago, I spotted a spare 40 gig 2.5 inch HDD I had purchased some time ago, but not adequately used and the thought occurred to me I should replace the drive in the X31 with this and install Debian Linux.  I've installed Debian on a previous IBM laptop, and was most impressed to see that everything on it "just worked". 

The X31 maintenance manual was easily found on the Internet, and with a little bit of fiddling, I had the drive replaced.  I downloaded the latest iso image for "Squeeze" and the firmware.tar.gz file.

Another diversion to talk about Debian's installation logic with their current Stable distribution.  Debian has made their installation iso image only with "free" drivers.  This is not the chore that you might think.  Simply download the firmware archive and unpack it onto a USB stick.  There will be a collection of "deb" files.  During the installation process, if the need for a "non-free" driver is found, the installation routine will ask you to insert the removable media containing the driver and continue.  Really easy.  Not an issue.

Going through the standard Debian installation routine, I chose a guided option, separate "home" partition and encrypted LVM (just to see what would happen).  Well, everything did seem to go OK, though it took some time but I should expect that given the processor is a good six years old.  Erasing the data on the disk took quite some time.  On a 40 gig disk, it set aside 28 gig for "home".  The whole installation process took probably 3 or more hours - all I know is that I started before dinner and it wasn't till after 10.30 in the evening that it all finished.  A significant period of time was spent by the install routine setting up the encrypted volume.  A couple of times, I almost gave up when there was nothing but a blue screen there for many, many minutes.

In the end though, an excellent installation.  When the machine boots, enter the passphrase when it asks just after the Grub screen and after a short interlude, the standard GDM3 login screen appears.  So far, everything "just works" so I'm really pleased.  The standard wireless b works fine using the "non-free" intel 2100 driver, and so does my Netgear "G" wireless card - it uses the free Atheros driver.


Later ..................

Sunday, June 26, 2011

Debain Squeeze - Iceweasel Release - Firefox Deb packages

v 0.3
Sep 2011

Whilst I love the Debian Stable concept, it does become limiting when you wish to use rapidly evolving software.  Certainly this is where the Debian Backports service came about, though I seriously need to get into it and see how I can use it for useful updates.

I the meantime, over the last few days I have stumbled on two up-to-date incarnations of Firefox that are packaged as debs for, or compatible with Squeeze.
Of course, as I have written about earlier, you can always download the Linux binary from the Firefox download yourself and simply install it manually.  I have come to regard "Opt" as the most convenient place to put it, as several other packages do also.


Later ...........

Update 9 Aug 11

I was disappointed to see the Debian access to the latest iceweasel is far less than before.  Tried installing the latest release and it failed due to library problems.  (see below ... my mistake )

On the positive side, I
  1. downloaded the Firefox tarball from the Firefox site, and as root unpacked it in "/opt" .  
  2. added firefox to the menu system with "alacarte" from a root terminal.
When I executed firefox, it worked fine - no other action needed, so I un-installed iceweasel using synaptic.  Very pleased with the result.

Also .... NOTE the version of Iceweasel that is included with Debian Squeeze is no longer supported by Google in their products.


Update 16 Sep 11

Had my faith in the Debian Mozilla team enlightened.

http://mozilla.debian.net/

Follow the directions.

If you use the command line like they say, it will work .. when I followed the directions rather than using synaptic it worked fine.  The trick is  the " -t" option in the command line.  Once you use it, updates will work fine.  You just have to get it working in the terminal.


Later ....

Friday, June 17, 2011

Debian Squeeze - VirtualBox Guest Additions

v 0.3

This post has a number of connections - it ties together a number of the posts I've made today and also my post on Bitcoin mining.  As I posted there, you can let the mining happen in a Windows environment and run a normal desktop, say Slackware or Debian under Virtualbox.  I noted that playing video clashes with Bitcoin mining, but not if you run it in a Virtual Machine.

Slackware already comes with all the required build tools to install Guest Additions and all it requires for that is to mount the Guest Additions ISO and run the script.  Debian needs a bit more.  You need to ensure the kernel headers and the build tools are installed - either by installing Module assistant and then using the command " m-a prepare " or downloading the headers and build tools as described in the previous NVidia driver post.  If you find you need an alternative compiler version, the refer to the post on that.

Finally, just mount the Guest Editions ISO (in its most basic form you can find it in the Virtualbox directory) and then run the appropriate install script on that ISO.  Very simple.


Later.....

Jan 2012

Upon re-reading this, it seems a little spartan - I've detailed the process a little better in my post today on installing Debian Wheezy in Virtualbox...

Rgds

Debian Squeeze - NVidia Video Drivers

v 0.3

I've always found installing video drivers in Debian the easiest if I just use the proprietary drivers.  Sorry to the Debian Purists (hangs his head in shame).  Most of my experience is with NVidia drivers, so I'll stick with that.  First, two page links that pretty well cover what I'm talking about.

http://www.pendrivelinux.com/how-to-install-nvidia-video-card-drivers-in-debian-lenny/
http://www.pendrivelinux.com/upgrading-nvidia-drivers-in-debian-lenny/

The technique described to install the drivers is the pukka one, however you can also just use Module Assistant as "  m-a prepare " to ensure the appropriate kernel headers and the build environment are available.  If you get a message telling you that the available compiler is the wrong one, then you can download the correct one and use one of the two techniques in my previous post to fix the situation.

What you DO need to understand is that you need to have X .. NOT running.  For Squeeze, you will have to check which version of  "gdm" is running in the directory pointed to in the first post and adjust as necessary.  Why don't I give the exact instructions?  Well, first I'm being lazy right now, and second if you can't figure it out from the links and hints above, then maybe you shouldn't be playing with this.

Updating drivers in Debian Stable is not normally a problem, since it is just a repeat of the original installation instructions, however if you are playing with Debian Testing, then when a new kernel is installed, you will lose X as the wrong driver is pointed to in xorg.conf.  To fix this, just replace the proprietary driver name with " nv " or even " vesa " to get back to the Xorg driver and it will be ok for the moment.  Of course you COULD use the opportunity of being dumped into the command line to re-install the drivers and " startx " again, however ...

That's it for the moment.


Later ......

Update.
Squeeze uses " gdm3 " so in the instructions given in the link use that instead of " gdm "

ie to stop X ...  #  /etc/init.d/gdm3 stop

Debian Squeeze - Changing the Default Compiler

v 0.2

Once, when installing the proprietary NVidia drivers in Debian Lenny, I was stumped by the message that the available compiler was different than the one required.  I've seen several techniques to change the default compiler, but the two I've seen that are the most understandable involve changing the symlink or exporting a variable pointing to the required compiler.

Changing the Variable pointing to the Compiler:
 
# export CC=/usr/bin/gcc-4.1
# ./NVIDIA-installer-xxx-whatever


Changing the Symlink:

# ln -s -f /usr/bin/gcc-4.1 /usr/bin/gcc


http://www.linuxquestions.org/questions/debian-26/need-an-older-gcc-version-690246/


Later ...........

Debian Squeeze - Module Assistant

v 0.2

Often, in Debian, when you install a module from source, install proprietary Video Drivers (I'm looking at you Nvidia), or the Guest Additions in VirtualBox, you need some or all of the current Kernel Headers, the appropriate Compiler and the appropriate source code.  Module assistant can make it easy for you to do some or all of those things.  For example you can use it to download and prepare the kernel headers and make sure the build tools are available before you manually run another script, or you can use Module Assistant to prepare all available modules for you to choose which one to compile and install.  The Debian Wiki has an excellent run-down on using Module Assistant both in command line and interactive mode.  It also has a complete listing of available modules for the Debian kernel.

http://wiki.debian.org/ModuleAssistant

Each of the tasks I mentioned above is deserving of its own post, even if it is short so as to make it all easier to find, however they are all interwoven.  An additional post I'll make is how to change the default gcc compiler version, since sometimes this is needed - as it was with the installation of the Lenny NVidia drivers.


Later ...........

Debian Squeeze for My Parents - Useability - Pt4

v 0.2

Over the previous three posts on this subject, I've been describing how and why I set up my Parent's home computer with Debian as an alternative for their use.  I have to emphasise that at the moment, it is an alternative, since there is a lot they like to do on Windows that time just did not allow me to show them.  My main aim was to introduce the alternative and to show them how to use it for electronic banking.  I pointed out how their current setup had major weaknesses, particularly that the anti-virus had not been updated in months, and that even though the Gnome desktop may look a little different to Windows, it wasn't that different and did basically the same things.

It is always interesting when you introduce someone who has relatively limited experience with desktop computers, to a new system that, to myself, is just a variation, but to them is completely new.  Having said that, as the new system is used then familiarity helps.

  • The first thing is to explain basic concepts - the internet "cloud" of machines where websites and banks exist, the computer, and the web browser.  I found these being confused and if someone doesn't have a vision of how the pieces fit together, it can be a very difficult experience.
  • Operating systems is another problem people have.  I have been surprised how many people just cannot understand that Windows is not needed to run a computer.  I generally compare this to a large house needing a Butler to manage.  The Butler runs the house and employees, greets guests and generally makes sure everything is running well.  I explain different operating systems as different Butlers who each speak a different native language when running the house.  Some are bi-lingual, others not so.
  • Web browsers caused some confusion earlier on, since not having Internet Explorer and "Favourites" made it initially seem that this would not work, however explaining that IE and Firefox/Iceweasel were just two products that did the same job helped.  And relating that "Favourites" and "Bookmarks" really did the same thing helped also.
Fortunately as far as linux useability goes, the desktop metaphor is easily adapted to no matter which one. 

This post, I wanted to write about a few of the things I observed with useability, something we don't normally get to see with people trying to work at new concepts and understand things that are simple to the younger of us, but not to the elderly.



Later ..............

Thursday, June 16, 2011

Debian Squeeze - HDMI Audio

v 0.2.1

I was having an email discussion with a colleague who was getting into Debian.  He had installed Squeeze on his machine and then became stumped because there was no Audio being transmitted from the NVidia GTX460 Video card.  Ultimately, his solution involved a visit to Debian Backports and the installation of the proprietary NVidia driver.

Here is his email to me:


"I have everything up and working.:-)) yay!

It turns out that the gtx460 graphics card's GPU only recognized certain codecs that became valid after the 2.6.35 kernel or something like that. This page
 http://www.nvnews.net/vbulletin/showthread.php?t=159346 
has a good article on alas hdmi troubleshooting for nvidia.

I back ported the 2.6.38 kernel and the sound outputs magically appeared, however the nvidia graphics driver done the "debian way" didn't want to play, so I installed the proprietary drivers straight from nvidia. In hindsight, I think it may have had something to do with the nouveau graphics drivers the new version of debian comes with as I needed to blacklist them in the mod probe.d directory.

Anyway, it's working as advertised with all the bells and whistles, so thanks for pointing me in the right direction..."

Posted in the hope someone will benefit.


Later ......

Debian Squeeze for My Parents - Config Issues - Pt3

v 0.3

Grub2

Once I'd finished installing Squeeze on my Parent's Computer, I had a dual-boot machine that booted by default into Debian. Initial installation failed to include the Windows XP selection on the bootloader menu, however I wanted it to boot into Windows as the default operating system.

Debian uses the Grub2 bootloader.  Of course, a Windows selection SHOULD appear but didn't.  Instead, the default display had two selection lines, the first being for the normal Debian Squeeze kernel, and the second for a Rescue Mode boot into Debian.  How to organise Grub the way we want it?

The Debian Wiki, of course!  First search the wiki for the bootloader Grub2.  The first challenge we have is to have it recognise the Windows installation.  The clue is in the wiki.  Open a root terminal and:

update-grub

There is now a third line on the Grub menu, pointing to the Windows XP partition.

Next, we are told "To configure grub "v2", you should edit /etc/default/grub, then run update-grub."  Opening this file (as root) shows us the first two uncommented lines as:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5

The first line tells us that the default boot entry is on Line 0 (zero), the top one and that there will be a 5 second delay before the boot continues.  I changed the entries to:

GRUB_DEFAULT=2
GRUB_TIMEOUT=20

I now had the default boot line as line 2 (the third line down) and the default timeout at 20 seconds (to give adequate time to change the selection - don't forget pressing "Enter" will continue the boot process straight away).

update-grub

All fixed!


Tip - Edit file as Root

Open a root terminal window, change to the directory where the file you want to edit is located and:

gedit

gedit opens as root and can edit and save the file as root.

Tip - Open Nautilus File Manager as Root

As above but:

nautilus

and the Gnome file manager starts so you can copy files as root.

Adobe Flash

Whilst there is a package that purports to load Adobe Flash, it didn't work for me.  HowtoForge tells you how to disable the Gnash Flash plugin in "Iceweasel/Firefox", which is a good idea.

To enable flash the manual way, download the tarball for linux from Adobe and extract as root the "libflashplayer.so" file (I think it is called).  Copy it to " /usr/lib/mozilla/plugins " and it will show up nicely in Iceweasel and play Youtube videos for you.

ntfs

Use synaptic to ensure the " ntfs-3g " package is installed.

Assuming Windows is on /dev/hda1, create a directory under either /mnt or /media, say /mnt/windows .

Edit fstab (save the current one as a backup) and add a line such as this on the last line.


/dev/hda1     /mnt/windows     ntfs-3g     defaults

That should do it - you can now read and write to the windows partition.


That's it for the moment, however I still had to configure the router for SSH access - next part.


Later ......

Debian Squeeze for My Parents - Installation - Pt2

v 0.2.5

Now for the installation. ( refer also to my previous posts, particularly on Debian Iso's )

First item on the agenda was to defrag the WinXP partition.  This was not a very difficult operation, using the standard defrag tool in Windows.  Most of the files were at the front of the disk anyway, with only two insisting on remaining half-way down the partition.  Not a problem as I didn't plan on invading that part of the disk anyway.

Next, my favourite partitioning distro/tool - Parted Magic.  Whilst the Debian Installer partitions non-destructively, I like preparing the target partitions before-hand and then just assigning them during the installation.

Partitioning:
  • For this installation, I used a very simple scheme - one 30 gig partition for the Filesystem and a 2 gig partition for Swap.  
  • Ordinarily, I assign a partition for " /home ", which lets me re-install without destroying my data (it also lets you have multiple Linux installations for the same home partition).
  • A further refinement is to assign separate partitions for " /tmp " and " /var " which provides both a safetynet in case, say, /var fills the disk and stops the system, and a security one, however I'll leave that to those more knowledgeable.
The Debian Installer is, I have found, extremely reliable.  Often I decide to try another distro and just end up returning to Debian for a reliable installation experience.  One thing to note - if you get lost or confused or whatever else, you just start again and you have lost nothing.  In fact, you have learnt something and that is a plus.

For those who don't know, Debian installs by default a Gnome desktop.  If you are really keen on KDE, XFCE or LXDE,  then you can install one of these as an alternative - there is an approapriate installation ISO available.

As pointed to in a previous post, I used a net-install iso with all non-free firmware included.  A very painless, straightforward installation.  After that, remove the installation media and boot into the Debian Squeeze desktop.  What can I say?  It really is a non-event.  Personally I dislike the default wallpaper, which is easily replaced in Gnome with a right-click to the desktop background.

If you follow through the "howtoforge" installation sequence, you will end up with a full and balanced array of software.  Two things stand out to me from all this though.  The installation of Google Chrome may not appear in the menu system - and may well need manually adding to the menu structure, or the addition of a launcher to the panel or desktop.  Also, the adobe-flash plugin does not download and install as advertised.

Configuration glitches in the next Post .

Later ....

Debian Squeeze for My Parents - Strategy - Pt1

v 0.2

My Parents are getting on in years, and with me living on the other side of the country to them, I don't get to visit perhaps as often as we all think we should.  So, since I had a couple of weeks free recently, I jumped on an aircraft and paid a visit for a week.

One of the items on my "list of things to do" was to see what I could do to improve their computing experience - particularly in the areas of security and to make their use of the machine as a communication device a more pleasant experience.  What I would have liked to have done is to just buy them an iMac, however I knew they would have regarded that as an extravagance and would have resisted because it was "different".  My Brother-in-law had been helping them as he could, however he was "time-poor" and couldn't devote all the time that was probably needed to teach them what they needed to know, and I certainly didn't want to get in his way since he was there and I wasn't.

I remember the desktop as being an early Pentium 4 machine with not much memory, and I'd been told that there had been a bit more memory put in, so I thought I'd just take stock of what was there.  When I fired the machine up, my first thought was .. this is rather snappy!  It was a newer machine than I'd remembered and quite nice for what it was:
  • 15inch LCD Screen
  • Pentium 4 3.2 gig
  • 1 gig memory
  • DVD RW
  • FDD
  • 80 gig HDD
  • Windows XP Home
Internet access was using Internet Explorer through a router, and I found that the virus protection hadn't been updated in a few months.  For me, the only good thing here was that the machine was behind a router.  My personal, biased opinion is that you have to be nuts to use IE on a regular basis, however on a more rational level, Windows XP is rapidly becoming outdated, is inherently less secure than current systems, and can not run the latest Internet Explorer browser.  Outdated virus protection certainly didn't help.

Aha! I thought, there may be a zero-cost way to improve things here.  Importantly though, in installing a new system on the machine, it is important that Windows still boots up by default.  Forcing them into this "new fangled system" just gets the ire up and works against what you want to achieve.

After thinking about it all, I decided to use the last 30 gig of the HDD for Debian, and setting it up so that the system defaulted to Windows.

Next, the installation.


Later ..........

Tuesday, June 14, 2011

Debian Squeeze - ISO Installation Images

v 0.3.1


With version 6.0 of Debian, the default installation CD/DVD now removes all "non-free" licenced driver software from the kernel.  I have seen many postings and opinions on the Net expressing dismay in that now it will make it really hard to install a Debian System.

.................. well, not really .......

If you insist on using the "old" style installation with proprietary drivers included for you ( yes, I'm lazy and use this ) then you can download a "netinstall" CD image that will do the installation just like before.

Debian Install CD including all firmware

A netinstall requires an internet connection, as it first installs a basic system, asks you to choose a Debian repository and then downloads and installs the main system packages.

Debian Manuals
Debian Wiki

Now, if you use the standard installation CD images, all is not lost.  Read the installation guide and it shows how to load all "non-free" firmware onto a USB stick such that the installation procedure will access and install the required modules as it finds it needs them.

Finally, an EXCELLENT installation guide on "HowToForge".  The author contributes some wonderful stuff.

Perfect Desktop Debian Squeeze on HowtoForge.

And here is another installation guide that includes preparing the installation media on a USB memory stick.

So installing the new Debian "Stable" is not so scary after all.


Later ..

Tuesday, June 7, 2011

Bitcoin as an Electronic Currency

v 0.3.5

Since I started posting about Bitcoin, the traffic through this Blog as increased substantially.  Obviously this reflects the interest in Bitcoin, but I can't help thinking it is there for the wrong reasons.  I could almost compare it to what I've read of people's reactions to Gold Rush Fever, as it were.

Now, a Gold Rush is famous for making people rich, however all too often those being made rich were the merchants, rather than the prospectors, and it is looking the same today.  My most popular page, by far, is the description I wrote as to how to set up solo mining on Windows 7 and an ATI 6970 video card.  Yes, you will make a couple of hundred bitcoins a year with a medium setup, but that will not make you rich.  I'd classify it more as an entertaining distraction.

Another thing that concerns me is the rapid rise in the value of a bitcoin.  That has all the hallmarks of a bubble, and people are going to get burnt.  Hoarding the bitcoins for speculation CAN work, but can also burn you seriously.  If bitcoins become common as a currency then yes, over time they will inevitably rise in value, however once people start hoarding them, the "Bitcoin Landscape" becomes distorted and the instability starts again.  This instability is the opposite of what people are looking for in a currency.

Now, where does Bitcoin fit in to the money definitions?  If you read on Wikipedia as they talk of "Fiat Money" and "Comodity Money", then Bitcoin has characteristics of both.  It seems to be closest to a Banknote in definition, which then means that the stability of the Bitcoin network and encryption are the make or break characteristics.

Now, I readily admit I know little about the Bitcoin setup and I don't have a finance background, however it seems to me that Bitcoin, whilst a good concept, and apparently well thought out for the moment, still has a way to go before it can be considered a success.  It is essential that its network integrity is maintained, and it is readily apparent that its encryption needs to keep pace with the times.  What is unbreakable today is not tomorrow.  It needs continual work to stay secure and trustworthy.

So to those who think this is the magic bullet that will solve their money worries - no it is not.  You can make a substantial amount of money from Bitcoin, but only by working at the business like any other.  Yes, speculation MIGHT make you money, but more probably it will lose your money.

So there you have it, Bitcoin MIGHT work but it is early days yet and lots of holes to jump over ....


Later ..

Update:
Here is a discussion on Slashdot about Bitcoin, including just what I was concerned about above .. "the Bubble".  It appears that there was perhaps a bit of manipulation of the value over the last couple of weeks ..
Slashdot on Bitcoin

Update 2:
Bitcoin Price Crashes (Slashdot)

Saturday, June 4, 2011

Bitcoin - the Wallet

v 0.3

The Bitcoin client / server is your connection to the Bitcoin network.  It keeps a record of your bitcoins and transactions in the "wallet".  Not a good idea to lose it.  When you consider making a backup of the wallet, realise that it is no good backing it up, then conducting transactions and then trying to restore.  The contents of the backup wallet will be out of sync with the network, and you risk losing any remaining bitcoins you may have in the restore.

So remember, the backup is only good as a backup of the current state of the wallet.

And while we are at it, keeping a backup of your bitcoin address is a really good idea as well.

So, where is the Bitcoin Wallet?  Speaking for Windows 7:

  C:/Users/AppData/Bitcoin/wallet.dat

Of course, there is the configuration file there as well, so backing up the entire directory might be worthwhile.



Later ............

Update 1:

Reading about Wallet security has been sending me round in circles.  I've finally been able to understand (accurately I hope) a few things I was struggling with.  Every time I came to work out HOW to do something, the basic bits were missing.

The Bitcoin application can only deal with one wallet.  It cannot swap easily between two different wallets.  To create two wallets for the same Bitcoin instance, shut down the application, and rename the directory " C:/Users/AppData/Bitcoin/ ".  Restart and a new wallet and directory will be created.

To transfer coins between these two wallets, if I understand the process accurately, you would send coins from your "checkbook" wallet to the address of your "savings" wallet.  Shutdown, and then restart with your "savings" wallet.  You would rely on the network to have recorded the transaction, and so when you started with the "savings" wallet, the coins would be transferred to that wallet.

Another approach I like (and prefer) is to have a second Bitcoin application on another computer - a netbook with Linux is the most attractive.  Use this as your "bank" wallet and only connect when you wish to transfer coins to / from the wallet.

Bitcoin - Solo Mining - Windows 7 - ATI HD 6970

v 0.7
Before you do anything with Bitcoin, you need to be running the Bitcoin software.  Of course, you will have visited the Bitcoin website and read everything there.  The software is on the front page of the website.

Bitcoin Website.

I ran the software for a couple of days before I realised that I was only using the Intel processor, not my video card's GPU to generate bitcoins.  Some research and I downloaded Guiminer and tried that, however whilst this provided part of the puzzle, it failed to get things working and I ended up doing the gruntwork with the command line "poclbm".  Of course, since the command line programs are supplied with Guiminer, then no extra download for that is needed.

The final piece of the puzzle is getting "OpenCL" working.  Guiminer does NOT recognise the latest AMD incarnation, only the previous one.  I ended up installing both, so had to choose when I started the command line up, as you will see when I get to the startup command line instructions.

Software
Guiminer
https://github.com/Kiv/poclbm
Download button on the upper right lets you download the latest .. here is a direct link to the latest at time of writing:  https://github.com/downloads/Kiv/poclbm/guiminer-20110521.exe

Stream opencl
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-vista-win7-32.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-vista-win7-64.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-xp32.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-xp64.exe

or

AMD SDK
amd-app-sdk-v2.4-windows-64.exe    from
http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx


Here is a guide for guiminer which helped me to get started, however I had to work out the end details:  http://forum.bitcoin.org/index.php?topic=10438

Procedure

Install and run Bitcoin.  For mining with your GPU, you will need to run bitcoin as a server, but for the moment, we can look at the interface.  There is your bitcoin wallet address, and on the bottom right, your connection status and downloaded blocks.  If you want to generate coins with your CPU, then click "settings" and "generate coins".  Don't expect much.

Make sure you have un-installed any conflicting video drivers and installed the latest ATI drivers for the 6970.  I also ran a registry cleaner to make sure there were no confusing pointers, then rebooted.

If I had to do it over again, I would only load the "ati-stream-sdk-v2.3".  Guiminer recognises it and it saves an extra flag in the command line.  Reboot.

Install and run "guiminer".  Have it in a convenient directory that is easy to refer to on the command line.  We will be using the "poclbm" program it comes with later.  What you get out of running the command line is that you can set up the configuration files.  IF you have installed the stream sdk properly, then everything will work when it starts up and you will see it has found your video card in the "Device" drop down, otherwise it will complain that it can't find an "opencl" device.
  • Select "solo" miner.
  • Under solo utilities, enter the username and password you wish to use to log into the bitcoin server.
  • Enter any extra flags you want to use for the device (see the hardware comparison from the previous post).
  • Save the configuration.
There are two configuration files:

First
\User\AppData\Roaming\bitcoin\bitcoin.conf
Within that file, should be two lines set from guiminer.
        rpcuser=username
        rpcpassword=password

Next
\User\\AppData\Roaming\poclbm\poclbm.ini
Inside this is the solo miner configuration.

{
    "profiles": [
        {
            "username": "user",
            "balance_auth_token": "",
            "name": "Default",
            "hostname": "localhost",
            "external_path": "",
            "flags": "-f60 -v -w128",
            "autostart": false,
            "device": 0,
            "password": "password",
            "port": "8332"
        },
    ],
    "bitcoin_executable": "C:\\Program Files (x86)\\Bitcoin\\bitcoin.exe",
    "show_opencl_warning": true,
    "show_summary": true,
    "show_console": false
}

The Command Line

Open the command line.

       start /D"C:\Program Files (x86)\Bitcoin" bitcoin.exe -server

This line starts the bitcoin program as a server.  The bitcoin window will open as a separate process. The directory switch means you can run the command from anywhere.
Wait till a connection has been made.

start /DC:\pro\guiminer poclbm.exe --platform=1 --device=0 --user=username --pass=password

Enter the above command line (altered for your machine of course).  Note the directory switch nominates the directory - there is a space between the directory and the program executable name.  Also note the --platform switch.  I use 1 because I have two possible libraries as I have both the AMD and the ATI Stream libraries loaded - ATI Stream is the second one (1) that the system recognised first, so I'm staying with that.  I follow it with the device switch which is the video card, and then the username and password that you set in the configuration file.

It took me a while to get it sorted, but then my Video card sprang to life and the fan went wild and you could almost feel the load.  Instead of 3 M/hash per second, I was getting 350 M/hash per second.

Best of luck and I hope it works as advertised.



Later ...

Update:
I included a flag "-f60" in the poclbm.ini file.  I found without that flag, the default of "-f30" made the priority of the poclbm process too high.  I would find that after an hour or so, with the computer churning away, if I came back and wanted to do some work on the machine, it would apparently "lock" up on me and I'd have to reboot.

Update 2:
The "-f60" flag has definitely improved stability with no noticeable loss of processing.  The only problems I've had is when trying to play a Youtube video, when the system locks up.

Update 3:
The lock-up remains no matter what "f" flag I use.  It would appear that Flash video and bitcoin mining are mutually exclusive.

Update 4:
The solution I use (for the machine lockup with video playback) is to use a virtual machine for much of my work.  I have Debian 64 set up as a virtual machine using Virtualbox, and I also have instructions for a Slackware VM elsewhere in this blog.  Video playback works fine in the VM and it all works seemlessly.  My normal use of the machine barely touches its capabilities and I can run the mining on Windows.

Update 5:
Yesterday I found I had "rcp connection problems".  Solutions presented on the net didn't work for me.  Then I had a look at the bitcoin version I had (21) .... I updated to the latest (23) and the problems went away.  I also discovered that once you start the bitcoin server, you can then start the poclbm miner.  It will complain about no connection etc but as soon as there is one it starts churning away.

Update 6:
There was an update to my Catalyst Control Center from AMD tonight.  It broke the miner I had sorted.  That's the bad news - it gets better from here.  In the article above, I talk of downloading the ATI stream SDK 2.3 ... well, that is broke and we must move on.  Install the AMD 2.4 SDK and all will be fine.  In my setup, I had both - the 2.4 was platform 0 and the 2.3 was platform 1 (as reported to me).  I simply changed the "platform=1" switch to "platform=0" and all was again well.

Bitcoin - Solo Mining Considerations

v 0.3
I had intended this to be posted in a day or two, however within minutes of me posting my last piece about Bitcoin, I had several visitors to my blog about just this subject.  Having been through the frustration of trying to get the software to work for solo mining, I can understand people eager to find what they are missing.  Before I get into my setup though, a bit more about what is involved.

First, be very clear that solo mining will produce returns very few and far between.  The payoff is a block of 50 bitcoins, and since these arrive in one go, and with the current return, you can expect a payoff only once or maybe twice a year.  To get that, you will have to use the GPU on your video card to achieve that.  As an example, I have an AMD HD 6970 video card with an Intel 8400 quad core processor.  Mining with the CPU is only 1% as effective as the GPU.

Bitcoin Hardware comparison.
Bitcoin Mining Calculator

Next, what sort of Video Card.  ATI / AMD are the only way to go.  As an example, the HD 6970 is almost half the price and more than twice as productive as an NVidia GTX 580.  The best description of why, that I've seen, is that you can consider the ATI/AMD cards to use a large number of dumb calculators to get things done, whereas the NVidia cards use a small number of very smart calculators.  Brute force wins in this case.

Next post ... how I got my setup working ..


Later .........


Update 1:
Whilst I'm really happy to have so many hits on my bitcoin posts, I'm also concerned that people look at this as an instant wealth exercise.

I'd encourage you to look at ALL my bitcoin posts.

Please.

Bitcoin - Some Thoughts

v 0.2

A couple of weeks ago, I chanced on a reference to "Bitcoin", perhaps in a Slashdot article.  I remembered that I'd seen something about it a few months ago and started to read some more.  Whilst it took me some time to "get my head around it" what developed was an interesting comparison with conventional money concepts.

Gold is next to indestructible and whilst you can find some, there is still a finite supply and it cannot be counterfeited.  Gold is gold.  By itself, gold is worthless - just metal - though useful for some industrial applications.  Gold's value comes from our collective decision to have faith that someone will provide us with trade for it.  It has developed into a universal currency because we have decided that it is reliable as a medium of exchange.

Bitcoin is the digital equivalent of gold. It is run by an open-source peer-to-peer network.  It can be transferred by email and that transfer registered with the network.  It has finite supply and can be manufactured (or mined) in accordance with the rules set by the network, and as a reward for taking part in the network.  As time goes on, and the supply approaches the pre-determined limit of 21 million bitcoins, then it becomes harder to manufacture a bitcoin, and reward for participating in the network will move to transfer fees.

Is Bitcoin destined to become the defacto currency?  Perhaps, perhaps not.  Whilst it has no intrinsic value, it is certainly secure and a convenient way to transfer funds over the internet.  As more people accept bitcoins, I can see that its use could easily develop such that people simply use bitcoins as normal currency and never bother to convert back to conventional currency.  Certainly over the last six months, the value of a bitcoin has rocketed from a few US cents, to nearly US $10.  Now, this rise in its value is almost certainly driven largely by speculation, and we've all seen what wreckage a "bubble" leaves behind.  HOWEVER, as a medium of exchange, a bitcoin has value and in the short term, I see people buying some bitcoins, sending them as payment and the merchant cashing them in.  As confidence builds, then people other than speculators will have more confidence to keep their bitcoins in their digital wallets for spending.

Time will tell.


Next post, I'll talk about my experimentation taking part in the network and setting up a mining test.



Later ........

Monday, May 30, 2011

Installing an ATI HD 6970

v 0.2

I'm getting old.  It used to be easy doing this stuff.  Stick the card in, load the driver and away you went.

Not so now.  Let's start at the very beginning, as Julie Andrews advised.

I have a quad-core Win7 64 desktop I keep for a WWII Flight Simulator.  A very good flight simulator as it turns out .. and then there is FS-X with the Pmdg 747-438 (which I haven't played with for a while, but nostalgia might get to me).  I was using an nVidia GTS 450, DVI cable and Chimei 22 inch monitor at 1650x1080 resolution.

Now, IL2 ( the WWII Flight Sim ) has released a new version.  Wonderful graphics BUT needs tweeking and VERY demanding of video cards.  An HD 6970 or nVidia 570 would probably be the minimum you would think of.

Back to the installation.  I removed the nVidia card and replaced it with the 6970.  That 6970 sure is a much heftier card than the GTS 450.  First problem.  I ran out of power supply points.  Then I realised I had replaced the power supply some time ago with a more powerful one and I had some spare cables.  Reading the labels on the spare plugs on the power supply - hmmm specific plugs for video power supply.  Search my desk drawers .. presto .. connect and done!

Connect the DVI cable to the main port (the card has DVI and HDMI output) and boot.  Blank screen.  Let it churn for a while.  Reboot.  Churn and then ... a screen at 640 x 480.  Install drivers, then update drivers .. screen resolution STILL only 640 x 480.  Bother.

Phone a friend.  It is the monitor.  Find drivers for the Chimei monitor ... nope.  Bother.  Final suggestion was to use the DVI - VGA plug and plug the monitor in using the VGA cable.

TA-DA

Worked like a charm and straight to the native resolution.

So now, I need to find a driver for either my Chimei monitor OR a similar 22 inch monitor that does 1650 x 1080 and then try DVI again.


Now where did I leave that Horse-hair vest .........


Later....

Saturday, April 30, 2011

Slackware Leet in Virtualbox

v 0.2


With the release of Slackware v 13.37 (Leet) I thought it was about time to get an installation up and running again.  I've always loved Slackware, even though I use Debian as my base install for the desktops in my house.  I have one desktop with Windows 7 installed - simply because it is needed for a Flight Simulator - but I have Debian 6.0 64 bit installed in Virutalbox for my other stuff.

I keep hearing how difficult Slackware is to install which I personally think is rubbish, provided you have taken the minor trouble to read the readily available information from the revised Slackbook project, or a simple Google search.  Anyone who hasn't done even the basic searches to help themselves deserves what they get.  Of course, here is where I admit to cheating a little - instead of using the tools in Slackware to partition and format, I use the Linux distro "Parted Magic".

Here we go.
  • Download the Slackware DVD iso image
  • Download the Parted Magic iso image
  • Use the Virtualbox "wizard" to create a new Slackware machine.  (I used v 4.04 of VB)
I should note here, that I modified the settings to allow a machine that was 20 gig, that expanded as required so as to not take up space, 1.5 gig memory, 64 meg video memory.
  • Mount the Parted Magic ISO on the VM DVD drive and boot the machine.
  • Create at least one partition on the VM and format.  I used ext4.
  • Unmount the Parted Magic ISO and mount the Slackware ISO
  • Reboot.
  • You will eventually be invited to log in as root with no password required
  • "setup"
  • I re-formatted the partition as I chose for the install disk - this sets up fstab
  • Had the installer find the Slackware install DVD
  • Chose to install everything
  • Selected KDE as the window manager
  • Set up the networking - nominated a hostname and a simple domain name and defaults.
After all this was done, I unmounted the Slackware DVD and rebooted.  I ended up at the log-in prompt again, logged in as root and typed "startx".  KDE crashed half way through starting.

Bother.  Google.  Solution found.

From the changelog, Nov 16, 2010:
...
If X crashes at start, try disabling compositing. Create a file
named /etc/X11/xorg.conf.d/disable-composite.conf with this in it:
Section "Extensions"
Option "Composite" "Disable"
EndSection
...

Here is where you get a payoff for being even basically proficient in a standard Linux editor, such as "vi".  This was done, and just because I could, I restarted and "startx".   Worked like a charm.

Now, I found the resolution limited to 800x600.  Google again.  Found out how to install the VB Guest additions, which I suspected would fix this.  Easy again.  I chose the menu selection to install the guest additions, and I found the iso mounted under /media.  Even if this does not happen, you can mount the guest additions iso (found in the VirtualBox directory).  In this ISO is a "VboxLinuxAdditions.run" file.  Simply move to the ISO as root and run " ./VboxLinuxAdditions.run ".

Reboot.

When you restart KDE you will find your resolution is now 1024x768 as the max.  All you need to do to enlarge it is to drag the window larger and it will resize.

Done.

I will admit to writing parts of this from memory the next day, however with some care, it is really not that difficult to sort out.


Later ....


Saturday, April 16, 2011

Asus Commando - cpu Update

The Asus Commando motherboard natively supports DDR2 800 memory and a 1066 FSB cpu speed.

However ......

If you update the bios (explained in a previous post) to the latest 1901 version, it supports a variety of Core 2 Quad 1333 FSB processors, and it does this very nicely.  How you may ask?  Well from what I can work out, it overclocks the North Bridge to allow the faster cpu speed, and in doing so, it also turns the DDR2 800 into DDR2 1000 memory.  A really good reason to buy quality memory.

Until earlier this afternoon, I had a Core 2 Duo E6600 2.4 gig 1066fsb cpu.  I searched for an instruction set to swap an LGA775 processor and fan.  Pretty easy to find - I'd suggest if you can't find the tutorial, you shouldn't attempt the swap.  Whilst the instruction set I found was great, I still needed a little bit of interpolation and thought to reach a successful conclusion.

So, with my replacement Core 2 Quad Q8400 in place, I started the machine - I had to enter the BIOS setup, exited and continued with the boot.  I then shut down and restarted.

Violas (a string section)

I now had a 1333FSB and the processor working properly, together with faster memory.

Done!

Did it make any difference?   You bet it did.

Later .....

Thursday, April 14, 2011

Asus Commando - Bios Update

I recently decided that I really did need to update my desktop computer.  It uses an Asus Commando motherboard, (LGA775) and the bios was several years old and only able to accommodate 1066 FSB processors.

Upon looking on the Asus website, the motherboard will accommodate 1333 Core 2 Quad processors with a bios update, so I started my research.  Several message boards produced tales of woe whereby people had destroyed their bios during an update.  Now previously I've never had a problem, and I suspect many of these disasters were simply a matter of Darwin rising from his grave to smite those who were less than careful.

Having decided that this was going to work, I went shopping for a Core 2 Quad processor, only to find that they were no longer available, however one shop I've dealt with in the past suggested that they had a Q8400 processor in an older machine that they would be happy to sell me - I bought it and since it was not very old, I still had a couple of years warranty left.  I wouldn't have worried anyway, since I've never had a cpu fail on me.

Now ... to update the BIOS.

  • I documented every setting I had in the BIOS.  Very Important.
  • I read what I could about using the EZFLASH utility INCLUDED IN THE BIOS.
  • I copied the downloaded, unzipped bios (1901) to a standard FAT formatted USB stick
  • With the USB stick still inserted, I rebooted and pressed "DEL" to enter the BIOS Setup.
  • I Entered EZFLASH and backed up the BIOS to the USB stick. (it appeared as the C drive)
  • I highlighted the new BIOS and updated.
  • When the update had finished, it rebooted and I removed the USB stick before it restarted.
  • I re-entered the BIOS and entered my previously documented settings.
  • After exiting the BIOS, I turned the machine OFF and removed the power cord for a couple of minutes.
  • Boot - all was wonderfully well.
I now have a machine which will accept a significantly faster processor.



Later ........




PS

I find it rewarding that this post gets a hit one or two days and that I may have been able to help someone find their way through the maze ...

:)

Sunday, February 27, 2011

Floppies and Evolution

 v0.2

About a week ago, I needed to check a 3.5 inch floppy disk .. I have a 3 gig pentium machine that currently dual boots several versions of Debian Linux and Windows XP - it is my old Flight Sim machine you see, for which I needed Windows.

Well, shock horror, the drive was... er ... distressed.

Fortunately, I have some other carcasses and spare floppy drives lying around - but it took me several attempts before I found one that was working.

Epiphany.  I have rather a large collection of 3.5 inch diskettes ( and 5.25, but that is another story).  I got to thinking that perhaps I better copy them now before they were lost forever.  Despite the fact that I have a 5.25 drive under my desk, I am not confident of having it in a working machine.

So, for the last few days, I have been making copies of data from my 3.5 inch floppy collection.  Hey, I realise that it is unlikely I will NEED the files on them, but .. well ... it is nostalgia.

And then I started thinking about DosBox.  Or even Virtualbox with FreeDos.


Update

On a hunch, I had a look at a "slot 1" carcass I'd been given to dismember.  YES!!  A 5.25 floppy connector.  Now to see if my dormant "B" drive can be coaxed to life.


Later.

Monday, February 7, 2011

Debian 6.0 Squeeze - STABLE!!!!

v0.1

I have to mark this event.  While everyone was looking at Christmas or New year or some other significant day, who knew that it would be the Superbowl that influenced the Debian Organisation.

A new Stable Debian may only be declared once every couple of years, but the advances are huge between each release.  If you want meat in your computing experience, then Debian gives you the the highest quality aged, tender experience.

Whilst I'm short on detail for this post, I just have to mark the event, it is THAT important.

(of course, no-one listens to me ....  )


Ahhh yes, I remember now .... a night at "The Truck" .... the other guy I went with - I warned him - don't drink the draught Kirin .... only buy the bottles ...... "bullshit" said he ..

Next evening .. " Ooooohhhhh ... I should have listened to you mate!!!"

For those darting to google ... search on "the truck" Narita  ..... sadly, so I'm told, that high-class establishment no-longer exists .. 


Sigh ...


.. Later

Finding Emacs - Ccrypt Encryption and Default Load Path

v 0.1
I was spending some time poking around some Emacs information and came across this page explaining how to use ccrypt to automatically encrypt files.

http://myridia.com/dev_posts/view/638

It showed the location for obtaining ccrypt and the emacs " el " file to use it.

http://ccrypt.sourceforge.net/


The important point I gained from the article was that the " .emacs.d " directory is the default load path for emacs, so just placing the " el " files in this directory means they are automatically readable by emacs on startup.


... Later

Saturday, January 15, 2011

Debian - Bad Module, Apt, Rescue Mode

v0.2
I spent a rather frustrating hour today fixing a self-inflicted non-X-booting Debian system.  On the good side, I learnt some more and gained an appreciation for being able to use the command line.

In a flash of irresponsibility, I thought I'd install the nvidia 3d module the Debian Way - without doing the research but just using a "she'll be right" approach.  The module compiled and installed.  I rebooted.  When X started, all I got was a blank screen with a flashing underline cursor at the top left.

Bother!

Ctl-Alt-Backspace would not kill X
Ctl-Alt-Del gave me a reboot.


Rescue Mode

When you boot a Debian system, at the Grub screen, each Kernel choice has two entries - the normal boot entry, and under that a "Rescue Mode" kernel choice which allows you to boot (eventually) to a root prompt.  The boot process finishes with an invitation for you to enter the root password, or to press Ctl-D.  Entering the root password drops you to a root prompt # .


Modules

Drivers are called "modules" in Linux and are loaded for the Kernel to get access to them.  Once I was in the root prompt above, I checked to see if the nvidia module was indeed causing the trouble.

# lsmod

The list streamed up above the page, so pipe the output of lsmod to a pager, like "more"

# lsmod | more

Better - and there was the nvidia driver in the list.  now to remove the module

# rmmod nvidia

Check the module list, and it is not there.  So reboot.  The system was as before, so the module commands only do a temporary job.

To cut a long story short, I did the brute force approach.  I found the module in
" /lib/modules/ (kernel-name) /nvidia/nvidia.ko"
and renamed it to nvidia.ko.bak.  When I rebooted, the system worked as before.


Xorg

In the past, when I've been confronted with something like this, I've simply edited the xorg.conf file to change the video driver back to the default "vesa" or "nv".  When I looked at doing this, there WAS no xorg.conf any more.  I'd heard a little about this, but not paid too much attention.  Another project - update my knowledge of Xorg.


Apt / Aptitude

Now the bit that would have saved me a lot of trouble.  Debian has a wonderful package management system.  I have only been really worried about using the graphical tool "synaptic", because it is easy to pick up the basics with.

However in the case I was faced with, there was no graphical interface and I hadn't learnt very much of Aptitude either.  It would have been easy to just search for the nvidia packages and then remove them.  Two minutes work.

So the lesson is - learn the command line and learn the command line Apt tools.  They will save you an awful lot of frustration and time.


Later .....

Thursday, January 13, 2011

Finding Emacs - "Learning GNU Emacs"

v 0.2
I was googling for some information on "nroff-mode" in Emacs, and unexpectedly, I found a Google copy of "Learning GNU Emacs" in Google Books.

I now have found two brilliant books on Emacs.  First is the reference manual by Richard Stallman, and the second is this.  From what I've read of it so far, I think Amazon will sell another copy.  Unlike most, this is more of a TUTORIAL rather than a reference manual, so it lets you put things in perspective.

As I have come to realise, Emacs is a long term project - but one which will repay the effort many times over.



Later.

Update

There are significant differences between the 2nd and 3rd editions.  For example, Mail is not covered in the 3rd edition.

Tuesday, January 11, 2011

Server - eepc - VNC

v 0.1
To achieve viewing a remote desktop, you need a VNC SERVER on the machine you want to view, and a VNC VIEWER on the machine you want to view with.

I had a look at a couple of tutorials and used a couple of VNC servers, however I found that TightVNC was the most successful.


So, on the eeepc Debian Squeeze setup:

# aptitude install tightvncserver
$ tightvncserver :1
$ tightvncserver -kill :1

I found there was an unusual problem with running Xfce4 and wanting to have Xfce4 on the VNC viewer.  I've included the link above that I found explaining this, however in the meantime, I installed Fluxbox and used that setup similarly to as explained in the tutorial ... except I had "fluxbox" instead of "gnome-session".

Now to run a session:

$ tightvncserver :1

Go to another machine, fire up tightvncviewer or "chickenoftheVNC" on the Mac, enter the IP address you want, and the screen then go.

(networkaddressofthemachine):(screennumber)
for example
192.168.0.15:1

A final note.

You'll observe that so far all this relies on there being a log-in on the server.  We shall get round this, but one step at a time.  It is also far from secure, just showing proof of concept at this stage.



Later .......

Monday, January 10, 2011

Server - Thoughts

v0.1

I've been finding my little eeepc server rather entertaining, and I'm learning a lot.

SSH

I can log in to the server from the local network and from the internet using my IP address, having port-forwarded the router ports.  Using the Secure Copy function of SSH I'm looking into copying files between machines.

IP Address

Dynamic DNS providers - the free accounts seem to expire if you don't use them for  a month or so, so that is a consideration.  If you don't turn your router off, then your IP address should stay the same and you can use that.

Opera Unite

Opera has what is effectively a free dynamic dns service together with FTP, Web servers, Media streaming, Web Cam broadcast etc through their web browser than I'm going to have a better look at.  It turns your computer into a server with no special configuration.  May well serve for what most people would find useful.

VNC

Definitely a function I need to investigate.  I did have a play with it a few months ago, but now is the time to get it resurected.


Some more later ........

Sunday, January 9, 2011

Server - eeepc - Debian

v 0.2.3

I know, I'm predictable.  I loaded Debian Squeeze onto the EeePc.  I've had it on there for a while, in fact, having eliminated the original Xandros install.  Two valuable resources for loading Debian onto the EeePc are:
The eeepc does not have a DVD drive, so when I originally purchased it, I had also purchased an external DVD drive.  It has proved useful for a number of tasks over the years.  I first prepared the SSD using my gparted program on bootable CD.  The eeepc 701 has 3 partitions on its SSD.  I left the small one alone and simply combined the 2.5  and 1.5 gig partitions into one.  I did not use a Swap partition.

I installed Debian Squeeze using the Xfce install CD.  I know that perhaps a GUI was not needed, but at that stage I was after a lightweight desktop, and after deciding to keep the machine for a server, just left it there.  It all installed fine using the standard installer, the only addition being to install the Gnome Network Manager, and make the config file correction noted previously in the Debian Wiki.  The WiFi connection to my router works fine.

Xfce recognises the external drive however it drops off occasionally.  In any case, if this is to be a server, then mounting the drive in the fstab file is a necessity for reliability.

Next, sort a static IP within the network.  All the tutorials I found simply configured the wifi entry for a specific IP address.  I took a different route, making a note of the mac address of the wifi card using " ifconfig " and writing down the hardware address.  Then I went to the network router and assigned a specific IP address to that mac hardware card.

Now to be able to access the server from another machine on the network.  The simplest and most straightforward way is to install a secure shell server on the machine, and then log in from another one with the ssh client.  For windows, use putty, and for mac or linux, just use ssh.  Using aptitude on the eeepc Debian install:

aptitude install openssh-server openssh-client

Once the installation is complete, the ssh-server is running as a service on your machine.  There are plenty of tutorials about how to connect with ssh, so I won't repeat them here, needless to say, I can connect from my mac by just entering:

ssh username@(network-ip-address)

If you have modified your hosts file, then you can substitute the hostname for the IP address.  Enter your password if you haven't set up authentication and you can log on as an appropriate user.  Yes, you do need to set up your user account on the server first, since all you are doing is logging on to it as a user, but from over the network.

So there we are, we now have our eeepc server up and running on a static network IP and a SSH server running.  Not much, but it is getting there.


Later .....

Update - Manipulate NTFS file system:

In my case, the drive I have for my server is an external 2.5 inch drive.  Since they all come formatted to ntfs, I have two choices, accept ntfs or reformat.  I shall accept ntfs, so we need to install the ntfs driver:

aptitude install ntfs-3g

Then we need to make a mount point in the .. er .. /mnt directory ..

mkdir /mnt/external

Now we need to edit the fstab file

In fstab, add a line (obviously similar to this - you will have to check your disk drive device)

/dev/sdb1  /mnt/external   ntfs-3g   defaults   0  0

Done!