Sunday, November 28, 2004

Checking new email by korn or biff on secure-connection-require mail servers with stunnel

You can use email application to check if you have new email messages even if the application does not support secure connections and your server requires an encrypting. The solution is stunnel utility. Stunnel opens a port on your local machine and redirects all traffic directed to this port to a different port on another machine using SSL (i.e. secure) connection.
If, for example, your email notification application (Korn in my case) cannot use IMAPS connections but IMAP4 only, you have to set stunnel in such a way that Korn connects unsecurely (using IMAP4) to the port on your local machine and than stunnel redirects packets thru a secure connection to a proper port on your email server.
Let's start. Create or modify '/etc/stunnel/stunnel.conf' file with the content:

pid = /stunnel.pid
setuid = root
[my_imaps_tunneling]
accept = 2143
connect = your.email.server.com:993

Now you only need to configure Korn to connect to localhost at port 2143 (you can choose another unused port number) . Now you have to run '/usr/sbin/stunnel'
If you want stunnel running just after reboot or restart of your machine add:
/usr/sbin/stunnel
line in at the bottom of your '/etc/rc.d/rc.local' file.

Saturday, November 27, 2004

Fedora Core 3 and Palm devices using USB

The common problem with Palm devices using USB connection under Linux are access rights to ttyUSB0 and ttyUSB1 devices. Only root user have permissions to these files. Setting permissions to read/write for group and others is, maybe not very elegant and secure, but fast and easy solution.
Fedora Core 3 uses a new method of device menagement. The device files in the /dev directory exist only if proper devices are connected to the system. Therefore /dev/ttyUSB0 and /dev/ttyUSB1 exist only if HotSync button is pressed in the Palm device and you cannot change permissions to these files permanently.
To solve this problem you have to add two files:
First:
/etc/udev/rules.d/10-visor.rules
and you should add into this file a line: KERNEL="ttyUSB1" SYMLINK="pilot"
and
/etc/udev/permissions.d/10-visor.permissions
and you should add into this file a line: ttyUSB1:$local:uucp:0660
The content of filed in rules.d and permissions.d control the behavior of device manager during the construction of devices in the /dev directory.
Now you can set pilot device to /dev/ttyUSB1 in KPilot or use it in pilot-xfer. But remember, you have to run pilot-xfer -p /dev/ttyUSB1 AFTER fou have pressed HotSync on your Palm.
Based on: http://www.clasohm.com/blog/one-entry?entry_id=12096


Fedora: setting default window manager

To set/change default window manager in Fedora use switchdesk tool. For example. to set KDE your default window manager run: switchdesk kde

Fedora Core 3: problems with X forwarding in SSH

X forwarding by SSH in Fedora Core 3 couses some problem. For example, Emacs or Midnight Commander started on remote machine show errors after several minuts of running. To correct this problem you should create a file ./ssh/config and insert one line into this file:
ForwardX11Trusted yes
That's all, have a nice X forwarding ;)

Friday, November 26, 2004

Fedora Core 3 on Compaq Presario 700

Fedora Core 3 works fine on Compaq Presario 700. The processor cooling is OK, ACPI works out of the box. The only thing that have to be corrected is the problem with PS/2 mouse. TouchPad works fine but PS/2 mouse does not work. To make PS/2 muse working you have to pass an extra parameter to the kernel. The parameter is 'psmouse.proto=imps'. The easiest way to make it works is to add this parameter permanently in /boot/grub/grub.conf
The example line in /boot/grub/grub.conf should look like:
kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol00 rhgb quiet psmouse.proto=imps

Polish fonts in MPlayer

To get Polish fonts in subtitles in MPlayer one should copy files describing a font from /usr/share/mplayer to ~/.mplayer/font. For example, if one wish to use MS Windows encoded fonts in MPlayer he/she should copy to files from /usr/share/mplayer/font-arial-cp1250/font-arial-24-cp1250 to ~/.mplayer/font/
If ~/.mplayer/font directory does not exist, one should create it.