Synapse ↵

logically incoherent… not!

Archive for July, 2007

Demystification of your xorg.conf

Posted by synapse on July 21, 2007

X.ORG LogoDisclaimer : Editing the xorg.conf can make things go horribly wrong if you don’t know what you are doing. Unless you are sure of yourself, do not try this. At the very least you should be comfortable with some basic Linux commands in case you need to restore a backed up copy of the file. You have been warned.

The first thing that you should do, and I cannot stress this enough : Make a copy of your xorg.conf file. It can be found in the /etc/X11/ folder. The command to do the same is -

su

cp /etc/X11/xorg.conf xorg.conf.backup

After this you can begin editing various sections of the file. I will try and explain a couple of important sections. With trial and error you can become pretty good at this and have more fine tuned control over your display.

The xorg.conf file is divided into a minimum of eight sections. The start of each section is marked by the word Section followed by the section’s name, and its end by EndSection. Sections can be placed in any order, and you can have more than one section that cover a certain purpose — for example, if you are using multiple monitors. As in most configuration files, you may also see lines that start with a number sign (#) that provide comments for human readers. These lines are ignored by the operating system, and you can add more for your own purposes.

Fonts

Quick tip for fonts : You can add new font paths by following the format of existing entries: FontPath “<absolutepath>”
It is suggested that you place any directory for 100dpi bitmap fonts before those for 75dpi bitmap fonts, and add :unscaled to the end of all the paths for bitmapped fonts. This ensures that the higher quality fonts are used by the xserver first.

Module

You should prevent editing this section. xorg.conf’s Modules and DRI sections refer to modules loaded by the X server for such purposes as 3-D acceleration (glx, dri) and font support. Unless the relevant resources have been compiled in the kernel, it will not make a difference if you edit this section.

Input Device - Keyboard

Most probably you will want to use the XkbRules options to define the general behavior of the keyboard, since the alternative is to define all aspects of the keyboard layout separately yourself. Driver ‘kbd’ will work fine 90% of the time. The XkbModel for the keyboard can be defined, using one of the options listed in /usr/share/X11/xkb/rules/base.lst, or else a generic one such as pc104 or pc102.

Input Device - Mouse

Two important sections here are ”Driver” and ”Device”. The driver ’mouse’ will work fine for most. Device indicates the location where your pointing device is present. The protocol section defines the type of mouse you have - whether a PS2 (round connector), a USB or a serial mouse. If you have a three-button mouse, you should add the “Emulate 3 buttons” option as follows -

Option “Emulate3Buttons” “true”

Device & Monitor

These sections define your monitor and your 3d card. Make sure that they have got detected correctly. If you are having trouble with the display, you can try one of the drivers in the /usr/lib/xorg/modules/drivers directory for the graphic card ‘Driver’ section. If all else fails you can get basic video support by entering “vesa” or “vga” for the driver. The bus ID for the first 3d card is usually PCI:1:0:0.

For the monitor, the DPMS, enables Display Power Management Signaling in order to conserve the power used by the monitor.

Screen 

The screen section can be used for setting the depth and resolution. Pretty handy if you want to bump up/down your resolution or if you know beforehand that your monitor does not support a particular mode.

After you hav made changes to your xorg.conf file, save the file and restart X by pressing ‘Control + Alt + Backspace’. I case something goes wrong you can always restore the the copy of xorg.conf that you had backed up earlier. You can also look for logs related to the error in the /var/log folder. Look for recent entries.

Download this article as a PDF -> Demystification of your xorg.conf

Posted in Linux, Tips and Tricks | 5 Comments »

Speed up your connection and stay secure with OpenDNS

Posted by synapse on July 15, 2007

Open DNS Logo

Here’s a surefire way of speeding up your internet access and getting secure from DNS spoof attacks. The answer is OpenDNS. Every ISP (Internet Service Provider) has a DNS server setup so that the website addresses you type get translated into IP addresses so that your browser understands where the website content is to be fetched from. But most of these DNS servers are overloaded and at the same time are prone to spoofing attacks like DNS poisoning.

Here’s how you can protect yourself and speed up DNS requests at the same time -

In Windows XP-

  1. Open up your Control Panel
  2. Open Network connections
  3. Right click the connection you want to configure
  4. Select properties
  5. From the dialog that pops up, select Internet Properties (TCP/IP)
  6. Click the properties button
  7. Type in 208.67.222.222 and 208.67.220.220 as your DNS server addresses
  8. The dialog should now look like the screenshot below -

Screenhot - TCP/IP Properties Dialog

Thats all! All you have to change the Preferred DNS server and the Alternate DNS server. Leave the rest as is.

For Linux -

  1. In Gnome, goto System Administration -> Network
  2. Change your DNS servers to 208.67.222.222 and 208.67.220.220
  3. The same procedure can be used for KDE, just goto Control Center and enter the above addresses as your DNS addresses in Network Configuration

This tip not only reduces your internet DNS requests lag but also makes you secure against DNS poisoning attacks.

Goto http://www.opendns.com/ for more information.

Quoted from the above website -

 

OpenDNS is safer

OpenDNS protects you from phishing — bad websites trying to steal your personal information. When you try to go to a phishing site, we let you know. We also let you optionally block adult sites as a category, or individual websites of any type. These services help you better protect those on your network from websites they shouldn’t be visiting.
Learn more.

 

OpenDNS is faster

You use DNS every time you use the Internet. The speed of your DNS service determines how quickly websites load for you. That’s why you want your DNS service to be blazing. OpenDNS is so fast because we run some of the largest DNS caches around and do it on our own high-performance network.
Learn more.

 

OpenDNS is smarter

The address bar is how you navigate the Internet. We make your address bar more intelligent. With OpenDNS, you can create shortcuts that let you type something easy-to-remember into your address bar and leap straight where you want to go. And we’ll correct your common spelling mistakes, on the fly. That means when you are typing fast and type yahoo.cmo instead of yahoo.com, you still get there.
Learn more.

 

OpenDNS is more reliable

Little is more frustrating than intermittent Internet outages. When your DNS service isn’t working, you can’t access the Internet. When you start using OpenDNS, your days of dealing with DNS-related downtime will be over. We know reliability is important, and we stand behind ours.
Learn more.

Posted in Links, Tips and Tricks, Windows | 1 Comment »

Open ports for your Airtel connection (Port-mapping)

Posted by synapse on July 11, 2007

Airtel-LogoThis write up will explain to you how to speed up your Airtel Broadband connection / solve other problems regarding connection failures due to closed ports.

Although I use Airtel and a Beetel 220 BX modem as my basis for this write up, the same rules can be applied to others as well. So lets get started. First thing make sure your DSL modem is on. Fire up your browser. Type http://192.168.1.1 as the address with the following Username/Password -

Username : admin

Password : password

Note : These are case sensitive. Make sure all are typed in lowercase.

Click on Advanced Setup -> NAT in the page that loads. If you do not see these options try entering http://192.168.1.1/main.html as the address. Some routers/modems deliberately try to prevent users from accessing these options. On the NAT virtual servers page click the add button. Now add the port number that you wish to open up. You can even open up a range of ports using the add button. You should see something similar to the screenshot below. Click it to view full image

Beeter 220 BX Screen Shot
This technique can be used for any operating system / modem / service provider. It may vary slightly but the essential principle remains the same.

Posted in Hacking, Linux, Tips and Tricks, Windows | 8 Comments »