troubleshooting kevin

I upgraded Kevin ,our 2 year old Dell Desktop. We usually don’t use the debian system installed in there so I haven’t really upgraded it for a while now. So now I did an apt-get upgrade and just my luck that it crashes after logging in.

So I was trying to troubleshoot all the errors on the. .xsession logs but it turns out I was just wasting my time. What I did to fix it is just mv the .config and everything worked. I have a brand new spanking Gnome Unity desktop.

Update: 3-20-12
I just fixed my Dual head setup today. Compiz is still not running though. What I did is put “Virtual” setting on the screen section of my xorg.conf and restarted gdm.

I then tried grandr to rearrange the displays. Bingo!

Making a Blackberry out of my Nokia N95

I finally found a working solution to the problem of getting all my email accounts in one single place and also getting it “pushed” to my cellphone. I will give you all the steps but YMMV. Basically,what we need is to setup a mail server.

  1. I have a yahoo ,a gmail and my ISP email(comcast). I have to somehow fetch all the mail from these services to my server. Yahoo however sucks coz you have to pay to get access to your email via the POP protocol so what I did is just forward all my mails to my other accounts ,I chose gmail. Fetching Gmail and Comcast using fetchmail is pretty straightforward , so I’ll leave that to another post.
  2. Install a mail server. I already have MTA ,which is Postfix which I already got working for local delivery so All I need left is a POP/IMAP server. For these,I tried Cyrus,courier and Dovecot,stay away from Cyrus ,SASL is a PITA to setup..I am using Dovecot,much much simpler to setup and well documented configs.
  3. Make sure if you have a firewall that you open up the right ports for imap,imaps,pop,smtp .Also don’t forget the server itself coz sometimes there are firewalls installed like fail2ban and moblock.
  4. I use Imap on my N95 coz it’s much simpler to manage and you also get the “push email” functionality like that of the Blackberry. Just go to messaging and enter your server details . And one very important thing I noticed, Most of the time when accessing your mail It would like it gets stuck in “Updating Mailbox ” but actually it is synchronizing the folders . So have “PATIENCE”. If it really takes a while try to trim down the folders that one is subscribing to and try again.

Here are my configs.

My dovecot.conf:

protocols = imap imaps managesieve
disable_plaintext_auth = yes
shutdown_clients = yes
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl = yes
ssl_cert_file = /etc/ssl/ca/certs/dovecot.pem
ssl_key_file = /etc/ssl/ca/private/dovecot.pem
mail_location = maildir:~/Maildir
namespace private {
separator = .
prefix = INBOX.
inbox = yes
mail_privileged_group = mail
protocol imap {
mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
imap_idle_notify_interval = 120
imap_client_workarounds = delay-newmail netscape-eoh outlook-idle
protocol managesieve {
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = root@localhost
mail_plugins = sieve
global_script_path = /home/vmail/globalsieverc
auth default {
mechanisms = plain login
passdb pam {
args = blocking=yes
userdb passwd {
args = blocking=yes
user = root
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
dict {
plugin {

My postfix

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_security_level = may
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
smtpd_tls_received_header = yes
smtpd_tls_cert_file = /etc/ssl/ca/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/ca/private/postfix.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_loglevel = 1
myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname , localhost, localhost.localdomain
relayhost = []:587
mynetworks = [::ffff:]/104 [::1]/128
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
home_mailbox = Maildir/
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
transport_maps = hash:/etc/postfix/transport
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
local_recipient_maps =
smtpd_tls_auth_only = no
receive_override_options = no_address_mappings
content_filter = smtp-amavis:[]:10024

Diagnosing a Linux problem


I was trying to backup my debian server using this s3fs script but apparently I forgot that the script needs fuse in the kernel. Since I just upgraded my kernel to 2.6.30 ,I mistakenly compiled Fuse in the kernel ,It needs to be compiled as a module.

So this provides an excuse to upgrade my kernel again,ok done it . Installing but what is this !!

grub-probe: cannot find a device for /

shucks! Grub has a bug or LVM ..anyway I found a temporary solution in the internet..

To top all of this, debian’s kernel-package has a missing or malfunctioning initramfs hook script which leaves my new kernel without an initrd! Thanks to a backup kernel ,I was able to boot and copy the example initramfs script in /usr/share/kernel-package/examples/ .

Wheeew! that tooked a lot of time to diagnose. . I wonder if stable has this kind of problems .

Awesome sound with ChainTech AV-710

Jus t upgraded my soundcard to a Chaintech AV-710. What i like about this card is the digital output,It’s way cooler to connect to my A/V receiver via TOSlink. I now can listen to my favorite internet radio through my receiver,Awesome!

Well,I had to search the net for a decent .asoundrc and I found one that works but It only allows me to connect through digital but not the analog. I want the analog to work coz my pc is in my bedroom and my A/V receiver is in the living room and I want the small speakers in my bedroom to function also.

So I did a little research and I did a little hack to my asoundrc .

Here is the original asoundrc.

I also added this to enable digital passthrough. You’ll need this if you want to watch DVDs and you want to hear Dolby/DTS surround sound. Just paste this to the original asoundrc.

pcm.!iec958 {
type plug
slave.pcm “hw:0,1”

I also made some some small tweaks to the asoundrc to allow me to switch outputs from digital to analog.
So this is the final asoundrc.

pcm.!default {
type plug
slave.pcm “dmixer”

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm “hw:0,0”
format S32_LE
period_time 0
period_size 1024

# increased buffer_size because in my system 1024 cause bad
# audio performance (for totem media player and mplayer)
buffer_size 8096

rate 44100
bindings {
0 0
1 1

ctl.dmixer {
type hw
card 0
device 0

pcm.!iec958 {
type plug
slave.pcm “hw:0,1”

I just change dmix settings to device 0 instead of 1. So now what i do when I want to listen through my Onkyo 504 A/V receiver is this:

mplayer -ao alsa:device=iec958 *mp3

And If want digital surround Dolby or DTS :

mplayer -ao alsa:device=iec958 -ac hwac3 dvd://

Hope this Helps!

Big Blue ThinClient with Debian

About a week ago ,I got the IBM Netvista 2200 that I bought from Ebay . I wasn’t expecting it to be that small a thin client . Its just about an inch and a half thick..Anyways, I was planning to setup it up as a diskless client. So I already had a pretty rough idea how a diskless client works.. To sum it up,it gets its kernel from a server and run everything off of that server ..

Well,for a client to boot from the server it must have PXE. Turns out mine doesn’t have it.. so it has to have some other means of booting from a server since it’s a thin client.. to get it to boot one must setup the dhcp server to serve the kernel via NFS since TFTP via PXE doesn’t work ..

I have my Openwrt setup that way ..I’ll post my dnsmasq here next time ..

Azureus and Openwrt

The following problem has been bugging for the past two days . I have been using bittornado for my torrent needs ever since I was in to torrents. Bittornado is curses base and I tried Azureus which is java base for a while but I didn’t really tinker with it that much . Anyways ,I have a router in between my computer and my cable modem . I have OPENWRT White Russian on it. It’s really nice to have a little bit of something in between you and wild net outside ..

My home computer network looks like this :

* Debian Sid on a Pentium 3 500mhz
* Linksys WRT54G ver 2.2 i think
* Openwrt on the Linksys

I was trying Azureus and I notice that It keeps telling me that my Router is not set up right . I always get a either a DHT firewalled or NAT firewalled status on the lower status bar .I went about googling for solutions :

1. I sshd to my router and added the ff line in my /etc/firewall.user: iptables -t nat -A prerouting_rule -i $WAN -p tcp –dport 6880:6990 -j DNAT –to
iptables -A forwarding_rule -i $WAN -p tcp –dport 10000 -d -j ACCEPT
iptables -t nat -A prerouting_rule -i $WAN -p udp –dport 6880:6990 -j DNAT –to
iptables -A forwarding_rule -i $WAN -p udp –dport 10000 -d -j ACCEPT
2. I reloaded the firewall after that by : #/etc/init.d/S45firewall restart
3. however that didn’t work ,so ;I tried changing /etc/config/firewall ,this file is used by NBD’s qos-scripts and according to the info I googled supposedly makes it easy to change the nat behaviour ..
I added this line: forward:dport=6880-69990:

All this suppose to setup my my portforwarding , this supposedly forwards all incoming connections to my routers ports 6880-6990 to my computers port 10000. .
I tried to look at my computers netstat output but all I can see was that my port 10000 is open and when I used shields-up to probe my port 6880-6990 ,it was also open but still no NAT success with Azureus..

I also noticed that the netstat output shows that there are tcp6 and udp6 ports that are open . I didn’t know that I was using anything that has to do with ipv6 .. So I googled my friend google ..hehehehe .. and I came across this forum for redhat users … It suggested there to turn off aliases for ipv6 in /etc/modutils/aliases . That took care of the ipv6 problem when I rebooted no more ipv6 ports opened but i still have no nat for Azureus ..

I finally got a working /etc/firewall.user line that worked .after so many hours of tweaking . I read somewhere that azureus or bittorrent for that matter doesn’t like the usual ports opened coz some isp’s are blocking this ,so I thought about it.. Maybe just change the dport to something else and don’t change the forwarding rule to another port .

So my final rule that got me is this :

iptables -t nat -A prerouting_rule -i $WAN -p tcp –dport 60881 -j DNAT –to
iptables -A forwarding_rule -i $WAN -p tcp -d -j ACCEPT
iptables -t nat -A prerouting_rule -i $WAN -p udp –dport 60881 -j DNAT –to
iptables -A forwarding_rule -i $WAN -p udp -d -j ACCEPT

That dport flag on the prerouting rule is arbitrary .. You can change it to anything . After this I reloaded the firewall and to make sure ,I rebooted the router and also my computer ..
I also change the port settings on Azureus and voila! Magic! My azureus is going green eversince ..

A few pointers ,give it a little while if at startup its yellow .. it takes a while for it to change ..Also,there are some torrents out there that is bad ,meaning ,there is no seeds and tracker site is down ,So if you run into this then it’s not really you thats the problem . Also, I don’t have to say this but if you’re torrenting you must be prepared to give,i mean don’t try to be a leech.. or you’ll get what’s coming to you ..

I hope this helps all those Azureus users out there. Coz ,this has got me some lost hours of sleep!