Hack for disabling suhosin when using phpmyadmin on Debian

If you apt-get install phpmyadmin on Debian/Ubuntu, you will notice the quoted warning message:

Server running with Suhosin. Please refer to documentation for possible issues.

You will get reference and possibile solutions here.

A fast get to achieve a fully working phpmyadmin on a trusted environment, is to enable the simulation mode on the phpmyadmin vhost, editing /etc/apache2/conf.d/phpmyadmin.conf and adding:

php_flag suhosin.simulation On

inside the relevant IfModule directive, for example [IfModule mod_php5.c] if you are using libapache2-mod-php5.

Leave a Comment

Hylafax with A01-PU3 WebRunner USB

HylaFAX is an enterprise-class system for sending and receiving facsimiles as well as for sending alpha-numeric pages.

The A01-PU3 is an usb PSTN modem that support the CDC ACM standard, and it works great on Linux!

A01-PU3

On Debian you can easily setup an Hylafax Server installing it by:

aptitude install hylafax

And configure your fax device with faxaddmodem:

faxaddmodem /dev/ttyACM0

At this point, the faxserver was correctly receiving faxes but the sending was constatly failing due to no carrier errors:

Nov 16 12:18:09 hylafax FaxSend[8506]: SEND FAILED: JOB N DEST XXXXXXX ERR [2] No carrier detected

You should add to /etc/hylafax/config.ttyACM0 for fixing the problem:

ModemResetCmds:         ATX3

You can find other useful information on:
DebianWiki
HylaFax Documentation
HylafaxFax Desktop Clients

Leave a Comment

Exporting serial tty lines over TCP

On server:

socat tcp-l:54321,reuseaddr,fork file:/dev/ttyS0,nonblock,raw,echo=0,waitlock=/var/run/tty

On client:

while true; do socat pty,link=/dev/vttyS0,raw,echo=0,waitslave tcp:192.168.1.1:54321; done

A lot of fun exporting fax-modem serial line of servers geographically far and use a central hylafax server with multiple virtual modems =D

Leave a Comment

Linksys WAG54G2 and slowness on p2p

It’s 3 weeks that I bought a Linksys WAG54G2 wifi adsl router, and I wasn’t very happy with it.
Even with a very low bandwidth allotment for my torrent client, the navigation on every site was very SLOW (~5 sec for http://www.google.it), with the latest firmware (1.00.17) and with default settings.

Today I probably found a solution for the WAG54G2 problems with high latency when using p2p. The problem is probably not the router itself, but it’s poor QoS implementation or its gui frontend.

Let’s look at my actual configuration:
Linksys WAG54G2 QoS
With this QoS configuration, I can happily browse the internet while torrenting. I don’t have any idea why the hell with QoS disabled, the opening of new connections is massively retarded.

For those who aren’t fluent in Linksys web interface, you should go to Applications &
Gaming -> QoS;
Set Internet Bandwidth to Manual (I have a 7mbits DSL, ~8000 should be good, I put 9000)
In Category -> Applications, Add a new application: name web, port range 80 80 on the first line, 443 443 on the second and 53 on the third. On the dropdown select Both, Priority Medium, then Add.
Save settings.
Finish.

If these settings solve your problems, please drop me a comment on this page, thanks!

Comments (2)

Tips for configuring Ubuntu Karmic on MacBook Pro

The new Ubuntu Karmic (9.10) will be release soon and it will greatly increase the support of MacBooks, thanks to the official Ubuntu Mactel Team (https://launchpad.net/mactel-support)

Here are a short list of tips for configuring your Macbook with Ubuntu Karmic.

To change the default behavior of the Fn keys, because I use much more the F1, F2, F3 ecc, than changing brightness of my screen, keyboard, etc.
Added in /etc/rc.local:

echo 2 > /sys/module/hid_apple/parameters/fnmode

The new hid-apple module has native support for keys for changing brightness on screen and keyboard, and also for the integrated light sensor. Unfortunately, hid-apple obey too much to the light sensor, changing every few seconds the brightness without taking care of manual changes to the brightness. In a few words, I cannot manually change the screen brightness because the light sensor reset it every time.
So I decided to reinstall ye good olde pommed to control everything.

sudo aptitude install pommed

For changing settings:

sudo nano /etc/pommed.conf

For mounting the mac hfs+ partition on Ubuntu:
sudo aptitude install hfsprogs
Add to /etc/fstab:
/dev/sda2 /media/mac hfsplus defaults 0 2
Important note: you *MUST* disable journaling on the hfs filesystem, because Linux doesn’t know how to handle the journal. You can disable journaling on the mac volume when you are on MacOsX running in a terminal:

diskutil disableJournal /

I have also changed on my Ubuntu /etc/passwd the UID of my user from 1000 to 501, so I don’t need to use my root account to access my mac home directory. You can also change the mac user UID from mac, using the Account applet in the System Preferences panel (but I don’t have tried yet)

Also remember to add to your sources.list the Medibuntu repository (https://help.ubuntu.com/community/Medibuntu) and Mactel PPA (https://edge.launchpad.net/~mactel-support/+archive/ppa)

Leave a Comment

My network hints for setting up VirtualBox on Mac Host with Linux Guests

Virtualbox is one of my favourite OpenSource project, and I am actively following it’s rapid development, headed by Sun/Oracle.
You can use it very easily, and there are tons of howto out of here on how to setup, configure and run your favorite operating system inside another.

The default settings put on your virtual machine a single NAT device, which is good if you only need to reach Internet inside the VM, but it became pretty unusable if you need to access to the VM from an external machine. Here came in help the bridged networking mode, so your VM will get an IP address directly from the DHCP of your current network (both wired or wireless), so you can connect to the VM from everywhere, as you can with the host machine. This is the most flexible environment.
If you want to stay more secure (and probably gain some transfer speed), you can use the host only network: it’s a network managed with dhcp by virtualbox, and it’s only accessible from your host machine (it has a dedicated virtual interface).

Sharing files with the host machine:

  • If you need to access to your music collection inside the VM, the best way is to activate the file sharing function of your mac inside System Preferences, and after mount it inside the VM using both command line:
    mount -t cifs -o username=yourusername,password=yourpassword,uid=1000,gid=1000 //name.of.the.host.machine/yourusername /mnt/here
  • If you need to export a directory from the VM to the host (for me, it’s the /var/www, so I don’t need to ftp/rsync files when doing web-development), the fastest way is to setup a nfs server and mount it on mac. Apt-get nfs-kernel-server and edit /etc/exports with:
    /home/scorp 192.168.56.1(rw,async,no_subtree_check,insecure,all_squash,anonuid=1000,anongid=1000)

Leave a Comment