FreeBSD DHCP Set Hostname ( Empty Hostname After Reboot )

Posted on in Categories , , , , last updated July 16, 2009

I’m using FreeBSD 7.2 on HP laptop and getting IP info via WI-FI router. I’ve setup hostname in /etc/rc.conf buy after the boot process, I check host name with “hostname” command, but get empty line. Setting hostname with “hostname” works well, but after reboot host name is still empty. I suspect it has something to do with DHCP settings. How do I set hostname-using DHCP?

Ubuntu Linux: Uninstall / Remove Any Installed Software

Posted on in Categories , , last updated October 11, 2007

Q. I’d like to save some disk space so I’d like to remove unwanted software from my HP laptop. How do I uninstall software under Ubuntu / Debian Linux?

A. Both Ubuntu and Debian Linux provide command line as well as GUI tools to delete / remove binary packages.

GUI Package Management Tool

synaptic is graphical management tool of software packages. It allows you to perform all actions of the command line tool apt-get in a graphical environment. This includes installing, upgrading, downgrading and removing of single packages or even upgrading your whole system.

Just click on System > Administration > Synaptic Package Manager

Now you can select any package and click on Mark for Removal popup meni. You can also start GUI tool from command line, enter:
$ synaptic &

Command Line Package Management Tool

apt-get is the command-line tool for handling packages. It is used for adding / removing / updating packages.

Uninstall / Delete / Remove Package

Just use the following syntax:
sudo apt-get remove {package-name}

For example remove package called mplayer, enter:
$ sudo apt-get remove mplayer

Remove package called lighttpd along with all configuration files, enter:
$ sudo apt-get --purge remove lighttpd

To list all installed package, enter:\
dpkg --list
dpkg --list | less
dpkg --list | grep -i 'http'

How do I enable laptop mode to improve Linux laptop battery life?

Posted on in Categories , , , , , last updated December 23, 2007

Q. I’m using Redhat enterprise Linux desktop / workstation operating system with HP laptop. Several Linux distributions have a / script to enable to disable Laptop mode but Redhat misses the script. How do I enable or disable laptop mode on fly?

A. Modern Linux kernel includes very good support for Laptop mode. It is use to control the IO subsystem. When laptop mode is enabled, the Linux will try to be smart about when to do disk I/O. It gives as much time as possible to be in a low power state. If mode is disabled if value is set to zero (0). To enable mode use non zero value such as 5.

Display or print current Laptop mode

Type the following command:
$ cat /proc/sys/vm/laptop_mode


Turn on or enable Laptop mode

Type the following command as the root user:
$ sudo echo 5 > /proc/sys/vm/laptop_mode
# echo 5 > /proc/sys/vm/laptop_mode

A note about Ubuntu Linux

According to this page:

Ubuntu has a laptop-mode-tools package, which is installed by default on laptops. However, laptop mode is disabled by default in Ubuntu Edgy (6.10), because some people have been experiencing hangups with it on certain laptops (mostly Thinkpads). Until now, nobody has any clue what is happening here. To reenable laptop mode, edit /etc/default/acpi-support and set ENABLE_LAPTOP_MODE=true.

If you want to use the latest version of laptop mode tools, you can use the Debian packages, they are compatible enough to work out-of-the-box on Ubuntu.

A note about Suse Linux

=> Suse Linux comes with powersaved tool, so please ignore above commands for power saving.

Updated for accuracy.

Linux laptop media player

Posted on in Categories , last updated August 20, 2007

Q. Can you suggest me a decent media player for my HP laptop? I’m using Fedora Core Linux.

A. Linux desktop offers lots of multimedia program for audio and video experience.

Beep Media Player

The Beep Media Player (BMP) is a free audio player, based on the XMMS multimedia player. I recommend beep media player for playing mp3. BMP looks like Winamp and even supports Winamp and XMMS skins. BMP supports most of the audio file formats.
=> BMP Home Page

VLC media player

Use VLC media player to play DVD/VCD and other formats. It is a highly portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to stream over networks and to transcode multimedia files and save them into various different formats.
=> VLC media player


There is also mplayer which can play and rip almost any multimedia cd format. In addition to its wide range of supported formats MPlayer can also save all streamed content to a file.
=> mplayer media player

You can download software / media player from above web sites or from Linux RPM software repository such as RPMForge