← Back to team overview

yade-users team mailing list archive

Installing yade on kubuntu.

 

Hi, this is my first draft guide about how to install yade with kubuntu.

It should work with ubuntu as well. The only difference is that people
with ubuntu will not use 'adept', but 'synaptic', and that's all.

I will put it soon on yade webpage.

If you find something unclear in this guide, please write it, so I will
be able to fix it.

------------------------------------
Installing kubuntu

I have downloaded latest kubuntu DVD (it's dapper 6.06) and installed from it.
Installation was very nice and easy, so try it, and you'll be surprised. It
even can automatically resize windows partition for you and make space on the
hard disk, so you can install without any troubles, and do not lose your windows
installation. (but better to have a backup, anyway ;)


------------------------------------
Network

After installation, when kubuntu starts first make sure that you have working
internet. Most of the cases it will work, unless you have some non-standard
internet connection. So if it will not work (very unlikely) you will have to
ask your network administrator to set the connection for you. He will have to
edit file /etc/network/interfaces, possibly create file /etc/resolv.conf,
and then do /etc/init.d/networking restart . To obtain root privileages just
type sudo su, and your password. All that can be done using terminal (called
konsole), you can find it in menu K->System->Konsole


------------------------------------
Doing kubuntu update

To manage packages installed on your system you can run K->System->Adept, then
type your password. First thing will be to enable package repositories, so that
you can download latest versions of software from the internet. Click in upper
menu Adept->Manage Repositories, you will see a list of possible sources from
which software will be downloaded. Right click on each line that in column
'distribution' has a name dapper, dapper-updates or dapper-security (skip
dapper-backports) then pick "enable" from the menu. Also everywhere where it is
written "main" in the third column you need to replace it with "main
restricted". After that click "Apply" on the bottom, then "Close". Now click
icon "Fetch updates", wait a bit. Then click "Full upgrade" and "Apply changes"
- that will download latest versions of all programs, it will take a bit of
time. When it is finished, it's a good idea to restart the computer, because
most likely the linux kernel has been updated among other packages.


------------------------------------
Installing nvidia drivers

Yade is using OpenGL to display 3D graphics, so it will work much better with
hardware acceleration. This currently works correctly only with NVidia graphic
cards (those cards have usually GeForce in their name), and it is usually buggy
with ATI graphic cards (those have usually Radeon in their name). So if you
have an ATI Radeon graphic card, then skip this section (you should buy nvidia
;). Currently I'm working on software rendering module for yade, so it will be
possible to have a faster display even without hardware acceleration, but it's
not ready yet.

First, verify that you don't have hardware acceleration yet, open
K->System->KInfoCenter, and click OpenGL. You should see there written
"Renderer: Mesa GLX Indirect".

So now start K->System->Adept, in the search box (upper left corner) type
'nvidia', you will see relevant packages listed. Install package nvidia-glx and
nvidia-kernel-common (by clicking "Request Install", and then "Apply Changes").
If you have an older nvidia card, then you should use nvidia-glx-legacy instead
(it is written in the description of the package what cards are considered
older).

Make sure that the latest version of linux-restriced-modules-*-386 is
installed (and install it, if it's not) - you will be able to do that only if
in previous step you have replaced "main" with "main restricted" in
dapper-security. But it should be done automatically in previous step, when
doing "Full upgrade".

If you carefully read the description of nvidia-glx package you will see that
you have to start K->System->Konsole, and type there this command:

   sudo nvidia-glx-config enable

this command sometimes my fail, then do what is below, and execute above
command again:

   sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.OLD
   md5sum /etc/X11/xorg.conf | sudo tee /var/lib/x11/xorg.conf.md5sum

When nvidia-glx-config enable was sucessfull, you now heve to exectue this command:

   nvidia-xconfig

You can now restart your computer, and nvidia drivers will work. You will see a
big nvidia logo when the graphics starts.


------------------------------------
Installing ati drivers

Actually there are ati drivers in kubuntu, I haven't ever tried them, but I
heard that thay work with some ATI cards. You can try to install them in a
similar way to that one described above. You will have to search for "fglrx" in
the search box, instead of "nvidia". The package you need is xorg-driver-fglrx.
I don't use ATI so I don't know more about running it, but you should be able
to find something with google if you have problems.


------------------------------------
Confirming 3D hardware acceleration

You can now open K->System->KInfoCenter and look into OpenGL section. You
chould see that "Renderer" string has changed - it's now the name of your
graphics card.

Alternatively you can type in the terminal (konsole):

   glxinfo | grep render

And the answer should be:

   direct rendering: Yes

Small program glxgears should work, try running it from the terminal.


------------------------------------
Installing packages required by yade

Open adept again and install those packages:

libboost-date-time-dev
libboost-filesystem-dev
libboost-thread-dev
make
libglut3-dev
qt3-dev-tools
subversion
g++
dpkg-dev
fakeroot


------------------------------------
Installing QGLViewer

QGLViewer is currently not included in kubuntu distribution so to install it we
have to build our own package from source. We will make a port of this package
from package prepared for sid.  You have to open adept, and in "Manage
Repositories" you have to add following line:

   deb-src http://blabluga.hell.pl/QGLViewer/sid ./

Click "Add", "Apply", "Close", then click "Fetch Updates" so that adept will
know that there is a source of a new package qglviewer available.

Alternatively you can use a text editor, and add this line to file
/etc/apt/sources.list, and do 'aptitude update'.

Make sure that this line is added and updates are checked, otherwise commands
below will not work at all.

Now open a terminal (K->System->konsole) and type following:

  apt-get source lib3dviewer
  sudo apt-get build-dep lib3dviewer

Now edit the file lib3dviewer-2.2.2-3/debian/control and replace string
"xlibmesa-gl-dev" with "mesa-common-dev". It's on the line "Depends:" at the
end of line. To edit a file you can for example use 'kate' editor.
When this correction is made do the following:

  cd lib3dviewer-2.2.2-3/
  fakeroot debian/rules binary 
  cd ..
  sudo dpkg -i *deb
  sudo ln -s /usr/lib/lib3dviewer.so /usr/lib/libQGLViewer.so

Now QGLViewer is installed. And yade will work.


------------------------------------
Running yade

Proceed with yade installation as it is described on the webpage. Currently
better use version from svn:

   svn checkout svn://svn.berlios.de/yade/trunk
   cd trunk
   mkdir ~/YADE
   cp yade-examples ~/YADE/data -r
   make compile_install CXXFLAGS='-pthread -lpthread -O3' INSTALL_DIR='/YADE' PREFIX_DIR='/home/joeuser'
   cd ~/YADE/bin
   export LD_LIBRARY_PATH=/home/joeuser/YADE/lib/yade/yade-libs
   ./yade

Remember to replace "joeuser" with your user name. Remember to add plugin
directories as described in First time setup.



-- 
Janek Kozicki                                                         |
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
http://lists.berlios.de/mailman/listinfo/yade-users



Follow ups