Git and Cogito on Ubuntu

In Synaptic I installed cogito (and therefore git), and gitk (gui).

I'm going to follow the advice on the Git Cogito page:

If you want to start to use Git and are considering Cogito, the best way to go about it is to first learn Cogito, then pick up Git commands if you need to do something extraordinary.

For quick introduction to Cogito, follow the Git Crash Courses – they are presenting Cogito commands.

So I cd'd to my project dir and did:

cg init 

This is the equivalent in svn to both creating the repository (which is now local!!! although I can "push" my stuff to a centralized directory somewhere) and doing the initial import. I make the initial comment, save the file and exit).

Then I made a change in a binary document file, and did:

cg commit

Typed in "modifiqué sección 3.6 Ambientes del Usuario" and saved and exited. Then saw my changes:

Subversion Version Control System on Ubuntu Desktop

The objective is to install subversion on my Ubuntu Dapper desktop in order to support version control for day to day projects.

Will use Apache 2 as uniform access control for security reasons, and in order to make this box a subversion server in my home office network.

Installation with Synaptic

  • subversion package
  • libapache2-svn package

Create repository

victorkane@mentor:~$ sudo mkdir /var/lib/svn
Password:
victorkane@mentor:~$ sudo svnadmin create --fs-type fsfs /var/lib/svn

Create password file

victorkane@mentor:~$ sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd victor
New password:
Re-type new password:
Adding password for user victor
victorkane@mentor:~$

Apache 2 HTTP Server configuration

/etc/apache2/mods-enabled/dav_svn.conf:

Konqueror and Vim 7 as IDE

First off, see Viva Vim 7! (installing on Ubuntu Dapper) .

Second off, see Konqueror with Midnight Commander theme on Ubuntu . Now we're all on the same page, with Konqueror (in all its variations) and Vim 7 installed.

Also assumed here is the installation of the ExuberantCtags package, so that ctags can be generated for ruby, php, python, perl, and a host of other languages (see ExuberantCtags) as well as the C language. On my Ubuntu box installation was straightforward with Synaptic.

The main interest here is using (and remembering how to use in between actual programming bouts: different projects hook you on different tool sets) Vim 7 as a lightweight alternative to Eclipse.

That may sound like a mouthful, but we'll see it is not an exaggeration.

How to make a favicon in Ubuntu

To make a favicon in Debian linux or Ubuntu (in my case):

  • Install the package xpm2wico with Synaptic or apt-get.
    An Xpm to Windows .ico converter
  • Using Gimp, Capture and shrink or create/edit a 16×16 graphic.
  • Save your image in X PixMap Image (xpm) format.
  • Convert from xpm to favicon name and format: "xpm2wico favicon.xpm favicon.ico".
  • Copy favicon.ico to convenient place, then add the following to a webpage:
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    

Drupal Clean URL’s on Ubuntu Dapper

1. See following tutorials:

a. http://drupal.org/node/43783

b. http://www.debian-administration.org/articles/136

2. Case where drupal is not installed into the apache document root, but rather in a subdirectory, it is necessary to so specify in two places:

1. /var/www/drupal/.htaccess

# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.

RewriteBase /drupal
2. /var/www/dsn/sites/default/settings.php 

/** * Base URL (optional).
* * If you are experiencing issues with different site domains,
* uncomment the Base URL statement below (remove the leading hash sign)
* and fill in the URL to your Drupal installation.
...
* * It is not allowed to have a trailing slash; Drupal will add it * for you. */

# $base_url = 'http://www.example.com'; // NO trailing slash!
$base_url = 'http://localhost/drupal';

If you’re running Apache2 on Debian stable, in order to install the rewrite module you simply need to:

Installing Drupal on Ubuntu Dapper

Although Synaptic has a drupal, it's very old!

Preparations

To go with the latest version, I first went with the pre-fork Apache 2, PHP 5 and MySQL 5.

Downloading Drupal

I then downloaded the latest stable drupal version (since I am interested in developing a software engineering platform and personal development environment capable of being moved to a shared hosting environment).

$ wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.3.tar.gz
--17:22:17-- http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.3.tar.gz
=> `drupal-4.7.3.tar.gz'
Resolving ftp.osuosl.org... 64.50.238.52, 64.50.236.52
Connecting to ftp.osuosl.org|64.50.238.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 484,988 (474K) [application/x-gzip]

100%[==============================================>]
484,988 81.56K/s ETA 00:00

17:22:24 (76.13 KB/s) - `drupal-4.7.3.tar.gz' saved [484988/484988]

Installing the files for Apache 2

I then copied everything into (in this case) /var/www/drupal-4.7.3, then made the symbolic link (see Drupal Clean URL's on Ubuntu Dapper Laughing ):

non-US ubuntu dapper dvd playing

In order to watch my own dvd's on my amd64 dapper-box, I do the following (non-US):

sudo apt-get install libdvdread3
sudo apt-get install dpkg-dev fakeroot debhelper
# If you have AMD64. You need dpkg-source. Otherwise skip.
# If you have AMD64. You need build-essential. Otherwise skip.
sudo /usr/share/doc/libdvdread3/examples/install-css.sh
sudo apt-get install totem-xine

 

Viva Vim 7! (installing on Ubuntu Dapper)

Unfortunately, vim 7 didn't make it into the Dapper Ubuntu 6.06 LTS.

So the best way to install it without fighting with dependencies is to amend your apt-get sources.list file with the following line (works fine for me on Ubuntu Dapper, 6.06 LTS freshly installed October 2006):

deb http://www.freshnet.org/debian/ dapper/

Then go ahead and install (see below, and see below for amd64 (above repository of course won't work for amd64 installations)).

Thanks, Freshnet.it !

If you're using Synaptic, just hit Settings >> Repositories, then hit the Add button, then the Custom button and paste in the above "Apt line" repository info and hit "Add Channel". Then close the Software Preferences windows and hit the "Reload" button to update package info. And update the appropriate vim7 package you are looking for (vim perl, vim ruby, or whatever you are using).

Viva Konqueror! (even on Ubuntu)

During my stay in Venezuela, searching for a development environment that didn't weigh a ton and take too many valuable blinkcounts to load, even on the Pentium 4 workstation I was using there with a full giga of memory (the popular "open source" IDE will go nameless for the moment, since it is pretty damn useful and unavoidable on many projects), I came across… Konqueror and Vim! We'll have a lot more to say about vim 7 on other posts. For now, Konqueror… awesome!

Return to Buenos Aires

OK, it seems like a week or so, but I got back to Buenos Aires on Friday, at three o'clock in the morning.

Since then, I have had a welcome back asado with my family, have (wiping a tear from my eye) wiped out Slackware on my AMD64/SATA wonderbox (after a suitable dvdbackup), and put up a spanking new Ubuntu desktop. Got the nvidia card drivers in through synaptic (nvidia-glx – by the way don't forget that nvidia-settings is a broken package, it is actually installed automatically by nvidia-glx, just install the latter and you can do <alt-F2> and just run nvidia-settings)