Monday, December 31, 2007

using pkg-config

Need to compile a gtkglextmm program?


pkg-config gtkglextmm-1.2 --cflags --libs

g++ `pkg-config gtkglextmm-1.2 --cflags --libs`

where button was the example program in the directory.


Thursday, December 27, 2007

pogl - perl opengl makes it in to debian libopengl-perl

I noticed that we dont have to install pogl directly it is now in sid!

Sunday, December 16, 2007

dosemu issue

I had dosemu working with an old application which required a hasp plug on my linux box.

i got it partialy working. the issues are

1) get dosemu working (dont need windows just the dos version)
2) redirect input from hard drive copy of the atm databasee disk so i can use it without loading the disk in cdrom player
3) need to have permission to use the hardware parallel port.
this requires an edit of the global /etc/dosemu/dosemu.conf to access the parallel port
as well as being ROOT user in order to have it work (or setuid or something) see the
readme in the /doc directory of the dosemu which i put in /oldmachine2/me/dosemu-1.2.2

need to play with it more. seem to need to be root and set it up. oops i wonder if the
settings are specific to the workstation
looks like
$_ports= "..."
$_ports= $_ports, " device /dev/lp0 fast range 0x378 0x37a"

cat /proc/ioports |grep parport
if no parport, need to enable it in the bios :).
then match the above line to the to the memmory range....

but please review this.

Wednesday, December 12, 2007

browse over ssh issues

i copied this from
need to think about this....

Ssh Port Forwarding and "channel 3: open failed: connect failed: Connection refused"

In relation to a tutorial I previously made on how-to connect to a remote mysql server by forwarding port with ssh, I found out that some distributions like debian sarge where not using a default configuration that allow you to do that by default.People who get an error like:

ERROR 2013 (HY000): Lost connection to MySQL server during query


channel 3: open failed: connect failed: Connection refused

might find an answer to their problem.

By default and for security reasons, Linux distribution don't let mysqld server accessible from the outside. There is actually 2 ways to achieve this:

  1. binding the service to address, this is the default on ubuntu
  2. skipping networking, in that case, only local (non TCP/IP) connections will be allowed, on Unix, connections will be made through a Unix socket. This is the default on debian sarge

In the first solution, you need to add in the [mysqld] section of /etc/mysql/my.cnf the directive:

bind-address =

the second solution use:



While you can connect on a localhost server which skip networking like you could with a server which only listen on address using:

$mysql -u root -p -h localhost

you can not connect to it using an ssh tunnel with port forwarding.
as you will get an error like:

channel 3: open failed: connect failed: Connection refused

on the remote host

ERROR 2013 (HY000): Lost connection to MySQL server during query

on the client host.

So in order to be able to connect to a remote mysql server which is only accessible from localhost, comment the directive:


and replace it with

bind-address =

This will not make your server less secure (as the service won't be accessible from the outside) and you will be able to access your database server remotely with tools like mysql-query-browser, mysql-administrator using a ssh tunnel.

Hope this helped.

previous thing was

In a previous article we saw how to connect to a remote mysql server running both ssh and mysql.

This time, we are going a bit further and will see howto connect to a remote server running ssh in order to be able to access a sql server on the remote LAN.

This system allow to hide the SQL server from the outside. Please, keep in mind that in this example, we are connecting to a MySQL server, but it could be any service running there.

Let's put it on the table. Imagine that we have got a web server which is put under high load, a clever way to soften the effect of the load and in the same way protect our SQL datas from the outside will be to have the HTTP server available to the outside (so it can serve the web pages), and hide our MySQL server from the outside.

This will look like this:

We saw last time, that in order to securely connect to a remote MySQL server running both mysql and ssh, we had to create a tunnel between our desktop and the server where we had to forward port 3307 on our desktop to port 3306 running locally on the remote server by giving the following intruction to ~/.ssh/config:

Localforward 3307 localhost:3306

This time, we want to forward port 3307 on our desktop to port 3306 on the MySQL server (let says it as as IP adress). The only change we have to make to the previous configuration is to change the Localforward instruction by:

Localforward 3307

And simply use the same mysqlcc configuration as the one given in the How To Connect to a remote mysql server using mysqlcc and ssh tunneling Tutorial. It is as simple as that :). Here is an overview of the final configuration we have deployed:


People which do not want to use ~/.ssh/config might use the following command:

tester@laptop:~$ssh -L 3307:

Now, you can play around with port forwarding, later on, I will show you how to go even further and just do some useless be geeky thing.


Tuesday, December 11, 2007

Panel disappears Sound stops?

1) Panel sometimes disappears from bottom of KDE. How to get it back?

* run-> panel

panel name is "kicker" significance? think about look into kasbar too

2) Sound stops. Who knows why?

* Run /etc/init.d/alsa-utils start
seems to work

who knows what goes wrong?