Tips n Tricks for Linux

Status
Not open for further replies.

topgear

Super Moderator
Staff member
To Reduce and Increase the gamma of your display
in linux use this command:

To Know about your displays current gamma status:
Code:
xgamma

To reduce
Code:
xgamma -gamma 0.60

To Increase
Code:
xgamma -gamma 0.95

To know more about xgamma:
Code:
xgamma help

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

praka123

left this forum longback
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:
Code:
ping lockergnome.com
You’ll see output similar to this:
Code:
[FONT=Courier New]PING lockergnome.com (216.246.17.205) from 192.168.1.100 : 56(84) bytes of data.
64 bytes from mdr.lockergnome.com (216.246.17.205): icmp_seq=0 ttl=240 time=64.586 msec
64 bytes from mdr.lockergnome.com (216.246.17.205): icmp_seq=1 ttl=240 time=59.460 msec
64 bytes from mdr.lockergnome.com (216.246.17.205): icmp_seq=2 ttl=240 time=59.952 msec
64 bytes from mdr.lockergnome.com (216.246.17.205): icmp_seq=3 ttl=240 time=59.920 msec[/FONT]
In Linux, this output will continue to print to your screen until you stop it. To do so, use [ctrl]C. Or, you can use the ping command with the -c 5 option. That will send five pings and stop. From the output, you’ll need the IP address enclosed in parentheses - in this case, 216.246.17.205.
Now, change the user in your open console screen to root and open the /etc/hosts file for editing.
Code:
su
    [your root password]
    vi /etc/hosts
Add a line to /etc/hosts that looks something like this:
Code:
[FONT=Arial][SIZE=3]216.246.17.205    lockergnome.com  [B]lg[/B] [/SIZE][/FONT]
Then, save the file and close.
Code:
    :wq
Let’s test your tweak, then I’ll tell you what you actually accomplished. Open your browser. In the address bar type the letters lg and press [enter]. You should see the Lockergnome site in all it’s glorious green and peach - and very quickly, too.
So what did you accomplish? You circumvented the process of checking your network DNS for the IP address for Lockergnome. Your Linux system checks the /etc/hosts file first for IP information, before it looks to a network DNS. Since you added the IP address, the common domain name and an alias to the /etc/hosts file, your machine didn’t need to make those few extra queries to know where to point your browser to find Lockergnome. And, since you added and alias (lg) to the hosts entry, that’s all you’ll ever need to enter in order to access the Lockergnome site. Best of all, you can speed up access to all your most frequently visited sites with this tweak.
This whole process is scriptable, as well. I’ll create a ready-made script to add these entries to the /etc/hosts file in the next few weeks. Or, who knows? Maybe I’ll be able to include one from a reader in the GnomeVOICE.
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/
 
Last edited:

topgear

Super Moderator
Staff member
To Know about certain system information type in terminal:
Code:
uname -a
Shows all information about your linux box
Code:
uname -s
Shows the kernel name
Code:
uname -n
Shows the network node host name
Code:
uname -r
Shows the kernel release
Code:
uname -v
Shows the kernel version
Code:
uname -m
Shows the machine hardware architecture
Code:
uname -p
Shows the processor type
Code:
uname -i
Shows the hardware platform
Code:
uname -o
Shows the operating system
Code:
uname --version
Shows version information and exit
 

skghosh44

dig_boy_dig,dig !
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

left this forum longback
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

"The Gentleman"
HOWTO: Install Ubuntu Linux without burning a cd

HOWTO: Install Ubuntu Linux without burning a cd

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

mehulved

18 Till I Die............
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

Broken In
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

"The Gentleman"
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. ?? :confused:
 
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.
 

praka123

left this forum longback
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
 

praka123

left this forum longback
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:
Code:
crontab -e
then for me,
Code:
# 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
Code:
echo $DISPLAY
^add this value in crontab.now run:
Code:
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

Resistance is Futile.
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:
  1. Open the Terminal/Console.
  2. 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.
  3. 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!)​
 
Last edited:

silent008

Broken In
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

Wahahaha~!
Staff member
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

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
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
 
Status
Not open for further replies.
Top Bottom