The Blogging Technician Providing useful info for all of you and myself

17Nov/15Off

Laptop to Digital Photo Frame with Ubuntu 15.10

I decided to embark on what turned out to be quite an adventure from start to finish to build a Digital Photo Frame from an old laptop I had laying around. I will add photos later but the meat and potatoes of the project was the apache2 and Flickr API integration, which is what I will be covering here. I found an amazing site that contained a great tutorial with most of the information I needed at Burgerfaire.com their software build was up to Ubuntu 12.04 as of this writing which led me most of the way but with a few issues I hope to clear up here. So here it goes....

I have a working Ubuntu 15.10 install, 4GB ram, 250GB HDD.

The first thing burgerfaire recommends is to install SSH.  as the GUI on older laptops can be a little resource heavy, causing the laptop to feel sluggish, instead of an old laptop with a lighter more responsive operating system.

Getting Started with ssh (if just using the GUI skip ahead to Configuring the System)

Login to the GUI, go to the ‘Dash Home’ and in the search box type  terminal

Choose the termial app of your choice.

In the terminal window type: sudo apt-get install ssh

enter your password…

wait for ssh to install after which terminal will return to waiting for input.

Configuring the System

Still in terminal type: ifconfig

Ifconfig will give you your IP address so you can use putty or something like it to SSH into your frame (if desired otherwise continue using terminal)

Once you are in, the basic setup is the same between ssh (if applicable) and terminal, let’s take a look at that…

sudo apt-get update

This will make sure your source packages are up to date.

sudo apt-get upgrade

This will make sure you have the latest packages installed.

Next, install all of the packages that make the backend, frontend, and black magic work.  After all, this is black magic to most people.

Feh is the actual slideshow program.  It displays the directory of files for you in the display.

sudo apt-get install feh  

Graphicsmagick is the program we use to generate the slides for weather, news, scores, etc….  You will only need this for the ‘extra’ stuff at the end of the tutorial.  You don’t need it to run the pictureframe for flickr photos etc…

apt-get install graphicsmagick 

Make is necessary to ‘make’ various modules, it is required, so is gcc.  Install them both.

apt-get install make gcc 

Apache2 is the webserver used to configure the slideshow content and set up the authentication with flickr.  It is required.

apt-get install apache2 

Perl is the language the FlickrFrame script runs with.  it is required.  Also the www libraries for perl, and the apache mod for perl(I know that seems greek to some, just do it.)

apt-get install perl libwww-perl libapache2-mod-perl2

Here is where things got a little different with 15.10. You will also have to install the zlib libraries.

apt-get install zlib1g.dev

If that does not work then use

apt-get install zlib1g.devel

Once the above has been completed open a web browser and type in your IP address (if SSH)  or 127.0.0.1 (loopback if terminal).  You should see an apache2 page that says, “It Works!”

The FlickrFrame script

Get the file from sourceforge here

or use wget to get it directly

wget http://sourceforge.net/projects/flickrframe/files/flickrframe/0.9.5/flickrframe.tar.gz/download

Once you have the file, unzip it.

tar -xvf flickrframe.tar.gz

Or if using Package Manager within Ubuntu 15.10 extract the contents to /home/username/flickrframe (replace username with your account name)

Also a little different in my experience first I had to install the module CPANMINUS using CPAN then we install the perl modules to support the flickrframe app using cpanm.

cpan APP::cpanminus

This will install and configure cpanminus

First we will need XML::LibXML and XML::Simple

cpanm install XML::LibXML

then XML::Simple dependencies

apt-get build-dep libxml-parser-perl

then XML::Simple

cpanm install XML::Simple

Now for the perl modules required for Flickr app

cpanm install Flickr::API

cpanm install Getopt::Compact

cpanm install Text::Table

cpanm install Math::BigInt

Configure Apache2

So now we get to configure the webserver for our config site.

sudo pico /etc/apache2/mods-enabled/mime.conf

find the line that says ‘# AddHandler cgi-script .cgi’ and modify it to:

AddHandler cgi-script .cgi .pl

So essentially we removed the "#" and added .pl to the end

This will add perl script (.pl) cgi support and enable .cgi script support outside of the cgi-bin directory
Ctrl -x to exit select y to save.

sudo pico /etc/apache2/sites-enabled/000-default.conf

Change the line for  Document Root to reflect the root directory of flickrframe:

from:
Document Root /var/www to:

DocumentRoot /home/username/flickrframe/htdocs

And below that add

<Directory /home/username/flickrframe/htdocs>

AllowOverride None

Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

Require all granted

</Directory>

Exit out using Ctrl+X and Y at the prompt to save.

Now add the localhost to the config file by opening the apache2.conf file

sudo pico /etc/apache2/apache2.conf

In the following to the section starting at line 147 (#Sets the default security model of the Apache2 HTTPD Server...) below the code for

<Directory /var/www/>

...

</Directory>

Add

<Directory /home/username/flickrframe/htdocs>

Options Indexes FollowSymLinks ExecCGI

AllowOverride None

Require all granted

</Directory>

Add the following line to the bottom of the file

ServerName localhost

exit and save

Restart apache2 and watch for errors

sudo service apache2 restart

This should return without errors.

Configure FlickrFrame

Copy the config file from the source…  Go to the flickrframe directory.  Then copy the file to keep the original intact for reference.

cd /home/username/flickrframe
cp flickrframe.conf.dist flickrframe.conf

Change permission on the file

chmod 666 flickrframe.conf

Permissions are touchy, but this has always worked for me, so far.

chmod 774 Flickrframe.pm
chmod 774 htdocs/ff.js

Configure Image Folders

Create a  directory as a subdirectory of your /home/username/flickrframe/Pictures folder so you can still use local folders i.e. /home/username/pictures for pictures you don’t put on flickr. This is due to the fact that any photos not part of the sync will be deleted from the subdirectory.

cd /home/username/flickrframe/Pictures
mkdir ffimage

Authorization with Flickr

This part always seems to take longer than you think.  I think we are so used to getting quick gratification, that when this doesn’t work exactly right, we (I) get confused.

Open your Web Browser and go to your IP address:

http://whatever.your.IP.Address/authwizard.pl

This will allow you to set the synchronization portion for flickr.  The process here is to set up the API key to use your flickr account.  You will need to login to your flickr account and request a key… the instructions are on the web interface for your digital picture frame.

The authorization script will ask you to add the key, the shared secret, etc… after you set that wait about 5 minutes. then click the link to authorize everything.

This will take you to the configuration for the slideshow.

Just to make sure everything is working correctly,

choose “Interesting”
set the Max to 10
Check “Shufffle”
Display interval to 10 seconds
update to 120 Minutes
Image folder to where you created the ffimage directory above.
Log file to /home/flickrframe/fflog.log
click save

Now back to the terminal to start the backend sync process…

/home/username/flickrframe/FlickrFrame.pm -b -c /home/username/flickrframe/flickrframe.conf

..wait a few minutes… check the log file.

Here is what my log file looked like….

Sun Sep 30 13:18:39 2012: Starting Backend
Sun Sep 30 13:18:39 2012: Getting interesting photos
Sun Sep 30 13:18:42 2012: Online Photosets have 10 photos
Sun Sep 30 13:18:42 2012: Storing http://farm9.staticflickr.com/8318/8033186169_089904b9d1_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:42 2012: Storing http://farm9.staticflickr.com/8029/8035121653_cedc58cfd5_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:42 2012: Storing http://farm9.staticflickr.com/8042/8036054937_ae14a03cc7_o.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:42 2012: Storing http://farm9.staticflickr.com/8176/8035054900_fb414c4cf7_o.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:43 2012: Storing http://farm9.staticflickr.com/8039/8036235451_7347cf1b7d_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:43 2012: Storing http://farm9.staticflickr.com/8457/8029082356_639585b652_b.jpg as /home/flickrframe/Pictures/ffimages/802$
Sun Sep 30 13:18:43 2012: Storing http://farm9.staticflickr.com/8039/8035261504_f85259511b_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:43 2012: Storing http://farm9.staticflickr.com/8039/8035461333_f62d8ddedf_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:43 2012: Storing http://farm9.staticflickr.com/8455/8035673550_ccf96ec253_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:44 2012: Storing http://farm9.staticflickr.com/8035/8035118437_f9a2f107d1_b.jpg as /home/flickrframe/Pictures/ffimages/803$
Sun Sep 30 13:18:44 2012: Restarting FlickrFrame Frontend
Sun Sep 30 13:18:44 2012: Killing fbi:
Sun Sep 30 13:18:44 2012: Synchronization Complete

You can now check your image directory to see if you see any images…

ls /home/username/flickrframe/Pictures/ffimages
10Jun/15Off

Yahoo Results in IE 11 show blank page with security warning in address bar

registry icon

 

 

I have recently come across an issue where yahoo search results within Internet 11 on windows 7 are displayed but when you click on the result you are presented a blank page and a security warning in the address bar.

To resolve this issue:

  1. Open an elevated command prompt (click start -- all programs -- accessories -- right click command prompt -- click run as administrator)
  2. Within the command prompt window type  Regsvr32 “c:\program files (x86)\Internet Explorer\ieproxy.dll” and press enter
  3. You should receive a notification that the dll was successfully registered and you may close the command prompt.
  4. Enjoy the ability to follow search results.
22Nov/13Off

User profile service failed the login error

regicon
Click Start, type regedit in the Search box, and then press ENTER.

  1. In Registry Editor, locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  2. In the navigation pane, locate the folder that begins with S-1-5 (SID key) followed by a long number.
  3. Click each S-1-5 folder, locate the ProfileImagePath entry in the details pane, and then double-click to make sure that this is the user account profile that has the error.
    2705065
    • If you have two folders starting with S-1-5 followed by some long numbers and one of them ended with .bak, you have to rename the .bak folder. To do this, follow these steps:
      1. Right-click the folder without .bak, and then click Rename. Type .ba, and then press ENTER.
        2493038
      2. Right-click the folder that is named .bak, and then click Rename. Remove .bak at the end of the folder name, and then press ENTER.
        2493039
      3. Right-click the folder that is named .ba, and then click Rename. Change the .ba to .bak at the end of the folder name, and then press ENTER.
        2493040
    • If you have only one folder starting with S-1-5 that is followed by long numbers and ends with .bak. Right-click the folder, and then click Rename. Remove .bak at the end of the folder name, and then press ENTER.
    • If you have two folders starting with S-1-5 followed by some long numbers and one of them ended with .bak, you have to rename the .bak folder. To do this, follow these steps:
      1. Right-click the folder without .bak, and then click Rename. Type .ba, and then press ENTER.
        2493038
      2. Right-click the folder that is named .bak, and then click Rename. Remove .bak at the end of the folder name, and then press ENTER.
        2493039
      3. Right-click the folder that is named .ba, and then click Rename. Change the .ba to .bak at the end of the folder name, and then press ENTER.
        2493040
    • If you have only one folder starting with S-1-5 that is followed by long numbers and ends with .bak. Right-click the folder, and then click Rename. Remove .bak at the end of the folder name, and then press ENTER.
  4. Double-click the folder without .bak in the details pane, double-click RefCount, type 0, and then click OK.
    2493045
  5. Click the folder without .bak, in the details pane, double-click State, type 0, and then click OK.
    2493046
  6. Close Registry Editor.
  7. Restart the computer.
  8. Log on again with your account.
28Aug/13Off

Audio not functioning

 

 

 

I have recently come across a large number of computers with a similar issue: No Sound from the speakers if a laptop or any of the jacks if desktop or laptopheadphones I have found a solution to this problem which has worked every time in my case. The instructions are as follows:

  1. Open an elevated command prompt by right clicking on the start menu entry and selecting "run as administrator".
  2. Type "net localgroup Administrators /add networkservice" and press enter
  3. Type "net localgroup Administrators /add localservice" and press enter
  4. Type "exit" and press enter to close the command prompt
  5. Now Restart the computer and you should have audio again.

 

23Jan/13Off

How to perform an advanced restart in Windows 8

If you haven't noticed by now that windows 8 is considerably different than all previous Microsoft Operating Systems as such I have found that the f8 menu for advanced boot options has been eliminated and in order to achieve some of the functionality of the advanced boot options menu, you can boot to the login screen and click the power icon at the bottom right then hold shift and click restart, this will then present you with advanced restart options. These options include booting to the restore partition or selecting an alternate boot device.

23Jan/13Off

What to do if your windows PC locks up @ Configuring updates after a system restore

This error can be caused when the system fails to complete the update process, or if a virus gets into the system. The repair can be quite simple, once you have remove the virus infection if applicable, within safe mode locate and delete the file pending.xml located in the folder C:/Windows/Winsxs/

Filed under: Repairs Comments Off
29Nov/12Off

VPN with RVS4000

 

 

I have been asked recently to provide VPN access for a small business, and decided to use the Cisco RVS4000 VPN Router as the device handling the vpn/client. The initial setup is similar to most routers i.e. enter your isp information (it is required to operate under a static ip using the router to handle authentication), configure your lan options (i would at this point recommend using an ip scheme other that the default 192.168.x.x as this can cause issues later). Once this is complete you can connect the rvs4000 to your modem and the local computers should now have network / internet access.

Now moving on to the VPN configuration on the router, at this point you will click on the VPN tab of the router interface and choose vpn client accounts. Once here you will have the option of creating up to 5 VPN user id's and passwords, you may also configure the option to let the user change his/her password (I recommend not). Type the user name and password you would like and select add/save. Now with the user account created, under certificate management click export for client, you will be prompted to save xxxx.pem do so to the desktop.

 

 

Now you have added your users and you can begin configuring the client software. Install the quickvpn client software and copy xxxx.pem to the installation directory i.e. c:\program files\cisco small business\quickvpn client\. This will allow the client to connect to the vpn. Launch quickvpn, give the profile a unique name, fill in the remaining fields and click connect. After a few moments you should be prompted showing you are now connected to the VPN.

Here is where things get sticky.

Now if you want that user to have access to folders on a workgroup share (not domain) you will have to go to the computer where the shares are configured and access the control panel \windows firewall \ advanced settings \ inbound rules, you will want to add 2 rules for ports tcp 433 and udp 500, then in the list you will see File and Printer Sharing (Echo Request - ICMPv4-In) double click on this and change the scope to any ip address. Click apply and your users will now be able to ping and browse network shares.

I hope this helped some of you out. Thanks for reading.

15Feb/12Off

Prevent searching network places / network neighborhood

An issue I have come across recently was one in which a client did not want employees searching the contents of shared directories, however still wanted the ability to access the shares via the run command or address bar. In order to achieve this the only method I found was to disable the network neighborhood and remove the existing shortcuts in the directory "C:\documents and settings\%user%\nethood". In order to disable the network neighborhood discovery you must edit the following registry key.

"HKEY_CURRENT_USER\Software\Microsoft\Windows\Policies\Explorer"

Once in the above key you will add a DWORD titled "NoNetHood" and give it a value of "1".

This will prevent the Network Neighborhood from rediscovering the shares on the network and once you have deleted any entries in the folder mentioned earlier your search assistant will not search the network shares.

3Feb/12Off

Upper and Lower Filters Issue on CD/DVD-Rom Drives

registry icon

 

 

A common issue between Microsoft Windows and Norton Security products is that during updates to Norton products or the removal of Norton products is that the registry entries for the disk drives becomes corrupt. To resolve this issue you must open the registry by pressing the windows key on your keyboard and the letter R key together then type regedit into the run field and click "ok"

Once into the registry navigate to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}

Now in the right hand pane select the following:

Upper Filters
Lower Filters
Upper Filters.bak
Lower Filters.bak

and delete the entries.

Once you have deleted the above entries reboot the computer and your disc drive should be working.

20Jan/12Off

Repairing BSOD error C0000135 The program cannot start because %hs is missing

This error is commonly found after removing a virus and can be very frustrating. In order to fix this issue you must first follow the instructions found in the post "Edit the registry of a windows 7 computer that won't boot" and you will select the "System" Hive. Once in the loaded hive you navigate to the following:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\SubSystems
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\SubSystems

The value for the key windows will be this:

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=consrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16

and should be changed to this:

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16

The value of consrv was created by the virus, and once you removed the virus infected .DLL the system was not able to load causing the C0000135 %hs blue screen of death.