Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Wednesday, May 26, 2010

New Primary HDD: A full Ubuntu backup & restoration experience (Draft)

Steps:
  1. Use "SystemRescueCD"
  2. "fsarchiver savefs"
  3. "fsarchiver restfs"
  4. mount /dev/sda1 /mnt
    mount /dev/sda2 /mnt/boot  #skip this if don't have a separate /boot partition
    grub2-install --root-directory=/mnt/ /dev/sda
Operation Stats:
  • Original Disk Space used on the HDD to backup: 45 GB
  • Size of the backup images using "fsarchiver" default settings: 30 GB
  • Time taken to restore the whole HDD: around 45 min.
  • Bootloader restoration (grub2): 1 min.
Impression: Very fast, very little disk space used, very happy :)

Thursday, May 13, 2010

Display CPU Temperature Graphically using a Panel Applet in Ubuntu

"sudo apt-get install sensors-applet"

Right-click on any panel and add the new applet, then easily configure it to display the temperature, fan speed, HDD temperature ...etc

Wednesday, May 12, 2010

Create NTFS Partition with gparted in Ubuntu

The "ntfs" option is dimmed by default, to enable it you should install the necessary package: "sudo apt-get install ntfsprogs"

That's it, just re-open gparted and you're ready to go :)

Get CPU Temperature From Command Line in Ubuntu

more /proc/acpi/thermal_zone/THM0/temperature
more /proc/acpi/thermal_zone/THM1/temperature

As I have two processors "THM0" and "THM1"

Source

Permanently Blacklist a Kernel Module in Ubuntu

  1. Edit "/etc/modprobe.d/blacklist.conf"
  2. Add the module you want to remove, e.g. to blacklist the "kvm_intel" module, add this line "blacklist kvm_intel"

Thursday, May 6, 2010

Disable a Laptop's Touchpad in Ubuntu Karmic (and later as I well I guess)

  1. Applications -> Ubuntu Software Center
  2. Search for Touchpad
  3. System -> Preferences -> Touchpad
  4. Untick "Enable Touchpad"

Friday, April 30, 2010

Install Linux Distro. without burning on CDs

While searching, I found this cool program that enables you to burn Linux Distro. on USB Devices
http://unetbootin.sourceforge.net/

Download Internet Files from the terminal in Ubuntu

wget url

e.g. wget http://files.ubuntu-manual.org/manuals/getting-started-with-ubuntu/10.04/en_US/screen/Getting%20Started%20with%20Ubuntu%2010.04.pdf

Clear Totem (and other programs) History in Ubuntu

Tuesday, March 30, 2010

Restarting USB Storage Modules in Ubuntu

"sudo modprobe -r usb_storage"
"sudo modprobe usb_storage"


It's only because I had a problem in mounting any USB storage, it happened with me once
and I had to restart my machine, and I hate having to do so :)


Source

Sunday, March 28, 2010

Download Videos From YouTube using Ubuntu

A very nice command-line tool that allows you to download videos from Youtube:

"sudo apt-get install youtube-dl"

After the installation process, run:

"youtube-dl video_url"

Setup an SSH/SFTP Server on Ubuntu

"sudo apt-get install openssh-server"

That's it, you can now connect to your machine via SSH/SFTP from any other machine on the same network, it's easy, fast and secure.

Thursday, March 25, 2010

Adding a software repository from Ubuntu PPA in Ubuntu Karmic and later

This new method is easier than the old one which required you to edit your software sources manually, and then get the key and import it. The new one is as follows:
  1. Go to the PPA page of your interest, e.g. URL, check the name of the new repository, it is "ppa:transmissionbt/ppa" in my example.
  2. Open a terminal and type "sudo add-apt-repository ppa:transmissionbt/ppa"
  3. Done! This both adds the entry to your software sources list as well as importing the key which authenticates that repository.
  4. Don't forget to refresh your repository to be able to update/install new packages "sudo apt-get update"
PPA = Personal Package Archives, i.e. the user-contributed software repositories.

Workaround for Ubuntu Karmic Bug: Window List buttons do not always respond to mouse clicks

Here is the bug URL

I got the solution from there as well, as this was an extremely annoying bug for me and I consider it a FATAL One!

Open a terminal and run the following command:

"nohup env GDK_NATIVE_WINDOWS=1 gnome-panel --replace &"

Where:

"nohup": To run the command independent from the terminal, so as not to cancel the action if the terminal is closed.

'&': Must be put at the end of a command run using "nohup" to run it in the background and avoid canceling the command.

That's it!

The above command will restart the "gnome-panel" and you'll find that the bug disappeared.

I haven't restarted my machine yet to know whether this command is persistent or not (I think not), but anyway it can be easily put in the session startup if it's not.

Thanks go to "schuetza" who suggested this nice workaround on the original bug report.

Monday, March 22, 2010

Extract audio from a video file in Ubuntu

"mplayer -dumpaudio GummyBearSong.avi -dumpfile gummybear.mp3"

Where:

"GummyBearSong.avi" is the source video, in the example above it was 30 MB
"gummybear.mp3" is the output audio file (in mp3 format), was about 3 MB in size

and surprisingly it took 1 second only!!

I think it runs on other video formats as well, as the source article was working on an "flv" file.

Tuesday, March 16, 2010

LAN Chat Server & Client in Ubuntu

"sudo apt-get install chatplus chatplus-server"

Sunday, March 14, 2010

How to restart the VirtualBox kernel module in Ubuntu

If you're encountering problems in Virtualbox on Ubuntu and you feel you need to restart your machine, don't! You're on Linux, not windows! You can just close Virtualbox and then restart the Virtualbox kernel module by running the following:

"/etc/init.d/vboxdrv restart"

And then start Virtualbox and try again :)

Thursday, March 11, 2010

How to install Guest Additions for Ubuntu Guest in Virtualbox

Guest Additions are very useful in VirtualBox (or any other virtualization software in general), it installs virtual adapters for your hardware and enables the following:
  • Better graphics support (very useful when resizing the desktop or changing the guest's resolution)
  • Folder sharing between the host and the guest (you can refer to this article for a how-to)
  • Mouse Integration
Maybe other features as well which I don't know. To install the guest addtions, you can simply follow the following five steps:
  1. Click Devices->Install Guest Additions, this will mount a virtual cdrom containing the files from which we will install the guest addtions.
  2. Open a terminal and navigate to the folder containing the guest additions "cd /media/cdrom"
  3. Run the guest addition installer "sudo sh VBoxLinuxAdditions-x86.run"
  4. Wait till the additions are installed and the kernel modules are compiled, note that this may take a few minutes.
  5. Restart the Ubuntu guest.
This article is dedicated to my cousin Midoooz, to use it in his first virtual machine :)

Tuesday, March 9, 2010

Install Google Gears on Firefox on Ubuntu Karmic

So simple:
  1. Don't install from the website, it will - till the time of this article - give you an error message that your browser isn't supported
  2. Install the "gears" package, e.g. open a terminal and type "sudo apt-get install gears" 
  3. Restart your browser
  4. QED :)