Posts filed under ‘Tutorials’

Printer fix after installing Ubuntu 10.10 (Lexmark E120n)

Yesterday I did a fresh install of Ubuntu 10.10 and today when I tried to print out some work I got an unpleasant surprise:

As always Ubuntu found my Lexmark E120n drivers when I turned on the printer, but when I tried to print out my work the it just made it’s usual noises and movements but without grabbing any paper. First I thought that it maybe were broken, but then I remember that I used the printer yesterday with Ubuntu 10.04 and it worked just fine. So I tested it with Peppermint Ice, and later with the Ubutntu 10.04 live CD were it worked like a charm.

So I’m pretty sure this is a Ubuntu 10.10 issue, I don’t know if other than me are affected, anyway this is the fix I found after realizing that I could manually edit the .ppd file:

  1. Download lex120n.txt (it’s an old .ppd file, I just had to change the file name to be able to upload it)
  2. Open “Nautilus” as root (gksudo nautilus)
  3. Goto /etc/cups/ppd
  4. Open the file named Lexmark-E120n.ppd
  5. Copy all the text from lex120n.txt and paste it into  Lexmark-E120n.ppd (after removing all the text of course)
  6. Restart and voilà, the printer works properly again ^^

You can also rename lex120n.txt into Lexmark-E120n.ppd and move it to /etc/cups/ppd instead of copying and pasting.

Thanks to the people that tried to help me at Linuxquestions.org before I found the solution myself :)

11/10/2010 at 20:18 1 comment

How to install Opera in Ubuntu

Some weeks ago a friend of mine asked me how she could install the Opera web browser in Ubuntu as she had problems installing it the regular way. After that I have gotten this question some more times, so I decided to make this little guide.

The Regular Way

  1. Download Opera for your machine from this site http://www.opera.com/browser/download
  2. Install it like any regular package :)
  3. Yey! Your finished!

The Alternative (Terminal) Way

My friend had problems with the regular way of installing Opera and I have heard that there are others with this problem. But you will still able to install it by using the terminal, and this is how you do it:

  1. Go to Software Sources (System > Administration > Software Sources)
  2. Then select the Third-Party Software tab
  3. Click on the [+ Add] button and add:deb http://deb.opera.com/opera/ stable non-free
  4. Now open the terminal and write:wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
  5. sudo apt-get install debian-archive-keyring
  6. apt-get update
  7. sudo apt-get install opera
  8. Yey! You should now have Opera installed on your system ^^

I don’t use Opera myself so please tell me in a comment if these solutions doesn’t work for you. And as usual: Feel free to ask if you have any questions about the installation :)

11/07/2010 at 18:11 Leave a comment

How to watch encrypted DVDs in Ubuntu?

This is one of the questions people often ask me when they are trying Ubuntu for the first time. For in Ubuntu, unlike in Linux Mint (one reasons why I recommend Linux Mint for those who new to GNU/Linux), watching encrypted DVDs doesn’t work right out of the box. This is because this feature is a part of the package repository Medibuntu (Multimedia, Entertainment & Distractions In Ubuntu) that isn’t included into the Ubuntu distribution for legal reasons (copyright, license, patent, etc).

I’m just going into show you how to install the package that let you play encrypted DVDs and not how to add the Medibuntu repository (but if you want to you cant read about how to do that here: Medibuntu.

The GUI Way

  1. Open Synaptic (System >Administration > Synaptic Package Manager ) or Ubuntu Software Centre if you’re using Ubuntu 10.04 (Applications -> Ubuntu Software Centre)
  2. Search for ubuntu-restricted-extras (Ubuntu users), kubuntu-restricted-extras (Kubuntu users) or xubuntu-restricted-extras (Xubuntu users) and install this package
  3. Then search for the package named libdvdcss2 and install it
  4. You should now be able to watch encrypted DVDs on your system :) If you didn’t find libdvdcss2 try the Terminal Way’s step

The Terminal Way:

  1. Open the Terminal:
    Ubuntu: Applications > Accessories > Terminal
    Kubuntu: KMenu > System > Terminal Program (Konsole)
    Xubuntu: Applications menu -> System -> Terminal
  2. Install Ubuntu Restricted Extras with this command:
    Ubuntu: sudo apt-get install ubuntu-restricted-extras
    Kubuntu: sudo apt-get install kubuntu-restricted-extras
    Xubuntu: sudo apt-get install xubuntu-restricted-extras
  3. Then install try to install libdvdcss2 with the command sudo apt-get install libdvdcss2 if it didn’t work try the command below that’s matching your system (if you don’t know which one, try the one for i386).
    i386:

    1. wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.9-2medibuntu4_i386.deb
    2. sudo dpkg -i libdvdcss2_1.2.9-2medibuntu4_i386.deb

    amd64:

    1. wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.9-2medibuntu4_amd64.deb
    2. sudo dpkg -i libdvdcss2_1.2.9-2medibuntu4_amd64.deb

    PowerPC:

    1. wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.9-2medibuntu2_powerpc.deb
    2. sudo dpkg -i libdvdcss2_1.2.9-2medibuntu2_powerpc.deb
  4. And there! You should now be able to watch encrypted DVDs!

And in case someone is wondering: I recommend using VLC for watching DVDs in Ubuntu (you can find it in Synaptic and Ubuntu Software Centre or you can just install it by using this command: sudo apt-get install vlc).

16/06/2010 at 21:24 4 comments

How to install Wolvix on a USB drive

This guide can be used with Linux, Windows and Mac OSX.

Wolvix is a desktop oriented GNU/Linux distribution based on Slackware. It features the Xfce desktop environment and a comprehensive selection of development, graphics, multimedia, network and office applications. It’s mainly targeted at home users and strives to provide a balance between everyday computing tasks, creativity, work and enjoyment.
Read more…

You need:

  • A computers that’s able to boot from a USB drive
  • A working CD/DVD burner for burning yourself a Live CD (or a program for making a Live USB)
  • 1 USB drive and a CD/DVD (or 2 USB drives)
  1. Download the .iso file from Wolvix.org (Cub is designed to fit on a 256MB USB stick, while Hunter is designed to fit on 512MB)
  2. Then burn the .iso file to a CD or DVD (Click here to get a guide: BurningIsoHowto – Community Ubuntu Documentation)
  3. Turn of the computer and boot from the Live CD (or USB):
    – This is a different procedure on almost every computer depending on which BIOS your machine is using
    – Look at the fist image that shows up when you turn on your computer there should be a text like “Click F2 to enter setup” (note that this is different for every computer and that some has different buttons for different actions)
    – Now you want to find the place where you can change the order in which your devices is going to boot, change the setting so that the CD is on the top
    – Save and exit and the system should boot from your Live CD if you have done everything right.

    My Acer’s BIOS looks like this:

  4. When this screen shows up hit [Enter]
  5. Log in. The username is root and the password is toor
  6. Then there is the fun part ^^
    – Fist click on the icon with the red ring around it
    – The window Wovix Control Panel shold show up
    – Select the tab named HD-Install
    – Select USB Install
    – Find you usb key (this process will erase everything on your drive, so remember to do a backup)
    – Hit Start install
  7. And you now you should have your very own Wolvix USB drive!

11/06/2010 at 21:24 Leave a comment

How to re-enable Ctrl+Alt+BackSpace in Ubuntu

In my last post I wrote about what to do when when Linux hangs or completely freezes. In the same post I mentioned that the key command [Ctrl]+[Alt]+[BackSpace] was switched to [Alt]+[PrtSc]+[K] in Ubuntu. This is was done because of the fact that DontZap is no longer an option in the X server and has become an option in XKB instead. This guide is meant for old Ubuntu users and those that have migrated to Ubuntu from other Linux distros.

Before we begin you should note that all these methods will re-enable the [Ctrl]+[Alt]+[BackSpace] key command, but not disable the new [Alt]+[PrtSc]+[K].

These methods should work for Ubuntu 9.10 and 10.04 (and hopefully for the future versions of Ubuntu).

The Easy GUI Way

GNOME

  1. First go to: System > Preferences >Keyboard menu
  2. Then select the Layouts tab and click on the Layout Options button
  3. Then find and select Key sequence to kill the X server and then select Control + Alt + Backspace
  4. And yey! You can now use [Ctrl]+[Alt]+[BackSpace] to kill the X server!

KDE

  1. Open System Settings
  2. Select  Regional & Language
  3. Then select Keyboard Layout
  4. Click on Enable keyboard layouts (in the Layout tab).
  5. Select the Advanced tab
  6. Then find and select Key sequence to kill the X server and then select Control + Alt + Backspace
  7. And now you too should be able to kill the X server with [Ctrl]+[Alt]+[BackSpace] :D

The Terminal Way

Requires installation of a program

  1. Install the “dontzap” package:
    sudo apt-get install dontzap
  2. Type to enable [Ctrl]+[Alt]+[BackSpace]:
    sudo dontzap --disable
  3. And type this if you find out that you want to disable it later:
    sudo dontzap --enable

Does not require an installation (but it is kind of scary)

  1. Open the terminal and type:
    sudo gksudo gedit /etc/X11/xorg.conf
  2. Then add these lines to your xorg.conf file, and then save.
    Section "ServerFlags"
    Option "DontZap" "false"
    EndSection
  3. Then log out (and then in again) from your account (or restart) to enable the changes

Do you know other methods to re-enable [Ctrl]+[Alt]+[BackSpace]? Please tell in a comment ^^

09/06/2010 at 19:37 Leave a comment

When Linux Hangs or Completely Freezes

When Windows hangs itself we all know what to do right? Were just reaching for the combination [Ctrl]+[Alt]+[Del] (Control Alt Delete). But if you try this in Linux nothing happens (in some distributions, like Ubuntu, you actually get the menu for shutting down your system, but this don’t work when your system hags or freezes).

So what to do?

There is 3 keyboard combinations every Linux user should remember (or write down). But before we begin I want you to understand some of the signs I use: If a symbol is surrounded by [ ] means that it is a button or key on your keyboard. + means that you have to hold the keys down at once. And > means that you have to click the buttons one by one, remember that you have to press each key for 2-3 seconds. Now that you have learned this we can move on to the commands:

Fist you have the combination [Ctrl]+[Alt]+[BackSpace] (backspace is the [←] over [Enter]) that restarts X or GDM (you will be logged out), and you can kind of call it Linux’s Control Alt Delete equivalent. This command gives your programs time to make emergency backups of unsaved files (for example if you writing on a document in Open Office) and it  prevents that you get a file system error during the crash.If you use Ubuntu or a distribution based on Ubuntu you will have to use [Alt]+[PrtSc]+[K] (PrtSc = Print Screen) instead, but you should note that some Ubuntu based distros (like Linux Mint) still use the universal [Ctrl]+[Alt]+[BackSpace]. (Note 14.11.2013: For newer versions of Ubuntu, and some of it’s derivatives, even this combination does not seemto work any more, to get it working again check out the update in the end of the post)

But what to do if this combination doesn’t work? Then you have to use something called Magic SysRq Keys. In short they are keys which allows you to perform various commands regardless of the system’s state, like in this case get the system to recover from a freeze. Note that these keys wont work if your system is in kernel panic. Like I said there are tree combinations that you will have to remember and since we have already learned one, there are two to go:

This command will get your freezed system to restart safely:
Hold [Alt]+[PrtSc] then type [R]>[S]>[E]>[I]>[U]>[B] (press each key for 2-3 seconds). In short the keys mean: unRaw (take control of keyboard back from X), tErminate (send SIGTERM to all processes, allowing them to terminate gracefully), kIll (send SIGKILL to all processes, forcing them to terminate immediately), Sync (flush data to disk), Unmount (remount all filesystems read-only), reBoot (restart).

This command will get your freezed system to shut down in a safe way:
Again hold [Alt]+[PrtSc] then type [R]>[S]>[E]>[I]>[U]>[O] (press each key for 2-3 seconds). These keys mean: unRaw, tErminate, kIll, Sync, Unmount , shutdOwn (does it really need an explanation?).

To learn more about Magic SysRq Keys visit: Wikipedia: Magic SysRq Key.

 


 

Update:

As Andy E points out in his comment; [Alt]+[PrtSc]+[K] does not seem to work in newer versions of Ubuntu and some of it’s derivatives.

To get it working again first type this into the terminal (if you prefer using a dedicated text manager and not the terminal, change nano into your preferred text editor, like for example gedit):
sudo nano /etc/sysctl.d/10-magic-sysrq.conf

You will now see this line of code in the end of the file:
kernel.sysrq = 176

Change this into:
kernel.sysrq = 180

Then save and reboot, and [Alt]+[PrtSc]+[K] will “magically” work again!

04/06/2010 at 14:55 7 comments

How to get hardware information in Linux?

This guide requires use of the Terminal, and can be used on all Linux systems (as far as I know).

The package were going to use is named Hardware Lister (command: lshw).

Most Linux systems and distros comes with this pre-installed as default, but if you should need to install it you just write this in your Terminal:

APT (Debian, Ubuntu…): sudo apt-get install lshw

Yum (Fedora, Red Hat…): sudo yum install lshw

If your system doesn’t use APT or Yum (and doesn’t have lshw pre-installed), you can visit this site for installation instructions: Hardware Lister (lshw).

But as I said most systems comes pre-installed with this package as default, so you doesn’t have to use the commands mentioned over unless this command doesn’t work:

sudo lshw

If you got lot’s of text about your system you have it installed. Yey! But if you get the message bash: lshw: command not found you will have to install it.

This single command gives you all the information you will need about your hardware. But what if you just want some part of this information? No problem, just use these commands:

  • Short summary of all the important information: sudo lshw -short
  • Information about your system (like manufacturer, serial-number, type etc. ) : sudo lshw -class system
  • For memory (RAM, BIOS, firmware etc. ) information type:
    sudo lshw -class memory
  • CPU info: sudo lshw -class cpu
  • Information about your disk(s) sudo lshw -class disk
  • Network information: sudo lshw -class network
  • Disk volum information sudo lshw -class volume
  • Example of how you can combine these commands: sudo lshw -class system -class memory -class cpu

Like you maybe has understood by now, the information in ishw is stored in classes (therefore the -class). So this is just some examples, and if you want the whole list of classes you can visit Hardware Lister’s homepage (or just use sudo lshw and try to memorise the classes by yourself)

But what if you want to store this information in a file, so you dosn’t have to do the lshw information everytime your wondering about some of your hardware info? That’s no problem either :)

  • Store the information as a .txt file: sudo lshw > hardware-info.txt
  • Store it as a HTML file: sudo lshw -html > hardware-info.html
  • And finally as a XML file: sudo lshw -xml > hardware-info.xml

Note that all these commands will save the files in your home folder, and that the commands of course can be combined with the ones mentioned over for you specific needs (but if your not really into using the terminal yet I would stay with the ones I have mentioned here for now).

If your kind of scared of using the Terminal there’s a option for you too: Just go to Synaptic and do a little search for lshw-gtk (gtk-lshw in some distributions) and install it. You can also install it by typing this command in the Terminal sudo apt-get install lshw-gtk (ATP).

02/06/2010 at 20:01 Leave a comment

Older Posts


Licensed Under:

Creative Commons LicenseExcept where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Tux and GNU are published under the GNU General Public License.

Subscribe

Categories


%d bloggers like this: