Archive

Posts Tagged ‘ubuntu’

Extracting M2TS length from a BDMV directory in Linux

January 14th, 2010

I was having the hardest time getting various programs to echo the runtime of m2ts files in Linux, and it turns out someone wrote a parser for the files in the BDMV/PLAYLIST directory, which have all of this information.

  • Get bdtools. I got Version 1.4. You can find it here.
  • ./configure && make && sudo make install
  • Try running mpls_dump. I got this error when running:
    mpls_dump: error while loading shared libraries: libbd-1.0.so.1: cannot open shared object file:
    No such file or directory

  • To fix it, do this:
    echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf
    sudo ldconfig


Uncategorized , , , , , , , , ,

Calibre with the Nook on Ubuntu

January 1st, 2010

Calibre is about the best thing since sliced bread. It is able to convert basically any type of Ebook format into EPUB, which is what my Nook reads natively. It seamlessly syncs with the Nook as well, which is a huge plus, and all of this happens in Linux. I highly recommend this software. Just make sure not to queue up too many jobs, or it might DOS your computer for a bit. The PDF conversion is especially intensive. It makes quick work of short documents (hundreds of pages), but documents that are thousands of pages take much, much longer. The only capability I’m missing currently is conversion of DOC to EPUB, but I can use OpenOffice to convert a DOC to HTML, and then import that into Calibre and convert it, so that works.


Uncategorized , , , , , , ,

Compiling ConvertLit on Ubuntu Linux 9.10

December 31st, 2009

So, ConvertLit seems to be a good solution for those looking to convert LIT ebooks into EPUB (well, into HTML, but then into EPUB…).  Unfortunately, the developers seem to be unable to properly make a good source tarball for version 1.8.  Here’s what I did:

  1. Download Version 1.8 source from here.
  2. unzip clit18src.zip -d convertlit
  3. sudo apt-get install libtommath-dev
  4. Download this to the convertlit directory.
  5. patch -p1 -i clit18.source.patch
  6. You should see the clit18/Makefile was patched
  7. cd lib && make && cd ../clit18 && make
  8. the clit binary should be available in the clit18 directory
  9. sudo cp clit18/clit /usr/local/bin/
  10. Use it!

Now I just have to figure out how to convert it to epub.


Uncategorized , , , , , , ,

Getting Skype Working on Ubuntu 9.10 Karmic x86-64

November 19th, 2009

So, recently, I installed Ubuntu karmic cleanly on my main desktop machine here at home, and I have really liked it. I even switched to KDE, and everything has been working better than it had been in GNOME. I tried setting up Skype the other day, and ran into an issue with the microphone. It turns out that since the new Skype uses PulseAudio, there’s a further configuration step that’s not so obvious. I found out here that you have to do the following:


sudo apt-get install pavucontrol
pavucontrol

Then, go to the Input Devices tab, and unmute the sound (click the little speaker with a red X until the controls at the bottom are enabled). Then, change the Port setting until you can see the bars move when you tap the microphone. Then try Skype. This worked perfectly for me – it’s too bad it’s not connected to the KDE sound mixer, but oh well. Maybe in the future that will happen.

Uncategorized , , , , , , , ,

SMPlayer, Lirc, and IRExec on Ubuntu Karmic

November 7th, 2009

I used to use lirc with mplayer to allow my Packard Bell crappy remote to work awesomely, but I have since lost that configuration and switched to smplayer, since it’s awesome.  Today, I figured out how to control smplayer using similar means.

Read more…

Uncategorized , , , , , , ,

Importing MySQL 1.4 Amarok data into Amarok 2.2 Nightly

September 28th, 2009

I was having a bunch of trouble today importing my old MySQL amarok database into the new nightly version of amarok I installed.  The Amarok Wiki had a great section on how to convert a MySQL Amarok collection into an SQLlite one.  This was the key to importing my old 1.4 collection into the new 2.2 nightly version of Amarok.

Uncategorized , , , , , , ,

SSD in the M1530

March 28th, 2009

Today, I finally set up my new OCZ SSD hard drive:

All I had to do to convert my M1530 running Ubuntu over was use the cp command:


mkdir /mnt/root && mount root_partition /mnt/root
mount /dev/sda1 /mnt/target
cp -a /mnt/root/ /mnt/target/

You might also have to repeat for other partitions like boot and home. cp -a is awesome. It does exactly what you need for this process. Now my computer runs perfectly (other than me having to tweak grub a little for the right boot options). The only issue is you will have to move the contents of /mnt/target/root in this case to /mnt/target after this is done, as there’s an issue with dotfiles being copied in the root directory of the source.

Uncategorized , , , , ,

Enabling typing of the Euro symbol in Ubuntu

October 9th, 2008

In today’s troubled world, it’s nice to be able to talk about different currencies. The Euro is one that has gotten very popular lately, and you can actually type the character in Linux. In Ubuntu, you can select a Third-level chooser key to enable foreign characters to be typed. I chose the right ALT key for mine. Here’s how I did it:

  1. Open System -> Preferences -> Keyboard and go to the Layouts Tab.
  2. Click Layout Options
  3. Pull down the Adding the EuroSign to certain keys list, and pick one. I chose the E key.
  4. Now, pull down the Third level choosers list.
  5. Select a key.

Mine looks like so:
Mine

Close it, and now you can type the € character at will!

Uncategorized , , , ,

OSCON Sessions, Day 2

July 25th, 2008

Oh man, what a day.

I attended quite a few talks, grabbed a lot of swag, and entered a few contests. I ended up buying the Arduino Starter Kit from MAKE so I can do some awesome embedded Ruby like I saw at FOSCON. It looks really fun – I can’t wait to try it out.

The talks I attended were half-way decent, but I learned a lot more on the first day.

Hadoop and EC2

A good overview of how one can use Amazon’s S3 and EC2 services to cheaply process and store data on a pretty large scale. The New York Times digitized hundreds of years of articles in a single day using these services and some awesome C++ code.

Open standards in cloud computing

This ended up being a marketing talk. I don’t know what it had to do with cloud computing, and I didn’t stick around to find out.

Ruby 1.9: What to Expect

An awesome overview of all the new stuff in Ruby 1.9 given by Sam Ruby. I had no idea they were changing so much, and this was a good dive with code examples into that. There was some discussion among everyone in the middle on whether for loops should work like .each blocks with regards to scope. I happen to disagree with what ended up being the popular thought on this subject. Most were advocating that a for loop constitutes a block, and that scope variables and iterators should be localized inside of it. This is contrary to almost every language, which I brought up using the example of C. Yet, when you iterate with .each, you immediately define a block and a scoped iterator, which, if it has a conflicting name with the outside world, it doesn’t matter since that’s out of scope. The only thing this changes is the value of a variable outside after the loop finishes. I think leaving the ability to modify a variable external to the loop is very convenient – in summary, leave it how you’ve done it in Ruby 1.9 already.

Ubuntu on the Go: Subnotebook and MID technologies

This was an interesting session on where Canonical is taking mobile technology, and what the community can do to help. They seem to have a pretty neat subnotebook coming out soon.

Python, C++, and SWIG

This could have been one of the best talks, but the speed at which it was given and the lack of enthusiasm in the presentation left most of us either bored or unfulfilled at the end of the talk. He spent the first half explaining what Python and C++ were, then he got to what SWIG is. The end was a quick dive into an extremely complicated bunch of files that didn’t help very much. In the future, it would be helpful to go to a SWIG talk that details how to make a simple Python extension with SWIG. I may have to throw that one together myself…

I also attended the tail end of Designing Political Web Apps for MoveOn.org, but I didn’t take any notes.

We ended up going to dinner at Widmer Brothers, which was pretty awesome. I had the Pork Schnitzel, a very tender piece of meat if I do say so myself, along with 2 Full Nelson IPAs. Afterwards, we caught the bus from the convention center to BeerForge and the SourceForge Community Choice Awards party. Beerforge was a blast. I ended up talking to Jean-Baptiste Kempf, one of the developers of VLC, for hours – a truly great guy. I learned a lot about France and the French people, but also about VLC. Apparently, you can use VLC from the command line much like mplayer, which I did not know. Yet, he explained that they removed Directshow support from VLC in Linux in favor of open source alternatives, which in part I can understand. Yet, the only codec available that is able to smoothly play 1080p h264 video is closed source (CoreAVC), and until the ffmpeg avc codec catches up, I’ll have to continue using mplayer. When I can play everything back smoothly with VLC, I may consider switching.

The beer at BeerForge was pretty good – I had the IPA. SourceForge had some sort of mixed drink which wasn’t too great. All in all, a good day, but now I’m dehydrated…

Uncategorized , , , , , , , , , , , , , ,

Hardy Heron on the M1530

May 3rd, 2008

So, I upgraded my Ubuntu installation from Gutsy to Hardy today on my precious laptop. It went pretty well except for the nvidia driver. I ended up having to copy one of my old configurations over xorg.conf to actually make it work. Just so anyone who has the same problem again (including myself) can fix it without being really lucky, here’s a link:

A working xorg.conf for Gutsy and Hardy on the M1530

It ends up looking like this:

The above was done with emerald and Compiz Fusion.

Horray!

Uncategorized , , ,