# Tips n Tricks for Linux



## khandu (Feb 22, 2005)

Hi All.. 

I just hope the MODS make it a sticky and every1 adds tips n tricks in this post.. 

Many will be already knowin these but i m startin this just for the TOTAL NEWBIES!!!

1) *HOW TO INSTALL RHN directly from ISO ( JAN 2005 DVD )*



Copy all the ISO in a folder.. ( CANNOT BE A NTFS file system.. Should be a FAT32 System )
Use a RW and burn the rescued CD ISO into it 
For Floppy ppl, you will have to make a bootable floopy 
Boot from it and then type " linux askmethod"
Then choose "From Hard Disk" and then give the path.. 
Rest is same

More will be coming soon... 8)


----------



## klinux (Feb 22, 2005)

weird , sounds so familiar : *www.thinkdigit.com/forum/viewtopic.php?t=14097  . anyways good thread .


----------



## GNUrag (Feb 22, 2005)

This could be a good start. I would recommend the level of complexity to a bit lower. 

One can also go to the LOST project's homepage and have a lots of LOSTs from there. Its also available in fortune format.
* *lost.sourceforge.net *

I'd try to post something from freebsd fortune cookies..

TIP:
*If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.*


----------



## khandu (Feb 23, 2005)

2)* HOW TO RESET UR ROOT PASSWORD IF U FORGET IT*


```
While Booting ( Redhat )   just press "e" in GRUB 
u will find 3 lines of code.. 
Goto to the 2nd line press "e"again and type "1" in the end
 then press ENTER.. 
Then press "b" and it will boot you into your shell.. 
Just type "passwd" and change ur ROOT password... 
dont need to know the old one..
```


Cool na..


----------



## tuxfan (Feb 23, 2005)

Source: *LinuxForYou, June 2004*



> Q. I am doing a project on Linux platform. Someone has added the GRUB password to the computer on which I am working and has also changed the root password. I can crack the root password, if there is no Grum password, from the initial screen (i.e. from the init 1); but with the GRUB password. While reading LinuxForYou, I saw your section and thought you may be able to help.
> 
> 
> 
> ...





Source *Digit, June 2004*



> "I, uh, forgot the root password"
> 
> 
> 
> ...


----------



## firewall (Feb 23, 2005)

*How to restore GRUB*

It's happened to almost every GNU/Linux and Windows dual boot user at some point: You have a nice installation GNU/Linux cross-booted with Windows. So far so good. But then, at some point, you reinstall Windows, perhaps because you upgraded to a new version, or perhaps you just did it to "clean up" Windows, reinstalling the original system files to make it a little more stable. When you reboot, however, you'll find that if you had LILO running from your hard disk's MBR, it has been killed, and Windows has claimed the MBR as its own. How will you reinstall your boot manager so you can get into GNU/Linux?

here is small tutorial on how to reinstall your gnu boot loader in that case. I chose GRUB here as now a days it's very popular and powerful too. For those who use LILO, check out my next post 

----

Boot into the rescue mode using install CD1 by typing "linux rescue" at the boot prompt. When it asks you if you want it to find your installation and mount it, let it by selecting "Continue". Once you get to the sh prompt chroot into you installation with:

# chroot /mnt/sysimage

If the disk you boot from is /dev/hda then you should be able to reinstall grub with:

# grub-install /dev/hda

Just remember to exit the chroot'ed shell before you reboot. If you reboot by "Ctrl-Alt-Del" the installer will unmount your partitions. Although it probably wouldn't hurt to try to unmount as many as you can yourself with something like:

# umount /dev/hd?[1-9]*

-----


----------



## firewall (Feb 23, 2005)

*Restoring LILO*

Here is the process :::::

you just need to reinstall LILO. That means you have to boot into Linux some other way. Use the First CD of ur distro and go to repair option. At the command prompt just type /sbin/lilo. You should get a response that looks like this:

Added linux *
Added win

The asterisk (*) indicates the default boot image. (If you see anything other than this, something went wrong. Go back through your lilo.conf and read the man page to see what it was.) When you reboot, LILO will be back where it belongs!


----------



## GNUrag (Mar 1, 2005)

* If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'. *



*Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.*


----------



## firewall (Mar 2, 2005)

*Internet sharing using IPTABLES*

*Scenario : There are two pcs. one is connected directly to internet and you wish to have another one too. 
You can use Squid - Proxy for that. But there is another smart way to do the same. yes use, IPTABLES ! *

 here is how.....

You need to have "rOOt access.

1) edit the file:
/etc/sysctl.config
add a 1 to the ip_forward like so:

net/ipv4/ip_forward = 1

save and close file.

2) at the prompt type:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Then at the prompt again type:

/etc/init.d/iptables save
or
service iptables save

Restart the network services, like so:

/etc/init.d/network restart
or
service network restart

All this is done on the firewall machine.

The eth0 is the network interface pointing to the Internet not your local network

This will let all pc on the local net to get online and the main pc will masquerade the internal IP address to look like the request is comming from the firewall pc.

 enjoy....


----------



## firestarter (Mar 2, 2005)

*DEfault Desktop Envirinment Switcher*

What will be your default desktop when you boot next time.

Open the terminal and firein

```
switchdesk GNOME
```
or

```
switchdesk KDE
```

Or you can manually edit the following file and put your prefered environment

```
vi  /etc/sysconfig/desktop
```
and put
*DESKTOP="KDE/GNOME"*


----------



## pradeep_chauhan (Mar 3, 2005)

Guys all of us use a terminal for work in linux. I located a beautyful cute and well behaved terminal called Eterm. Its small and very eye catchy. Its also highly configrable. Try it out and you will forget konsole xterm gnometerminal or even aterm(my previous pal).


----------



## tuxfan (Mar 4, 2005)

Link, sir link. Give the link for downloading Eterm.


----------



## firewall (Mar 4, 2005)

*prdownloads.sourceforge.net/eterm/Eterm-0.9.3.tar.gz

njoy...


----------



## pradeep_chauhan (Mar 4, 2005)

Eterm has some dependency also use yum or apt-get to install it.


----------



## GNUrag (Mar 5, 2005)

lol... it was * Eterm* and i was trying * eterm  * all the while


----------



## pradeep_chauhan (Mar 6, 2005)

Now Try this for a true cool effect
Eterm -g 60x10+10-10 -O -x --no-cursor -w 0 --scrollbar 0 --buttonbar 0 -e tail -f /var/log/messages &


----------



## firewall (Mar 7, 2005)

*Know your Distribution Release Information*

To know about your Redhat/Fedora info:


```
cat   /etc/redhat-release
```

To know about your Debian info:


```
cat   /etc/debian_version
```

To know about your SUSE info:


```
cat   /etc/SUSE-release
```

Feel free to add about other distros


----------



## ujjwal (Mar 7, 2005)

For slackware



> cat /etc/slackware-version





*Aliases*

You can use shell for convenience, for example to set alternate names for certain commands, or to replace one command with another, like

alias more="less"

This will use the more featured "less" command in place of "more".

Note :- An alias set in this manner is temporary, and only holds for that shell session. To permanently set an alias, add it to an initialisation script in your distro (like ~/.bashrc).

*Removing the fat*

Linux can be run on a variety of old systems, but many new distro's are bloated up, and include loads of unneccessary stuff, which make them painfully slow to use.

Two excellent articles on reducing the bloat -

*users.netwit.net.au/~pursang/lofat.html
*users.netwit.net.au/~pursang/lofat2.html


----------



## pradeep_chauhan (Mar 18, 2005)

Guys
The new 2.6.11 kernel shipps with a range of new low level drivers please upgrade your kernel. To highlight this pont I have an Adaptec 39160 SCSI 160MBps adaptor in my home P3 machine earlier i was getting a throughput of roughly 49MBps from the disk Now with the new driver in the kernel 2.6.11 the throughput has gone up to 51.34MBps This performance improvement has made the system noticably faster.
Similarly there are other new drivers too.


----------



## ujjwal (Mar 23, 2005)

*Using loadlin to boot into an installation image from your hard drive*

You can install a linux distro directly from its installation image, incase you don't have a CD Writer.

If you have windows 9x or DOS installed (a DOS bootable floppy will do), you can use a tool called loadlin for this purpose.

I will take the example of slackware here ...

Download the slackware installation cd.

Create a directory called slackware or something in your DOS partition. View the image with any CD image viewer, and open the file loadlin16c.zip in the "kernels" directory (incase your distro doesn't ship with loadlin, you can download loadlin 1.6c from here), copy the file loadlin.exe to your directory. Also copy the following to that directory -

kernels/bare.i/bzImage
isolinux/initrd.img

Note - incase you need a feature present on a kernel other than bare.i, use that instead (ex - jfs.i if you want to use the jfs filesystem)

Boot into pure DOS mode and cd to the directory you created and type the following -

loadlin bzImage root=/dev/ram rw initrd=initrd.img

Your installation should continue as normal. Mount your dos partition in linux, and then mount the ISO linux in any directory ... say /source by the following command -

mount -o loop filename-with-full-path /source

Now, begin the installation as usual by typing "setup", and then when it asks you for the source of the installation files, just enter "/source/slackware".

Everything should be normal from here


----------



## ujjwal (Mar 27, 2005)

*Keeping track of packages installed from source*

Installing software from its source code is the optimal way of installing software in linux. Unfortunately, uninstalling these softwares can be a bit of trouble, as you have to go hunting through /usr/local/ for all the files created during the "make install" procedure.

Well, there is an easy way around that. Use this nifty tool called checkinstall for that purpose.



> When make install is done, CheckInstall will create a Slackware, RPM or Debian compatible package and install it with Slackware's installpkg, "rpm -i" or Debian's "dpkg -i" as appropriate, so you can view it's contents with pkgtool ("rpm -ql" for RPM users or "dpkg -l" for Debian) or remove it with removepkg ("rpm -e"|"dpkg -r"). Aditionally, this script will leave you a copy of the installed package in the source directory so you can install it wherever you want.



So, compiling a software once will give you a package that you can install/uninstall at will, and you don't need to compile the program all over again when you reformat


----------



## nixcraft (Mar 27, 2005)

I have some tips @ myblog mostly useful for admins *www.cyberciti.biz/nixcraft/vivek/blogger/linux-tips-and-tricks.php


----------



## surdy (Mar 28, 2005)

for those who have a dual boot machine ..... *To access(read-only) linux partitons from Windows use EXT2IFS here is the link *uranus.it.swin.edu.au/~jn/linux/ext2ifs.htm

P.S. Only for Microsoft Windows NT 4.0,  Microsoft Windows 2000 (NT 5.0) and Microsoft Windows XP (NT 5.1).*


----------



## neerajvohra (Mar 29, 2005)

Well You All Are doing a gr8 job to help newbies in linux
Thx To you all!!!!!!


----------



## ujjwal (Mar 30, 2005)

*Mounting your windows partitions with specific permissions*

I guess you know how to auto mount your windows partitions in linux. If not, then you can do it by adding a line like



> /dev/hda1 /mnt/dos/d vfat defaults 0 0



to your /etc/fstab file. See the "Fedora Core 3 FAQ" for more details (it applies to any distro).

But by default, your FAT partitions are mounted with permissions such that only root can access them, and not normal users. You can get around this by using "umask".

For example, replace "defaults" in the given line with "umask=022" such that the root user has write access to all files in that partition, and everyone else can only read the files.

Read up on linux file system permissions (man chmod & man umask) to experiment with the permissions to get them to your liking


----------



## vignesh (Apr 28, 2005)

quick logoff ctrl+alt+ backspace


----------



## pradeep_chauhan (Apr 28, 2005)

quick logoff ctrl+alt+ backspace


sorry thats a bad way to kill the x server and not a loggoff as your loggin is still active in init level 1,2 or 3.


----------



## ujjwal (Apr 29, 2005)

*Taking screenshots using simple command line tools*

Sure, its simple to use The Gimp or KSnapshot to take linux screenshots, but many a time one may not want to use these heavy and cumbersome tools for a simple thing.

Make sure you have ImageMagick installed (its a versatile console based image manipulation toolset), else get it from *www.imagemagick.org/

Now, you can use the command



> import -window root screen.jpg



You can also specify a single windows of which to capture an image (root captures whole screen)

To view the image, type



> display screen.jpg



*Timed screenshots*

Now for the fun part, we shall use the sleep command to get the screenshot after a small delay, so that we can arrange the screen the way we like 



> sleep 5 ; import -window root screen2.jpg



This statement will first execute "sleep", so it will go idle for 5 seconds, in which you can do what you like,  and then execute "import" to capture your screen.

Also, Captura is a simple tool to get screenshots, and it is vert easy to use

*www.hernansoft.com/downloads_en.html


----------



## amol_dan (May 20, 2005)

*Booting Linux with NTOS boot loader*

For all those who do not want to install both windows and linux but do not want to overwrite their windows MBR.

This trick can help a bit provided you have windows 2k or XP

When installing linux, choose to install boot loader on the root partition or /boot partition(if any).

When you boot into linux mount your windows C drive to some directory e.g. /mnt/C

Launch a terminal, su to root, change to the directory where C drive is mounted.

Type this command.

dd if=/dev/<drive where boot loader is istalled> of=bootsect.lnx bs=512 count=1

e.g.

dd if=/dev/hda3 of=bootsect.lnx bs=512 count=1

Then come back to windows.

Add this line to boot.ini file

C:\BOOTSECT.LNX="<Your distribution name>"


----------



## banned2wise (Jun 14, 2005)

*thinkdigit.com/forum/viewtopic.php?t=20306 ===> Linux linkz


----------



## ujjwal (Jun 15, 2005)

Ok here is a neat trick I found at the arch forums.

We know that linux filesystems handle data operations well so there is no need of defragmentation. But when there is frequent writing to a certain directory the data may get fragmented. A common example is the database used by a package manager (pacman, apt-get, slapt-get, emerge, yum etc). This may cause accessing data to be slow, and (in this case), querying the package manager will take time.

But there is an easy way to rearrange the data so that its all in one place.

Say, the directory is called "blimp".


```
cp -r blimp blimp2
rm -r blimp
mv blimp2 blimp
```

So as you can see, a fresh copy of the directory is created, and the newly created files are not fragmented. The old (fragmented) directory is removed, and the new one is renamed to the name of the old directory.

Credit goes to *bbs.archlinux.org/viewtopic.php?t=11840


----------



## banned2wise (Jun 18, 2005)

Intro for linux uploaded @ rapidshare.de
 ==> Download here <==

100 tips and tricks(common) for linux uploaded @ rapidshare.de
 ==> Download here <==


----------



## banned2wise (Jun 19, 2005)

The Linux Documentation Project Archive

```
*www.tldp.org/linuxfocus/English/Archives/index.html
```

Its very useful for newbies like me.


----------



## banned2wise (Jun 20, 2005)

Source


Question:
I have Red Hat 9, and it's XMMS player don' t want to play mp3'z. At first time it showed some message, that this player doesn't support mp3 for some reazon.

Answer:
www.freshrpms.net search around quicker if you click here


This is a common question many ppl tend to ask @ the forums. 

Courtesy : LQ Forums


----------



## banned2wise (Jun 27, 2005)

To clear history in the bash shell type

```
[root@localhost root] $ history -c
```

I also suggest linux users and mods to be active this thread by posting a command a day ..... Newbies will find it useful(count me in tooo)


----------



## ujjwal (Jun 27, 2005)

Some ways to search for files -

1. Locate

A database of all files present in your system is maintained in a GNU/Linux system, this makes it easy to locate a file when you need it.


```
locate filename
```

However, this will show only those files which were present on your system the last the database was updated, to update the database, run as root -


```
updatedb
```

2. Find

find will search an area of the filesystem for a file you need. It is slower, but its a surer way to get your files.


```
find /directory/to/search -name filename
```

The basics of vi

vi is a very handy text editor, and many a times it is all one has to edit a file from console. Knowing its basics can be helpful.

By default when you start vi (vi <filename>), you are in "command" mode, and you can't write something yet. Hit _ to enter insert mode, and <ESC> to exit from it. In command mode, <x> will delete a charactor and <dd> will delete a line. Hit ':' (shift + ';' key) to get a prompt, from where you can type 'w' to save, 'q' to quit, 'wq' to save, 'q!' to quit without saving.

There are full books on vi, but this is just a very basic intro to just explain what is needed to edit files with it.

REQUEST : If anybody has a few good tips on using the samba client (smbclient) that will be very helpful._


----------



## ujjwal (Jun 27, 2005)

If someone wants to try out downloaded knoppix based live linux cd's, without burning them to a CD, this is a good way, which uses the DOS based loadlin tool. This one is intended for Damn Small Linux, but should work for all knoppix based distro's. I tried it and it works beautifully.

*www.damnsmalllinux.org/talk/node/191


----------



## banned2wise (Jun 27, 2005)

Loadlin for dsl page 
I really should say, cool ....

Samba config, ebook.... Please check whether it covers what u wanted ... 

```
Configuring Samba ==> *rapidshare.de/files/2631299/Samba_configuration.pdf.html
```


----------



## GNUrag (Jun 27, 2005)

* Navigating quickly in bash *

1) Press * CTRL - L * to clear your screen immediately (better than entering "clear" command everytime)

2) Press * CTRL -  K * to cut the characters from the cursor till the end of a line

3) Press * CTRL -  U * to cut the characters from the cursor till the starting of a line

4) Press * CTRL -  Y * to paste the characters that  you have cut just now.


----------



## mario_pant (Jul 6, 2005)

*www.thinkdigit.com/forum/viewtopic.php?t=24162

someone please help me!!....

how do i restore windows without any data loss..... GRUB just wont load my windows.......


----------



## QwertyManiac (Aug 2, 2005)

one trick to remove linux boot menu, install osl2000 boot manager and uninstall it immeadiately, thats it MBR fixed ! (remove the hdd data using windows disk manager).

Hahahaha

I like linux but follow this for removing it to install some other linux version and just for throwin myself in to trouble.


----------



## Vishal Gupta (Aug 2, 2005)

W can also remove Linux Boot loader by using following command:

*fdisk /mbr*


----------



## QwertyManiac (Aug 6, 2005)

I know that, i told osl for those scared to use FDISK...


----------



## ujjwal (Aug 11, 2005)

If you are concerned about speed of applications (using shared libraries) under linux (especially load time), you will surely be interested in prelinking.

*www.crast.us/james/articles/prelink.php
*www.celinuxforum.org/pubwiki/moin.cgi/PreLinking


----------



## Vishal Gupta (Aug 18, 2005)

Guys! I'm not an expert in Linux, but I hv some Tips-n-tricks for it, which I hv collected from Many DIGIT issues, websites and some from my own experiences. Here I'm sharing them.
Many of them may be already discussed or u guys already know them, but I'm putting some of them here. May be these can help some members:

*1.) To access FAT partitions in Red hat linux:*

Open */etc/fstab* file and append following lines:



> /dev/hda1	/mnt/C	vfat	defaults	0 0
> /dev/hda5	/mnt/D	vfat	defaults	0 0
> /dev/hda6	/mnt/E	vfat	defaults	0 0



*NOTE:* Here hda1 denotes C: drive, hda5 denotes D: drive, similarly hda6 for E: drive and so on...
C, D and E are the directories name, which u hv to create in /mnt directory, it can be any names.
Remember to add an extra line at end of this file!

*2.) To enable / disable services to be start at system startup:*

In Console, type *Setup*.

*3.) To configure GRUB loader:*

U can edit */etc/grub.conf* file to change settings of GRUB loader.

*4.) To enable 32-bit I/O of Hard Disk:*

In console, type *hdparm -c1 /dev/hda*

*5.) To enable DMA of Hard Disk:*

In console, type *hdparm -d1 /dev/hda*

*6.) To see messages that r displayed at boot time:*

In console, type *dmesg*

*7.) To crate Rescue Disk:*

In console, type *mkbootdisk <kernel_version>*

*8.) To set <ctrl>+<alt>+<del> working in Linux:*

Open */etc/inittab* file and append following line:



> ca:ctrlaltdel:/sbin/shutdown -t3-r now



*9.) To change SPLASH screen of KDE:*

Goto: */usr/share/apps/ksplash/pics* directory, here u'll find some PNG files, u can edit them for ur desired result.

*10.) To change SPLASH screen of GNOME:*

Goto: */usr/share/pixmaps/splash* directory, here u'll find some image files, u can edit them for ur desired result.

*11.) Location of Login screen of GNOME:*

Goto: */usr/share/gdm/themes* directory, here u'll find Directories, which contain different Login screens images, that u can set into Control Panel. Here u can also add ur cutom Login screen or can edit existing!

*12.) To reinstall GRUB Loader:*

Boot using Linux Setup CD, and type *Linux Rescue* at terminal, then after some steps u'll enter into console, here first type:
*/mnt/sysimage*, and then type:
*grub-install /dev/hda*
Now u can exit from console...

ENJOY!!!


----------



## QwertyManiac (Aug 19, 2005)

@vishalgupta
Cool Post man, thnx for the one place stop shop for a lot of tricks or tips...
Keep it UP up and above...


----------



## niranjan_mcarenyold (Aug 30, 2005)

*dos shortcuts*

hi all,


  those who are tired of windows and crossover to linux and firstly try console may try the dir command at first. even though we get the same as windows but ls more powerful than that one. 

  by mistake also u try dir instead fo ls. to get rid of it simply follow this steps and even if u type dir u will get the power of ls. try this for some of your commands as and alias.

  for ls:

  open vi editor with the file name 'dir';
  type ls in the first line and save and exit.
  them chmod dir 777 to make the file executable.
  then copy/move the file into /usr/bin directory or the user bin diractory.

  and when ever u type dir you will execute the ls command itself. and do same for your favourite commands until u adictacted to the console commands.


----------



## Satissh S (Aug 30, 2005)

Change your login manager to KDE 
*www.thinkdigit.com/forum/viewtopic.php?t=27467&highlight=


----------



## praka123 (Oct 23, 2005)

For gnome esd sound problems;i simply do this:


```
$gconftool-2 --type boolean --set /desktop/gnome/sound/enable_esd false
```
My 2Cents


----------



## praka123 (Oct 29, 2005)

Many are irritated my newer GNOME nautilus not opening as browser interface,if u double click on icons.hmm....i am not 100% sure but u can try opening nautilus always as browser by

```
prakash@debian:~$ gconf-editor
```
in gconf GUI browse to apps>nautilus>preferences>tick 'always_use_browser' .
that's it.I tried with my RHEL 4 and DEbian SArge and got it working.


----------



## desertwind (Oct 29, 2005)

A better way is open Edit>Preferences in nautilus.
Go to Behaviour tab and check "Always open in browser windows".


----------



## ujjwal (Oct 31, 2005)

If you are interested in console commands/tools which can make your work easier, the CLI Magic series from Linux.com will appeal to you -

*www.linux.com/search.pl?tid=89


----------



## desertwind (Oct 31, 2005)

Those who have trouble mounting windows partitions by editing fstab file, just install this rpm. it searches for fat/ntfs partitions in your system and mounts it automatically, and add entries to fstab.

*forums.pcquest.com/forum/files/mountpartitions-1.0-0.i386_953.rpm


----------



## abhinav (Nov 3, 2005)

thanks guyz ,
this thread is useful
thanks for sharing


----------



## shlok (Nov 10, 2005)

For protecting against local root hack [if you share your computer physically], following maybe useful [only for grub boot loaders]:
1. Make access to grub at boot prompt password protected. To do this -
a. login as root {su}
b. get grub shell {/sbin/grub}
c. grub> md5crypt
password: *******
Ecnrypted: #$%#$fewfwer34534^%$^%
grub> quit
d. Copy the encrypted string and put it into /etc/grub.conf as:
#====>
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 #$%#$fewfwer34534^%$^%
title Red Hat Linux
#<=====
i.e. between Splash and Title.
e. Now your boot loader grub is password protected.

2. For further blocking of root access in single user mode, following can be additionally implemented. But a word of caution, this needs the root password to be remembered. It's a must. I think, even if someone removes hard-disk, it will not allow root access. I have not tried using boot-CD, if this can be bypassed. If someone tries, please post and let all know. Anyways, the method is as:
a. Login as root {su}
b. Include following line in /etc/inittab :
~~:S:wait:/sbin/sulogin
You can try tip [2.] even without enabling grub password protection. After above change, the system will always ask for root-password before login, even in single user mode. If not provided [Ctrl-D] it would simply enter multi-user graphical mode [run-level 5] or other default mode/run-level.


----------



## praka123 (Nov 11, 2005)

*Fonts on GDM login screen are too small*

This happens to be  a problem in many distros especially Debian and Ubuntu.
First need to get correct dpi (Dots per inch). for that issue:


```
prakash@ubuntu:~$ xdpyinfo | grep dimen
```
for mine it is a 15' Samtron 56V monitor:


> root@ubuntu:/home/prakash/Downloads# xdpyinfo | grep dimen
> dimensions:    800x600 pixels (212x159 millimeters)



get in inches:
212/10/2.54=8.346456693 =8.35
divide :
800/8.35=95.808383234 =96 dpi for mine (normally for most)

as root open any editor:

```
root@ubuntu:~# vi /etc/gdm/gdm.conf
```

go to the end of the file and get those lines starting as 
"command=/usr/X11R6/bin/X....." 
append the dpi to the end of the lines.
eg:
 command=/usr/X11R6/bin/X -br -audit 0 -dpi 96
and as root


```
debian# /etc/init.d/gdm reload
```

thats it! fonts will be bigger


----------



## praka123 (Dec 7, 2005)

For enabling COMPLETE bash completion features in UBUNTU/DEBIAN.(provided bash-builtin package already installed) run:

```
. /etc/bash_completion
```
 in home dir.
or u can try this script in /home/xxx/.bashrc.(already in Ubuntu)

```
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
. /etc/bash_completion
```


----------



## praka123 (Jan 24, 2006)

If YOU want to see the boot messages in b/w flashing rhrough ur screen at very high speed.U can try enabling bootlogd.remember though few distros got this working.In my debian Sarge GNU/Linux 3.1.I tried as below enabling bootlogs with 'Yes'  Succeded
	
	



```
suryan:~# vim /etc/default/bootlogd
# Run bootlogd at startup ?
BOOTLOGD_ENABLE=Yes
```
I learned from web that bootlogd needs to be started before udev for bootlogd to work.I manually changed as below

```
mv /etc/rcS.d/S05bootlogd /etc/rcS.d/S03bootlogd
```
And I restarted and checked to sure that there is bootlog in  /var/log/boot
So U may try this in Debian Sarge.I dont know if it works in Ubuntu etc..as this essentially is a Hack  
My eg:





> Tue Jan 24 20:59:31 2006: bootlogd.
> Tue Jan 24 20:59:31 2006: Mounting a tmpfs over /dev...done.
> Tue Jan 24 20:59:31 2006: Creating initial device nodes...done.
> Tue Jan 24 20:59:31 2006: ^[%GSetting parameters of disc: (none).
> ...


Best of LUX


----------



## Satissh S (Feb 12, 2006)

*How to Recompile and install a new kernel.*

*How to Recompile and install a new kernel.*
Recompiling and installing a kernel is often a fearsome experience for a linux newbie, here are easy to use (shampoo bottle) instructions for doing so.

1. Download the Linux kernel from the linux kernel website, currently Linux Kernel 2.6.12 (as of feb 2006)

*www.kernel.org

2. Extract the .Bz2 (BZip2) archive to /usr/src/, by doing the following.
Open a terminal, if you are in graphical environment or if it's your login shell, just continue.
Remember, You must be of group wheel to su in.

$ su
(root password)

# cd /usr/src
This moves you to /usr/src directory.

# tar -xvjpf <downloaded file location>/linux*.tar.bz2
This extracts the bz2 image to the /usr/src directory. Substitute the <downloaded file location> with the location of your file.
Now, we have to update the linux symlink for your earlier kernel to our new kernel source.

# rm linux

# ln -s linux-2.6.12* linux

this -s option instructs the ln command to create a symlink instead of a hard link. Make sure that the new link points to your new kernel.
Now, cd into directory and make the kernel.

# cd linux

# make menuconfig 

This fires up a n-curses based menu that performs the kernel configuration. Here, I have nothing to do. Browse each option and take your time to fully read the help associated with each option. The commands lspci and lsmod can help you identify hardware info if you have installed pciutils package. Additionally you can also view boot messages for help, using dmesg. You can either compile stuff into the kernel using brutal compilation or compile stuff as modules in a more subtle way.

A few keystrokes to help you,
[Enter]          --> Activate Current Item
[Esc]             --> Go backwards
[Tab]            --> Toggle through the interface.
/                   --> Search
? ([shift] + /) --> Help for the associated item.
With item Selected,
Y                   --> Compile into kernel
N                   --> Donot Use the Item in the kernel.
M                   --> Compile as Module which you can insert, remove using insmod, modprobe commands.

Sometimes it opens up a submenu there you can either walk around using Arrow keys and select the stuff or type if it's a text input box.

After doing all your work, Go to the top most hierarchy and select [Exit] and select [yes] to save your config.
After you are dropped in the terminal, do the following. 

# make

# make modules_install

This creates a hot new bz kernel for you to use. Copy it to the /boot partition using the following commands.

# cp arch/i386/boot/bzimage /boot/newkernel

Now, update your boot loader for booting with the new kernel, for example create new section in /boot/grub/grub.conf or in /boot/grub/menu.lst as,

# emacs /boot/grub/grub.conf

title newkernel26
root (boot partition in boot loader lingo) // Example (hd0,0)
kernel /boot/newkernel root=/dev/hda* (your root partition)

Save and close.
Now, you can boot your new kernel from the boot time. Enjoy Linux!! 

Edit: a small mistake corrected.


----------



## desertwind (Feb 13, 2006)

Wow! Thats a clean and lean tutorial. Must be a great help for n00bies.

I got this information from the cinelerra documentation.

*SPEEDING UP THE HARD DRIVE*

This is a very popular command sequence among Linux gurus, which is not done by default on Linux distributions.


```
$ hdparm -c3 -d1 -u1 -k1 /dev/hda
```

-c3 puts the hard drive into 32 bit I/O with sync. This normally doesn't work due to inept kernel support for most IDE controllers. If you get lost interrupt or SeekComplete errors, quickly use -c0 instead of -c3 in your command.

-d1 enables DMA of course. This frees up the CPU partially during data transfers.

-u1 allows multiple interrupts to be handled during hard drive transactions. This frees up even more CPU time.

-k1 prevents Linux from resetting your settings in case of a glitch.


----------



## Satissh S (Feb 13, 2006)

I got this from gentoo docs to speed up disk access as well as to activate DMA mode
To test the disk,
# hdparm -tT /dev/hda

To activate safe performance options,
# hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda

To activate DMA Alone,
# hdparm -d 1 /dev/hda


----------



## Gregory (Apr 10, 2006)

*Edit by Deep: Start new thread for new queries please*


----------



## Satissh S (Apr 14, 2006)

Fc5 has irritating alias settings for the root user,
like rm is aliased with rm -i and mv is aliased with mv -i and like that.
This sometimes is very irritating when used on directories with -R option as it asks you for every file. 
Check your alias settings with the alias command,
*# alias*
/**.. 
stuff
..*/

To get rid of this, 
change the rm using
*# alias rm='rm' *
and you can change back to the old by issuing 
*# alias rm='rm -i' *
if you like the old settings.


----------



## vignesh (May 9, 2006)

Thats beacuse a root user has ultimate control over the system so the interactive mode is set so he can think again before deleting or moving a files...Its been in all versions of Fedora and Redhat not only in FC5..I think its a good thing not a irritating feature


----------



## gary4gar (Jun 27, 2006)

DISplay splash images in grub menu


e.g. Assumed that hd0,1 is the location of Ubuntu boot partition
wget -c *easylinux.info/uploads/ubuntu.xpm.gz
chmod 644 ubuntu.xpm.gz
sudo mkdir /boot/grub/images
sudo cp ubuntu.xpm.gz /boot/grub/images/
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst

    * Find this section 

# menu.lst - See: grub(8), info grub, update-grub(8)
#      grub-install(8), grub-floppy(8),
#      grub-md5-crypt, /usr/share/doc/grub
#      and /usr/share/doc/grub-doc/.
...

    * Add the following line below it 

splashimage (hd0,1)/boot/grub/images/ubuntu.xpm.gz

    * Save the edited file 


 How to convert Wallpaper to Splash Image for GRUB menu

    * Read #General Notes 

    e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image 
    splashimage.xpm.gz is the Splash Image for GRUB menu 

convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm

    * Read #How to display Splash Image for GRUB menu on boot-up (use splashimage.xpm.gz instead of ubuntu.xpm.gz) 

[edit]
How to temporary skip boot-up services

    * Read #General Notes 

Press 'Ctrl + C'


----------



## praka123 (Nov 7, 2006)

*Installing local .ttf fonts for viewing webpages in FF/Mozilla for view in ur LANG*

*Installing .ttf fonts in Debian/Ubuntu Linux locally *

First i downloaded Manorama.ttf(india malayalam language daily) from
 *www.hackorama.com/malayalam/fonts/
 then for present user,

 $cd ~.fonts
 $mkdir manorama
 Copy Manorama.ttf font into this directory
 then,

 $ttmkfdir > fonts.dir
 $ttmkfdir > fonts.scale
 $mkfontscale 
 $mkfontdir
 $xset fp+ $HOME/.fonts/manorama/
 $xset fp rehash
 Now do an
 $fc-cache  -fv
 Next step is to add the fontpath to our /etc/X11/xorg.conf last of font paths
like this:
> FontPath        "/home/prakash/.fonts/manorama/"
 Do a
> $fc-cache -fv


Now restart X and try watching in Firefox.
There are better ways to do this especially in redhat fedora.comments are welcome.
and for all users copy ur fonts to /usr/share/fonts/truetype/ dir and do "fc-cache -fv" as su
btwn apt-get install ttmkfdir before trying.


----------



## gary4gar (Nov 8, 2006)

well fedora we have to just put the fonts into the fonts folder(system>preferences>fonts) then there is a option for the font folder.easy as pie


----------



## mehulved (Nov 8, 2006)

Can't we do that in Ubuntu by opening Nautilus as sudo and typing fonts:/ and placing the fonts there?


----------



## mediator (Nov 8, 2006)

Some contribution from me too!

*Converting media files* 

1. Wav to ogg
cmd =>  "*oggenc inputfile.wav -o outputfile.ogg*"

2. ogg to wav
cmd => "*ogg123 -d wav -f outputfile.wav inputfile.ogg*"

3. wav to mp3
cmd => "*lame IPfile.wav -o OPfile.mp3*"

It requires u to install lame!


----------



## praka123 (Nov 8, 2006)

tech_your_future said:
			
		

> Can't we do that in Ubuntu by opening Nautilus as sudo and typing fonts:/ and placing the fonts there?


 i think yes.this hw2 was made by me sometime back.
but earlier nautilus seems to me little buggy with font install.now also the fonts will be shown only after a restart i believe.otherwise u need to check $HOME/.fonts/ for correct install of fonts..


----------



## praka123 (Dec 5, 2006)

*GNOME Refresh Screen button*

To have a Refresh Screen in GNOME Desktop,you can add 
	
	



```
xrefresh -white
```
...the code into a new launcher in gnome-panel.
or make a script executable into your nautilus-scripts folder


----------



## drsethi (Jan 6, 2007)

For newbies of Suse10.2 
You should add guru's site and packman's site to yast and kyum respectively
*ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2/
*packman.iu-bremen.de/suse/10.2/

How
*www.linuxquestions.org/questions/showthread.php?t=509097
*www.thejemreport.com/mambo/content/view/254
Copy installation cd/dvd on hard disk and add it to  yast installation source.
If already have rpms then make a directory and copy all in that directory . Add this directory to yast installation source.
Dont forget to install w32codec and libdvdcss
Now update your system and enjoy Suse fully!


----------



## freebird (Mar 1, 2007)

for audio files preview in Nautilus(GNOME default file manager),install mpg321.this is found working on Debian and Ubuntu Distros.


----------



## praka123 (Apr 28, 2007)

*My two Tips!*

two tips from me 
1)In GNOME(possibly kde and other Desktop Environments too) if some window is very large and it's radio buttons are not accessable to you(not visible),You can get it in GNOME by pressing keyboard ALT key + pressing left mouse button on the software window to move it up or down to get its radio buttons or options.normally i think this problem is faced by ppl having Display resolution lesser than 1024x768.


2) For downloading Linux torrents you can try this site as of now it is free reg:
*www.linuxtracker.org/

And for some people _who are uninitated yet_: 


> In the X Window System, middle-clicking by default pastes the contents of the primary buffer at the pointer's position. Many users of two-button mice emulate a three-button mouse by clicking both the right and left buttons simultaneously. Middle-clicks often provide the functionality of an extra button.
> .................
> 
> On systems with three-button mice, pressing the center button (a middle click) often conveniently maps a commonly-used action or a macro. In the X Window System, middle-clicking by default pastes the contents of the primary buffer at the pointer's position. Many users of two-button mice emulate a three-button mouse by clicking both the right and left buttons simultaneously. Middle-clicks often provide the functionality of an extra button.
> Most machines running Unix or a Unix-like operating system run the X Window System which almost always encourages a three-button mouse. X numbers the buttons by convention. This allows user instructions to apply to mice or pointing devices that do not use conventional button placement.


 *en.wikipedia.org/wiki/Mouse_%28computing%29
also u can grab a selected text from browser or editor etc to desktop to make a text document.
 by selecting text from anwhere and pressing mouse left button dragging to desktop  
yes drag-n-drop.
::happy::


----------



## sachin_kothari (May 20, 2007)

banned2wise said:
			
		

> Intro for linux uploaded @ rapidshare.de
> ==> Download here <==
> 
> 100 tips and tricks(common) for linux uploaded @ rapidshare.de
> ==> Download here <==


 The files have probably been removed. Could u please upload them again. Thanks.


----------



## pravesh_4766 (Jun 19, 2007)

dear jo tumne bataya hei its known as single user mode


----------



## anantkhaitan (Jun 20, 2007)

Task Manager kinda setting for Gnome

1> Open Terminal

```
$ gconf-editor
```

2> Navigate to apps>metacity>keybinding_commands and edit an empty key (Like I am dealing with "command_1") and set its value to _gnome-system-monitor_

3> Now navigate to apps>metacity>global_keybindings and edit the key corresponding to the keybinding_command you have edited earlier (In my case it is "run_command_1") and set its value to _<Control><Alt>Delete_

4> Thats it, close everything and enjoy

Btwn I have a question what do we call the "Windows Button" in GNU/Linux


----------



## mehulved (Jun 20, 2007)

anantkhaitan said:
			
		

> Btwn I have a question what do we call the "Windows Button" in GNU/Linux


 super


----------



## QwertyManiac (Jun 20, 2007)

yes, use <super>


----------



## praka123 (Jun 22, 2007)

For tips and tricks on GNOME Desktop Environment visit:
*gnome-hacks.org/

example hack: 
Type ☰★cool★☰ Unicode ch☣r☣cters in ☃GNOME☂


> Yes, you too can type cool Unicode characters in your posts, e-mail, signature,
> blog, blog comments, etc, using GNOME!
> 
> 1. Start Accessories/Character Map(gucharmap)
> ...


  *gnome-hacks.org/hacks.html?id=76

Many People now adopts debian-based distros for its stability and apt-dpkg package management tools.
So below is the online version of "Ubuntu book" by Benjamin Mako Hill, Jono Bacon, Corey Burger, Jonathan Jesse and Ivan Krstic.it is licensed as creative commons share a like.Enjoy this book.it explains you most things a new Linux user are confused with for egartitioning.
*www.prism.gatech.edu/~mflaschen3/UbuntuBook/


----------



## topgear (Jul 26, 2007)

To Reduce and Increase the gamma of your display
in linux use this command:

To Know about your displays current gamma status:

```
xgamma
```

To reduce

```
xgamma -gamma 0.60
```

To Increase

```
xgamma -gamma 0.95
```

To know more about xgamma:

```
xgamma help
```

Source : Ubuntu 7.04 Help docs but I am currently Using it on fc7


----------



## praka123 (Jul 26, 2007)

*networking tip*

A good Tip for faster browsing for frequent visited sites.



> *Browser Speed*
> If you’re like me, much of your daily surfing involves the same sites. Linux is, for the most part, faster at reaching those sites. However, a fundamental element of the Linux OS can make your surfing slower than it might normally be.
> Your browser uses the Domain Name Server (DNS) you listed in your network settings to resolve common domain names (yadda.com - no “www”) to IP addresses, the _real_ address of a web site. However, this DNS server may be a few hops away from your location on the Internet. That means it takes a bit more time to reach the site you want to surf than it might take if, say, the IP address was listed somewhere on your machine. That’s exactly what this tweak does - adds the IP address of your most surfed sites directly a file on your machine, the /etc/hosts file.
> First, open a console window, and ping your favorite site:
> ...


 hope it helps may be u can try loading thinkdigit faster? 
Also u can use nslookup for sites if dnsutils is installed.
*www.lockergnome.com/nexus/linux/2002/01/15/browser-speed/


----------



## topgear (Aug 3, 2007)

To Know about certain system information type in terminal:

```
uname -a
```
*Shows all information about your linux box*

```
uname -s
```
*Shows the kernel name*

```
uname -n
```
*Shows the network node host name*

```
uname -r
```
*Shows the kernel release*

```
uname -v
```
*Shows the kernel version*

```
uname -m
```
*Shows the machine hardware architecture*

```
uname -p
```
*Shows the processor type*

```
uname -i
```
*Shows the hardware platform*

```
uname -o
```
*Shows the operating system*

```
uname --version
```
*Shows version information and exit*


----------



## skghosh44 (Aug 3, 2007)

I have copy paste this whole thread to open office write. But it takes to much time to open after opening it in open office whenever I scroll the page it stops responding after 5/6 minute it appears. There fore it is not possible to go through the file and I cannot access the file through Windows. However if I copy paste it
in MS Office(word) through Windows it is easily run.


----------



## praka123 (Aug 3, 2007)

*Controlling runaway processes on Linux*




> Sometimes, buggy memory hogs can choke your machine. Here, two tricks: one to recover from a memory choke, another to prevent memory chokes forever.
> 
> *Misbehaving application frozen?*
> 
> Has an application stopped responding on your machine? Well, as long as your machine is still responsive, you can use these tricks to nuke it safely.


 ^ read the article in full for *average/experianced* users.  Is a nice read  on alternate mechanisms for controlling buggy apps,hangs.


----------



## vish786 (Sep 11, 2007)

*HOWTO: Install Ubuntu Linux without burning a cd*

* HOWTO: Install Ubuntu Linux without burning a cd*

*ubuntuforums.org/showthread.php?t=28948


----------



## skghosh44 (Sep 13, 2007)

How create luncher in Kubuntu 7.04 ?


----------



## mehulved (Sep 14, 2007)

Install and boot 145 OS's in a PC - *www.justlinux.com/forum/showthread.php?threadid=147959
Some of them are windows and DOS, too.


----------



## amitsurana (Sep 18, 2007)

Quickest way to create ISO file of any CD. 

type the following command in terminal after inserting CD in drive. 

#cat /dev/cdrom > ISO_file_name.iso

yes u r rite this is done by "cat" command which v use daily.


----------



## vish786 (Sep 18, 2007)

mehulved said:
			
		

> Install and boot 145 OS's in a PC - *www.justlinux.com/forum/showthread.php?threadid=147959
> Some of them are windows and DOS, too.



but what is he tring to prove, that kernel can support more number of root partition. ??


----------



## SunnyChahal (Oct 2, 2007)

guyz ,i have not installed my graphix drivers on linux and it is working slow and sloppy?
is it due to GRAphix deivers or ne other probs?
the intel drivers also not work on linux for Dual core 945.
where can i get those for linux.
BTW i am using linux mint.


----------



## SunnyChahal (Oct 2, 2007)

@admin  .please delete all the posts below.
sorry a big mistake.


----------



## praka123 (Oct 21, 2007)

*help.ubuntu.com/community/BurningIsoHowto
*BurningIsoHowto*


----------



## praka123 (Nov 6, 2007)

*64-bit Help*

*Solution for using 32Bit flash plugin on 64Bit debian etch. nspluginwrapper is also available for other distros.*
*Unofficial nspluginwrapper & ia32-libs-gtk packages for Etch*

 ----------------------------------------------
 First things first, as root:

Add repository to sources.list:
echo "deb *www.dipconsultants.com/debian etch main" >> /etc/apt/sources.list 

apt-get update
Install the keyring so you're not bothered with key/verification warnings:
apt-get install markybob-keyring

apt-get update  once more
Install what you want:  
apt-get install ia32-libs-gtk nspluginwrapper

If you're looking to install Flash in a 64-bit browser: 
*( Do *every* step listed above, then the following as a *user*, **not root: ) important*

wget  *fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz
tar -zxf install_flash_player_9_linux.tar.gz
mv install_flash_player_9_linux/flashplayer.xpt install_flash_player_9_linux/libflashplayer.so ~/.mozilla/plugins/ 
nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so
Start/restart iceweasel/firefox/whatever
Enjoy, Etch 64-bit users, from the guys at *www.dipconsultants.com/debian/
source:from ilug-cochin mailing lists.Hope it helps 64-bit users


----------



## Gigacore (Nov 16, 2007)

after some googling, i found this site bit useful.. it has video tuts, tips and tricks etc..

www.linuxgalore.com


----------



## vish786 (Nov 18, 2007)

*ftp-poisk.kiev.ua/156/

Sub Link for distro's


----------



## praka123 (Dec 6, 2007)

*Cron+GUI applications launching*

*Launching X applications in Cron*
vixie-cron or at will not allow X applications to be scheduled to work.the solution is to add the *DISPLAY* environment variable to the crontab list.
Here,for eg i am scheduling my Debian box to launch *broadband* ON and Azureus Java Client also launched at 2:02AM 
open gnome-terminal and run:

```
crontab -e
```
 then for me,

```
# m h  dom mon dow   command
2 2   6   12  4      pon dsl-provider
2 2   6   12  4      DISPLAY=:0.0 /home/prakash/azureus/azureus

58 7  6   12  4     poff
```
thus,internet connection and Azureus or any X client to be launched,which normally Cron does not allow.
the DISPLAY variable for me and for most are  ":0.0",but you can make sure by running below command in terminal

```
echo $DISPLAY
```
 ^add this value in crontab.now run:

```
crontab -l
```
 for scheduled apps.

Hope this helps,especially those who schedules dataone for download torrents from 2AM-8AM 

another way is to use 
"xhost+" to disable X  acl.


----------



## coolpcguy (Dec 20, 2007)

*Mounting .iso and .mds/mdf Files in Linux*

There are lots of times where you’d want to mount a CD/DVD image. Say your friend who uses his Windows box has given you a .iso file or a .mds/mdf file, created using Alcohol 120%. How would you mount them in Linux? Using the Terminal and making use of the loop device,there is no need for any external software tools and utlities.
 Here’s the steps:
Open the Terminal/Console.
Switch to root user(mounting more often than not requires root privileges, we’ll have a look as to how make media user-mountable later) by typing *su root* *buntu users and others distros in which the root account is disabled, can skip this step.
Type mount -o loop -t iso9660 /windows/movies/movies.mdf  /movies/    For users of distros where root account is disabled(like Ubuntu) prefix sudo to the above. So the command is sudo mount -o loop -t iso9660 /windows/movies/movies.mdf  /movies/
If the above command looks confusing,it’s pretty simple!  Let’s dissect it.
 mount command is pretty obvious, it’s the commnad used for mounting storage media and images of storage media.
 -o loop(note that o is the letter o not the numeral zero, ie, 0) instructs the mount command to use the loopback device. -o stands for option, loop indicates loop back device. Intuitive, ain’t it?
 -t iso9660 instructs the mount command that the image is of iso9660 format.
 The next argument is the path to where the .mdf file is located.
 The last argument is the path to which directory the media must be mounted.
 The image below shows an example.
*sathyasays.com/wp-content/uploads/2007/12/mount.thumbnail.jpg​ If all goes well, you shouldn’t be getting any messages, as in the image. For .iso files, the steps are the same, just replace the .mdf file by the .iso file. The above method should work for CloneCD’s .ccd and Nero’s .nrg files(I remember it worked long time ago, not so sure though, if anyone can confirm this it’d be great!)​


----------



## silent008 (Dec 21, 2007)

*Re: Mounting .iso and .mds/mdf Files in Linux*

*Tip to backup ur MBR*

u can even backup ur MBR in linux.
at console type

*dd if=/dev/sda of=/home/<ur home dir>/mbr_backup bs=512 count =1*
Replace sda by ur device where bootloader is installed
out of 512 bytes that it will copy 446 bytes are for the boot sector and remaining for the partition table. 

To restore ur MBR, after booting through a live disc,simply type at the console
*dd if=<ur bckup file path> of=/dev/sda bs=512 count=1*
Again sda is ur drive where bootloader is installed

*Run these command as root*


----------



## Faun (Dec 21, 2007)

*Re: Mounting .iso and .mds/mdf Files in Linux*



			
				silent008 said:
			
		

> *Tip to backup ur MBR*
> 
> u can even backup ur MBR in linux.
> at console type
> ...


restoring whole MBR may destroy your partitions (if u hav recently repartitioned ur drive after making a backup of whole MBR).

So its better to backup only boot information and not partition info.
*farm3.static.flickr.com/2265/2107306410_c1c400ede5_o.png
Correct me if am wrong


----------



## silent008 (Dec 21, 2007)

*Re: Mounting .iso and .mds/mdf Files in Linux*



			
				T159 said:
			
		

> restoring whole MBR may destroy your partitions (if u hav recently repartitioned ur drive after making a backup of whole MBR).
> 
> So its better to backup only boot information and not partition info.
> *farm3.static.flickr.com/2265/2107306410_c1c400ede5_o.png
> Correct me if am wrong


yes it is true that is why it has been specified that bootsector size is 446 bytes.
Simply replace 512 by 446


----------



## coolpcguy (Dec 21, 2007)

*Changing Bootsplash in openSUSE10.3*

Alright so let’s have a look at how to change bootsplash screen. Note that this is written with openSUSE as the target distro, the same steps should work with all distros which have bootsplash package installed, if you don’t have it installed or are unsure if bootsplash is present, head over to *www.bootsplash.org/ and check it out.
Boot splash screens are the screens that show up when you’re booting up or shutting down Linux. Basically while Linux boots, there are 2 modes-silent mode and verbose mode. In silent mode only the picture is shown, while in verbose mode the pictures as well as boot up messages are shown.
The bootsplash actually is a theme. The theme file(or rather theme directory) is stored in /etc/bootsplash/themes/ directory. The theme directory consist of 2 more directories: images and config. In addition to these, the theme directory optionally has animations and bootloader directories/ The directory naming convention is self-explanatory so I will not go into more details into these.

So let’s get to the action and start changing!


Step 1: Get the theme!
You can get some awesome themes from *www.kde-look.org My personal favorites are Fingerprint and Tattoo’s Girl(search for them in the site mentioned above).

Step 2: Extract the file
After downloading the file(most likely to be in .tar.gz or in .bz2 format), extract the archive to your home directory.

Step 3: Copy to right directory
If you are using openSUSE(10.2 and above) then Click on the K Menu, and type Konqueror in the search box and select File Manager(Super User mode).
For other distros, open the terminal and type kdesu konqueror. Enter the root password when prompted. Browse over to /etc/bootsplash/themes/ and copy the theme directory to this directory.
Your theme directory should be as shown in the picture:
Step 4: Instruct bootsplash to use the new theme.
Click on YaST2, then on System and click on /etc/sysconfig editor. Then click on the “+” besides System, then on Boot and then on THEME. Under setting of theme text box type the name of the directory.


Step 5: Configure init to use the new splash screen
Open Konsole, switch over to root by typing su root and then enter mkinitrd. If all goes well, you should see the bootsplash: <theme name> (resolution) message as shown in the below screen shot.
Happy tweaking!

Note: While downloading themes, don’t forget to choose a theme which matches with the bootsplash screen resolution! Else instead of the splash screen, you will be greeted by boot up messages instead. For changing the boot splash resolution, Launch YaST, click on System, Boot Configuration, click on the entry for openSUSE and Click on Edit. At lower end you’ll see a box for VGA. In this, write the code for the required modes.
Resolution VGA Mode Number
640×480 785(16-bit), 786(24-bit)
800×600 788(16-bit), 789(24-bit)
1024×768 791(16-bit), 792(24-bit)
1280×1024 794(16-bit), 795(24-bit)


----------



## coolpcguy (Dec 22, 2007)

*Formatting a USB Pen Drive in Terminal*

Insert your USB pen drive. Let it get detected and mounted. Open Terminal. Type The Following commands
1. dmesg |tail –> here the ‘|’ key is the pipe, ie, the key before the backspace key(the upper one, so press shift)
You’ll get something like 

```
sathya@shaman:~$ dmesg |tail
[ 9921.681164] [B]sda[/B]: Write Protect is off
[ 9921.681174] sda: Mode Sense: 23 00 00 00
[ 9921.681178] sda: assuming drive cache: write through
[ 9921.709138] SCSI device sda: 4030464 512-byte hdwr sectors (2064 MB)
[ 9921.720951] sda: Write Protect is off
[ 9921.720963] sda: Mode Sense: 23 00 00 00
[ 9921.720967] sda: assuming drive cache: write through
[ 9921.721225] sda:
[ 9921.727896] sd 0:0:0:0: Attached scsi removable disk sda
[ 9921.744187] sd 0:0:0:0: Attached scsi generic sg0 type 0
```

Note the terms 'sda'. In your system it will be different, maybe sdb or something. Whatever it may be, make sure to substitute it in the commands below, else your hard disk may get formatted.
2. Unmount your pen drive by using

```
sudo umount /dev/sda
```
 (In your case, please substitute sda with the appropriate device, listed above.
3. use the mkfs.vfat command to format to FAT32 filesystem, or mkfs.ext3 to format to ext3 filesystem

```
sudo mkfs.vfat -n ‘Label’ -I /dev/sda
```
Replace Label with the name you want the pen drive to have.
4. That’s it! When done formatting, you’ll be returned to the prompt

```
sathya@shaman:~$ mkfs.vfat -n ’sathya’ -I /dev/sda
mkfs.vfat 2.11 (12 Mar 2005)
sathya@shaman:~$
```
Remove and insert the pen drive to have mounted again!


----------



## praka123 (Feb 12, 2008)

*chroot howto especially for Debian and ubuntu*

chroot is used in systems which is in really broken condition.
you can use chroot from a livecd or another distro on harddisk.
usage:
mount your broken linux partition:

```
mount /dev/sdx   /mnt
```
where /dev/sdx is the linux partition which is broken
now,

```
mount --bind /dev/ /mnt/dev/
```

now as root (or sudo in ubuntu etc),

```
chroot /mnt/ /bin/bash
```


```
mount /proc
```
that's it!now u can do the fdisk and other useful commands in chroot jail  
this is especially written for Ubuntu gutsy which needs to sync /dev/ inorder to show partitions.


----------



## gary4gar (Feb 12, 2008)

*Re: Formatting a USB Pen Drive in Terminal*



coolpcguy said:


> Insert your USB pen drive. Let it get detected and mounted. Open Terminal. Type The Following commands
> 1. dmesg |tail –> here the ‘|’ key is the pipe, ie, the key before the backspace key(the upper one, so press shift)
> You’ll get something like
> 
> ...


but this will erase all data on disk, Please give a warning atleast


----------



## vish786 (Feb 17, 2008)

*Recover deleted files from memory card*

*Recover deleted files from memory card

**goinggnu.wordpress.com/2008/02/14/recover-deleted-files-from-memory-card/


----------



## praka123 (Mar 1, 2008)

*gnome-dictionary shortcut setup*

adding gnome-dictionary shortcut as *CTRL+SHIFT+D* :
open a terminal(from menu Applications>Accssesories>Terminal) and run:

```
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "<Control><Shift>d"
```
and then:

```
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-dictionary"
```
Now try the key combination to launch gnome-dictionary.
u can add such shortcuts for some applications.also u can browse via "gconf-editor" graphically


----------



## vish786 (Mar 18, 2008)

*Transfer files with Bluetooth on Ubuntu*

*Transfer files with bluetooth on Ubuntu*

Link


----------



## praka123 (Mar 20, 2008)

*fast copying files :-*

Here:
*gentoo-wiki.com/TIP_Fast_Copy


> *The normal way *
> 
> To copy files recursively from src1/, src2/, to dest/ you do
> 
> ...


for complete tips for copying fast(for network etc) refer:
*gentoo-wiki.com/TIP_Fast_Copy


----------



## praka123 (Mar 23, 2008)

For *NVIDIA* graphics card based systems:-
Those using *Compiz/Fusion or Beryl may not want to enable below option*
Reason:
in order to avoid periodic short-term    freezes on beryl and other OpenGL intensive   programs.instead : (Option "UseEvents" "false")

To fix Xorg's CPU usage shootup when using NVIDIA driver:


> With many NVidia cards, when using a proprietary driver, xorg seems to freeze with high cpu usage. To fix this issue, add the below option to /etc/X11/xorg.conf under the Device section.
> 
> ```
> Option "UseEvents" "on"
> ...


source (redhat magazine):
*www.redhatmagazine.com/2007/11/20/...-cpu-usage-shoot-up-when-using-nvidias-driver

some options you would like to add when using "nvidia" driver(proprietary) :-


```
Option         "AddARGBVisuals" "True"
    Option         "AddARGBGLXVisuals" "True"
    Option         "NoLogo" "True"
    Option         "UseEdidDpi" "FALSE"
    Option         "DPI" "96 x 96"
```
use the dpi acc to the need.see "man nvidia-xconfig" for more info .


----------



## VINSTAR (Apr 3, 2008)

Booting tips and tweaks click here


----------



## gary4gar (Apr 12, 2008)

*Get Max Of Apt-url, Let Firefox be your app installer*
Here's a trick: 
1) In Firefox, click Bookmarks->Organize Bookmarks. 
2) Click New Bookmark. Under location, type 
	
	



```
apt:%s
```
3)Under keyword, type "install" without the quotes. From then on, you can install software from inside Firefox by typing "install (package)"

To install istanbul Desktop session recorder
simple type this in location bar

```
install istanbul
```

pretty useful for me atleast,as Firefox is always open in my pc.
so no need to open Synatic separately


I learned it on Digg


----------



## gary4gar (Apr 13, 2008)

The live cd list
*www.frozentech.com/content/livecd.php

make your own live cd
*www.linux-live.org/

The Linux Gamers' Game List
*www.icculus.org/lgfaq/gamelist.php?license=free


----------



## Faun (Apr 19, 2008)

Gnome users run this command and see wanda swimming on the screen 



> free the fish


----------



## shady_inc (Apr 20, 2008)

To ensure that a file can't be deleted even by a root user, use the following command as root:
chattr +i <filename>
To make it deletable again use:
chattr -i <filename>


----------



## topgear (Apr 21, 2008)

*To view information about your Optical ( ie. CD/DVD ) Drive issue this command :*


```
cdrecord -prcap
```


output of the cdrecord -prcap command for example :

_
Device was not specified. Trying to find an appropriate drive...
Detected CD-R drive: /dev/cdrw
Using /dev/cdrom of unknown capabilities
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identification : 'DVDRAM GSA-H10N '
Revision       : 'JL12'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Drive capabilities, per MMC-3 page 2A:

  Does read CD-R media
  Does write CD-R media
  Does read CD-RW media
  Does write CD-RW media
  Does read DVD-ROM media
  Does read DVD-R media
  Does write DVD-R media
  Does read DVD-RAM media
  Does write DVD-RAM media
  Does support test writing

  Does read Mode 2 Form 1 blocks
  Does read Mode 2 Form 2 blocks
  Does read digital audio blocks
  Does restart non-streamed digital audio reads accurately
  Does support Buffer-Underrun-Free recording
  Does read multi-session CDs
  Does read fixed-packet CD media using Method 2
  Does not read CD bar code
  Does not read R-W subcode information
  Does read raw P-W subcode data from lead in
  Does return CD media catalog number
  Does return CD ISRC information
  Does support C2 error pointers
  Does not deliver composite A/V data

  Does play audio CDs
  Number of volume control levels: 256
  Does support individual volume control setting for each channel
  Does support independent mute setting for each channel
  Does not support digital output on port 1
  Does not support digital output on port 2

  Loading mechanism type: tray
  Does support ejection of CD via START/STOP command
  Does not lock media on power up via prevent jumper
  Does allow media to be locked in the drive via PREVENT/ALLOW command
  Is not currently in a media-locked state
  Does not support changing side of disk
  Does not have load-empty-slot-in-changer feature
  Does not support Individual Disk Present feature

  Maximum read  speed:  8467 kB/s (CD  48x, DVD  6x)
  Current read  speed:  8467 kB/s (CD  48x, DVD  6x)
  Maximum write speed:  8467 kB/s (CD  48x, DVD  6x)
  Current write speed:  8467 kB/s (CD  48x, DVD  6x)
  Rotational control selected: CLV/PCAV
  Buffer size in KB: 2048
  Copy management revision supported: 1
  Number of supported write speeds: 7
  Write speed # 0:  8467 kB/s CLV/PCAV (CD  48x, DVD  6x)
  Write speed # 1:  7056 kB/s CLV/PCAV (CD  40x, DVD  5x)
  Write speed # 2:  5645 kB/s CLV/PCAV (CD  32x, DVD  4x)
  Write speed # 3:  4234 kB/s CLV/PCAV (CD  24x, DVD  3x)
  Write speed # 4:  2822 kB/s CLV/PCAV (CD  16x, DVD  2x)
  Write speed # 5:  1411 kB/s CLV/PCAV (CD   8x, DVD  1x)
  Write speed # 6:   706 kB/s CLV/PCAV (CD   4x, DVD  0x)

Supported CD-RW media types according to MMC-4 feature 0x37:
  Does write multi speed       CD-RW media
  Does write high  speed       CD-RW media
  Does write ultra high speed  CD-RW media
  Does write ultra high speed+ CD-RW media
_


----------



## praka123 (Apr 21, 2008)

eh?command got changed after distros(debian esp) ditched cdrecord for wodim(cdrkit),so

```
wodim  -prcap
```
^will work for ubuntu et al.

```
wodim -checkdrive
```


----------



## QwertyManiac (Apr 26, 2008)

To speed up your boot by around 6-8 seconds (If there's a delay where your splash screen or your dmesg@boot hangs momentarily at just the startup) simply go to your BIOS and disable the Legacy USB support.


----------



## gary4gar (Apr 26, 2008)

what exactly is Legacy USB support?


----------



## praka123 (Apr 26, 2008)

usb-1.1  I suppose


----------



## gary4gar (Apr 27, 2008)

^^^
even i can't disable it,as many devices using 1.1 here


----------



## topgear (Apr 27, 2008)

praka123 said:


> eh?command got changed after distros(debian esp) ditched cdrecord for wodim(cdrkit),so
> 
> ```
> wodim  -prcap
> ...



Thanks praka for the update. I am using open suse 10.3


----------



## abhijangda (May 1, 2008)

good tip


----------



## vish786 (May 2, 2008)

gary4gar said:


> what exactly is Legacy USB support?



connecting peripherals like keyboard, mouse, etc... thru USB & accessing BIOS & others... is legacy support... so one can still easily access system.


----------



## gary4gar (May 2, 2008)

vish786 said:


> connecting peripherals like keyboard, mouse, etc... thru USB & accessing BIOS & others... is legacy support... so one can still easily access system.


Thanks for information, Vish 

[edit]
Posted edited, offensive word removed on request


----------

