The every day things from Thalamus' life.

Thalamus' Blog

28 April, 2009

Forgot your root MySQL password ?

Filed under: ComputerStuff_en — Thalamus @ 07:39

Reset it in 3 simple steps.

1) Stop the mySQL database.

service mysqld stop

2) Create a file – here … named ‘reset_password.sql’ containting:

UPDATE mysql.user SET Password=PASSWORD('YOUR-NEW-MYSQL-PASSWORD') WHERE User='root';
FLUSH PRIVILEGES;

3) Start mySQL database with the init-parameter pointing to the newly created file … eg

mysqld_safe --init-file=/root/reset_password.sql &
• • •
 

27 April, 2009

Filed under: Dagbok_no — Thalamus @ 08:35

Leste idag i vg at Petter Solberg er blitt robbet for penger, pass og bla. en laptop.

– Dessuten lå blant annet 10.000 dollar i kontanter, alle passene våre og førerkortene til Phil (Mills, kartleser) og meg i bagen. Alt av planer lå på PCen, og vi har ingen backup, sa en fortvilet Petter Solberg til NTB.

Huff og huff, når jeg leste dette mistet jeg helt respekten for Team Solberg. Hvordan er det mulig, at man går rundt med en laptop og påstår at dette er så kritiskt. Og så i tillegg sier at “vi har ingen backup” … for guds skyld. Om du vet hva en backup er – så, burde du også ha såpass vett at du faktiskt så til at dere har sådan.

• • •
 

21 April, 2009

Slow login on WinXP

Filed under: ComputerStuff_en — Thalamus @ 01:06

Once in awhile I do get very annoyed about Microsoft and their default settings they have chosen for their OSes. One of them being that they don’t show what is going on after you authenticate yourself and the desktop is loaded. I suddenly noticed that my computer became slower than usual while booting. So, I wondered – what is really going on here. Nothing had really changed that I could think of. If only I could see what it loads between auth and the desktop I though. So, I talked to my best friend Google and found one article that told med that there is really a setting for this. But, why … ain’t this default ? That is beyond me !! :p

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system]

Is the magic place where a ‘verbosestatus’ should be a DWORD with a value of 1.

After is enabled this an booted it became very clear that it was trying to restore previous network connections. I then had a look at “My Network Places” and there seemed to be some illegal entries there – pr. example a share pointing to a earlier used smb mount, but in the descripting field it said it was pointing toward this computer. Deleted that and some other unneeded ones. Ran “compmgmt.msc /s”, had a look for services that where set to automatic but hadn’t started. Found only one, the “Wireless Zero Configuration” which I don’t use because I like the Intel utility to do that job instead. So, I disabled that and rebooted.

Whoah … Computer came up in seconds instead of half a minute wait where it only told me that it was loading my settings.

Oh … while on the subject of slow booting. It is important that you defrag your PC. There is also a setting in registry you should check is set “on”. That key is

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction]

Sting value ‘Enable’ set to ‘Y’. Please note, this is for Microsofts’ defrag utility. I’ve heard rumors that other defrag programs don’t take considerations to boot time optimalization as ‘dfrg.msc’ does. This setting, doing the defrag and running the built in optimize routine ‘Rundll32.exe advapi32.dll,ProcessIdleTasks’ could probably be a good idea. It is a good idea to let the PC be left alone to do the optimize routine btw. So, start it one night before going to bed or something like that 🙂

• • •
 

14 April, 2009

Vanskelig …

Filed under: Dagbok_no — Thalamus @ 16:06

I dag var det en relativt vanskelig dag på jobben. Ikke det at det var så utrolig mye å gjøre, eller at man ikke strakk til rent tekniskt. Men, heller det faktum at i dag var første dagen etter at jeg sendte min oppsigelse til Ergo. Det surret rundt i hodet mitt hele dagen at dette var gjengen jeg kom til å forlate etter 15,5 år. Føltes både merkelig og trist. Vet ikke, på en måte også godt da. Ser jo frem til å skifte jobb – ellers hadde man vel ikke gått til et sånt skritt.

Uansett, jeg klarte faktiskt ikke å fortelle det. Jeg avventet og håpet på at sjefen skulle informere de istedenfor via mail. Men, vel, siden det ikke kom noen mail før jeg dro for dagen. Så, får jeg vel gjøre det selv i morgen – om det da ikke har kommet en mail i ettertid da.

• • •
 

8 April, 2009

Effortless upgrade from CentOS 5.2 to 5.3

Filed under: ComputerStuff_en — Thalamus @ 07:34

Last week I checked my email and noticed that there where more than 200 updates available for the server. I was … wtf ?!

I quickly went to CentOS main page wondering if there where any info there about unsynced repositories or something in that direction. I did notice that not many updates had come out the last couple of months.

What I learned was that they had released version 5.3, and it was an upgrade to this release they offered via yum. Since this isn’t really a production machine – and I do make backups on a regular basis I was not scared of just applying them all. So, now – the server is running 5.3 – and I haven’t found anything that is broken … yet.

Very nicely done CentOS maintainers !!

• • •
 

5 April, 2009

DJS3 … og min kamp mot Ole ;-)

Filed under: Dagbok_no — Thalamus @ 13:20

Hei – skriver for å fortelle om min lille drakamp med Ole Kristian Adolfsen i Deluxe Ski Jump. Jeg var på besøk til Ole her for noen uker siden. Vi snakket da om løst og fast, og lite visste jeg om at han driver å spiller DSJ3 i pausene sine på jobben. Naturligvis hadde han rimelig god snøring på hvordan dette spillet spilles, så siden jeg bare 5 dager før dette besøket hadde kjøpt og registrert full versjonen – så, ble det til at vi skjønte at her var det atter igjen “GAME ON !”.

Ole hadde ikke på det tidspunktet kjøpt fullversjonen, noe jeg hadde. Det gjorde seg utslag i at jeg hadde alle mine rekorder registrert på Mediamonds‘ server. Ole fikk da selvsagt full kontroll på hva jeg hadde av lengder. Så, her en kveld fikk jeg beskjed om han nå også hadde kjøpt spillet – og ikke lenge etterpå begynte mine rekorder å bli slått av Ole … som forventet egentlig.

Så, hvorfor skriver jeg idag anng. dette ? Tja, litt for å si at DJS3 er morsomt, og at jeg annbefaler alle å gi det en prøve. Vel, ikke alle kommer til å like det – men, vel, det skader ikke. Men, vel, jeg skriver jo selvsagt også for å skryte av at nå eier jeg tilbake alle mine rekorder over Ole. Slik at han atter igjen får ekstra press på seg til å slå meg 😉

Hvordan det ligger ann mellom oss kan man finne ut ved å sjekke denne linken.

• • •
 

2 April, 2009

Firefox – my way … on CentOS5

Filed under: ComputerStuff_en — Thalamus @ 10:38

First and foremost, not everyone knows this – but CentOS 5 is the same as RedHat Enterprise 5. Only “free” and better that way. If you use it – consider donating !

First, get the firefox version you need. On CentOS 5, the 3.0.x release works fine.

http://www.mozilla.com/en-US/firefox/all.html

Then after download you might have a file named “firefox-3.0.8.tar.bz”. The file extention tells you that this file is a tar archive, compress with bzip. I always test the tar-files before really uncompressing it to the filesystem. So, I issue a

tar -tjf firefox-3.0.8.tar.bz

to make sure that it is valid and that it will uncompress without any weird paths. Then – If I’m ok with the file – I extract it with

 tar -xjf firefox-3.0.8.tar.bz

Ok, after this is done, in this case – I’m having one folder named “firefox” in my home folder.
I then go into the root account by issuing

su -

and do a

 mv /home/myusername/firefox /opt/.

Then I make a new file in /etc/profile.d/ named mozilla.sh

#!/bin/bash
#
# Setting up firefox' new path as global for every user
export PATH=/opt/firefox:$PATH

Make sure its exectuable

# chmod 755 /etc/profile.d/mozilla.sh

Please note that after creating this file, the X server needs to be restarted. For some, the easiest way is to reboot. For others, just do a

telinit 3

then followed by a

telinit 5

– or maybe if you run by vnc

vncserver -kill :1

, followed by

vncserver

.

Now, ofc, if you start firefox by using any “icon” on your desktop, you will have to change them accordingly as well. But, that has nothing to do with this article.

Oh yes, do I install the already installed firefox ? No, I have no need to save a couple of megabytes extra. To upgrade to a newer version ? Well, just open a shell, do a

su -

, start firefox and use its normal “upgrade” prosedure – “check for updates”. Once updated. Close firefox …. never ever run Firefox as root, except for upgrading. Then the next time the normal user executes firefox – it will update.

The benefit of this, is that I have a clean firefox, and I know 100% how the plugins are going. Either in my $HOME/.mozilla/plugins folder – or if I want to make them available for any user. I simply put them as a softlink in the /opt/firefox/plugins folder. Eg. for Java’s plugin.

Oh yeah – there is a trick to java as well … I unpack it to /opt with its original archive name – the does a softlink of eg. /opt/jre1.6.0_13 to java – for the softlink in firefox’s plugin folder I refer to the softlink – not the hardcoded 1.6.0.13 release. So, next time I just delete the softlink, recreate it for the new java version – without needing to update the firefox plugin link.

The plugin for firefox’s java – is by this example

/opt/java/plugin/i386/ns7/libjavaplugin_oji.so
• • •