Saturday, February 28, 2015

How to fix AT&T Mobile Transfer problem with Wi-Fi blocking phone to phone transfers


I recently switched cell phone carriers to AT&T so as to upgrade my aging Android smart phone to a newer model.  When at the store, the sales rep installed their Android app called AT&T Mobile Transfer (Google Playstore Link) on my old phone and on the new phone and began a transfer of data from old phone to the new phone.  Since I had a lot of data on my old phone, we cancelled the transfer, so that I could continue the transfer from my Wi-Fi network at home.

However, when I got home and connected both phones to my Wi-Fi network, and attempted the transfer again, the app running on the new (receiving) phone displayed the following error:

Connection Issue
Cannot connect. Your Wi-Fi provider
is blocking phone to phone transfers. Please choose a different
Wi-Fi and try again.

Here is a screenshot of that error:


I called the AT&T technical support.  The technical support rep said that the Wi-Fi should be configured for peer-to-peer connections.  My router is a NETGEAR Genie Nighthawk R7000, and so I first looked at the UPnP setting, and found that it was selected.  So both the technical rep and I were puzzled by why this would not work.

After I got off the phone, I dug a bit more in the configuration and discovered that there is a Guest Network page that has an option:

Allow guests to see each other and access my local network

The normal wireless network I have configured (not this so-called "Guest Network") does not have this setting.

When I enabled the Guest Network, and connected both phones to this network, but without enabling the above option, I still got the error message. But when I enabled the above option and reconnected the phones to the Guest Network the error message went away and the transfer started.

This fixes the immediate problem, but it is quite puzzling that this special option was only available on the Guest Network, and apparently there is no way to enable this on the other "networks" in this router.

Below is a annotated (side-note: using the handy Nimbus Screenshot Firefox Extension ) screenshot of the NETGEAR Setup/Guest Network page where the above option is to be found:







Router Firmware Version was: V1.0.4.18_1.1.52


Saturday, March 2, 2013

How to switch from Google+ Photos back to Picasa Web Albums

Looking for how to find the secret link to a photo inside Google+ photos? This is what I found:

The Google+ view of the Photos did not allow me to find the secret link to a given photo within an album. The other interface which I believe is called Picasa Web Albums does.

Here is how to get back to the original Picasa Web Albums interface that has that feature:  Use this special link to display the Picasa Web Albums interface, not the Google+ interface:

https://picasaweb.google.com/lh/myphotos?noredirect=1

Here is I stumbled upon it:

  1. Login to your Google Account.
  2. Go to http://support.google.com/picasa/answer/157000?hl=en&ref_topic=1689652 
  3. Scroll down until you see "Picasa Web Albums".
  4. Notice it says "Looking for a simple way to get photos from your camera and computer on the web? Google's Picasa Web Albums provides 1GB of free storage that makes sharing your photos a snap. Visit http://picasaweb.google.com."
  5. Click on http://picasaweb.google.com.
  6. Wait for a little bit. At the top of the page that is loaded you will see a message that disappears after a few seconds/minute: "Click here to go back to Picasa Web Albums".  A screenshot is shown below.
  7. That link goes to https://picasaweb.google.com/lh/myphotos?noredirect=1.


Saturday, January 26, 2013

RaiiCaps with GCC: error: cannot declare ‘::main’ to be a template

The idea of the raiicap class is described at RaiiCap pattern: Injected Singleton alternative for C++. However, the version of GCC I am using is affected by a bug ([Bug c++/24449] Unable to declare friend main() from class template) that prevents using the raiicap idea directly without code modifications.

Below is an attempt at a workaround:

When MAIN_IS_THE_FRIEND is defined above, we fail the compile on GCC (version 4.6.3) with:

/usr/bin/g++ -g -fPIC -Wall -Werror -Wsynth -Wno-comment -Wreturn-type test.cpp -c -o test.o
test.cpp:13:41: error: cannot declare ‘::main’ to be a template
make: *** [test.o] Error 1

But if we undefine MAIN_IS_THE_FRIEND then the compile succeeds.

This may or may not prevent malicious intent: In practice, these classes will likely be defined in header files, which can be included in other translation units, and exploited. For instance, it might still be possible for someone to define their own file static version of mainSurrogate in their own translation unit, and use it in that other translation unit to instantiate instances of Resource. However, this may just be enough to keep the majority of developers within the bounds of the original intent.

Saturday, October 6, 2012

Gmail RTM Bookmarklet

I am evaluating the Remember The Milk task management system.  They have a bookmarklet that does not provide (as of 2012-10-06) a way to record the URL of the page the task was added from.  I played around with the mobile versions of the bookmarklet posted to Using the mobile Add as a generic Quick Add tool including all fields forum thread and could not get it to work. So I based my own on a modified copy of the original Gmail This! bookmarklet and edited it to create a message body with the fields I needed, including the URL off the current web page.

This bookmarklet opens up a new Gmail compose window and adds the required info to the body of the message. It appends a note for both the document title and the current selection. You can then manually add additional text into that note which is typically what I need to do to provide extra info about the task.

I left the Due field blank, as I know I will have to type that in anyhow. This is different from what the standard RTM bookmarklet as it expects you to highlight text of a date and/or time as the Due date.

This is just GMail compose window, so there is no auto-completion of existing Tags, which is something the original bookmarklet does that mine does not. I don't miss that much as I know what my tags are, which are kept to be short names.

Here is the bookmarklet text:

java_script:popw='';Q='';rtmMail='CHANGE_THIS';x=document;y=window;if(x.selection)%20{Q=x.selection.createRange().text;}else%20if%20(y.getSelection)%20{Q=y.getSelection();}else%20if%20(x.getSelection)%20{Q=x.getSelection();}popw=y.open('https://mail.google.com/mail?view=cm&tf=0&to='+encodeURIComponent(rtmMail)+'&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent('T: '+Q+'\n')+encodeURIComponent('D: \n')+encodeURIComponent('U: '+location.href)+encodeURIComponent("\n---\n"+document.title+"\n"+Q+"\n"),'gmailForm','scrollbars=yes,width=680,height=510,top=175,left=75,status=no,resizable=yes');if%20(!document.all)%20T%20=%20setTimeout('popw.focus()',50);void(0);

How to install:
  1. Select the text above and copy it to the clipboard (CTRL-C typically).
  2. Right mouse click on the Firefox toolbar, and select New Bookmark.
  3. Select the Link field, and paste the link text (CTRL-V typically).
  4. Remove the underscore character from "java_script".
  5. Change the "CHANGE_THIS" in the pasted text of the bookmarklet to be your Inbox Email Address (see How to). 
  6. Change the Name field to be GMail RTM.
  7. Click Save.
To use, highlight a part of a web page, and click the GMail RTM button on your toolbar.  Make any required changes and click Send.

(The platform and browser version I used: 32-bit Firefox 15.0.1 running on 64-bit Debian Linux (Testing).)

Sunday, May 27, 2012

Raspberry Transplanting Procedure

Overview


Below is the procedure I followed to transplant raspberries. This is a consolidation of various sources I found on the web (links are included). Primary sources were posts on http://ehow.com.

Equipment needed:

  • Garden gloves sturdy enough to deal with thorny raspberries.
  • Hand shovel or similar.
  • Garden shears for cutting the suckers roots.
  • Garden stakes for locating where the holes will go.
  • Tape measure to measure off the distances.

Procedure

  • When to transplant: This should be done in the 2nd year after the plant has grown. Transplant raspberry volunteers in April and May (see volunteer plants). Dig them up and move them when they have just begun to leaf out, with a few small leaves emerging. If possible, transplant during overcast weather, at the beginning of an overcast period, so the transplant will get 2 or 3 days to develop roots before the sun comes out. If transplanting during the summer months, use a sun shade for several weeks to provide the plant with reduced sunlight.
  • Locate the destination holes for the transplants (Select a full-sun location) by marking them with some stakes. Make the line east to west to maximize sun exposure during the summer. Space holes 3 feet apart to prevent the spread of disease, and rows 8 to 12 feet apart (note that one web page said spread them 2 feet apart). Destroy any perennial weeds growing near the destination holes including any wild raspberry or blackberry plants, because they can spread disease to your plants.
  • After the first frost, in early spring, identify the healthiest red raspberry plant from which to draw suckers. Look around the base of the mother plant for suckers (choose strong suckers with healthy roots), which are also known as daughter plants: find the off shoots from your main plant or plants that are popping up from the soil around the main plant. Put garden gloves on, because you will be working around the red raspberry's thorny canes. Use garden shears to snip roots that connect the daughter plant to the mother plant (It may be necessary to scoop some of the dirt away to find the root of the plant). Be careful to preserve a soil ball around the daughter plant's root system. When you find the roots, dig the plant out from that point. As you will see, some of the roots are actually part of your main plant. Go ahead and dig or cut away from those roots, as it will not harm your plants.
  • Be sure to loosen the soil around and under the raspberry sucker to remove it from the ground with its roots attached. Raspberry roots are shallow, growing no deeper than 10 inches. If you drive your spade into the ground to a depth of 1 foot, you should be able to take the baby bush out completely with its roots.
  • Dig out transplant candidates after the last spring frost and submerge their roots immediately in a bucket of water to keep the roots from drying out (but only if you are not going to transplant them immediately).
  • Take care to remove all old canes from bushes to be transplanted.
  • Plant one raspberry seedling per hole.
  • In the destination holes, insure to dig holes as deep as the daughter roots, and twice as wide as they are deep. Insure that the holes are large enough so that roots will not be crowded and an inch or two deeper than roots were growing previously (see also Set plant in a hole).
  • Fill holes with water and let them drain halfway down.
  • Use a shovel to tamp down the soil over the top of the newly transplanted red raspberry plant, being sure to cover roots. This is so that any water remaining in the hole will not leave a dry air-space when it drains out.
  • Trim all canes to 6 to 8 inches long (new small plants created by tipping can remain untrimmed). The reason is because "trimming back transplants may result in decreased fruiting the first year but will pay dividends in healthy growth". Check again that plants are solidly tamped in (i.e., do not leave dry air-spaces). (An alternative is to snip off two-thirds of the cane with garden shears to help encourage root development. Provide one inch of water. Consider planting at night to help the plant adapt to its new location.)
  • Keep soil consistently moist for at least a week, to help roots establish in new soil. Continue keeping soil moist during any dry spells until plants show solid new growth.
  • Do not immediately stake new plants; they must be trimmed and allowed to grow new canes first. In fact, since they do best with a trellis system, do the instructions in installing a trellis during the summer, or after the plants grow a bit.

Tips & Warnings

  • Your transplant should begin producing berries the following summer.
  • To help maintain moisture, reduce weeds and protect against the harshness of winter, maintain six inches of mulch around your transplant year round.  I ended up using lawn grass cuttings piled up high enough so that the suckers and other weeds cannot grow (just let the yard trimmings decompose around the plant which I believe will act as fertilizer for the raspberry bush).
  • Trimming back transplants may result in decreased fruiting the first year but will pay dividends in healthy growth.
  • The University of Maine recommends installing a trellis to support raspberry canes (They do best with a trellis system). Providing a place for the canes to climb reduces disease, improves fruit quality, and makes it easier to harvest the berries.

Saturday, May 19, 2012

Batch Image Resizing from the GIMP command-line

The following TinyScheme (Script-Fu) script resizes one or more image files as specified with a file glob, and writes the resized image files into an output directory:

(define (scale-to-max-fileglob
         file-pattern
         out-dir
         newmax
         )
  (let* ((filelist (cadr (file-glob file-pattern 1))))
    (while (not (null? filelist))
      (let* ((in-file (car filelist))
             (image (car (gimp-file-load RUN-NONINTERACTIVE in-file in-file)))
             (drawable (car (gimp-image-get-active-drawable image)))
             (old-width (car (gimp-image-width image)))
             (old-height (car (gimp-image-height image)))
             (old-max (max old-width old-height))
             (new-width (round (/ (* old-width newmax) old-max)))
             (new-height (round (/ (* old-height newmax) old-max))))
        ;; http://tinyurl.com/7bvura2 states "... because saving undo
        ;; steps can be time and memory intensive" and so we don't
        ;; care about undo operations for batch runs:
        (gimp-image-undo-disable image)
        (gimp-image-scale image new-width new-height)
        (let ((out-file
               (string-append out-dir
                              ;; Insert a slash character if
                              ;; not already at the tail-end
                              ;; of out-dir:
                              (if (char=? #\/ (car (last (string->list out-dir))))
                                  ""
                                  "/")
                              ;; Take the basename of in-file which may be a fully-qualified path:
                              (car (last (strbreakup in-file "/"))))))
          ;; The print function does not show output on standard
          ;; output, so use gimp-message instead:
          (gimp-message (string-append "   scale-to-max-fileglob: scaling "
                                       in-file " into " out-file
                                       " with these dimensions: "
                                       (number->string new-width) "x" (number->string new-height)))
          (gimp-file-save RUN-NONINTERACTIVE image drawable out-file out-file))
        (gimp-image-delete image))
      (set! filelist (cdr filelist)))))

Store this into ~/.gimp-2.6/scripts/batch-resize.scm and the definition of scale-to-max-fileglob will load into all future gimp sessions.


Example run: This was executed using GIMP 2.6 on a 64-bit Debian Linux machine.  The "script-fu-Warning" is coming from the gimp-message function:



user@somehost:/tmp/images_dir$ time gimp -i -b '(begin (scale-to-max-fileglob "*.jpg" "outdir" 1000) (gimp-quit 0))'

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-43-42_676.jpg into outdir/2012-05-19_16-43-42_676.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-44-35_210.jpg into outdir/2012-05-19_16-44-35_210.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-41-21_785.jpg into outdir/2012-05-19_16-41-21_785.jpg with these dimensions: 1000x562

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-44-02_760.jpg into outdir/2012-05-19_16-44-02_760.jpg with these dimensions: 1000x562

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-45-34_771.jpg into outdir/2012-05-19_16-45-34_771.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-43-15_141.jpg into outdir/2012-05-19_16-43-15_141.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-42-39_886.jpg into outdir/2012-05-19_16-42-39_886.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-45-13_128.jpg into outdir/2012-05-19_16-45-13_128.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-42-52_376.jpg into outdir/2012-05-19_16-42-52_376.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-41-49_429.jpg into outdir/2012-05-19_16-41-49_429.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-42-08_196.jpg into outdir/2012-05-19_16-42-08_196.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-41-54_552.jpg into outdir/2012-05-19_16-41-54_552.jpg with these dimensions: 562x1000

script-fu-Warning:    scale-to-max-fileglob: scaling 2012-05-19_16-42-34_497.jpg into outdir/2012-05-19_16-42-34_497.jpg with these dimensions: 562x1000



real    0m16.179s
user    0m13.229s
sys    0m2.236s




The above code was cobbled together from these sources:
  1. Christopher Campbell's blog: Batch image scaling with Gimp
  2. TinySCHEME Version 1.40 Manual is rather skimpy so you may desire to refer to The Racket Reference instead.
  3. Gimp Batch Mode Introduction

Saturday, October 8, 2011

Developing Software Productively through selective automation

How do you increase your software development productivity over the long haul? Here's how: Examine your daily task work to identify tasks that are amenable to automation, and then automate it. For me, this means to do the following:
  1. Maintain a constant awareness of all of your development activities, specifically patterns of behavior or groups of actions that are repeated multiple times throughout the day.
  2. Of those patterns, identify the ones that are comprised of tasks that do not change regardless of the circumstances.
  3. Determine if those tasks are amenable to automation (some will, some won't). This excludes tasks that should be delegated to someone else to do.
  4. Schedule time to encapsulate the tasks in a software routine.
  5. Make executing that routine mindless and effortless, by associating the execution of the routine to a new and unique combination of key-bindings in the main window of the primary editing tool you use (e.g. Emacs, Eclipse, Jedit, etc.).
Some may think that the "schedule time" item will eat into their productivity. However, I have found in practice that the time saved by automation will pay for itself over time. But there is one more benefit: Having a machine execute the tasks frees up your mind to think at a higher level of abstraction, in a given project. Making a task mindless and effortless has the goal of not distracting your mind from the flow of adding, deleting, and moving code around. Any requirement to pull down menus, bring other windows to the front, type in and execute long command lines, etc., are distracting to the mental process of software development and should be gradually eliminated by delegating those tasks to push-button automation. Therefore, as a software developer, those activities are best done right there in the text editing window itself, to be driven by carefully chosen key sequences that are easy to memorize. Below are some examples of tasks I discovered fit the above criteria, and that I could automate (this is specific to my focus on code development, but they could be generalized for other work domains):
  1. When the cursor is on a full or relative path to a file somewhere on the filesystem, typing a keystroke to open the file in the text editor. Compare that to opening up a new window, moving the mouse cursor into that window, navigating a file browser to find the file or typing in the full path to the file in the file system. Think about how often that task is done in given developers work day.
  2. When the cursor is sitting on a URL, typing a keystroke to open the URL in a browser. Think about how often you need to refer to reference material that is only on some remote web server somewhere.
  3. When the cursor is sitting on a symbol whose definition you need to alter, typing a keystroke to drive your editor to view and edit that definition. Compare that with using a file search to find the definition, and filter out the false positives.
  4. You need to go back to where you started when editing some code, so type a keystroke to go back to the place where you started. The idea here is that each time you navigate to a new view on some source, there is the equivalent of a "back" button in the form of a key sequence. This should be applicable for all types of navigation to some file, symbol, or web page.
  5. You need to reload your brain with the context after an interruption. The thing being automated away is the time wasted wondering where you left off, or clicking through various windows or views to answer that question. The solution is to track notes of decisions you are making in a searchable set of interlinked note files. This excludes writing them down on paper, since there is no search capability (and filing cabinets and other filing systems are yet another mental distraction). In my case, I use multiple text files that are interlinked (Muse mode in GNU Emacs). This also pays dividends later on when you need to refresh your memory on decisions that were made on the project done months later.

How to install Adobe Flash plugin versus Gnash under 32-bit FireFox 7.0.1 on Debian Linux


Overview


Herein I show a step-by-step procedure to install Adobe Flash plugin into Firefox, and remove the Gnash plugin which seems to be buggy as of 2011-10-08.  The version of Firefox I am using here is not the one that is installed using the Debian package manager, but the Firefox I downloaded directly from the Mozilla website.

Provided below is Procedure followed by the Backstory.

Procedure

  1. Close down Firefox. 
  2. Do step 165  which states: "If you installed via apt-get/aptitude (Debian/Ubuntu): sudo apt-get remove flashplugin-nonfree"
  3. Do step 167:
    1. Type about:config in the address bar and press Enter. 
    2. Find the option plugin.expose_full_path and change the value to "true" (double-clicking the preference name will toggle the setting).
    3. Type about:plugins and locate the flash plugin
  4. If you see the Gnash Shockwave plugin (you will see "gnash" somewhere in the pathname), then you need to continue below and remove it:
    1. Remove the gnash plugin from the Debian installation: sudo apt-get remove browser-plugin-gnash gnash-dbg
  5. Install Adobe Flash plugin:
    1. Download the .tar.gz file from the Adobe website specifically for 32-bit Linux (I did this by disabling all Shockwave plugins, then browsing to YouTube, and then clicking on the link to the Adobe website to find the link specifically for Linux).
    2. Into a temporary directory, extract the tarball via tar zxvf thefile.tar.gz
    3. Copy the file into ~/.mozilla/plugins/libflashplayer.so, overwriting any file that will be there.
  6. Reinvoke Firefox
  7. In the Address field, type about:plugins
  8. You should not see any Gnash references under any Shockwave Flash entry
  9. Test it out on a YouTube video:
    1. Browse to http://www.youtube.com
    2. Right mouse click on the video and insure it does not say HTML5. If it does, keep looking for other videos that are true flash videos.
    3. Right mouse click on the video and it should say "About Adobe Flash player ".
  10. Test it out on http://www.tfd.com/browser
    1. Click on the tiny blue speaker symbol to the right of the "browser" word in the definition. It should pronounce the word.
    2. Right mouse click on the icon and it should also say "About Adobe Flash Player ".

Backstory

I am using the Firefox version 7.0.1 that was downloaded directly from the Mozilla website, and not the one provided by Debian (i.e., I did not want the one rebranded as Iceweasel).  I did this because I want to be able to upgrade Firefox using the built-in Firefox upgrade mechanism versus be held up by the Debian release schedule.




I had recently upgraded my 32-bit laptop to use a recent version of Debian. I reused my existing Firefox installation that was installed into my HOME directory.  Everything was working smoothly, until today when I discovered that clicking on the pronunciation icons for definitions inside the http://www.tfd.com site no longer played the pronunciation links, but Flash YouTube videos would play properly.  This post shows what I did to fix the problem.

This post pertains to Firefox 7.0.1 and not Iceweasel running on a 32-bit Debian system.

From what I can gather, the main problem was that the gnash package was being used as the Shockwave Flash player and not the Adobe Flash player plugin.  Why Gnash could not handle http://www.tfd.com I do not know.

I discovered that there were two different kinds of flash plugin being referenced in my Firefox sessions. This may not be the underlying cause of the problem, but having both in the mix seemed wrong in concept, so this shows how I removed the Gnash plugin from my system, and install the latest version of Adobe Flash plugin.

The key trick is to step 167 which states (grammar editing applied):
  1. Type about:config in the address bar and press Enter. Find the option plugin.expose_full_path and change the value to "true" (double-clicking the preference name will toggle the setting).
  2. type about:plugins and locate the flash plugin.
I saw two flash plugins be displayed from the about:plugins page:
Shockwave Flash
File: /home/brentg/.mozilla/plugins/libflashplayer.so
Version:
Shockwave Flash 11.0 r1
MIME Type    Description    Suffixes
application/x-shockwave-flash    Shockwave Flash    swf
application/futuresplash    FutureSplash Player    spl

Shockwave Flash
File: /usr/lib/gnash/libgnashplugin.so
Version:
Shockwave Flash 10.1 r999.
Gnash 0.8.8, the GNU SWF Player. Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Gnash comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of Gnash under the terms of the GNU General Public License. For more information about Gnash, see http://www.gnu.org/software/gnash.
Compatible Shockwave Flash 10.1 r999.
MIME Type    Description    Suffixes
application/x-shockwave-flash    Shockwave Flash    swf

Setting the "plugin.expose_full_path" option inside about:config to true is what causes the about:config output above to show the "File:" lines highlighted above.  That was the key information I needed, since with that file path, I could find out what provides the gnash plugin and remove the corresponding Debian packages:

brentg@bg1:~/Downloads/flash$ apt-file search /usr/lib/gnash/libgnashplugin.so
browser-plugin-gnash: /usr/lib/gnash/libgnashplugin.so
gnash-dbg: /usr/lib/debug/usr/lib/gnash/libgnashplugin.so
brentg@bg1:~/Downloads/flash$ sudo apt-get remove browser-plugin-gnash gnash-dbg
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package gnash-dbg is not installed, so not removed
The following packages will be REMOVED:
 browser-plugin-gnash
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 369 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 116648 files and directories currently installed.)
Removing browser-plugin-gnash ...
I believe that the removal is required so as to prevent Firefox from even considering gnash as the plugin that handles Flash videos when using the Adobe Flash plugin is the one I had intended to use.

I did try step 165 below but it turns out that I did not have the flashplugin-nonfree package(s) installed (but I left in that step in the procedure for completeness).


Sunday, November 28, 2010

YouTranscript for text transcripts of online videos

It's interesting what you stumble upon by accident. I ran across a project the author of Let Over Lambda is working on, called YouTranscript. It is something I've wanted for a long time. It provides transcripts of some technically oriented YouTube videos. What I thought was really interesting is the way the web page for each video highlights the text as the video is playing, and each fragment of text is a clickable entity. For example, 6-Minute Memristor Guide.

Friday, August 14, 2009

Usage of SSH and VLC

This is a followup to an earlier post about VLC in order to elaborate a bit on how I use SSH in that context. First, you need to insure that your SSH works properly from the local to the remote hosts. I am assuming that you know the IP addresses of both hosts here, and both machines are expected to be running Linux. To that end, insure that you can run this command to list files on the remote machine:
echo ls -d .bash\* | ssh -X -Y "REMOTE_USER_NAME@REMOTE_IP_ADDRESS"
You need to change "REMOTE_USER_NAME" to be the username on that remote host, and "REMOTE_IP_ADDRESS" should be the IP address of that remote host (I am using an IP address instead of a hostname to side-step questions discussion about how to set up DNS on your local network given the complexity of DNS). When I do this from my Linux laptop to my Linux desktop, both of which are on my local area network, I simply see a list of files that match the ".b*" expression:
.bash_history
.bash_logout
.bash_profile
.bashrc
Note the backslash in front of the "*" on the command on the local machine, which avoids shell expansion on the local host. If you are able to do that, then you should be able to use the same "echo" command to send vlc commands to the remote host. You may or may not have a SSH agent running on your local system. I do, and it is called seahorse. If you are running GNOME on Debian Linux, it is likely to be available to you by running "seahorse" at a shell command prompt. That seahorse program is an interface to a daemon that runs in the background, handling requests for passwords and such, such that when you request a ssh connection to a remote machine, the seahorse daemon will display an X window dialog box that prompts you for the password for authentication. I'm not exactly sure as to how it determines the password to type in if you don't have a ~/.ssh/ directory setup. If you don't have a .ssh directory, I would encourage you to read up on Linux SSH tutorials on the web for more detailed info. Second, you need to use the ssh command to send a VLC command to stream the AVI file back to the local host, and invoke VLC in GUI mode to receive the stream and display it. Below is the VLC commands I run from the local machine to (a) start the remote VLC session to stream it back, and (b) to start a VLC GUI session locally that will be the receiver:
LOCAL_IP_ADDRESS=you_must_set_this_value
REMOTE_IP_ADDRESS=you_must_set_this_value

# senderVLCCommand is the command we want to execute on the remote
# machine.  I included the sed command that just adds " sender --> "
# to the front of every line so that we can see it on the local
# terminal. Note that although this is placed in the background
# (&), we will still see the "sender" output lines:

senderVLCCommand="vlc -vvv --sout \
  '#std{access=udp,mux=ts,dst=${LOCAL_IP_ADDRESS}:1234}' \\\"$file\\\" 2>&1 \
  | sed 's%^%  sender --> %g'"
sshSenderCommand="echo \"$senderVLCCommand\" \
  | ssh -X -Y \"${REMOTE_USER_NAME}@${REMOTE_IP_ADDRESS}\" sh &"
sh "$sshSenderCommand"

# Note spawn the local VLC session, which will read the stream. Note
# the port number used here in the sender and receiver sessions
# happens to be 1234 (chosen arbitrarily, as long as the number is >
# 1024 and not in use by some other process).

$receiverVLCCommand="vlc -vvv udp://\@:1234 2>&1 | sed 's%^%receiver -->%g' &"
sh "$receiverVLCCommand"

Both commands are put into the background. It has been my experience that this isn't a problem for the sender to start before the receiver starts, as presumably it will block waiting for a receiver to connect to the sender port before transmission starts. Note that for the second command, I use a sed command to prefix "reciever" so that I can monitor errors that occur (and will occur if you have network setup problems or corrupt AVI files, or both). Word of warning: The position slider on the receiver GUI window does not work as you would expect it to. I have not yet found a solution, and would appreciate any comments as to a suitable fix.

Thursday, July 16, 2009

Emacs Blogger Integration

I find editing text outside of Emacs very cumbersome. Editing HTML directly inside Emacs or any other editor is also very cumbersome. What I think I need is a way to edit certain types of markup from within Emacs but save it into some blogging "backend" such as Blogger. What I have done so far is use the Mozex Firefox extension to edit text fields inside Blogger, and that is a big improvement, but it is still lacking: To see the rendered HTML, I have to switch between Firefox and Emacs, and I am still writing in HTML, versus a WYSIWYG view of the text. Some possibilities that I may eventually investigate are: If anyone has any experiences with those, or can offer other alternatives, I would like to know.

Friday, May 29, 2009

Overlap

I found myself interested in the underpinnings of Zen Buddhism. That eventually led to my reading of The Creed of Half Japan, by Arthur Lloyd, [1911]. In it, I found an interesting reference to "three modes of expression":
(64) In truth, there were, in germ, in the new Buddhism which was then coming into shape in the Indus valley, three modes of expression which must all be taken into account, if we would understand the Japanese Mahāyāna of to-day. They are not confined to Buddhism: they are found in Gnosticism, in Hinduism, in Christianity; they are, in fact, universals of religion. They may, for brevity's sake, be termed the Way, the Truth, and the Life; the appeal to the affections, the intellect, the spiritual imagination of Faith.
Eckhart Tolle said essentially the same thing (and I do not recall where and when), that each of those religions had such a mystical offshoot.

Saturday, April 18, 2009

Emacs Bootstrap Tutorial

This tutorial is aimed to help users who need to know the very basics of invoking and learning GNU Emacs. It was written because many tutorials seem to overwhelm the reader with too much detail, causing them to give up on Emacs entirely because "it's just too complicated". This strives to give sufficient detail to get you started, but shows how to get more info later when it is desired, all within one Emacs session. This tutorial presumes you have X windows up and running, and are not executing Emacs in text-only mode.

Very important things to do before you start

Be sure to disable your X window managers (GNOME/KDE) bindings of things like Alt-x (any letter, not just x, actually) so that they are allowed to pass to other X applications. This is because those key bindings come under heavy use in Emacs. If you don't do that, then the X window manager will process those keybindings, and not pass them on to the Emacs session. Increase your type repeat rate. This will make it much faster to scroll around in Emacs buffers with C-n and C-p (explained below). Doing this should help the new user move around efficiently until they need to learn the more obscure key bindings that are useful in certain modes (such as ever so useful C-M-u binding inside C and C++ buffers).

Magic decoder ring for Emacs concepts

The Emacs Manual that comes with (or should come with it unless they Linux distribution packages it separately) your Emacs has an abbreviated way of describing about key bindings that can seem strange to the new user:
  • C-n means that you should hold the Control key down, press n, and then let go of both keys.
  • C-h m means that you should hold down the Control key, then press h, then let go of both keys, and then press m.
  • C-h C-m means that you should press and hold the Control key, then press h, release h, then press m and then release all keys.
  • M-x to mean that you should press and hold the Alt key, then press x, and then release both keys. If you are a vi user making the transition to Emacs, you will find yourself hitting the Escape key (which isn't very efficient since it takes your left hand off of the keyboard), which is an alternative to holding down the Alt key.
  • C-M-u means that you should press and hold the Alt and Control keys together, then press the u key, then release all keys.
When you start reading parts of the Emacs Manual (or the Elisp Reference manual), you will see references to the "point". The "point" is where new characters will be inserted into a buffer when you are typing interactively. The cursor will be blinking on a given character, and when you type a new character, that new character will push the character under the cursor to the right. This is similar in concept to how the "i" command in vi works.

Starting Emacs with nothing

When you first start out, you will not have any ~/.emacs configuration file, and that is ok for now. For this tutorial, we will stick with this basic configuration that lacks a ~/.emacs file, because you can still learn a lot with the uncustomized Emacs session. Invoke Emacs in a mode that doesn't load the ~/.emacs configuration file by typing (into a terminal window): emacs -q. What you should see in the X window that pops up is some text and maybe a picture of some strange looking animal. Some of that text is highlighted in blue and act as links that you can click on with your mouse (or navigate to with the cursor and hit Enter). This area of the Emacs window containing pictures and text is called a "buffer", and it is not associated with any file. I explain the concept of buffers later on in the Emacs windows versus X windows versus buffers section. Only a limited number of keys are actually bound in this initial buffer. Hit the TAB key until the cursor is sitting on the Emacs Tutorial link, and hit the Enter key. A new buffer will be displayed that contains a tutorial that explains basic key navigation. Use C-n and C-p to move line by line up and down in that tutorial buffer until you read about the other keybindings. Read through that tutorial enough to get comfortable with using the control key with other keys to move the cursor around in the buffer. Then type C-x C-f to open up a buffer on a new or existing file. Look for the prompt at the bottom of the window. That prompt is called the "minibuffer" and is used for prompts for things like file names, as well as the area to emit messages for errors and warnings. Enter in a path to a file name, backspacing over the previous file as needed, and then hit Enter. Here is where you type in new text. Depending upon the mode you are in (a C file? A text file?), the coloration of the text will change. This is called fontification in Emacs, and is explained in the manual. If you opened a file in some protected area, such as /etc, then when you start typing, a message will show up in the minibuffer stating that the buffer is read-only. That is because you lack the permissions to edit it. How do you get to read the manual from inside Emacs? Type C-h i, then scroll down to the Emacs Manual. But there are other useful bindings that you will be using a lot as a beginner, explained next.

Useful Emacs key bindings

Here are the bindings that I think are most useful to know about when you are first starting out. This is just the tip of the iceberg of key bindings available in Emacs. You can't learn them all right away, nor should you have to, so Emacs provides you with a way to discover more bindings as you see the need (C-h b and C-h k). Here they are:
  • C-g -- Get back to normal text editing if you find yourself stuck in some mode you don't understand.
  • C-x C-f -- Opens (finds in Emacs parlance) a buffer that is visiting a file. You may or may not be able to edit and save the buffer to that file, depending upon the filesystems permissions.
  • C-x C-s -- Save the current buffer to the file it is visiting. If the buffer is not visiting a file, you will be prompted for the file into which to save. Notice that this is not C-s which is what you would use in some editors, and that is intensional. Think about it! How often do you need so search around in the same text file for stuff, as opposed to saving? Most of the time, the more frequent operation is incremental search (C-s), and saving the buffer is less often (C-x C-s).
  • C-x C-w -- Write the buffer to another file.
  • C-h b -- Pops up a new buffer in another window (see Emacs windows versus X windows below for the Emacs definition of window versus the X Windows definition) that summarizes all of the keybindings in the buffer in which you typed C-h b. This is how you can find out all about the keybindings associated with a given buffer. Type C-x o to go to the other buffer (C-x o is explained below). Scroll down until you see something interesting, such as the binding for C-a, then hit the TAB key to position the cursor on the function name to the right of the key binding (e.g., for C-a it would be move-beginning-of-line). Then hit the Enter key. The window will change its buffer over to a new buffer specifically for describing the move-beginning-of-line function. In that new buffer, keep hitting the TAB key until you see the cursor sitting on the "back" link, then hit Enter. When you do that, you will be back into the buffer that summarizes the key bindings.
  • C-h k -- Typing this in any buffer will then cause Emacs to prompt you (at the bottom of the Emacs frame) to type in one or more key sequences until it determines a binding, and then displays a help buffer showing what that binding is bound to. Try it: In any buffer, hit C-h k, then type the letter a. A new buffer will likely show up displaying the function a is bound to (e.g., it most likely will be bound to a function called self-insert-command which is used for many of the letters such as a through z, punctuation characters, etc., but does not necessarily have to be bound). Try it again: Type C-h k, wait for the prompt, then type in C-h k again. The help for the C-h k key binding is then displayed. Notice how the help text also indicates what other keys or menus the function (e.g., describe-key) is bound to. Wouldn't you like to see that in Microsoft Word???? I would. Actually, I'd like to see Microsoft Word die a fiery death, but that is diatribe for another day.
  • C-x o -- Moves the cursor into the other window inside the current Emacs frame. If there are more than two windows, then the cursor will visit all of them in turn, eventually landing your cursor in the first window you started in.
  • C-x 1 -- Makes the current buffers window take up the entire Emacs frame. I use this one quite constantly when I'm editing source code, where I want all the other clutter in the window to just go away (but without deleting any files or damaging any other buffers contents)!
  • C-x 0 -- Makes the current buffers window disappear, leaving more real-estate for the other windows in the frame. The file that may or may not be associated with that buffer is not deleted or modified, nor is the buffer deleted, and you can see that buffer still exists by using C-x C-b.
  • C-h i -- Opens up a new buffer that is in Info Mode. That mode has many of the usual key bindings changed to ones more appropriate for reading and navigating around manuals not unlike you would see in a web browser, but focused on using the keyboard (and to a lesser extent, the mouse). Use C-n and C-p to move up and down in that Info buffer. It is here that you should see the Emacs Manual along with a few other manuals that have been published as info files, such as the Elisp manual which you will need to read for doing heavy customization work. Use the TAB key to move the cursor to a link in the Info mode, and then hit Enter to view that manual. Familiarize yourself with the special key bindings used in Info mode (there is an Info manual for this purpose there, too).
  • C-s -- Starts an incremental search. By incremental, I mean that each character you type will search for characters in the current buffer in succession (and those characters should form a consecutive chain of characters somewhere in the buffer). Type C-h k and then type C-s to find out what keys are to be used during the incremental search. After you find the spot in the buffer, hit Enter to terminate the incremental search. If you hit C-g, then it will return you to where you started the search. Note that if you want to match the end of a line, hit C-j while entering in other characters. Try to do that in vi!
  • C-h C-b -- Pops up a new buffer that displays a list of other buffers in your Emacs session. Select that buffer with C-x o and then use C-n and C-p to move the cursor to one of the lines showing a buffer you would like to view, and then hit the Enter key. See What's productive and what is not below for my take on why I think this, and the C-h b binding, are important features.
  • C-h b -- Prompts you for the name of the buffer to switch to. Use the Tab key repeatedly and then type the first letter of the buffer name you wish to visit, hitting Tab again as needed to complete the name. Once you have filled out the name completely, then hit the Enter key. The current Emacs window will switch its buffer over to that buffer you selected. This is similar to C-h C-b, but is to be used when you know part of the name of a buffer you want to visit (and is faster in that case).
  • M-x -- Prompts you for an interactive Emacs command. Try it: Type M-x, wait for the prompt, then type describe-key, and then hit Enter. Then type the m key. What you should see is something like the self-insert-command function being described, but you could see something entirely different depending upon the mode of the buffer you were in when you first typed M-x.
To take advantage of the power Emacs gives you, you will eventually want to invest time learning how to customize your Emacs to your work flow. And you won't be able to learn all of Emacs in two weeks, nor should you try to, as there is just too much functionality there. Just learn new info as you find the need.

Emacs windows versus X windows versus buffers

Since Emacs can be used in a X terminal as well as a X window itself, the manual uses the word "window" to mean part of the main X window that houses a buffer. Emacs refers to the top level X window as a "frame". In Emacs, X windows contain a single Emacs frame, and that Emacs frame contains one or more windows that divide up the Emacs frame into non-overlapping sections. Each of those Emacs windows will house exactly one buffer, and that buffer may or may not be associated with a real file on the filesystem. You can and should switch the buffer displayed in a given Emacs window as you see fit. Contrast this with X Windows (and Microsoft Windows) overlapping windows approach. Emacs does it this way so that you don't fight the windowing system for control over the screen real-estate. You use key bindings such as C-x 0 and C-x 1 to manage them quickly and efficiently, with ruthless abandon, while leaving the top level Emacs frame alone. In fact, I maximize my Emacs window to cover the entire screen, and just use Alt-tab to switch to other top-level X windows such as Firefox when I have no other choice.

Emacs modes

Emacs buffers are a concept that allows for different behavior depending upon the editing or viewing context: One example of this is that you can view a directory listing and do file operations in that listing from within a buffer. Another example is editing C++ files using special key bindings that make editing C++ files more efficient than if you used a plain text editor (e.g., the C-M-u, C-M-n, and C-M-p bindings explained later). Each of those different editing "contexts" is called an Emacs mode. Buffers and files are different concepts in Emacs. The difference between a "buffer" and a "file" is that a buffer is a Emacs concept of a view that shows the contents of any arbitrary text or pictures. Some of those buffers may, or may not, be viewing real files on the filesystem. That is intensional because you can do various things in Emacs with special buffers that have key strokes bound in all sorts of wacky ways. That variation in key bindings from buffer to buffer really irritates the snot out of vi users making the transition Emacs. That annoyance abates when they receive Emacs Enlightenment, which is when they realize that they can rebind those keys to whatever they want and do all sorts of things that many folks believe Emacs shouldn't be doing at all. Emacs buffers have one or more modes associated with them, so that the keybindings for that mode can be different from other buffers that have different modes. Contrast this with vi which has only two modes: one for inserting text and a command mode (excluding ex commands of course which is similar to M-x command entry in Emacs). For example, the Info mode will have special bindings that allow you to view manuals quickly, but editing a C++ file has radically different needs, and therefore, different key bindings. Read the Emacs Manual for a more in-depth description of major versus minor modes. The minor modes mixing and matching different key binding behaviors to get exactly the behavior you desire.

Customizing Emacs behavior

Each of the keys that are likely to be useful to you are bound to functions that have either a C definition in the Emacs binary or are bound to functions defined in a dialect of Lisp called Emacs Lisp. 99.9999% of the time, you will want to alter the behavior of Emacs either by changing the binding over to some other Emacs Lisp function of your own making, or redefining an existing function. You might need to do one or the other depending upon the circumstances, but redefining existing functions should be a last resort since when you upgrade Emacs, as your redefined function will not get updated with any bug fixes. But, don't let that stop you from customizing the dickens out of your Emacs, as it is through that customization that you gain the power and productivity that other editors lack.

What's productive and what is not

Don't use the Vi Emulation mode. It will just frustrate your efforts to get over the learning curve. Most people drawn to Emacs are software developers or IT people that need to work with a lot of different files in different languages. You may find that navigating files and directories using file browsers such as Windows Explorer (in Microsoft Windows) or Nautilus (in GNOME desktop) can pollute your desktop with so many top-level windows, that you lose the forest for the trees, such that you end up spending a substantial amount of time hunting around for a particular window. In Emacs, you don't have to do that any longer: just use C-x C-b to get a list of buffers you have currently opened, and use your cursor to move to a given buffer, and hit Enter key to view that buffer in Emacs. What is not efficient is having to move your hands off of the main keyboard area to use the arrow keys, the page up keys, or the mouse. This may seem odd to hear this, but when you become more productive at the keyboard, you do not want your software to waste your time by forcing you to move your hands away from the main area, or force you to look down at the keyboard to find where the Home key resides. Did you learn the function keys on the first row of your keyboard in Touch Typing class? No? Why not? Because they aren't always in the same spot on all keyboards (and the same can be said for arrow and page up/down keys). Try not to use them to remain productive. You think I'm joking, right? Wrong. Yes, you can rebind the function keys in Emacs, and I did that for years before I discovered that I could remain even more productive without them. I found, in my case, that I would have to take my eyes off of the screen to find the F9 key, and man does that suck time away from doing real work when you have to do that operation 1500 times a day! And don't even get me started about the mouse (too late!). The mouse can be a major time waster when you are working with text or documents 98% of the time. The only thing a mouse should be used for is in CAD and drawing applications, not for selecting text areas of the screen during text editing and navigation operations. Force yourself to learn to use the Emacs key bindings effectively, and leave the mouse for the still-retarded apps. Still not convinced? Think about how many times you wished you could minimize window with a single keystroke, only to find out that you have to use the mouse, and then accidentally hit the [X] (kill window) icon at the top of the window, only to curse yourself for getting in a hurry. Yeah, that's right, you are in a hurry, which is what the keyboard is for. So, get a grip on that keyboard!

Navigating paren/brace/bracket-intensive languages in Emacs

The descriptions of the bindings below do not really belong in a basic tutorial, but they are so important to editing source code that I have to mention them: C-M-u -- This is useful in buffers that are visiting source code files for languages such as C and C++, Lisp, Perl, etc. that make heavy use of parentheses and curly braces. All it does is move up (think "u" for up) one level of parenthese or curly brace. Other bindings that allow you to navigate around nested levels of brace are C-M-n (next) and C-M-p (previous). I tend not to use the C-M-d (down) binding for some reason. I think there are bindings that do similar things for languages such as Python since there is a separate mode specifically for Python in Emacs.

Friday, April 17, 2009

Google Transcoder for Mobile phones does not work on HTTPS URLs

Google Transcoder does not work for HTTPS URLs. I tried to use it by navigating to http://www.google.com/gwt/n and entering in this URL: https://help.ubuntu.com/community/NautilusScriptsHowto Only to see: You have clicked on a link that Google will not reformat for your phone. Click here to go to the page directly. Why the limitation?

Sunday, April 12, 2009

How to stream AVI files from Linux to Linux

The How To Stream Almost Anything using VLC blog post was a great help, but the user interface in my version of VLC (0.9.8a, on both machines) was radically different from that post, and different from the VLC streaming how to page. To initially control the VLC on the source machine (the server), you either have to understand the command-line syntax, or use the VLC GUI on the server machine (which requires, in my case, tunneling the X protocol from the server machine back to the receiving machine). I followed the instructions in blog post up to where it instructs you to play the video using "Play Locally" mode to play the video on the server machine. But saw this message on the terminal window (and not in the GUI; why?):
[????????] x11 video output error: X11 request 145.1 failed with error code 10: BadAccess (attempt to access private resource denied) [????????] x11 video output notice: buggy X11 server claims shared memory [????????] x11 video output notice: support though it does not work (OpenSSH?) [????????] x11 video output error: X11 request 145.1 failed with error code 10: BadAccess (attempt to access private resource denied)
Well, of course I'm running the server's VLC over a ssh session. I want to play the video on my local machine, and not have to have access to the physical console at the server end. So, I skipped the Play Locally part of the blog post, and proceeded with the rest of the instructions. I finally got it to work, but with some modifications to the instructions in blog post. This is what I ended up doing:
  1. Run ssh into the remote machine from the local machine, tunneling X protocol back to the local machine so that I can interact with the servers VLC GUI session.
  2. At the remote machines shell prompt, invoke vlc. The key here is to invoke vlc from the shell so that you can see any errors in its terminal output, as the GUI doesn't do a good job of presenting errors.
  3. Pull down the Media menu (this is different from whats on the blog post).
  4. Select the Open File menu item.
  5. Navigate in the Open dialog box for the AVI file, and single click on it so that it is highlighted, but don't click the Play button. This stumped me a bit, since the instructions indicate that there is some streaming button in the dialog box.
  6. Look to the left of the Play button. You will see a smaller button that has a black downward pointing triangle (drop down button??). Click that and click Stream.
  7. The Stream Output window pops up.
  8. Put a checkbox beside RTP here. Then also select "Prefer UDP over RTP". In the Address field beside that the UDP box, enter in the IP address of the machine where you want to stream the video to, not the server machine.
  9. Leave the rest of the panels unmodified.
  10. At the bottom of the dialog box, click on Stream. You are now streaming the video. It is actually playing right now, but since you don't have the receiving end set up yet, you won't see it.
  11. On the local (receiving) end, invoke vlc.
  12. In that new VLC window, pull down the Media menu, and select Open Network.
  13. In the Protocol pulldown, select UDP (not RTP).
  14. Leave the IP address blank (another trap for the uninitiated; why does it work when it is blank?).
  15. Wait for a few seconds, as there is some bit of delay here. For me the sound starts playing pretty quickly, but it took a few seconds before the window popped up.
Problems:
  1. The VLC's streaming how to page is badly out of date. Yes, the documentation is now a wiki page, but I personally feel it is irresponsible for software developers (commercial or open-source) to make radical changes to their software packages GUI interface and not update the corresponding documentation. Updating documentation a part of the software developers job role.
  2. The VLC's streaming how to page is too complicated for performing the basic user tasks such as streaming from one system to the other.
  3. There are panels in the Open Stream dialog box that are just begging to be adjusted, but you need to leave the rest of them unmodified for this case. I would have expected the F1 key to bring up a documentation page for that complicated dialog box that would then say something like "For basic streaming of AVI files, do not change any of those other boxes unless you know what you are doing". However, context sensitive help is apparently not implemented, which is a stumbling block for new users.
  4. Pause in the receiving machines VLC window does not work. Only stop works. You either have to use the web interface as indicated in the blog post, or switch back to the servers VLC window and operate it from there (which only works when you are tunneling X protocol over ssh so as to see the servers VLC window on the local (receiving) machine).
  5. No matter what I tried, I could not get just the RTP to work, but had to also select "Prefer UDP over RTP". If you leave the port numbers all set to 1234, then you will get an "audio and video port cannot be the same" error on the terminal window where you ran vlc.
  6. In the Address field beside the UDP check box, you are to enter in the IP address of the machine where you want to stream the video to, not the server machine. Another area of confusion, as I don't see anywhere where it is explained why that is the case. Must be obvious to the networking experts, but what about the majority of users? Besides, I don't see what the advantage is for RTP, as the UDP method seems to work just fine (well, there is a lag, but maybe that occurs in both protocols??).

Saturday, April 4, 2009

Verifying OpenID works with Gmail, Blogger, and Eviscape

I tried using an OpenID to understand it more fully, and to see how well it works in practice. This initial foray involved Gmail, Blogger, and Eviscape, with Blogger being the OpenID provider. My experiments (shown later on in this blog post) seems to work for the most part, with the exception of a few productivity problems:
  1. Registration at new sites may (in the case of Eviscape) require you to add a site-specific password that is not needed since OpenID provides the authentication.
  2. After having logged into the main web site that manages the OpenID, ideally I should not have to even type in the OpenID itself when browsing to the other site that is aware of my OpenID. However, again in the case of Eviscape, I did have to type in the OpenID. It is a usability issue because the OpenID is a long URI, which will be cumbersome to type in or retrieve from some other page or text file (especially in my case, since I know I will not be able to remember it).
From my experimental scenarios below, this is what I believe the main requirement is for OpenID:
On a given browser session, when the user provides a single username and password, all other sites that are aware of that OpenID, should not then prompt redundantly for any password. If the user closes down the browser completely, and restarts the browser, the user should be required to provide the OpenID and associated password only once when logging into any of the sites previously mentioned, in that new browser session.
Below, I am also using FireFox 3 running on 32-bit Debian Linux on an IBM R51 laptop:

Scenario #1 (Registration with Eviscape prompted for an extra, unnecessary password):
  1. Logout completely from Gmail and Blogger, and close all tabs and windows in the browser to any those websites1.
  2. Without being registered already with Eviscape, register using the OpenID.
  3. At some point in the registration, it prompts for a new password, so give a different password than the one associated with the OpenID provider2. This is unexpected behavior since the registration should provide a way to specify that only the OpenID usename and password is to be used, and not require the user to add a redundant password specific to that website.
  4. Finish registration.
  5. Logout of Eviscape
  6. Login to Eviscape.
  7. Type in the OpenID into the OpenID field.
  8. The site then prompted for the OpenID username and password. Supply the username and password.
  9. The site is now authenticated, which is expected.
Comments: Not once did I have to provide the Eviscape-specific password that I was required to supply during Eviscape registration. Hence, that Eviscape-specific password is unnecessary and redundant. I do realize that the Eviscape login web page has text entry fields for the Eviscape-specific username and password, as well as the OpenID, so obviously they have to support both methods of authentication. But, given that I provided the OpenID, Eviscape should (during registration) offer an option to use the OpenID username and password exclusively, thus avoiding the prompt to create the extra username and password.

Scenario #2 (Initially logging into Eviscape, without being logged into any other sites, using my OpenID):
  1. Logout completely from Gmail, Blogger, and Eviscape, and close all tabs and windows in the browser to any of those websites1.
  2. Connect to the main Eviscape home page and enter in the Blogger-provided OpenID.
  3. A new web page opens up requesting the Google account username and password2. Note that the Google account username is requested, and not the Blogger account name. That makes sense given that my Blogger account was set up to use my Gmail account name and password.
  4. I enter in the Google account username and password. Supply the username and password.
  5. The site then prompted for the OpenID username and password. Supply the username and password.
  6. The site is now authenticated, which is expected.


Scenario #3 (Does OpenID login with Eviscape seamlessly log me into Blogger?):
  1. Do Scenario #2.
  2. Open up a new browser tab, and browse to the Blogger site.
  3. Notice no password prompt is given and that Blogger shows that you are signed in. This scenario works as expected.


Scenario #4 (Does OpenID login with Eviscape seamlessly log me into Gmail?):
  1. Do Scenario #2.
  2. Open up a new browser tab, and browse to the Gmail site.
  3. Notice no password prompt is given and that Gmail shows that you are signed in. This scenario works as expected.


Scenario #5 (Does a Blogger non-OpenID login seamlessly authenticate Eviscape via OpenID?):
  1. I logout completely from Gmail, Blogger, and Eviscape1.
  2. Connect to the main Blogger login page and enter in the Google2 username and password.
  3. Connect to the main Eviscape home page and enter in the Blogger-provided OpenID.
Note that I did not have to provide the Google username and password, but only had to provide the OpenID itself. This is mostly expected, however, it would be nice to not even have to type in the OpenID itself, but that is probably asking too much. Footnotes:
  1. This forces these websites to not use existing authentication state that might be in the browser or on their respective servers.
  2. My OpenID provider is Blogger, and Blogger is managed by Google, so the OpenID username and password is equivalent to the Google username and password.

Saturday, March 28, 2009

Emacs Starter Kit

Phil Hagelberg has started a starter kit for Emacs development. I wonder if I should polish up my setup and publish it in some way. Some things to consider are:
  1. I would need to separate my work-environment-specific customizations from general use.
  2. I have my own personal Git repositories for maintaining copies of my Elisp setup on multiple machines. How does that mate with publishing those files elsewhere?
  3. ELPA is in use for some packages I import, but others I've checked in local copies of that are not in ELPA.
  4. Would it be better to contribute to Phil's code base or go it alone?

Emacs Package Management

ELPA is the Emacs Lisp Package Archive. Issues I'm pondering of late are:
  1. Does ELPA integrate well with SCM backends? I would want to be able to commit changes via a Git repo somewhere (github?) and have others be able to update their Emacs setups seamlessly. But not just Git: some Elisp packages are controlled via other SCM's such as SVN, CVS, Arch, etc.
  2. What about packages built into GNU Emacs? Some users desire to overlay a newer version of a package than what is installed in Emacs.

Keyboard efficiency in Emacs

Phil Hagelberg posted a comment onto The Graphical Keyboard User Interface:

For ideas on how to improve command discoverability, take a look at how Emacs does things. Every command is named and is invokable via Alt-x and then entering the name (offering tab-completion, of course), and you can look up commands by their name so that their bindings (if applicable) are shown. You can also get a listing at any time of all active bindings. Makes it very easy to explore. The eMate hold-the-modifier-key trick mentioned above is also a great idea.