Posts

Showing posts from January, 2009

How do I change hostname in Ubuntu Linux?

You can see or change hostname of your computer with hostname command. You need privileged access to use this command. In terminal, typing hostname gives you the hostname of the computer. hostname xyz changes the name of your computer to xyz.

Unable to remove old X config backup file /etc/X11/xorg.conf.backup.

Image
Many people complains me that they get error "Unable to remove old X config backup file '/etc/X11/xorg.conf.backup'." after pressing "Save to X configuration file" in nvidia-settings. The reason is very simple, launching nvidia-settings doesn't give you enough permission to write inside /etc/. So run nvidia-settings in the following way: Press Alt+F2 type gksu nvidia-settings

sudo echo

Many people complain that they cant use sudo with echo. For example people try to do sudo echo 1 > /etc/file To know why this fails, lets break the command in two parts. sudo echo 1 You are just echoing "1". > /etc/file You are trying to write something to file inside /etc for which you need root access. But there is no root access as sudo was needlessly used with echo command. So to use sudo and echo we need help from one command called tee . With tee you can accomplish the above work. echo 1 | sudo tee /etc/file echo 1 | sudo tee -a /etc/file

Ubuntu 9.04 to be called Jaunty Jackalope

Jaunty Jackalope is known for its fastness, so will the next version of Ubuntu 9.04 Jaunty Jackalope. The main goal on this release is to make boot up time or resume time very short and integrating desktop applications and web applications. Hear from Mark Shuttleworth himself, link

simple way to write to files from bash script

Here is two of the simplest method from where you can write to files from a bash script. Method One Within the bash script write echo "what you want to write" > filePath/fileName echo "What you want to append" >> filePath/fileName Method Two Within the bash script write cat << EOF > filePath/fileName Lines of the text that you want to write. You can write any number of lines. EOF cat << EOF > filePath/fileName Lines of the text that you want to append. You can write any number of lines. EOF

Control brightness from command line

Screen brightness can be viewed and controlled from /proc directory. /proc/acpi/video/VGA/LCDD/brightness is the file. First cat the content of the file with cat /proc/acpi/video/VGA/LCDD/brightness It will show all the supported levels and current level. The current level is the current brightness of your screen. To change the screen brightness just put any number on that file. For eg: echo 10 > /proc/acpi/video/VGA/LCDD/brightness echo 5 > /proc/acpi/video/VGA/LCDD/brightness echo 1 > /proc/acpi/video/VGA/LCDD/brightness

Lenovo Y510 surround sound in Ubuntu

Image
Lenovo Y510 has go 4.1 sound system with a sub- woofer (Dolby Home Theater) Default installation of Ubuntu doesn't recognises all four speaker. There are few fix going on the Internet. There is one problem with those fixes, i.e. headphone doesn't mute the speakers. So you have to manually mute and un-mute the speaker while using the headphone. However I have found one fix, that recognises all four speaker and one sub-woofer, mutes and un-mutes them while using headphone, and produces 5.1 surround sound. Open /etc/modprobe.d/alsa-base for editing. (you need root access) Open /etc/modprobe.d/alsa.conf if you are using Fedora (Thanks to the Anonymous user) add the following line at the end options snd_hda_intel model=6stack-dell save and reboot. Now, go to Audio Preferences and select "6ch" under the options tab. You are all done, test it with the command "speaker-test -Dplug:surround51 -c6 -twav" Note: If you have updated your system...