Tuesday, November 6, 2007

11 Things Ubuntu Needs To Improve On

Matt Hartley has posted 10 Things Ubuntu Needs To Improve On. He seems to know quite well about what he is writing, although I did not experience problems with (wireless) networking.

What surprises me is that he does not mention display resolution. As I have written earlier, changing the display resolution in Ubuntu can be quite a hassle. There are two options available through the Menu of the Desktop, and both must be set correctly in order to get the right resolution also after a restart of X Window System (Trick: to restart the X Window System in Ubuntu, just press Ctrl+Alt+Backspace).
Searching for a solution on the web only leads to some forums where people write how to modify /etc/X11/xorg.conf manually, which is a total imposition for newbies coming from the Windows world (and in my case, it even did not lead to success anyways!). So, I would like to add point 11) to the list of Matt Hartley:

11) Dummy-proof way of changing the Display Resolution through the Desktop! It is the first thing any novice from the Windows world will want to do, hence it is absolutely essential! Imho, the Windows way of changing things that affect the Desktop (right-click on Desktop, then select 'Properties') is excellent and should be copied 1:1 unless there are some copyrights or patents against it.

Friday, November 2, 2007

Share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware

I am currently testing Linux on a separate PC besides my main PC (which still runs Windows). For each PC, I have a separate monitor on my desk. Both PCs are connected over Ethernet.

I was looking for a possibility to use just one keyboard and mouse for both systems, preferably without additional hardware. The perfect solution is called synergy! There is a common description about how to setup, or you can use the following quick-guide which is most useful for a Ubuntu/Windows mix.

Step 1a: Download and install the latest version of synergy on the Windows PC (manually).

Step 1b: Download and install the latest version of synergy on the Linux PC. You won't find synergy in the package managers that are accessible through the default desktop menu. The easiest way to install it is to open a terminal (shell) and to execute the following command: 'sudo apt-get install synergy', which will locate synergy on the internet, download and install it on your local machine. (Note: this might not work for all Linux distributions, but it perfectly does for Ubuntu). If it works, you should get someting like that in the console:

josua@camelot-linux:~$ sudo apt-get install synergy
[sudo] password for josua:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
synergy
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 628kB of archives.
After unpacking 1573kB of additional disk space will be used.
Get:1 http://ch.archive.ubuntu.com gutsy/universe synergy 1.3.1-2ubuntu2 [628kB]
Fetched 628kB in 2s (285kB/s)
Selecting previously deselected package synergy.
(Reading database ... 88932 files and directories currently installed.)
Unpacking synergy (from .../synergy_1.3.1-2ubuntu2_i386.deb) ...
Setting up synergy (1.3.1-2ubuntu2) ...

josua@camelot-linux:~$


Note: you don't necessarily need a Linux/Windows setup. You can as well just have 2 Windows PCs or 2 Linux PCs, or even Macs!

Step 2: Define one PC as Server, the other as Client. The PC that will be used more often should become the Server. For me, the Windows PC still has priority, so my Windows PC is the Server, the Linux PC is the Client.

Step 3: Configure the Server. The way synergy works is as follows: the monitor with the current mouse-cursor gets the the keyboard (and mouse) input. Therefore, we only need to define the physical setup of the monitors exactly as they are our (physical) desk. In windows, this is rather simple: Start Synergy, and in the GUI enable "share this computer's keyboard and mouse (server)", then click configure, add the screens (you MUST use your computer-names or IP as screen names!), and configure your setup (e.g. 'my-linux-screen is at the left of my-windows screen'...) with the options at the bottom of the dialog.
Configuring the server on a Linux PC means you have to edit the synergy.conf file in your home directory (just create it manually). The synergy homepage provides some useful examples.

Step 4: Let's autostart synergy on both systems on startup. In Windows, you can simply use the GUI again (just hit the AutoStart Button and configure). In Ubuntu Linux (using Gnome by default) we must add synergy to the sessions that are automatically started on login. This can be done through the top panel of the desktop: System/Preferences/Sessions. Click 'Add' and fill in the fields as follows: Name: synergy, Command: synergyc -f server-ip, Comment: start synergy.

That's it. Restart both your Server and Client and enjoy!

Oh and btw, synergy allows you to magically 'copy & paste' from one PC to the other! :-D

Tuesday, October 30, 2007

Hands on KDevelop, QT4, SDL

Got my hands on KDevelop, QT4 and SDL... ...well, just some Hello World stuff.

The good news: I was able to do what I wanted. Everything needed to make my own programs with a nice GUI (QT4), or even cross platform multimedia applications (using SDL) can be installed through the Synaptic Package Manager.

The bad news: One would assume that installing an environment for a C++ 'Hello World' application would be as simple as installing a development IDE (KDevelop), create a "new Hello World Project", compile and run. This isn't exactly the case. Everything went well until I tried to compile. Then I had to go through a painful process of installing additional packages related to the compiler, the automated creation of makefiles (e.g. what the heck is this AM_PROG_TOOL stuff?!), 'konsole', etc.!

Here is a list of steps and packages I have added:

1) Add KDevelop (just add KDevelop, all the other packages will be selected automatically):
cvs (1:1.12.13-8)
kdebase-bin (4:3.5.8-0ubuntu2)
kdelibs-data (4:3.5.8-0ubuntu3.1)
kdelibs4c2a (4:3.5.8-0ubuntu3.1)
kdevelop (4:3.5.0-0ubuntu2)
kdevelop-data (4:3.5.0-0ubuntu2)
libapr1 (1.2.7-8.2ubuntu1)
libaprutil1 (1.2.7+dfsg-2build1)
libarts1c2a (1.5.8-0ubuntu1)
libartsc0 (1.5.8-0ubuntu1)
libaudio2 (1.9-2)
libavahi-qt3-1 (0.6.20-2ubuntu3)
libcvsservice0 (4:3.5.8-0ubuntu1)
liblua50 (5.0.3-2build1)
liblualib50 (5.0.3-2build1)
libopenexr2c2a (1.2.2-4.3ubuntu2)
libpq5 (8.2.5-1.1)
libqt3-mt (3:3.3.8really3.3.7-0ubuntu11)
libsvn1 (1.4.4dfsg1-1ubuntu3)

2) Add the g++ compiler:
g++ (4:4.1.2-9ubuntu2)
g++-4.1 (4.1.2-16ubuntu2)
libstdc++6-4.1-dev (4.1.2-16ubuntu2)

3) Sort out problems related to the automated creation of makefiles (this step was quite cumbersome!):
build-essential (11.3ubuntu1)
dpkg-dev (1.14.5ubuntu16)
autoconf (2.61-4)
autoconf-doc (2.61-0ubuntu1)
automake (1:1.10+nogfdl-1)
automake1.10-doc (1.10-1)
autotools-dev (20070306.1)
m4 (1.4.10-0ubuntu2)
autobook (1.4.4-unofficial-4)
patch (2.5.9-4)
libtool (1.5.24-1ubuntu1)
libtool-doc (1.5.24-1ubuntu1)

4) konsole (yes, written with k!)
konsole (4:3.5.8-0ubuntu2)¨

5) QT Designer (Just add QTDesigner, the rest will be added automatically):
comerr-dev (2.1-1.40.2-1ubuntu1)
libaudio-dev (1.9-2)
libc6-dev (2.6.1-1ubuntu9)
libexpat1-dev (1.95.8-4ubuntu1)
libfontconfig1-dev (2.4.2-1.2ubuntu4)
libfreetype6-dev (2.3.5-1ubuntu4)
libgl1-mesa-dev (7.0.1-1ubuntu3)
libglib2.0-dev (2.14.1-1ubuntu1)
libglu1-mesa-dev (7.0.1-1ubuntu3)
libglu1-xorg-dev (1:7.2-5ubuntu13)
libice-dev (2:1.0.3-3)
libjpeg62-dev (6b-14)
libkadm55 (1.6.dfsg.1-7build1)
libkrb5-dev (1.6.dfsg.1-7build1)
liblcms1-dev (1.16-5ubuntu3)
libmng-dev (1.0.9-1)
libmysqlclient15off (5.0.45-1ubuntu3)
libpng12-dev (1.2.15~beta5-2ubuntu0.1)
libpq-dev (8.2.5-1.1)
libqt4-core (4.3.2-0ubuntu3)
libqt4-dev (4.3.2-0ubuntu3)
libqt4-gui (4.3.2-0ubuntu3)
libqt4-qt3support (4.3.2-0ubuntu3)
libqt4-sql (4.3.2-0ubuntu3)
libsm-dev (2:1.0.3-1)
libsqlite0 (2.8.17-2.1build1)
libsqlite0-dev (2.8.17-2.1build1)
libssl-dev (0.9.8e-5ubuntu3.1)
libx11-dev (2:1.1.1-1ubuntu4)
libxau-dev (1:1.0.3-2)
libxcursor-dev (1:1.1.8-2)
libxdmcp-dev (1:1.0.2-2)
libxext-dev (2:1.0.3-2build1)
libxfixes-dev (1:4.0.3-2)
libxft-dev (2.1.12-2ubuntu4)
libxi-dev (2:1.1.2-1)
libxinerama-dev (2:1.0.2-1build1)
libxmu-dev (2:1.0.3-1ubuntu1)
libxmu-headers (2:1.0.3-1ubuntu1)
libxrandr-dev (2:1.2.1-1)
libxrender-dev (1:0.9.2-1)
libxt-dev (1:1.0.5-3)
linux-libc-dev (2.6.22-14.46)
mesa-common-dev (7.0.1-1ubuntu3)
mysql-common (5.0.45-1ubuntu3)
qt4-designer (4.3.2-0ubuntu3)
x11proto-core-dev (7.0.10-2)
x11proto-fixes-dev (1:4.0-2ubuntu1)
x11proto-input-dev (1.4.2-1)
x11proto-kb-dev (1.0.3-2ubuntu1)
x11proto-randr-dev (1.2.1-2)
x11proto-render-dev (2:0.9.2-4ubuntu1)
x11proto-xext-dev (7.0.2-5ubuntu1)
x11proto-xinerama-dev (1.1.2-4ubuntu1)
xlibmesa-gl-dev (1:7.2-5ubuntu13)
xtrans-dev (1.0.3-2)
zlib1g-dev (1:1.2.3.3.dfsg-5ubuntu2)

6) SDL:
libflac-dev (1.1.4-3ubuntu1)
libmikmod2 (3.1.11-a-6ubuntu3)
libmikmod2-dev (3.1.11-a-6ubuntu3)
libogg-dev (1.1.3-2ubuntu2)
libsdl-console (1.3-4)
libsdl-console-dev (1.3-4)
libsdl-gfx1.2-4 (2.0.13-3)
libsdl-gfx1.2-dev (2.0.13-3)
libsdl-image1.2 (1.2.5-3)
libsdl-image1.2-dev (1.2.5-3)
libsdl-mixer1.2 (1.2.6-3)
libsdl-mixer1.2-dev (1.2.6-3)
libsdl-net1.2 (1.2.5-7)
libsdl-net1.2-dev (1.2.5-7)
libsdl-sge (030809dfsg-1ubuntu1)
libsdl-sge-dev (030809dfsg-1ubuntu1)
libsdl-sound1.2 (1.0.1-12build2)
libsdl-sound1.2-dev (1.0.1-12build2)
libsdl-stretch-0-2 (0.2.3-7)
libsdl-stretch-dev (0.2.3-7)
libsdl-ttf2.0-0 (2.0.9-1)
libsdl-ttf2.0-dev (2.0.9-1)
libsdl1.2-dev (1.2.11-9ubuntu2)
libsmpeg-dev (0.4.5+cvs20030824-2)
libsmpeg0 (0.4.5+cvs20030824-2)
libspeex-dev (1.1.12-3)
libtiff4-dev (3.8.2-7ubuntu2)
libtiffxx0c2 (3.8.2-7ubuntu2)
libvorbis-dev (1.2.0.dfsg-1)

So, with this packages, I am now really able to easily create 'Hello World' programs for both QT4 and SDL.

I don't know exactly what I should think now. On one hand, I am happy that I was able to sort out the problems myself (well, with the help of Google). On the other hand, compared to VisualStudio this was a rather cumbersome and geeky start. I wonder if there are some super-developer-packages that can be selected by a novice, and it will just select all sub-packages automatically to make sure that the first impression will be truly painless?

Generally, not being afraid of facing whatever unexpected problem occurs and sort it all out step by step is definitely something essential in the Linux World. I don't really have a problem with that, except that it eats up so much precious time, and even after having sorted out all the problems the overall feeling of being stupid and not having understood everything in full detail remains...

Sunday, October 28, 2007

Ubuntu Display Resolution

The first thing I had to resolve manually was that Ubuntu come up with a resolution of 1280x768 on my LCD Monitor with 1280x1024 (which looked horrible).
First I thought the problem might be related to my display adapter/driver (ATI Radeon 9800 PRO), so after some research I tried to update my driver with some heroic shell stunts, e.g.:

sudo arp-get install xorg-driver-fglrx

Although this command was a good exercise and forced me to learn about sudo and arp-get, and even magically downloads some driver stuff and installs it, the result was that I lost the hardware accelerated 3D desktop. And I was not able to switch back again to the original driver or the original settings - As a true dummy user, I ended up reinstalling the whole beast to get the hardware accelerated 3D back..!

Next thing I played with was the tool found in the menu:
System/Administration/Screens and Graphics.
There I changed the settings of Screen1 to "LCD Panel 1280x1024" and "Resolution=1280x1024". This already did half the job, but after a restart of the system, the desktop was again at 1280x1024. After a while I found that changing the resolution to 1280x1024 in the Menu
System/Preferences/Screen Resolution
is necessary too.

So, my recipe for changing the screen resolution is:
1) DON'T change the display driver as long as hardware accelerated 3D is working
2) Change settings of "Screens and Graphics"
3) Change settings of "Screen Resolution"
4) Make sure that the settings remain with a full restart of the PC

Note: Afaik, this settings basically just change /etc/X11/xorg.conf

Friday, October 26, 2007

Ubuntu default Installation + optional packages

The installation of Ubuntu 7.10 went without a glitch. I installed it on a PC where I already had Windows but an empty partition on my harddrive. During the installation, I just had to select the right partition, which was easy because I could recognize it by its size. After that, it installed a whole dual boot setup (which allows me to boot into linux or windows) automatically.

After the first reboot of the installation, it automatically asked me to install some updates over the internet, and it did so without the slightest problem.

The Ubuntu Package Managers from the Menus
Applications/Add/Remove
System/Administration/Synaptic Package Manager
allow to install all kind of packages (more than 20'000!) in a most easy way. No need to browse for programs on the internet, everything that works can be accessed directly through the desktop! That's just awesome!

Thursday, October 25, 2007

Going for Ubuntu

I have been a Windows enthusiast for years, mainly because I am a realtime graphics fanatic and because there is nothing that compares to DirectX, at least not in terms of multiple layers of high resolution videos as textures on 3D objects.

My enthusiasm for Windows has dropped over the years, today I just see it as a good and stable operating system. The main reason to keep it is for MS Office compatibility and its .NET development environment. But I have to admit that Windows Vista is quite a disappointment and I feel forced to check alternatives, that is, Mac OS X or Linux. While Mac OS X is probably quite nice in some aspects, I somehow don't see a true necessity to favor it over Linux.

After some research, I decided for Ubuntu 7.10 (based on Debian), because
- it is very popular (hence, its future looks promising)
- it seems to allow a soft start without too much shell knowhow
- it seems to be the choice of the linux multimedia programmers (gstreamer - the equivalent to DirectShow)
- it comes by default with really nice 3D desktop features, based on GNOME and compiz

I decided to start a blog and write down my little adventures with Ubuntu. It will hopefully help others and also me myself to not forget about how to deal with specific issues.

If you are a novice or expert Linux user and would like to write some posts in this blog too, just let me know, I will be glad to add you as an author!