Debian: Configuring the time and timezone

April 11th, 2005

While doing an upgrade from woody to sarge (by adding a new source to the /etc/apt/sources.list),
the install process showed me the current time (which was an hr behind) and asked me to run
tzconfig in order to configure the time.

Debian: Configuring the network

April 10th, 2005

After configuring the module (as explained in the prev post), it is time to configure the card.
I found this great link explaining the Debian install (complete with screenshots)

Since I am on DHCP, I just edited the /etc/network/interfaces file and added this:

auto eth0iface eth0 inet static

Then, I restarted the network:
/etc/init.d/networking restart

A quick ifconfig showed that the IP had been acquired.
A ping took about 2-3 secs before it responded, but it was all OK!

netstat -r showed the routing table. The gateway was set and so was I !!!

Configure modules in Debian

April 10th, 2005

After unsuccessfully trying to install FreeBSD 5.2/5.3 on the P-133Mhz,
I installed Debian. But during the install process, I could not detect the network card in the modules list and skipped selecting any driver.

After the install, I spent a good amount of time trying to get the same configuration screen.
I had used lspci or something to get the name and model number of the card.
So now I wanted to go and install the relevant drivers (if they were there).

Linksys LNE100TX (Linksys EtherFast 10/100)
For some reason, this was also shown: Lite-On Communications Inc.
IRQ 10, I/O ports at fc100.

The command, you have all been waiting for, is: modconf (thunderous applause).

The installer, when I entered the network configuration (the IP addr, etc), showed the interface as Intel-something. Probably was showing me what the compatible chipset or something was.

The Linksys website shows that the tulip driver is the driver for this card.

Update: Using the tulip driver in modconf installed the card successfully.
Now need to go and configure the card.

VIM: Converting Tabs to spaces

March 25th, 2005

Converting tabs to spaces

http://www.vim.org/tips/tip.php?tip_id=12

To insert space characters whenever the tab key is pressed, set the
'expandtab' option:

set expandtab

With this option set, if you want to enter a real tab character use
Ctrl-V key sequence.

To control the number of space characters that will be inserted when
the tab key is pressed, set the 'tabstop' option. For example, to
insert 4 spaces for a tab, use:

set tabstop=4

After the 'expandtab' option is set, all the new tab characters entered
will be changed to spaces. This will not affect the existing tab
characters. To change all the existing tab characters to match the
current tab settings, use

:retab

To change the number of space characters inserted for indentation, use
the 'shiftwidth' option:

set shiftwidth=4

For example, to get the following coding style,
- No tabs in the source file
- All tab characters are 4 space characters

use the following set of options:

set tabstop=4
set shiftwidth=4
set expandtab

Add the above settings to your .vimrc file.

To get more help on these options, use
:help tabstop
:help shiftwidth
:help expandtab

.vimrc options to assist with perl coding

January 16th, 2005

Edit the .vimrc file and add the following:





” F2 close current window (commonly used with my F1/F3 functions)

noremap :close

” perl -cw buffer, using a temp file, into a new window

function! PerlCW()

let l:tmpfile1 = tempname()

let l:tmpfile2 = tempname()

execute “normal:w!” . l:tmpfile1 . “\

execute “normal:! perl -cw “.l:tmpfile1.” \> “.l:tmpfile2.” 2\>\&1

+ \

execute “normal:new\

execute “normal:edit ” . l:tmpfile2 . “\

endfunction

” perl buffer, using a temp file, into a new window

function! PerlOutput()

let l:tmpfile1 = tempname()

let l:tmpfile2 = tempname()

execute “normal:w!” . l:tmpfile1 . “\

execute “normal:! perl “.l:tmpfile1.” \> “.l:tmpfile2.” 2\>\&1 \
+R>”

execute “normal:new\

execute “normal:edit ” . l:tmpfile2 . “\

endfunction

” Settings for editing perl source (plus bind the above two functions)

function! MyPerlSettings()

if !did_filetype()

set filetype=perl

endif

set textwidth=78

set expandtab

set tabstop=4

set shiftwidth=4

set cindent

set comments=:#

set formatoptions=croql

set keywordprg=man\ -S\ 3

noremap :call PerlCW()

noremap :call PerlOutput()

endfunction

if has(“eval”)

augroup SetEditOpts

au!

autocmd FileType perl :call MyPerlSettings()

augroup END

endif

endif

VIM option file

January 16th, 2005

Setting VIM options:

http://babbage.cs.qc.edu/courses/cs701/Handouts/using_vim.html



The installation program normally puts a file named .vimrc in your home directory. On Windows, the file will be named _vimrc, and will be in the directory where Vim was installed. For example, when I installed version 6.1, it was placed in D:\Utils\Vim\vim61, and the _vimrc file was put in D:\Utils\Vim. Also, the Windows environment variable, VIM, was set to D:\Utils\Vim.

The standard .vimrc file supplied with the Vim distribution is not quite correct for use in this course. You need to set the tab width to something small, you must set the option to replace tabs with spaces, and you need to tell vim to wrap lines longer than 72 characters.

I also have some keyboard shortcuts that I like to use, mostly so I can enter certain commands while I am in insert mode. Here are links to two .vimrc files, one for Windows and one for Unix that you may use as a model for your own. Feel free to modify them as you wish, but be sure not to change the expandtab and tw options!

Other example .vimrc files:

http://tabo.aurealsys.com/code/vimrc.html

Excellent page for explanation of some .vimrc options

http://www.stripey.com/vim/

Turn that irritating beep off: set visualbell


Debian – Disabling system beep

January 9th, 2005

Just installed Debian woody on a P133/16Mb/4gb (actual memory 14Mb, -2Mb for display I guess).



Disable the beep sound of the pc speaker.

Add the following line to ~/.inputrc:

set bell-style none



If the file does not exist, create it.

If the above does not work, add this to the file:

set show-all-if-ambiguous on

Also, I did see here that the inputrc file can be put in /etc. No idea if that works or is relevant.

Will give it a try sometime.


Mandrake Powerpack 10.0 on Dell Inspiron 4150

October 28th, 2004

Installed Mandrake PowerPack 10.0 on Dell Inspiron 4150.

Specs are <>

Performed an “everything” install.

Allowed it to autopartition.

Filesystem Type Size Used Avail Use% Mounted on

/dev/ide/host0/bus0/target0/lun0/part1 ext3 5.8G 3.5G 2.1G 64% /

/dev/ide/host0/bus0/target0/lun0/part6 ext3 31G 38M 31G 1% /home

The NIC – 3Com – was detected.

ATI Display card – with 1600 x 1200 – resolution worked fine.

GNOME worked fine !! which hadn’t worked under Slackware 10.0

Slackware used Gnome 2.4 – which was I guess the latest.

I installed Slack on 3 different machines and 2 different options – normal and expert, but still Gnome would not work. It would load the desktop but no background, Terminal would come up, but not Nautilus.

Wireless Card – Hotplug worked. Network config through the wizard worked fine.

Had to change the SSID for the WLAN.

Driver: Orinoco_cs

USB Mouse as well as the PS/2 touchpad both worked together and alone.

Battery Monitor – in Gnome – worked fine.

Shutting the lid, would put the system in standby and bring it back up without any problems.

Windowmaker, XFCE, all worked fine.

I had not installed KDE, so no idea about KDE.

Menus in MDK 10.0 are much much better than what I had seen in 9.2.

Much better organized, fewer options in each category.

Sound – worked out of the box – ALSA

(Donno the sound card, think it is AC’97)

Pleasant Surprise – Audacity was installed :)

Also, Kdenlive was installed – havent had a chance to try it out.

CDROMs are automounted – nice, has been a MDK feature.

an icon appears on the desktop.

USB Drives – work …..although they do not automount. I suppose this

can be set in /etc/fstab.

Not so pleasant things:

XMMS was not installed :-o

Totem has such a stupid interface for Playlists.

Windows key not mapped to Gnome menu.

Wireless configuration – 2

September 30th, 2004

Update 2: Sep 30, 2004, 3:14am

Edited the /etc/rc.d/rc.wireless.conf

Changed the ESSID from Any to

Logged out and logged in – no luck.

/etc/rc.d/rc.pcmcia stop , then start – no luck.

reboot – got it working on the reboot…Dunno if it was the manual editing of the file…or the Kwifi manager.

Setting the system-wide default window manager

September 30th, 2004

Change it in /etc/X11/xinit/

or

use xwmconfig.

or

at the login screen, change the Session to whatever you want.

(This was tested in Slackware 10)