Pages

Friday, November 30, 2007

desktop and firefox shortcuts

Desktop shortcuts
ctl-alt-L : screen lock

alt-f1 : launch applications menu

alt-f2 : launch “run application” dialogue

ctrl-alt - right/left arrow : move to the next virtual desktop

ctrl-alt-shift - right/left arrow : take current window to the next virtual desktop

firefox: <
ctrl-t : new tab

alt-home : jump to home folder

ctrl-k : firefox search field

ctrl-l : firefox address bar

ctrl-pgup : next tab (left to right)

ctrl-pgdn : previous tab (right to left)

ctrl-r / f5: reload page

ctrl-u : view page source

No volume control GStreamer ... found — no sound on Ubuntu

Go to below URL :

linux.dsplabs.com.au

Thursday, November 29, 2007

Quick how-to sudoers file ubuntu

sudoers file to give permission to some users to act as if they were root.


To edit it, use the command

# visudo /etc/sudoers

You will see a file more or less like this.

 

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL



As you can see there is basically one line

root ALL=(ALL) ALL

This lines means that the user root can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command.

Wednesday, November 28, 2007

NTP Server/Client/Router RHEL4

===========================
NTP Server setting on RHEL4
===========================
The Network Time Protocol (NTP) is a protocol used to help synchronize your Linux system's clock with an accurate time source. There are that allow the general public to synchronize with them.

Installation:

step 1: leo@gnu# rpm -ivh ntp-4.2.0.a.20040617-6.el4

Configuration:

The /etc/ntp.conf file is the main configuration file

step 2: leo@gnu# vi /etc/ntp.conf

(add/edit following lines into main configuration files)

# -- CLIENT NETWORK -------
restrict xx.xx.0.0 mask 255.255.0.0 nomodify notrap

# --- OUR TIMESERVERS -----
server ntpserver.youdomain.com # A stratum 1 server
server ntpserver.youdomain.com # A stratum 2 server

# --- NTP MULTICASTCLIENT ---
restrict xx.xx.0.0 mask 255.255.0.0 nomodify notrap


logfile /var/log/ntpd
broadcast xx.xx.1.255





step 3:leo@gnu# chkconfig ntpd on

step 4:leo@gnu# date

step 5:leo@gnu# ntpdate -u ip_of_ntpserver

step 6:leo@gnu# service ntpd start



Determining If NTP Is Synchronized ?

step 7:leo@gnu# ntpq -p

===========================
NTP Server setting on RHEL4
===========================

step 1: leo@gnu# ntpdate -u ip_of_ntpserver

step 2: leo@gnu# vi /etc/ntp.conf

(add/edit following lines into main configuration files)

# --- OUR TIMESERVERS -----
server ntpserver.youdomain.com # A stratum 1 server
server ntpserver.youdomain.com # A stratum 2 server

step 3: leo@gnu# /etc/init.d/ntpd start

Determining If NTP Is Synchronized ?

step 4:leo@gnu# ntpq -p


-----------------------------------

ADD NTP server to Cisco Router

-----------------------------------

leo@gnu# telnet router.domain.com

router> enable
router# config t
router(config)# ntp update-calendar
router(config)# ntp server xx.xx.xx.xx
router(config)# exit
router# wr mem


---------------------------------

Thursday, November 22, 2007

shell script to convert .rm files to .mp3

#copy this script to downloaded audio files (i.e .rm) directory and execute.
#note at end script removes all .rm files after covertting them to .mp3.
#download latest hindi songs from blogspot.com


#!/bin/sh
for i in `ls *.rm`
do

tmp=$i

mplayer $tmp -ao pcm

mp3=`echo $tmp | cut -d. -f1`

lame -h -b 128 audiodump.wav $mp3.mp3

done

rm *.rm
rm audiodump.wav

Recover root privileges in Ubuntu 7.04

While trying to change username of admin user who is listed in suderos. I edited /etc/passwd of that particular user of my machine. Afterwards found that not able to do any administrative tasks as I changed user anilkumar to leo and leo was not in suderos group.

To gain back admin privileges
-------------------------------
step 1 # rebooted system with ubuntu live CD

step 2 # mounted root file system

ubuntu@ubuntu$ sudo -s

ubuntu@ubuntu$ mount -t ext3 /dev/sda2 /home/ubuntu (to find device use "fdisk" )

ubuntu@ubuntu$ vi /etc/passwd

step 3 # reboot


We can also edit grup i.e /boot/grub/menu.list (if it got crashed ).

convert .rm to .mp3 format

To convert .rm to .mp3, required utilities are mplayer (movie player) and lame (create mp3 audio files)

leo@gnu$ sudo apt-get install mplayer


leo@gnu$ sudo apt-get install lmae


leo@gnu$ mplayer thefiletobeconverted.rm -ao pcm

creates file audiodump.wav

leo@gnu$ lame -h -b 128 audiodump.wav myconvertedfile.mp3

Saturday, November 17, 2007

Wine is an Open Source implementation of the Windows API on top of X,

Wine is an Open Source implementation of the Windows API on top of X, OpenGL, and Unix.

Think of Wine as a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLLs if they are available. Wine provides both a development toolkit for porting Windows source code to Unix as well as a program loader, allowing many unmodified Windows programs to run on x86-based Unixes, including Linux, FreeBSD, Mac OS X, and Solaris.

Wednesday, November 14, 2007

GPARTED (linux utility )

GPARTED (GNOME Partition Editor)
http://gparted.sourceforge.net

A utility to be used for device and partition info at system end.

Features
------------
* Create New/Resize/Move/Copy/Format/Delete partition.
* Get Device info

Invoking Gparted requires root privileges,so invoke by $sudo gparted.