Archive for the ‘The Ubuntu Adventure’ Category.

The linux terminal for beginners

As I have used linux for quiet some time and having more experience with the console, the ways I use and control the system changes. Now and then I happen to use the console and as I do it more and more I start to like it. Especially since I the machine I use for linux is a laptop and not having a mouse to control, then it is nice to control everything with hotkeys and the console.

If you want to get startet using linux via the terminal, here is some easy commands you should know:

  • sudo
    runs a command as root (Super User Do). E.g. “sudo gedit” will open up Gedit as root. Whereas normal open from the gnome menu or similar opens the Gedit without root privileges.
  • ls
    lists the items of the current working directory
  • cd
    changes directory where you currently is working from. As argument you can give the exact part or go with a relative path
  • mv
    move a file from one place to another. it is alsoe used for renaming a file.
  • cp
    will copy a file from one destination to another.
  • unzip
    is used to unpack zipped packeges
  • tar
    is used for gzipped packages

The commands above are all very useful for basic file handling. To explorer the full posibilites of the commands use the command “man [command]” og try “[command] -help”. The man command will open up the manual for the given command. The -help will just show a shorter help message with basic options. Try it out and see what happens. But dont do anything as root unless you know exactly what you are doing and what will happen, you can end up doing harm to your OS installition.

For a little more advanced stuff, you can install/uninstall and run programs from the command line. Some programs are run directly in the terminal and some will open up another window for the programs gui (graphic user interface).To do this you will need some of the following commands:

  • apt-get
    is the a command line tool used for adding/removing programs. A parameter is required, for install you will need to enter “apt-get install” followed by the name of the package you want to install, and “apt-get remove” followed by the name of the package to uninstall.
    The apt-get tool will search for the packages in the repositories added in the sources list, this can get complicated and you can search information on this on you own. I recommend taking a look at the man page for this, “man apt-get”.
  • [name of program]
    will run the given program. You will of course need to know the name of the program you want to run. So, if you want to run the gedit (the standard text editor that comes with ubuntu) you can simply enter “gedit” and the program will show up. You can give the program an optional argument where the argument(s) is the name of a file you want to edit. You can put as many files as you want, but that is specific for this program. E.g “gedit file.txt”. Other programs will have other arguments. Every command is actally programs that run with or without arguments.

Sometimes when you work with you OS or want to customize something or change something you will need to edit certain system files that require root privileges. This is where it comes in handy to know some basic command line stuff. Say you need to edit the file /usr/foo/bar.txt for some reason but your user do not have writing access to the file. Then you will need to do something like this in you terminal:

sudo gedit /usr/foo/bar.txt

This will open the file in gedit and you will be able to save your changes. Very useful and easy to do once you get the touch with the terminal. It wont take long once you start doing it on a regular basis.

32-bit and 64-bit OS

Recently I installed Ubuntu on my stationary computer. The CPU is a 64-bit thing and the Ubuntu I am used to is a 32-bit edition. So what would be the difference?

First off.. I was not noticing any differences. Everything is the same, anyway so it looks. One major reason to use the 64-bit edition is the possibility to use all 4 GB of memory that my computer has. I have been running Windows XP 32-bit edition on this computer since i got it 6-7 months ago. But 32-bit edition is limited to only use 3.2 of the memory(not sure about the exact number). Thus the full capacity of 4 GB was not used, which I, of course would like it to be. Then the last two months I have been trying out Windows Vista 64-bit edition. It runs perfectly.. except for a random BSOD(blue screen of death, a Microsoft phenomenon which crashes your pc :) ) now and then, caused by my graphic cards driver. In windows 64-bit you can install and run both 32-bit programs and 64-bit programs, without noticing any difference.

So I tried to install skype on my Ubuntu 8.10 64-bit edition. Downloaded it from the skype.com site and tried to install the package but was surprised that I got an error telling me that the architecture of my machine did not match the package I had just downloaded. I was surprised because I have been used to not care about the architecture of the applications I install when using windows. I did a quick search to find the proper package from the skype.com site but it wasn’t available. Too bad, I had to find another solution.

Since I already knew that skype is part of the medibuntu repository I added that to my sources list. Then I tryed to install skype from the terminal, the usual and easy way it works:

sudo apt-get install skype

And the skype was installed, pretty easy actually.. but confusing that you cannot find the right package from the skype site.

As for why this trick worked out the issue I don’t know. My guess would be that the ubuntu crew has compiled the packeges for both architectures. Perhaps I will figure this another time :) .

Here is an article from the ubuntu help community that explains something about the different architectures https://help.ubuntu.com/community/32bit_and_64bit.

DVD Playback in Ubuntu 8.10

Through the time I have used ubuntu I have watched several movies and shows, but never from DVD’s. DVD’s can not be played on the ubuntu system without installing some libraries first. This is because of an encryption system used on many commercial DVD’s, Content Scrambling System. Support for this is not packaged with the standard Ubuntu install.

To get the DVD’s working there are 3 libraries that need installation: libdvdread3, libdvdnav4 and libdvdcss2. It may be needed to add multiverse and restricted drivers to the source list for this to work, I am not quite sure about this.
The libraries can be installed from the terminal:

sudo aptitude install libdvdnav4 libdvdread3 libdvdcss2

Thats all it needs to enable DVD support. But I recommend removing the standard totem movie player and installing VLC media player. To do this, enter the following lines in the terminal:

sudo aptitude remove –purge totem totem-gstreamer

sudo aptitude install vlc

Thats all it needs to get the Ubuntu system ready for DVD watching. Enjoy

Update on the ubuntu adventure

I have now been running linux (ubuntu) on my laptop for several months. There has been minor challenges when I have tryed to do some more advanced stuff, like running applications that originally was made for microsoft windows operating systems. Generally the system has been running just fine all this time.

Then the last couple of days my firefox has been messed up. After updates for firefox automatically was downloaded and installed through the packege manager, firefox had several different problems. One being my bookmarks removed, which is one the things thats most important not to lose for me. I tryed restoring it from the backups (new feature in firefox 3 :D ), it just didnt work. Next, I tested if I could add bookmarks, but could not. Other less important issues also occured, none of which I could fix. I went as far as installing firefox 2 because I gave up on this. But, even though I didnt change anything, firefox 3 now works again. It is really weird, I don’t know what has happened, but I have a clue that it was the memory that was reason.

I am concidering to try out linuxmint once when I get time for it :) . It is a linux distribution that originated from the ubuntu project, but its a little different. Also, I am gonna try out some different desktop shells/window managers, so far I have been using the standard in ubuntu, Gnome. Gnome is an excelent window manager doing the job very well. But I wanna test others for the fun of it. Some are highly costumizable and I like that a lot. Interesting ones are fluxbox, enlightenment, kde, xfce and maybe others :)

Warcraft and ubuntu

Warcraft is not designet to run on the linux system. But using wine, it is actually posible to play the game.

Wine is an Open Source implementation of the Windows API on top of X, OpenGL, and Unix.

From Winehq.com

So, basicly you should be able to run windows software on the linux system. But not everything runs as good as you could wish. Warcraft III was able to run on the system. I installed it and renamed movie directory inside the warcraft III directory. This way I disabled the movies from the game. Also, I could have deleted them. But since the movies in the game was stopping the game from running properly, it was necessary. Then I ran a test game on Battle.net. It was fine, except its runs slower than on the windows system, so a had to lower the graphics settings. But thats about the computer.

But playing warcraft III on battle.net is not really appealing, theres is too much delays and more. Then it is good that someone made a gaming platform called Garena. It is some kind of Virtual Private Network. It has lots of users, and the delay is minimal. This works for windows and macs as well. But running this in wine seemed good, right untill I tried the “Start Game” button. All though the game path is set, the game just doesn’t start and Garena freeze. This is as of version 2.4 of Garena. I have not yet found any solution to this. Hopfully it get to work in a future version of the program.

It seems that not everything is easy in Ubuntu.