How I added an AUX input* in my car’s CD30

*Actually input extension cable. The input was already there, it was just not accessible.

One of the things I first noticed was that there was an option for AUX from the CD30 menu, so I started looking for a cable and indeed there was a cable sold for about 15 euros online. But I decided that I could build a small cable by myself and do not bother buying a new one.

So here is what I did:

Took the CD30 out of the car using two DIY extractors…made from a hanger. Worked nicely…

extractors

Found the pins that correspond to the AUX (R,L,Ground)
diagram
plug plug2

Started building the cable (I used some pins from an old computer PSU)
before-cables cable-done

Connected the cable to the pins:
(forgot to take a pic, but there is not much to see anyway)
Just be careful: Red is Right. The black is usually the ground. The other one (green or white etc) is the Left.
Done!

finished

sh, bash, dash and Ubuntu

Hi!
I wanted to install a quite old package in my ubuntu computer using the .sh file I downloaded from their website. So, I tried typing in terminal:

sudo ./package_name.sh

and I got:

/bin/sh: 0: Can’t open ./package_name.sh

Briliant! Since you are here, you are probably looking for a fix.

The problem stems from the fact that Ubuntu uses dash as the default shell and your script is written with another shell in mind. The most usual is bash (sh).

So type in a terminal window:

sudo bash ./package_name.sh

This will force ubuntu to run the script using bash.

Enjoy!
Vasilis

PSAD Quick Fix

I like psad. I use it often and I find the email reports really handy.

Here is an issue I faced in Ubuntu and the solution:

Instead of the reports I received an email with the following contents:

[-] You may just need to add a default logging rule to the /sbin/iptables
‘filter’ ‘INPUT’ chain on oxide-server.  For more information,
see the file “FW_HELP” in the psad sources directory or visit:

http://www.cipherdyne.org/psad/docs/fwconfig.html

[-] You may just need to add a default logging rule to the /sbin/ip6tables
‘filter’ ‘INPUT’ chain on oxide-server.  For more information,
see the file “FW_HELP” in the psad sources directory or visit:

http://www.cipherdyne.org/psad/docs/fwconfig.html

 

I found on the web several people with the same problem, so here is what worked for me:

  1. Enable ufw logging. Type in console as root: ufw logging on
  2. Type as root:
    iptables -A INPUT -j LOG
    iptables -A FORWARD -j LOG
    ip6tables -A INPUT -j LOG
    ip6tables -A FORWARD -j LOG
  3. Open /etc/ufw/before.rules and type before the COMMIT directive:
    -A INPUT -j LOG
    -A FORWARD -j LOG
  4. Open /etc/ufw/before6.rules and type before the COMMIT directive:
    -A INPUT -j LOG
    -A FORWARD -j LOG
  5. Restart ufw by typing as root:
    ufw disable
    ufw enable
  6. Test if it worked:
    psad –fw-analyze

I know that some parts appear to do very similar things but for a strange reason it worked only after the exact above procedure.

Hope it helps!
Vasilis

Image resize & JPG to PDF

I am preparing some applications and I needed to scan several documents and upload them online in PDF format. The problem is that there is an upload limit of 3MB per PDF document. Since I like to have my files well organized and maintain digital records for everything I always use the maximum resolution (600dpi) when scanning. This, of course, results in 5-6 MB images.

So, I had to resize multiple JPG documents and then combine them in 6-7 pdf files.

The tools I found extremely handy for this purpose were:

  • FastStone Photo Resizer: For resizing multiple files in a fraction of their original size. Worked like a charm! (http://www.faststone.org/FSResizerDetail.htm)
  • FM JPG To PDF Free: For combining the images to a single PDF. Pay close attention (as always?) when installing the application and uncheck the installation of unnecessary features like “Babylon search”, unless you really like them. (http://www.fm-pdf.com/FM-JPG-To-PDF-Converter-Free-Setup.exe)

From this point the procedure was easy an it was more drag n’ drop.

Let me know if you are aware of better alternatives!

Have fun!
Vasilis

P.S.: Maybe next time I should try using a loseless image format, like PNG, instead of JPG.