Wednesday, February 27, 2013

Virtual Box Additions for Fedora

When installing the vbox additions in Fedora 16, I encountered errors.

First, I had to install a kernel development kit.

The suggestion kit was not found:
yum install kernel-devel-3.6.11.4.fc16.i686

I tried command completion and was suggested to use
yum install kernel-devel.i686

It was found and installed.

I switched to the /media folder where the vbox additions .iso was mounted and switched to the vbox folder. I ran the VBoxLinuxAdditions.run. It could not find gcc.

I ran
yum install gcc

It installed.

Once again, I ran
./VBoxLinuxAdditions.run

No good.

I looked in the vbox additions /ver/log/vboxadd-install.log file and saw that my kernel needed updating.
After doing rpm -qa | grep kernel I saw that two kernels were installed. I removed the older one.

Tried guest. Failed.

Rebooted.

Tried guest. Failed.

Ran /etc/init.d/vboxadd setup

Tried guest. Failed.

Rebooted.

Tried guest. Failed.

Ran yum update -y. Lots of stuff to update. Install 29, update 409.

Tried guest. Failed.

Ran  /etc/rc.d/init.d/vboxadd setup

Tried guest. Failed.

Rebooted.

Tried guest. Failed.

Tried the recommendation from the vbox log file
make oldconfig
make prepare
I ran these in the source folder for the installed kernel. Error.
no rule to make .../syscall_32.tbl

Trying to rebuild kernel with
make xconfig

Cannot find qt
yum install qt4-devel

I still cannot install the guest additions.

I read in a bug report that getting the additions from RPM Fusion will work.

Went to this page and installed the free and nonfree versions of RPM Fusion
http://rpmfusion.org/Configuration

From the GUI add/remove program application, I searched for guest additions and then installed the Virtual Box Guest Additions. IT WORKED!!!








Wednesday, February 20, 2013

Automating Book Edits

Automating Book Edits


When I published my book, I used NetBeans and Tomcat to automate some processes.

I created special tags for the index and the table of contents.

The IndexController determines what resources can be accessed. All additional resources can be accessed from the IndexController: preface, references, TOC, appendix, index pages for each chapter.

The anchor tags add information to a static list when the tag is used. The TOC tag writes the list to the TOC file.

The table of contents is generated when the TOC is requested from the IndexController:
http://localhost:8084/book/Index/TOC/

The index is processed

Connecting Mac to AppleTV


I am visiting a friend who has AppleTV. I wanted to show some photos.

My friend already had set up the AppleTV. He switched the input on the TV to the AppleTV.

I found a manual for AppleTV at Setup Guide

From my computer, I did the following
  • In iTunes, select File -> Home Sharing -> Turn On Home Sharing. The documentation indicated this menu was under Advanced, but it was in File -> Home Sharing.
  • Open the same menu and select Choose Photos to Share with AppleTV. It is better to limit the number of photos to share, if you have a lot of photos. It takes a long time for AppleTV to load a lot of photos.
  • I had to have my friend authorize AppleTV to use my computer. Only five computers can be authorized.  
Viewing a slideshow.
  • From AppleTV, select Computer and then Photos.
  • From the settings, select the type of the slideshow. Leaving the mouse over an option will preview the option.
  • Move to the top of the slideshow list for some options on music. Select music for the current slideshow or set default music from the library of the computers connected to AppleTV.
On a separate topic, iTunes has another menu for connecting to AppleTV to play music only.
  • In iTunes, find the rectangle with the arrow in it. I could not find it where the documentation indicated, but I did locate it next to the progress bar for playing a song. 
  • Select AppleTV from the list. 
  • When you play music in iTunes, it will play through AppleTV.
  • Playing music directly from iTunes will override the soundtrack from a slideshow in AppleTV.

Servlets in Eclipse

Update Eclipse so it can use Tomcat to Run Servlets

First, add ability to run servlet in Eclipse.
  1. Download Eclipse with Java EE.
  2. Add extensions for JAX-WS from
    http://wiki.eclipse.org/images/b/bf/Jaxws-1.0.0-201003201732.psf
  3. Add them to Eclipse with File->Import->Team->Team Project File. The username is anonymous and the password is an email address.
  4. Create a Dynamic Web Application. Create a New Runtime (Server) for Tomcat. Select Create local server, to save a step later.
  5. Create servlet from New -> Servlet.
  6. Works perfectly.
  7. After I had to restore my computer, the eclipse installation was no longer working. Tomcat was not recognized. I switched workspaces (File->Switch Workspace) and reinstalled the Tomcat plugin. It is working again, but there are still some red Xs for some packages.
JSPs in Eclipse
  1. Be sure that the project is using the Tomcat runtime.

Backspace in nano after ssh from Mac OS X

When I used ssh from a mac to connect to a remote linux machine, the nano editor did strange things to the backspace key.

It would work for three of four deletes, but then it would jump to the end of the line and start deleting there. It was very strange.

The TERM variable on the local machine is sent to the remote computer. Both machines were using xterm-256color.

I disconnected from the remote and set the TERM variable in the Mac terminal:

export TERM=xterm-color

I reconnected to the remote machine and the backspace worked properly.

Followers