Thursday, March 27, 2008

To Disable CD Autoplay, completely, in Windows XP Pro

1. Click Start, Run and enter GPEDIT.MSC
2. Go to Computer Configuration, Administrative Templates, System.
3. Locate the entry for Turn autoplay off and modify it as you desire.

To make multiple login in Yahoo Messenger with Yahoo ID's at the same time

Using this trick you will be able to login with many yahoo id's at same time:
1. Click Start, Run and Type Regedit, then enter.
2. Navigate to HKEY_CURRENT_ USER/Software/yahoo/pager/Test
3. On the right page , right-click and choose new DWORD value .
4. Rename it as Plural.
5. Double click and assign a decimal value of 1.

How to share files and folder in ubuntu

How to install Samba Server for files/folders sharing service


sudo apt-get install samba smbfs


How to add/edit/delete network users


sudo smbpasswd -a system_username
gksudo gedit /etc/samba/smbusers
    • Insert the following line into the new file
system_username = "network username"


  • To add network user
sudo smbpasswd -a system_username
  • To delete network user
sudo smbpasswd -x system_username
  • To enable network user
sudo smbpasswd -e system_username
  • To disable network user
sudo smbpasswd -d system_username
    • By Default network users are disabled after adding them, make sure you run the enable network user command above.

How to share home folders with read only or read/write permission (Authentication=Yes)


sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
; security = user
...
  • Replace with the following lines
  security = user
username map = /etc/samba/smbusers
  • Remove the ; in front of the following lines (there will text in between explaining what they do):
;[homes]
;comment = Home Directories
;browseable = no
;valid users = %S
;writable = yes
    • If you want other network users to be able to edit to the folder then change
 # By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
; writable = no
    • Replace with the following lines
  writable = yes
  • Save the edited file
sudo testparm
sudo /etc/init.d/samba restart


Tuesday, March 25, 2008

Multimedia codecs and players

  1. Add the extra repositories.
  2. (optional) Install DVD playback capability and Windows Media and RealPlayer codecs (see the Restricted Formats page):
    wget -c -P /tmp/ http://www.debian-multimedia.org/pool/main/w/w32codecs/w32codecs_20071007-0.0_i386.deb
    wget -c -P /tmp/ http://www.debian-multimedia.org/pool/main/libd/libdvdcss/libdvdcss2_1.2.9-0.0_i386.deb
    sudo dpkg -i /tmp/w32codecs_20071007-0.0_i386.deb /tmp/libdvdcss2_1.2.9-0.0_i386.deb
  3. (recommended) Install Totem with the Xine back-end:
    sudo apt-get install totem-xine libxine1-plugins
  4. (recommended) Make Totem the preferred multimedia player:
    gconftool --type string --set /desktop/gnome/applications/media/exec "totem"
  5. (recommended) Add right-click options in Nautilus for enqueuing and replacing multiple files in Totem.
  6. (optional) Install MPlayer (rubbish interface, but good to have around for the rare cases when Xine can't play something):
    sudo apt-get install mplayer
    sudo sed -i.backup -e's@gmplayer@mplayer@g' /usr/share/applications/mplayer.desktop
    sudo sed -i.backup -e's@vo=x11,@vo=xv,@g' /etc/mplayer/mplayer.conf
  7. (optional) Install the MPlayer plugin for Firefox:
    sudo apt-get install mozilla-mplayer

Mozilla Firefox - on Ubuntu

Firefox comes pre-installed on Ubuntu. Here are some useful customizations.

  1. (optional) Some useful extensions:
  2. (optional) Enter about:config in the URL bar and then make the following changes:
    general.autoScroll=true
    network.http.pipelining=true
    network.prefetch-next=false
    browser.backspace_action=0
    browser.link.open_newwindow=3 (3: new tab; 2: new indow; 1: current tab)
    browser.link.open_newwindow.restriction=2 (0: use open_newwindow setting; 1: new window; 2: use open_newwindow setting unless javascript specifies window size)
    browser.search.openintab=true
    browser.tabs.autoHide=false
    browser.tabs.closeButtons=2
    browser.tabs.loadFolderAndReplace=false
    browser.tabs.loadGroup=0
    browser.tabs.warnOnClose=false
    browser.search.minwidth=300
    linkification.settings.Linkify_OpenInTab=true
    linkification.settings.Linkify_OpenTabinBG=true
    linkification.settings.Linkify_Toggle=false
  3. (optional) Open URLs entered in address bar in a new tab by default. (Useful if you hate having to press ALT+ENTER to achieve this.) Note that the following needs to be done each time a new version of Firefox is installed (e.g., as an Ubuntu update).
    sudo apt-get install fastjar
    pushd /tmp; fastjar -xf /usr/share/firefox/chrome/browser.jar content/browser/browser.js; popd
    sed -i -e"s/if (aTriggeringEvent \&\& aTriggeringEvent.altKey)/if (!(aTriggeringEvent \&\& aTriggeringEvent.altKey))/" /tmp/content/browser/browser.js
    sudo fastjar -uf0 /usr/share/firefox/chrome/browser.jar -C/tmp content/browser/browser.js

Fonts

  1. Here are some beautiful alternatives to Windows fonts:
    • Serif fonts (alternatives to Times New Roman, Georgia, Garamond, etc.): Norasi, Nimbus Roman No 9 L, FreeSerif, DejaVu Serif.
    • Sans-serif fonts (alternatives to Verdana, Tahoma, etc.): DejaVu Sans, FreeSans.
    • Fixed-width fonts (alternatives to Courier New, Lucida Console, etc.): DejaVu Sans Mono, FreeMono.
  2. If, after trying the fonts above, you still want to get Windows fonts, here's how:
    sudo apt-get install msttcorefonts

Relocating the /home directory

Important: This only applies if you want to move the /home directory to another drive/partition, or if you want to activate an existing home directory on another drive/partition.

  1. Carefully write down these instructions since they require you to close the browser.
  2. Save and close all open programs, and then log out (as opposed to restart or shutdown).
  3. Press CTRL+ALT+F2; you will be taken to the TTY2 command line.
  4. Stop the Gnome Desktop Manager:
    sudo /etc/init.d/gdm stop
  5. (Note: Skip this step if you already have the contents of your /home directory in the desired partition.) Copy your /home directory to the desired partition, say /media/new_home_partition:
    sudo cp -pR /home/$USER /media/new_home_partition
    sudo chown $USER:$USER /media/new_home_partition/$USER
  6. Make the desired partition mount as /home:
    sudo cp /etc/fstab /etc/fstab.backup
    sudo nano /etc/fstab
    If the mount point for any entry is currently listed as /home, change it from
    # /dev/old_home_partition
    UUID=... /home ...
    to
    # /dev/old_home_partition
    UUID=... /media/old_home_partition ...
    Then set mount point for the desired partition's entry to /home by changing
    # /dev/new_home_partition
    UUID=... /media/new_home_partition ...
    to
    # /dev/new_home_partition
    UUID=... /home ...
    Save the file (i.e., press CTRL+O) and exit Nano (i.e., press CTRL+X).
  7. Press CTRL+ALT+DEL to reboot; after rebooting, your /home directory will be located in the new partition.

Enable 5-button mouse

  1. If you have a 5-button mouse, you can enable the forward and back buttons as follows:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.mouse
    sudo gedit /etc/X11/xorg.conf
    Change:
    Section "InputDevice"
    ...
    Driver "mouse"
    ...
    Option "Emulate3Buttons" ...
    Option "ZAxisMapping" ...
    ...
    EndSection
    to:
    Section "InputDevice"
    ...
    Driver "mouse"
    ...
    Option "Emulate3Buttons" "false"
    Option "Buttons" "7"
    Option "ButtonMapping" "1 2 3 8 9 10 11"
    Option "ZAxisMapping" "4 5"
    ...
    EndSection
  2. (optional) Restart Gnome Desktop Manager for these settings to take effect.

Monday, March 24, 2008

Install nVidia graphics driver

Note that installing the nVidia driver will fix some screen resolution problems.

1. If you plan to connect multiple monitors, start out by connecting only the main monitor in order to keep things simple. (Once you have the driver working fine for just that monitor, you can then connect the other monitors and use the nvidia-settings utility to configure them.)
2. Now reset the X server configuration to very basic settings:

sudo dpkg-reconfigure xserver-xorg

You will be presented with a series of questions. Choose the default answers for all the questions except for the following:
1. Choose "vesa" for the X server driver.
2. Choose "No" for monitor autodection.
3. Choose "medium" for the method for selecting the monitor characteristics.
4. Choose "1024x768 @ 60Hz" for the monitor's best video mode. (Don't worry, we'll get better screen resolutions once we install and enable the nVidia driver.)
5. Choose "Yes" for writing the monitor sync ranges to the config file.
You can now optionally restart the Gnome Desktop Manager (GDM) for these settings to take effect before continuing. Alternatively, you can just continue the driver installation without restarting the GDM.
3. Install and enable the nVidia driver:

sudo apt-get install nvidia-glx-new
sudo nvidia-glx-config enable

Note: If you have a GeForce4 video card, you may need to use nvidia-glx instead of nvidia-glx-new. And if you have a very old card, like a TNT, you may need to use nvidia-glx-legacy instead.
4. Reboot the computer for these settings to take effect. (In theory, you could just restart the Gnome Desktop Manager, but I ran into a situation where, after an error, the nVidia driver didn't seem to load upon restart the GDM.)
5. Set up screen resolution, dual monitors, Xinerama, etc.:

sudo nvidia-settings

You can change the settings in the "X Server Display Configuration" section and then click the "Save to X Configuration" button and save the file as /etc/X11/xorg.conf.
6. (optional) Disable the nVidia splash screen:

sudo gedit /etc/X11/xorg.conf

Change:

Section "Device"
...
Driver "nvidia"
...
EndSection

to:

Section "Device"
...
Driver "nvidia"
...
Option "NoLogo" "true"
EndSection

7. (optional) Restart Gnome Desktop Manager for these settings to take effect.

Printer sharing


  1. On the server:
    1. Set up your printer, and make sure it's turned on and working.
    2. Click on the "System" / "Administration" / "Printing" menu.
    3. Select "Server Settings" on the left, and turn on "Share published printers connected to this system". This will allow printer sharing over your private network. If you want to access the printer over the Internet, also turn on "Allow printing from the Internet".
    4. Select your printer under "Local Printers" on the left, select the "Policies" tab, and turn on "Enabled", "Accepting jobs", and "Shared".
    5. Use Firestarter to open port 631 (the default IPP port) for the IP addresses to which you want to give printer access. If you want to restrict printer access to your private network, set the policy to open your IPP port for only 192.168.0.0/16 (i.e., IPs of the form 192.168.xxx.xxx).
    6. If you are behind a router on a private network, give your server a static private IP (e.g., 192.168.1.30) by clicking on the "System" / "Administration" / "Network" menu item and setting up a static IP. Note that the "gateway address" should be the router's address (e.g., 192.168.0.1, 192.168.1.1, or whatever).
    7. If you want to access your server over the Internet and are behind a router, configure the router to allow access to your server's IPP port (port 631).
    8. If you want to access your server over the Internet and your Internet Service Provider doesn't give you a static IP address, you need to set up a publicly accessible hostname.
  2. On the client:
    1. Click on the "System" / "Administration" / "Printing" menu.
    2. Click on the "New Printer" button.
    3. Select "Other", and enter the following URI:
      http://$SERVER:631/printers/$PRINTER 
      where $SERVER is the server URL or IP address and $PRINTER is the printer name on the server, and then click "Forward" and follow the remaining steps as you would for local printer setup. You can find the names of the shared printer on a server by visiting the following URL in your web browser:
      http://$SERVER:631/printers
      where $SERVER is the server URL or IP address.