Skip to main content

Posts

Showing posts from March, 2010

How to increase the priority of a running process in Linux

Kernel decides how much processor time is required for a process based on the nice value. Possible nice value range is: -20 to 20. A process that has a nice value of -20 is very high priority. The process that has a nice value of 20 is very low priority. $ ps axl Use ps axl to display the nice value of all running process. F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 2100 724 - Ss ? 0:06 init [2] 5 0 2 0 15 -5 0 0 - S< ? 0:00 [kthreadd] 1 0 47 2 15 -5 0 0 - S< ? 0:00 [kacpid] 1 0 48 2 15 -5 0 0 - S< ? 0:00 [kacpi_notify] 1 0 125 2 15 -5 0 0 - S< ? 0:00 [kseriod] 1 0 166 2 20 0 0 0 - S ? 0:00 [pdflush] [Note: 6th column 'NI' is the nice.] To increase the priority, give a lower nice value as sh

How to make Ubnutu 10.04 Lucid Lynx Multimedia Ready

In Ubuntu 10.04 "Lucid Lynx", the universe, multiverse and restricted repositories are activated by default. For installing Multimedia files you need to add medibuntu repositories. Run the following in command mode it will add medibuntu repositories in your sources list $ sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list $ sudo apt-get --quiet update $ sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring $ sudo apt-get --quiet update Now you can Install non-free-codecs $ sudo apt-get install non-free-codecs It will enables your system to support for MP3 and various other audio formats, unrar. Java runtime environment, Flash plugin, Microsoft fonts, w32codecs etc! You can install more codecs and DVD Support by using $ sudo apt-get install libdvdcss2 libxine1-ffmpeg gxine mencoder It will help you to run DVDs, AVI files and other mpeg codecs. Now Install Famous VLC player

Upgrading to 10.04 Lucid Lynx from Ubuntu 9.10 or Ubuntu 8.04 LTS

To upgrade from Ubuntu 9.10 on a desktop system   1. Press Alt+F2 and type in " update-manager -d " (without the quotes) into the command box.  2. Update Manager should open up and tell you:  New distribution release '10.04' is available.   3. Click Upgrade and follow the on-screen instructions. To upgrade from Ubuntu 9.10 on a server system 1. Install the update-manager-core package if it is not already installed;  2. Edit /etc/update-manager/release-upgrades and set  Prompt=normal 3. Launch the upgrade tool with the command  $ sudo do-release-upgrade -d and follow the on-screen instructions. Read more here

How to view the performance details of individual CPUs in the top command

You can view the performance details of each CPUs of your machine in the top command by pressing 1 (number one) while the top command is running.one). $ top top - 09:28:33 up 2 days, 12:46, 2 users, load average: 0.61, 0.41, 0.18 Tasks: 90 total, 1 running, 89 sleeping, 0 stopped, 0 zombie Cpu(s): 17.0%us, 1.4%sy, 0.0%ni, 81.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1025468k total, 793568k used, 231900k free, 120836k buffers Swap: 1951856k total, 0k used, 1951856k free, 342384k cached when i pressed '1' i got the details shown below. top - 09:29:25 up 2 days, 12:47, 2 users, load average: 0.78, 0.50, 0.22 Tasks: 90 total, 1 running, 89 sleeping, 0 stopped, 0 zombie Cpu0 : 25.5%us, 1.9%sy, 0.0%ni, 67.8%id, 4.7%wa, 0.0%hi, 0.1%si, 0.0%st Cpu1 : 16.5%us, 1.3%sy, 0.0%ni, 82.2%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1025468k total, 801648k used, 223820k free, 120944k buffers Swap: 1951856k total, 0k used,

Resolve Skype video chat (web cam) issue in ubuntu 10.04 Lucid Lynx

Problems using WebCam in Skype. I installed Skype on Ubuntu 10.04 (64 bits) as described here Install Skype in Ubuntu 10.04 Lucid Linux. After installing, i found that the color webcam display looked ''green''. I had faced the same issue when i installed and used skype in ubuntu 9.10. The fix show below helped me at that time, it does rescue me this time also. To view the webcam properly in Skype use this piece of code: $ LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype To make this a permanent solution, follow the step below: $ sudo mv /usr/bin/skype /usr/bin/skype.bin $ sudo chmod 755 /usr/bin/skype.bin $ sudo gedit /usr/bin/skype (use anyother editor of your choice instead of gedit if u want) add the following lines to it and save & close #!/bin/bash LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype.bin $ sudo chmod 755 /usr/bin/skype

Execution Sequence of .bash_* files

Execution sequence for interactive login shell execute /etc/profile IF ~/.bash_profile exists THEN execute ~/.bash_profile ELSE IF ~/.bash_login exist THEN execute ~/.bash_login ELSE IF ~/.profile exist THEN execute ~/.profile END IF END IF END IF When you logout of the interactive shell, following is the sequence of execution: IF ~/.bash_logout exists THEN execute ~/.bash_logout END IF Please note that /etc/bashrc is executed by ~/.bashrc as shown below: # cat ~/.bashrc if [ -f /etc/bashrc ]; then . /etc/bashrc Fi Execution sequence for interactive non-login shell While launching a non-login interactive shell, following is the sequence of execution: IF ~/.bashrc exists THEN execute ~/.bashrc END IF

How to Change the position of the Restore/Max/Close buttons on windows in ubuntu 9.04,9.10,10.04

Many you might have already seen that the position of the buttons on the window decorated had been left justified in ubuntu 10.04. Actually it is very easy to change the justification. 1. Press Alt+F2 and type in gconf-editor 2. Navigate to app->metacity->general double click the "button_layout" option and change it to " memu:maximize,minimize,close " rather than " minimize,maximize,close:menu " This will move the buttons from left to right.

Try to navigate up the directory using cd followed by consecutive dots

In the below example i have show how to navigate up to level 5 using cd......(cd followed by 6 dots). Here a single dot represents the current directory, 2 dot means 1 level up, 3 dots means 2 level up and so on.. Add the following alias. $ alias cd..="cd .." $ alias cd...="cd ../.." $ alias cd....="cd ../../.." $ alias cd.....="cd ../../../.." $ alias cd......="cd ../../../../.." Now use cd.... to navigate upto level 3. Add more alias if you need. Enjoy! thanks to linuxhacks.

Toggle SSH Session using SSH Escape Character

When you’ve logged on to the remotehost using ssh from the localhost, you may want to come back to the localhost to perform some activity and go back to remote host again. In this case, you don’t need to disconnect the ssh session to the remote host. Instead, follow the steps below. 1. Login to remotehost from localhost: dipin@linuxgeek:~$ ssh user@remotehost 2. Now you will be connected to the remotehost and your prompt will read: remotehost$ 3. Now to come back to the localhost temporarily, type the escape character ~ followed by Control-Z. You won't see the ~ character on the screen immediately after you type it, until you press and press enter. So, on the remotehost enter the following key strokes: ~ remotehost$ ~^Z [1]+ Stopped ssh user@remotehost dipin@linuxgeek:~$ 4. Now you are back to the localhost and the ssh remotehost client session runs as a typical UNIX background job, which you can check as shown below: dipin@linuxgeek:~$ jobs [1]+ Stopped ssh user@remotehost 5.