linportal's blog
Your ATI Radeon very slow on Xorg X server 1.3?
Submitted by linportal on Sun, 2007-07-22 04:42This one has bothered me for a long time. The solution is, of course, simple. But, I still don't understand why was it necessary to force users to search so hard for this piece of information, where all the older X server releases worked OK out of the box?
If you find that after upgrading to X.Org 7.3 your display becomes very slow, and you own ATI Radeon, all you need to do is to put this line in the Device section of your xorg.conf:
- 33 comments
- Read more
- 88071 reads
Replaying terminal sessions with scriptreplay
Submitted by linportal on Sun, 2007-05-06 18:13OK, this is so cool and sexy, I really don't understand how I didn't find about this earlier. Possibly because it's the recent add-on to the well known script utility?
So, I suppose you all know about script. You type script, do your work, type exit, and you have your complete session logged in the file named typescript. Quite handy if you want to log everything you did in the shell for whatever reasons.
What you might not know is that script has an interesting switch which allows you to also save the exact timing data of the screen output you're capturing. And an additional utility called scriptreplay which can later replay your session in real-time. Like a movie. With perfect timing.
- 8 comments
- Read more
- 29889 reads
Two ways to force SSL on your website
Submitted by linportal on Fri, 2007-04-20 01:47Two solutions, both to be put in the .htaccess file, when you want to force your website visitors to go through SSL:
Solution A:
RewriteEngine On
RewriteCond %{SERVER_PORT} !443$
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R]
Solution B:
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
Pick whatever solution looks nicer for you.
- Add new comment
- 16281 reads
What to do if you forget root password?
Submitted by linportal on Thu, 2007-04-05 18:17Although this may seem like a small catastrophe to you, it's actually very easy to recover from that situation. What you need to do is to reboot (power on) your system, but on the LILO prompt you should type something like:
LILO: Linux init=/bin/sh rw
Where Linux is the example image name, you should supply the actual data, of course. And same parameters should be provided to GRUB or any other boot loader you might use.
- 2 comments
- Read more
- 19066 reads
How to grep for IP addresses using the GNU egrep utility
Submitted by linportal on Thu, 2007-03-15 21:56This is an useful regular expression if you're looking for IP addresses:
egrep '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}'
Related:
How to sort IP addresses using the GNU sort utility
- 1 comment
- 19790 reads
How to check when Daylight Saving Time (DST) will commence?
Submitted by linportal on Thu, 2007-03-08 02:39Using time zone dumper utility (zdump) like this:
zdump -v /etc/localtime | grep 2007
we can see that:
/etc/localtime Sun Mar 25 00:59:59 2007 UTC = Sun Mar 25 01:59:59 2007 CET isdst=0 gmtoff=3600
/etc/localtime Sun Mar 25 01:00:00 2007 UTC = Sun Mar 25 03:00:00 2007 CEST isdst=1 gmtoff=7200
/etc/localtime Sun Oct 28 00:59:59 2007 UTC = Sun Oct 28 02:59:59 2007 CEST isdst=1 gmtoff=7200
/etc/localtime Sun Oct 28 01:00:00 2007 UTC = Sun Oct 28 02:00:00 2007 CET isdst=0 gmtoff=3600
- Add new comment
- Read more
- 3165 reads
How to extract contents of an RPM package
Submitted by linportal on Fri, 2007-03-02 00:42Use the following procedure to extract contents of an RPM package:
rpm2cpio package.rpm | cpio -dimv
As the name implies, rpm2cpio takes an RPM package file and converts it to a cpio archive. The -i flag to the cpio command indicates that cpio is reading in the archive to extract files, and the -d flag tells cpio to construct directories as necessary. The -v flag tells cpio to list file names as files are extracted, and the -m flag tells cpio to retain previous file modification times when creating files.
- Add new comment
- 26642 reads
Soft scrollback for the Linux VGA console
Submitted by linportal on Sat, 2006-09-30 21:45If you're a heavy user of the Linux VGA console, you'll like this feature. Recent 2.6 kernels have added support for soft scrollback. This feature enables you to have much bigger scrollback buffer than the standard console has, at the price of slightly slower console output.
The scrollback buffer of the standard VGA console is located in VGA RAM. This RAM is fixed in size and is very small. To make the scrollback buffer larger, it must be placed instead in System RAM. We call this soft scrollback.
The feature and the size of the buffer are enabled/configured through kernel config options, during kernel compilation. Beside consuming kernel memory, enabling this feature will slow down the console by approximately 20%.
- 5 comments
- Read more
- 31419 reads
Running Linux on the ASRock 775Dual-VSTA motherboard
Submitted by linportal on Tue, 2006-09-05 22:54
ASRock 775Dual-VSTABeing a happy owner of the ASRock 775Dual-VSTA motherboard for a week, I decided to share my opinions about it and also give an advice or two to other people thinking about running Linux on it.
In short, this board is an exceptional piece of engineering and Linux runs GREAT on it. I'm not going to list all the specifications of the motherboard, because they're readily available on its official page, but let me go through the interesting features:
- the board can use both DDR & DDRII memory (but not at the same time!)
- you can equip it with AGP or PCIe graphics card, your choice
- there's plenty of connectors for both older ATA or newer SATA drives
- you can run any LGA 775 processor you can get hands on, including latest Intel Core 2 Duo (Conroe core)
- the board is very affordable (or should I say dirt cheap)
- 12 comments
- Read more
- 31460 reads
How to sort IP addresses using the GNU sort utility
Submitted by linportal on Sun, 2006-08-20 15:02Need to sort list of IP addresses in shell? Here’s the invocation that works:
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4
Thanks for this tip goes to Paul Heinlein.
Related:
How to grep for IP addresses using the GNU egrep utility
- Add new comment
- 7730 reads

Recent comments
3 weeks 5 days ago
3 weeks 5 days ago
5 weeks 2 days ago
9 weeks 2 days ago
11 weeks 2 days ago
11 weeks 2 days ago
11 weeks 2 days ago
11 weeks 6 days ago
15 weeks 2 days ago
16 weeks 3 days ago