Showing posts with label mint. Show all posts
Showing posts with label mint. Show all posts

Sunday, 13 July 2014

Lubuntu tips for an old PC

   My old PC (Pentium IV @ 3.4 GHz, 1 Gb RAM, ATI Radeon 9550 256 Mb) was running Windows XP until Microsoft's support ended. I had to either risk keeping the XP or changing the OS. Since Microsoft OSes are paid and tend to be resource-hungry, I switched completely to Linux in this PC. Between Mint, Debian, Lubuntu or Crunchbang, I went for Lubuntu (as you probably guessed by the title).

   Lubuntu 14.04 is actually a pretty nifty and soft-running OS in this PC. It does not consume much RAM, the CPU is not frequently pushed hard, and so far, (almost) everything goes well.

   Since it's an old PC, I have some tips which may be useful when using it. These tips are also arguable, and the post is not closed (I'll possibly add more stuff while using this PC).

   Keeping tabs on everything:

htop allows you to check how much of your CPU and RAM you are using, as well as how much of those resources each process is using up. To install it:

sudo apt-get install htop

It looks something like this:


You can use it to evaluate which processes consume more resources, and choose which programs are better for you. I used it, for instance, to check how Mozilla Firefox (installed by default) and Midori compared.

   A less RAM-hungry browser:

To install it, according to the browser website:

sudo apt-add-repository ppa:midori/ppa && sudo apt-get update -qq && sudo apt-get install midori

Or download the deb file, and use gdebi (read this post).

From My experience, Midori is much lighter on RAM, but randomly'ish pushes hard on the CPU. If your problem is lack of RAM, go for it. I recommend it for simple searches when you have other software running on your PC. But Midori is nowhere near as stable and complete as Firefox. That's why I use Firefox for more often.



I'll add more stuff soon!

Overall, Lubuntu is a very good, stable enough, and pretty OS which can give  anew life to your PC.

Saturday, 31 May 2014

Installing programs on Linux

One of the main problems new Linux users have is installing programs.

In Windows, you can just double-click a .exe or .msi file and an installer will run the work for you. In Macintosh, you can double-click a .dmg file or drop it in the Applications folder (dropping it is actually pretty intuitive, if you think about it).

In Debian and Ubuntu you can click your .deb file too, and use a graphical interface which runs gdebi installer for you. (for instance, installing latexila)



[Side note: when I mention Ubuntu, most of what I say applies to it's derived distributions like Lubuntu or Mint]

However, my preferred way of installing packages is using the terminal. You can either install packages from the repositories or download them and install "manually". I'll cover both ways.

Let's assume you want to install a package and you don't know if it is in the repositories. In a terminal, type:

sudo apt-get update
apt-cache search package_name

If your desired package is available, it'll show as output. Proceed to install it:

sudo apt-get install package-name 

[Side note: Even though this post covers Debian based distributions, CentOS or Fedora have their own repositories and installers. Instead of apt-get (aptitude), they use yum, Arch Linux uses pacman, etc, but the logic is the same.]


If not, that package may be in a personal repository (PPA). You can add that PPA to your list

using:

sudo add-apt-repository ppa:someonesppa

For an example, check this previous post on PulseAudio Equalizer.

After this step you can install it by typing:

sudo apt-get install package-name

Now, let's say the package you want is not in the main repositories and there are no PPA's you can find in which your package is available, but you were able to download a .deb file and you want it to work.

My favourite way to do this is using gdebi in the terminal. Just cd to the folder where your .deb file is and type:

sudo gdebi package_name.deb

Or if your are not inside that folder, give it the path:

sudo gdebi /path/to/file/package_name

and gdebi will do it for you. If your package has dependencies you don't have installed, gdebi will solve them for you.

Another way to install .deb files is by using dpkg (you have to change to the directory where your file is, just like with gdebi):

sudo dpkg -i desired_package_name

However, dpkg will not solve missing dependencies. You might be wondering why you would use it, then. Some packages like libreoffice have to be installed by running the installer for all files inside a folder full of .deb files. dpkg will install all files iteratively (sudo dpkg -i *.deb), whereas gdebi (sudo gdebi *.deb) will try to get dependencies from the repositories instead of keep looking for packages inside that folder, so it'll fail.

[Another side note: *.deb means it'll run through all .deb files inside that folder. If you wanted to install all files whose name starts with banana, you would do banana*]

By now you should be able to install quite a few things. However, let's imagine there are no PPA's nor .deb files for you package, and you only managed to find a .tar.gz (or something similar). Don't worry, there's still hope you can get your beloved package!

It's worth mentioning that you don't install a .tar.gz file. Tarball's (as they're called) are compressed files, like .zip or .rar, but they're commonly used to distribute packages (you can store regular files in them if you want).

First things first, you have to extract what's inside:

tar zfx package_name.tar.gz

but my favourite way is to use unp, which will unpack tarballs, zips, whatever is compressed:

unp package_name.tar.gz

After extraction, what I recommend is to read the REAME or INSTALL file. They contain specific instructions you should follow. I'll give some hints, but when dealing with compressed packages, always try to follow the instructions. If the developer is kind enough, there may be an installer file which you can run (a script that will do the install for you).

If there is no such thing, run the following commands:

./configure
make
sudo make install

And by now you should be able to install software. But remember, ALWAYS read the README help files.

If this tutorial was of any help and you have suggestions to this post or my writting, feel free to comment and I'll try to reply as soon as possible ;)