tips
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:
- linportal's blog
- 33 comments
- Read more
- 88205 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.
- linportal's blog
- 8 comments
- Read more
- 29968 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.
- linportal's blog
- Add new comment
- 16297 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.
- linportal's blog
- 2 comments
- Read more
- 19124 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
- linportal's blog
- 1 comment
- 19818 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
- linportal's blog
- Add new comment
- Read more
- 3171 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.
- linportal's blog
- Add new comment
- 26669 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
- linportal's blog
- Add new comment
- 7748 reads

Recent comments
17 hours 59 min ago
4 weeks 4 days ago
4 weeks 4 days ago
6 weeks 1 day ago
10 weeks 2 days ago
12 weeks 1 day ago
12 weeks 1 day ago
12 weeks 1 day ago
12 weeks 5 days ago
16 weeks 1 day ago