Archive for November, 2006

Correct id3 tags in mp3’s from Sound Juicer

Posted by Tips on November 29th, 2006

Recently I built a dual core machine.  It rips mp3’s from cd’s like a hot knife through butter.  However when we copied and discovered the music in iTunes to sync over to our iPods (Wife has  a Mac) we found out that the id3 tags were broken.  What I found out tonight was that when you build the mp3 preference in Sound Juicer you have to add the following line.

audio/x-raw-int,rate=44100,channels=2 ! lame name=enc bitrate=160 ! id3v2mux

Set what you need set and you’re good to go.

For those who want to use Sound Juicer to rip mp3’s but do not know where to start Ubuntu Help comes in handy.  Incidentally that’s where I found the line above.  You can see the full tutorial here.

MythTv on Edgy 6.10

Posted by Tips on November 28th, 2006

I’ve found a good howto on getting MythTv running on Ubuntu Edgy.  It appears to be very complete with some good examples and links to many other resources for MythTv on Ubuntu.

For those who do not know what MythTv is.  MythTv is like Tivo for Linux.  With a pair of video recording cards you can do a lot with just one PC running MythTv.  In fact it’s more like Tivo and Slingbox rolled up into one.

Video for iPod

Posted by Tips on November 27th, 2006

Yeah for the normal person Video for the iPod is a distant dream.  I’ve found a tutorial that enabled me to use HandBrake on Linux for the first time.  I’m in the process of writing up a new tutorial since that one did not really work out of the box for me and I doubt for others.

Stay Tuned!

Flash 9 Beta for Linux

Posted by Tips on November 21st, 2006

If you want to test the latest beta of the Flash 9 Player then follow these steps. Note: There’s a newer beta out which can be found here. The directions below should still work.

1. Download the correct binary for linux at Adobe labs

http://labs.adobe.com/downloads/flashplayer9.html

2. Unpack the files into a directory somewhere.
tar -zxvf downloadedfilename.tar.gz
3. Copy libflashplayer.so into the following directory

sudo cp libflashplayer.so /usr/lib/mozilla/plugins/

4. Give the file correct permissions.

Code:

sudo chmod 644 /usr/lib/mozilla/plugins/libflashplayer.so

5. Link the file to Firefox’s plugins directory.

Code:

cd /usr/lib/firefox/plugins/

sudo ln -s /usr/lib/mozilla/plugins/libflashplayer.so libflashplayer.so

6. Restart Firefox and enjoy! You can put about:plugins in the url bar and hit enter and look for Flash Player 9 to make sure it’s installed.
If you’re having issues you can leave a comment here or on my thread over at Ubuntuforums.

Exporting to PDF

Posted by Tips on November 18th, 2006

If you’ve ever used OS X there’s one great feature where you can print anything as a PDF file. To do this in Linux is easy as well but you need to configure your system properly. Thanks to Dave (dbott67)on Ubuntuforums for a great tutorial. This howto saved me from insanity. It also probably saved a few trees as well!
First you will need to install cups-pdf

apt-get install cups-pdf

There was a bug that required a special command for Ubuntu more can be read about it here. From the bug it seems the problem has been resolved for awhile. If you have not updated your system it’s possible you are still using the older package and a update should resolve any issues with selecting a pdf printer in cups.

- Select SYSTEM > ADMINISTRATION > PRINTERS > NEW PRINTER
- Select LOCAL PRINTER
- Use detected printer: PDF PRINTER
- Select Print Driver:
- Manufacturer: Generic
- Model: Postscript Color Printer
- Name: postscript-color-printer-rev3b
- Click APPLY

Also dowdberry has published a part to make the pdf printer default.


Edit the /etc/cups/cups-pdf.conf file
Code:gksudo gedit /etc/cups/cups-pdf.confSearch for:
Code:Out ${HOME}/PDFand change to something more meaningful:
Code:

Out ${HOME}/my_print_to_pdf_folder

and restart:
Code:

sudo /etc/init.d/cupsys restart

And that’s it!  Enjoy!

Simple way to secure your box from the CLI

Posted by Tips on November 16th, 2006

This applies to all *nix users. The commands are basically the same, but consult your man pages if the options are different.

While Linux is mostly invulnerable to virii and other nasties on the internet there are those who would love nothing more than to crack your box and spam the world from it. This simple guide will help you understand and mitigate any obvious openings your box may still have.

Commands used: Netstat, Grep, and a lot of |

First lets run Netstat (A tool for viewing connections on your *nix machine).

mypc:$netstat

You may see the following output.

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.1.148:42206 www.someserver:ssh ESTABLISHED
tcp 0 0 localhost:53830 localhost:48125 ESTABLISHED
tcp 0 0 localhost:48125 localhost:53830 ESTABLISHED
tcp 0 0 192.168.1.148:43439 oam-d09b.blue.aol.:5190 ESTABLISHED
tcp 0 0 192.168.1.148:40620 205.188.2.64:5190 ESTABLISHED
tcp 0 0 192.168.1.148:52305 cs12.msg.dcn.yahoo:5050 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 4 [ ] DGRAM 9784583 /dev/log
unix 2 [ ] DGRAM 5480 @/org/kernel/udev/udevd
unix 2 [ ] DGRAM 11439 @/org/freedesktop/hal/udev_event
unix 3 [ ] STREAM CONNECTED 10225154
unix 3 [ ] STREAM CONNECTED 10225153
unix 3 [ ] STREAM CONNECTED 10225151 /tmp/.esd-1000/socket
~~~~output cut

What we have here is basic services running on your machine. You can see a few AOL and Yahoo communicator entries and a ssh session in progress. Most servers and desktops nowdays are locked down pretty well.

Changing the options up we put in netstat -ln and the output becomes a bit different.

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:867 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53830 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3689 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:55021 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:52283 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
udp 0 0 0.0.0.0:33026 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 0.0.0.0:861 0.0.0.0:*
udp 0 0 0.0.0.0:864 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
udp 0 0 0.0.0.0:631 0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 11103 /tmp/.gdm_socket
unix 2 [ ACC ] STREAM LISTENING 12655 /tmp/.X11-unix/X93
unix 2 [ ACC ] STREAM LISTENING 12668 /tmp/.X11-unix/X0
Now we can see what ports are actually running.

Look at the one below.

tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN

Port 631 is what is to the right of the : 127.0.0.1 is obviously the loopback address of the box.

Basically this is your cups service for printing waiting for a connection.

Since it’s listening locally it’s not a real problem. However if you saw 0.0.0.0:631 it would be different. Is it still a problem?

Depends. If you were using the Linux machine to act as a print server than it’s okay to have the service exposed. If you’re not behind a firewall then you may want to consider one or look up how you can restrict which ip’s can connect to your server on that port.

Other things you may want to look out for are services you do not need.

Consider 0.0.0.0:21 FTP if you’re not running a ftp server then shut it down. If you’re using ftp to maintain your website then scp or winscp are better options since they’re secure and lessen the likelyhood of a man in the middle attack grabbing your passwords when your config files are being uploaded.

0.0.0.0:23 Telnet! okay it’s time to learn about SSh or openssh (Another article)

0.0.0.0:25 SMTP are you running a mail server? If not then keeping this running opens you up to being used as a relay or worse for spam.

What if you dont know which program has these ports open?

Great question.

try netstat -lnp

You can get something like

tcp 0 0 0.0.0.0:3689 0.0.0.0:* LISTEN 3096/rhythmbox
We’ll if you have rythmbox sharing music to another computer in the house you’re fine. It will show most applications that are holding that port open.

I hope this helps you towards securing your servers and desktops. As with all tips they’re provided as-is and the user takes all responsibility.

Enjoy!

Compiz, *Glx, Beryl, oh my!

Posted by Tips on November 14th, 2006

Warning: I have been told by a developer for Beryl that Dapper should not have beryl installed on it. It will break upgrades and you will not be able to update to Edgy due to the backporting necessary. While I have not had any package problems it may be a consideration to those wanting to run Beryl to start off using Edgy.

If you’re the savvy type that loves to make your desktop your own personal work of art you may have seen some of the more recent videos showing off what is most commonly referred to Compiz. There’s also a fork called Beryl that seems to get most of the attention lately and after using it for a few weeks and since I need something to start this site off on it’s what I’m writing about this week.

There are tons of tutorials out there detailing many methods of getting any version of Compiz going, but I’ll point to a few threads that appear to work for most people.

First off if you have a ATI card it’s likely that things may be more difficult reguarding the drivers. This usually applies to those cards that are not supported by the free ATI driver. It’s a pain but there are a few good threads on this subject on Ubuntuforums.

For the rest of us who decided on a Nvidia card for whatever reason I have found some threads that can get you started and on your way to desktop nirvana.

The first thread is for us Dapper folks. It’s actively maintained here on Ubuntuforums and answers are pretty fast if you need help with any problems. It is also the source of any updated Ubuntu packages for Beryl when new versions are packaged. It is also the thread I used to get Beryl running on my desktop. Kbuntu users may want to check here for specifics on their version of Ubuntu.

Those on the cutting edge using Edgy and Fiesty can check here for instructions.

As with any tip on Ubuntu tips all instructions are provided at your own risk. So remember to backup any file you edit in case you need to restore them should things not work out.

Enjoy!