Archive for October, 2006

Ph.D. Thesis Deposit

I have put my thesis under deposit! It means that it will stay that way for a month, then I will have to follow some other bureaucratic requirements and… for mid-December I’ll defend it! I’ll be a Doctor! I can not believe it only took me… well, too long :^)

Comments (2)

Gaussian shared memory

If you are running Gaussian in shared memory mode (in parallel in a multi-CPU computer, for example), you might get the following error (last line of output file):

shmget failed

It means that it was not possible to get the amount of shared memory required by the input. This can mean that the computer does not have so much physical RAM, but usually it is just a somewhat silly system setting.

Check the file /proc/sys/kernel/shmmax. Inside it there should be a single number, namely the amount of permited shared memory use (in bytes). If you need more (in my computer it was like 32MB… puaff), just echo xxx > /proc/sys/kernel/shmmax, where xxx is the desired amount of bytes (e.g. 500000000).

Comments

The meaning of Ubuntu

According to this guy:

“Ubuntu” is an ancient African word, meaning: “I can’t configure Debian.”

Comments

SSH connection without password

[Update (24/03/2007): see new post on subject]

Following Txema’s wonderful explanations, and translating from Basque a Dec 2, 2002 e-mail, here they go the instructions to connect from computer A to B via SSH, without computer B ever asking for our password.

Notice that it is not a security breach, because we are allowing a certain computer A (and user) to connect to B. Of course, if A is somehow compromised, then applying this recipe would give the attacker hability to connect from A to B with no hassle. If you fear computer A being compromised, then don’t do it.

On the other hand, it can actually be a hardening of the security of computer B. If only a certain user of A is allowed to connect to B without password, and then remote passwords are deactivated (making that, if you need to input a password, you can not connect), then a cracker breaking into A would have to first break into the account of that certain user to access B. Otherwise, no other user is allowed to try to connect to B from A.

Whatever…. Let’s get going:

In computer A, generate a DSA key for that machine (and account):

ssh-keygen -t dsa

This creates the following file at ~/.ssh/:

id_dsa.pub

The contents of such file should be copy-pasted (beware line-breaking, because it is a single, very long, line) into B, namely into a file called (create if doesn’t exist, append to it if it exists) ~/.ssh/authorized_keys2.

Now, the A user in whose ~/.ssh/ resides the id_dsa.pub, will be able to connect without password to the B computer account of the user in whose ~/.ssh/ is the authorized_keys2 file.

Comments (2)

Xgl with Xfce

I previously posted about running Xgl under GNOME. Well, it seems that the Xgl/Beryl duo can be run smoothly under any other desktop environment, e.g. Xfce.

To attain that (after you have GNOME/Xgl running), just create two files:

/usr/local/bin/startxgl_xfce

Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
# Start Xfce
exec xfce4-session

and

/usr/share/xsessions/xfce4-xgl.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Xfce-Xgl
Exec=/usr/local/bin/startxgl_xfce
Icon=
Type=Application

The latter inserts a “Xfce-Xgl” entry in the GDM xsession list, which will call the former. That one actually startx Xgl and opens Xfce. Nice, uh?

Comments

Private networks for dummies

Maybe you have two computers at home, with no router, and no wireless, and want both to share an Internet connection. Or maybe you want to set up a home LAN with non-public addresses. If so, read on.

I have set up my laptop to use my desktop computer as a NAT to connect to the Internet.

Requirements and setup

Your NAT computer needs two Ethernet cards: one to connect it to the Internet, and another one to connect it to the laptop. You also need a crossover cable, to connect the laptop to the desktop computer.

The physical setup is easy: make the connections as below:

Desktop computer setup

You need to set eth1 (second NIC) of your comp to connect to the LAN, and leave the eth0 as it was (to connect to the internet). Edit /etc/network/interfaces (for Debian. Other distros, edit the corresponding file), and add (suposing the network you want to create is 192.168.10.0):

iface eth1 inet static
  address 192.168.10.1
  netmask 255.255.255.0
  broadcast 192.168.10.255
  gateway 192.168.10.1
  post-up route del -net 0.0.0.0 gw 192.168.10.1 eth1
  post-up route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.10.1 eth1

The last two lines (man interfaces) remove the default routing path that bringing up eth1 sets, because we want eth0 to still be the default, with only signals going to 192.168.10.0 network being routed through eth1. The latter is set by the last line.

Laptop setup

We have to modify /etc/network/interfaces, too. Here it’s eth0 that we set up:

iface eth0 inet static
  address 192.168.10.2
  netmask 255.255.255.0
  broadcast 192.168.10.255
  gateway 192.168.10.1

Comments

What I’ve done to my laptop

OK, this entry is just a reminder for myself.

Install ATI drivers

I followed the instructions at this wiki. For the record, I used method 1, and it worked.

Update: The link above seems dead. Read a a more recent post about Compiz Fusion under Debian Lenny for info on ATI drivers instalation.

Install a SMP kernel

My CPU is an Intel Core 2 Duo T7200… I want a SMP kernel, otherwise I am wasting one of the two cores!

Problem is, the friggin Ubuntu has no 2.6 kernels labeled “SMP”. Why, oh why!? OK, I found out: all 2.6.*-686 kernels are actually SMP, even if they don’t say anything. If you have 1 CPU, fine. If you have more, they’ll be detected at boot time. No more “-smp” in the kernel names.

Wireless with 686 kernel

The default 2.6.15-686 supports the wireless just fine, but installing a 686 kernel (required for SMP, see above) seems to break the wireless. However, the solution is easy. As stated in this Ubuntu forum thread, one just needs to install the “restricted” kernel modules corresponding to her kernel (in my case 2.6.15-27-686):

% aptitude install linux-restricted-modules-2.6.15-27-686

After that, reboot. I guess that the new module is loadable (try modprobe ipw3945), without having to reboot… dunno. Also, if you want to have the restricted modules package upgrade automatically, install linux-restricted-modules-686.

WPA encription for WiFi

Update: Read a more recent article: WPA under Ubuntu/Debian.

Install a 64-bit kernel

OK, installing the mainstream 32-bit Ubuntu was a success. Now I have given Ubuntu amd64 a try (amd64 is for both EM64T (Intel) and AMD64 (AMD)).

Everything went smooth, except installing the ATI drivers (as explained above): the screen froze black when loading GDM. To solve this, I read the troubleshooting section in the link above, and found out that I could either add:

Load "extmod"

or:

SubSection "extmod"
  Option "omit XVideo"
  Option "omit XVideo-MotionCompensation"
  Option "omit XFree86-VidModeExtension"
EndSubSection

to the Section "Modules" of /etc/X11/xorg.conf (beware, it’s one OR the other, not both). For me the Load "extmod" did not work, but the SubSection "extmod" did.

Now, for the Xgl thing in 64-bits…

Xgl for 64-bits

I followed the instructions in a previous post, but I found out that some packages were missing, so I manually downloaded them from the Xgl.compiz site. Namely, I downloaded them from the “Edgy” section. However, it didn’t work for me :^(

Update: Compiz Fusion under Debian Lenny in a more recent post.

Comments (2)

Xgl with GNOME, under Ubuntu Dapper Drake

OMG!! Xgl is so pretty!!

First things first, I have to say how I’ve made it run. I say in a previous post (that I actually wrote some minutes ago), that I have given a try to Ubuntu, to test how good that Xgl thing is. And man is it good!

Xgl is a graphics server, something that interprets data and displays it on the screen (as XFree86 and X.org). It basically allows for 2D effects of a Desktop Environment to be rendered with the powerfull engine of the Graphical Card, which untill now only accelerated the 3D effects, as e.g. games. However, one needs a window manager that takes advantage of these capabilities to create effects. The first such a wm was Compiz. Sadly, I was not able to install it, but I did install Beryl, which is a fork of Compiz.

I mostly followed the instructions in Fred.cpp’s blog[es].

It basically boils down to:

As root, or with the infamous sudo:

aptitude remove compiz compiz-gnome cgwd cgwd-themes xserver-xgl csm

Add to /etc/apt/sources.list (the last line only if you have a 64-bit CPU):

deb http://www.beerorkid.com/compiz/ dapper main
deb http://xgl.compiz.info/ dapper main
deb-src http://xgl.compiz.info/ dapper main
deb http://xgl.compiz.info/ dapper main main-amd64

Get the GPG keys for the repositories:

wget http://www.beerorkid.com/compiz/quinn.key.asc -O – | sudo apt-key add –

Then:

aptitude update && aptitude upgrade

Install Xgl, Beryl and Emerald (the theme manager for Beryl):

aptitude install xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 beryl beryl-core beryl-manager beryl-plugins beryl-plugins-data beryl-settings emerald emerald-themes

Now everything is installed, we need to create 2 files:

/usr/local/bin/startxgl, our startx replacement. Its contents:

Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
# Start GNOME
exec gnome-session

/usr/share/xsessions/gnome-xgl.desktop, a new entry for the GDM session menu. Its contents:

[Desktop Entry]
Encoding=UTF-8
Name=gnome-xgl
Exec=/usr/local/bin/startxgl
Icon=
Type=Application

Then chmod +x them both.

We then need to enter GNOME as a regular user (if we are not already in it), and go to System/Preferences/Sessions/Autostart programs, and add beryl-manager to them. In the next GDM login, we will have an gnome-xgl option for a session. Choose it, and there you are.

Second, the screenshots (click to enlarge):


A window being minimized, fading away.


Two windows being shown as with MacOS exposè.


Two semitransparent windows. You can see my blog through a terminal :^)


A video, being played at the edge of a cube (the faces of which represent different desktops).


A video being played semitransparent. We can see an icon below it!


The video in the corner, plus it is raining all around!

Comments (2)

Installing Ubuntu Dapper Drake

After failing misserably to run Xgl in Debian Etch, I decided to install Ubuntu Dapper Drake (which allegedly supports it) in a spare partition of my hard disk. Below is the timeline of such an instalation:

13:27

Turn on computer, insert Ubuntu CD. Choose “run the CD as a LiveCD“. See it loading.

13:31

The LiveCD has booted, and I already have a fully functioning GNOME desktop. I spend 2 minutes playing around.

13:33

Select a link for “install Ubuntu on the hard disk”, and answer a couple of questions (username, password, language, time zone, keyboard layout), and off it goes…

13:36

It starts copying files to the hard disk.

13:44

Everything done. Asked whether I wanted to go on using the LiveCD by now, or directly restart to use the Ubuntu installed on disk. I choose the latter.

13:46

I am presented with GDM, which asks me to log in.

13:47

I am already inside GNOME, running my freshly installed Ubuntu OS!!

Summary

4 minutes for LiveCD working 100%, 20 minutes for full installation.

Comments (1)

On-board sound hijacking my SBLive

OK, I made a fresh install of Debian Etch on my home computer, and a sound problem appeared. My computer has a soundcard integrated in the ASUS A7N8X-E Deluxe motherboard (best piece of hardware I ever bought, this mobo), but I use a spare Sound Blaster Live! I took from my previous computer, so I want the sound to come out of the latter, not the former.

However, the kernel modules to control the on-board soundcard seem to get loaded first, and sound output defaults to it. There could be more elegant solutions, but mine was to copy the following in the /etc/rc.local file (this file gets executed after the /etc/init.d/ services started at boot time):

modprobe -r snd_intel8x0
modprobe -r snd_emu10k1
modprobe snd_emu10k1
modprobe snd_intel8x0

What these lines do is remove the module for the on-board sound (intel8x0), then the SBLive! one (emu10k1), then reload them, but the SBLive! one first.

Comments

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »