Category: Uncategorized

Convert Youtube Videos

I found this command that successfully strips the audio into a wav file:

ffmpeg -i Blessed_Be_Your_Name.flv -vn -acodec pcm_s16le \
   -ar 44100 -ac 2 Blessed_Be_Your_Name.wav

Here is the same command that includes the video that will play in Window’s Media Player:

ffmpeg -i Blessed_Be_Your_Name.flv -vcodec msmpeg4v2 -acodec pcm_s16le \
   -ar 44100 -ac 2 Blessed_Be_Your_Name.avi

I was able to use this command to convert an flv file from a downloaded Google Tech talk to an mp4 file that I could play with mplayer in Linux:

ffmpeg -i Using_bluemail_to_renew_the_design_and_study_of_enterprise_email.flv \
    -vcodec xvid -acodec pcm_s16le -ar 44100 -ac 2 \
    Using_bluemail_to_renew_the_design_and_study_of_enterprise_email.mp4

Resources

Thunderbird

Well, work demands are forcing me to begin to use a fat client for my mail.  Up until now, I have been using GMail successfully.  So, I am choosing Thunderbird.

Here is what I like about GMail:

  • I can access GMail from any computer (I used to work on multiple computers depending on the client/day of the week)
  • I can manage multiple email addresses (Each client was giving me an email address with their domain name)
  • I like the GMail interface
    • threads instead of messages
    • labels
    • Ability to type the name of a person in the to box

But, there were a few features that I needed that forced me to switch to Thunderbird:

  • HTML Signatures (or at least formatting)
  • Different signature for each email account
  • Use a third party SMTP server — sending through GMail leaves an “on behalf of” message even if you choose to send with another email address.

I have started with two extensions that I thought were helpful:

One of the frustrations that I found was that when I replied to a message, it would put the quoted message above my reply.  Most email programs place the original programs below the new message.  I found a thread that explains you can change this in the Account Settings, Composition and Addressing settings.

The signature is in the Account Settings as well.  It is on the main page for each account.  I created an HTML file in my home directory and attached it to account.

Zindus was easy to configure.  You can access the setings in Tools > Zindus.  I just entered my GMail account information and I was off.  I did have an issue with duplicate contacts because I had already sent a couple of emails to people already in my GMail contact list.  Thunderbird automatically adds to your contact list people to whom you send an email.  I just deleted those contacts, and everything synced fine.

The Lightning settings were in the Preferences — that is in the Edit menu for Linux and Tools menu for Windows.

The Provider for Google Calendar was a little more difficult to figure out.  I finally found some instructions on the wiki.  I had to open the Google Calendar web interface.  Then, if you click settings on the calendar list, you get your list of calendars.  Next, click on the link for your specific calendar that you want in Thunderbird.  At the bottom of the settings list, you will find the XML links.  I right clicked on the XML button for the Calendar address and selected Copy Link Location.  Once I had the link copied, I went to Thunderbird.  First, I had to click on the Calendar button on the lower left hand corner of the screen.  Then, I could choose File > New > Calendar.  I chose a calendar on the Network.  Next, I chose a Google calendar and pasted the XML link into the Location.  Then, it asked me to log into the Google account.  Finally, it asked for a name/description for the calendar.

Proprietary Olympics

I got the great idea that we would try to watch the Olympics online last night.  But, I had to reboot to Windows!

WindowsOnlyOlympics by you.

The problem is that NBC used a tool called Silverlight to broadcast the video.  Currently, the version of Silverlight does not work on Linux.

I attempted to download Moonlight, the Linux version of Silverlight. but it did not help.  The download page says that they do have an experimental version 2, but I think this note explains why it still does not work: “Note: These are currently built without multimedia support. No video or mp3 playback is enabled on these binaries.”

I tried to do some quick searches to see if there was a way to recompile or enable Moonlight to playback video, but I did not find anything.

I did find many other people complaining about Microsoft though.  New York times wrote an article called Olympics Online, With a Hook.  My search also brought this article up a few times: Linux Users on NBC’s Olympic Videos: We Don’t Get No Respect.

I found another article, Ok, I admit it. I love NBCOlympics.com! Now go make it work on Linux!, where the author makes this quote: “Now, one could get all huffy and puffy and blame Microsoft on this state of affairs, but in this case, I have to lay this problem strictly at the feet of the Open Source community.”  I have to disagree!  If I write a website, I have to make sure that I use tools and code that will work with my audience’s computers.  It would be ridiculous for me to write and test my website only for the Firefox browser or only Safari.  If Microsoft really wants Silverlight to be a success, I think they should donate the resources necessary to the Open Source effort.  Obviously, not that many open source developers feel that we need another Flash.

Anyway, I wish I had a good answer for how I made it work, but all I can say for now is we have to use Windows.

XRandr

I found that the xrandr features did not work with my NVidia driver in my old laptop.  I had to use the nvidia-settings tool, which worked with shortcomings.  But, my new laptop has an Intel video card.  The xrandr works with it.

Here are the commands that are working for me:

switching to dual monitors

xrandr --output VGA --auto --output LVDS --auto --right-of VGA

What did not work:

  • Leaves a black section on three quarters of the bottom of my laptop LCD panel.
  • only puts the applications menu and application switcher on the external Monitor — I would rather it be on the LCD panel
  • Only displays the monitor at 1024×768 @60hz.  I need it higher than 60hz for the flicker.

switching back to a single monitor

xrandr  --output VGA --off

What did not work:

  • did not move my windows back to the center, may have been because it thought they were on the left screen.

Changes to xorg.conf

I had to add the virtual setting in the Screen section.  Also, I had to add the mode to make the monitor use a 85hz instead of 60hz.

What did not work:

  • I have to start XWindows with the external monitor unplugged.  Otherwise, the laptop uses the 1024×768 setting from the monitor for the laptop screen, which is normally 1440×900.

Resources

Javascript Libraries Via Google

I just found some links about using Javascript hosted by Google:

I had been wanting to use jQuery with GreaseMonkey, but it seems to require that you have a web-accessible copy of jQuery.  I didn’t want to use other people’s bandwidth but wasn’t sure how else to do it.  Here are the instructions:

Hopefully, I can post an example piece of code soon on how to put the two together, but I am not quite there yet.  I hope the links help for now.

Troubleshooting: StayOnline Connections

While staying at a hotel, I had trouble connecting to https web sites.  Basically, I couldn’t log into anything: email, blogging, etc.  The hotel where I was staying had a company called StayOnline managing their network.

First, figuring out what network to connect to was rather confusing.  The card in the room said to connect to the SSID called “stayonline”.  But, that network did not exist.  Instead the right one was called “etwireless”.  When I called the support line, they answered LodgeNet.

Here is what I noticed:

  • I could connect to any website that did not use SSL — “http” only
  • If I rebooted to Windows, I had no problems.
  • In Fedora 9, when I went to any “https” it would just sit and spin.  The connection would eventually time out.

The solution is to disable TCP Window Scaling.  Run this command as root:

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

I found this information from this post:

SSL Problems with StayOnline Hotel Internet Providers

The post mentions that they did not support Linux.  I have to give them credit.  When I told them that I have Linux, they did not turn me away.  I was a little perterbed that they did not know the solution.  This post has been out there since February.  It would be even nicer if they could fix the problem so that Linux user’s don’t have to worry about it.

Resources

Screenlets

From Desklets to Screenlets

I tried to install gDesklets, but I had trouble with them.  I found a post that explained how to do it in Ubuntu.  And, I found a package in the Fedora repository for yum.  But, I had the following problems:

  • I never could get the good weather applet to work.
  • I couldn’t get the shortcut key to work for bringing them to the front.
  • The icon displayed by the clock, but it didn’t seem to do anything when I clicked on it (either left or right click)

So, I decided to try screenlets instead.  Maybe I am a little impatient, but I had had trouble with them in Ubuntu too.  I thought a change of scenery might me nice.

Installing Screenlets

To save you a few steps, you might want to run the following command right now.  That will save you from the errors I got as I went through:

yum install python-devel gnome-python2-gnomekeyring

I found the installation instructions on the FAQ.  I found the latest download on the main page at launch pad. I downloaded it to my Download directory and ran the following in a terminal:

cd ~/Download
tar -xzvf screenlets-0.1.1.tar.gz
cd screenlets
sudo python setup.py install

I did get the following error:

error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)

That was easily fixed by using yum to install python-devel (see this post).

At this point, screenlets was installed, but the next step was to configure it.  I ran:

screenlets-manager

That command gave me this error message:

ImportError: No module named gnomekeyring

This was easily fixed by using yum to install gnome-python2-gnomekeyring (see this post).

After fixing that, the Screenlets Manager opened, and that was all that I had to do.  I rebooted at that point, not that I had to, but I wanted to for another reason.  Amazingly enough, the screenlets was already running by the clock.  I didn’t need to do anything to get it to auto start.

Adding Screenlets

I chose to add the following screenlets:

  • Battery: Displays the battery status of my laptop
  • GMail: I added my email address, and it displays how many messages I have unread
  • Weather: I added my zip code, and it shows the weather for my area
  • SysMonitor: Displayed info about my computer
  • DigiClock: A simple digital clock

Displaying/Hiding

When I first added the screenlets, they were on the top all of the time.  But, I found that I could hide them by making them a widget and removing the Keep Above option:

right click > Window > Widget (checked)
right click > Window > Keep above (unchecked)

Then, I had to configure Compiz.  I opened the CompizConfig Settings Manager, and found Widget Layer under Desktop.  I checked this option, and then looked at the settings.  F9 was the shortcut key, and I added the bottom right corner as another option.

Installing More Screenlets

  • Download the screenlet you wish to install (you don’t need to unzip it)
  • Open the Screenlets Manager
  • Click the Install option on the left panel
  • Choose “Install Screenlet”
  • Browse to the location where you saved the screenlet
  • Find the new Screenlet in the list and start it

Here are the additional Screenlets I downloaded:

Gnome Do Issue

I installed Gnome Do and really like it.  Just one problem: the keyboard shortcut would not work!  Here is what I did to fix it:

Start Key (Super Key) Issue

From this thread, I found that I could create this text file —

File Name: $HOME/.xmodmaprc
Put the following two lines in the text file:

keycode 115 = Super_L
add Mod4 = Super_L

Run the following command in a terminal window:

xmodmap ~/.xmodmaprc

The Start key worked right away, but when I rebooted, it asked me if I wanted to load the file.  I put the file in the loaded column and it continued to work after the reboot.

Gnome Do Shortcut

I decided to change the command from Start + Space to Start + R (like Windows Start … Run).  Here is what I did:

I used Yum to install gconf-editor.  You may already have the tool, but I did not.

Then, I opened the Configuration Editor — Applications > System Tools > Configuration Editor.

On the left side, I opened the path: / > apps > gnome-do > preferences.

Then, I changed the key_binding on the right to <Super>r.

Resources

Umm… My Super Key Just Stopped Working…

Shortcut not launching gnome-do