Gallery Remote:FAQ - Gallery Codex
Personal tools

Gallery Remote:FAQ

From Gallery Codex


The paths and URLs in this guide are examples. Be sure to replace them with the paths and URLs specific to your installation.

How do I install GR?

With Gallery 2.3 and later, the best way to run Gallery Remote is no longer to install it, but to run it from Gallery's Add item page (on the Gallery Remote tab). This requires that you already have Java installed on your machine. Java will optionally create an entry in your applications menu and/or desktop so you can run GR later without having to log in to Gallery. It will also keep GR up to date automatically each time you run it.

You can still install GR the old-fashioned way, but this may no longer work on newer OSes, like Windows 7 and newer versions of Java:

1. Download the latest version from the Gallery Remote download page.
2. On Windows, just double-click the downloaded file. For other OS's, follow the included instructions.

How do I upgrade GR?

If you're using WebStart to run GR, you don't need to do a thing: Java will keep GR up to date.

If not:

  1. Download the newest zip patch for Gallery Remote from the nightly site. These are unofficial nightly builds.
  2. Make sure you exit GR before proceeding.
  3. Extract the zip file on top of your existing GR install (you need to have previously installed a full version of Gallery Remote), and overwrite all files.
  4. Restart Gallery Remote.

How do I upgrade the GR applets in G2?

  1. Download the newest applet zip patch for the Gallery Remote applets from the nightly site. These are unofficial nightly builds.
  2. On your Gallery 2 server, extract the zip in this location:
    • gallery2/modules/remote/applets
  1. If you have the Upload Applet or the Slideshow Applet plugins installed extract the zip to these two locations as well:
    • gallery2/modules/uploadapplet/applets
    • gallery2/modules/slideshowapplet/applets
  2. You need to clear your Java applet cache: restart your browser or in the Java console, hit C X
  3. Reload the applet

I found a bug, what do I do?

  1. Before you report bugs in Gallery Remote:
    1. Verify that what you're trying to do in Gallery Remote can be performed using the web interface.
    2. Many reported bugs against GR are actually installation problems that affect Gallery even when Gallery Remote is not involved.
    3. These can include incorrect upload permissions, PHP settings, etc.
  2. With any bug report, you need to provide the following information:
    1. The version of the Gallery installation you were trying to interact with.
    2. The version of the Gallery Remote installation, as well as the VM and OS under which Gallery Remote was being used.
    3. If the bug is that Gallery Remote doesn't do what's expected: it doesn't log you on, images aren't uploaded correctly, you get weird error messages, please also attach the log or a portion thereof to the bug report.

Log, what log?

If you encounter a problem, the logging system may be some help, and we will definitely request it if you ask for support. By default, GR writes most log information to the file GalleryRemoteLog.txt in the temporary directory for your platform. If you want to see more detailed information in this file, you can set the log level to "Detailed, very verbose" in the Gallery Remote preferences dialog.

If you would like to see the log unfold as you use the application, rather than having it go to a file, you should change the following:

  • In file GalleryRemote.properties (this is the preferences file, explained in the Preferences section), set
toSysOut=true
  • In file Gallery Remote.lax (in the directory where Gallery Remote was installed), set
lax.stdout.redirect=console

Caution: Your password is printed in clear text in several places throughout the log. Be careful before posting your log to forums or sending it to anyone.

I still can't find a log file

Don't look for the Gallery Remote log on the server, it's on the client!

The log file is in the temporary directory for your platform:

  • on Windows, go to Windows Explorer and type %TEMP% in the address bar. This should take you to the directory where you can find GalleryRemoteLog.txt.
  • on Unix, it's in /tmp
  • on MacOS X up to Tiger, it's in /tmp/GalleryRemoteLog.txt
  • on MacOS X Leopard and later, finding the log file is more difficult, because MacOS randomizes the temp path to avoid common vulnerabilities:
    • open the Java Preferences application (in /Applications/Utilities)
    • in the Advanced tab, select Show console
    • the log window will appear the next time you run Gallery Remote and display the location of the log file
    • the /private folder may be hidden by the Finder; if that's the case, you can run the Terminal application and run the command open /private

When you install Gallery Remote version 1.4.1 and later on Windows, it installs two executables: Gallery Remote and Gallery Remote Debug. You can run the latter to get a log window. At the top of the log, it should tell you where the log file is saved.

Building thumbnails and displaying preview is slow (Linux, MacOS)

Whereas on Windows, ImageMagick and jpegtran are installed by the installer, on other OSes, they are not automatically installed, and must be installed by the end-user.

Please make sure that these products are available in your Unix PATH variable: you should be able to run them from a command-line as:

  • jpegtran
  • convert

If the commands above do not work, you should download and install these packages: http://jpegclub.org/ and http://www.imagemagick.org.

Also see Gallery Remote:Bundled.

Rotating pictures seems to work (the thumbnails are rotated), but the pictures are uploaded without being rotated

Same as above.

Using HTTPS

You can use https:// URLs with Gallery Remote to connect to secured web sites. This functionality is only available on Java 1.4 and later. If the site you are attempting to connect to uses a server certificate that is not certified by a trusted certificate authority, Gallery Remote will be unable to connect. If this happens, you will need to add the site's certificate to the Java registry of trusted certificates:

For Windows:

  1. Go to the site with Internet Explorer
  2. Go to menu File>Properties
  3. In the Properties window, click Certificates
  4. On the Details tab, click Copy to File...
  5. In the wizard, select DER-encoded X.509 certificate and save it to a file
  6. Open a console window (cmd.exe)
  7. Type the following command-line:
     keytool -import -trustcacerts -file path_to_cer_file -keystore %JAVA_HOME%/jre/lib/security/cacerts -alias arbitrary_name
You'll be prompted for the store password, which by default is
     changeit

For OSX:

  1. Save the certificate (in the example mycacert) somewhere (path) on your disk
  2. Open a terminal
  3. Type the following command-lines:
     cd /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/security
     sudo keytool -import -keystore cacerts -trustcacerts -alias mycacert -file path/mycacert.crt
You'll be first prompted for your Finder password
Then you'll be prompted for the keystore password, which by default is
     changeit
You will be asked to import mycacert
     yes

For Linux (debian and ubuntu, at least)

  1. save the sample as in the other examples
     sudo keytool -import -keystore /etc/java-1.5.0-sun/security/cacerts -trustcacerts -alias myalias -file myfile


Editing preferences

Even though there is a Preferences dialog, the preference files can still be edited for some hidden extra options. You should not modify the defaults.properties file, but you can read it to understand what each preference does. Then, you can edit the GalleryRemote.properties (it is created the first time GR is run) and add or replace the preferences you want to change.

Make sure Gallery Remote is not running when you edit the GalleryRemote.properties files, or your changes will be overwritten.

The preferences files is in a directory named .GalleryRemote inside the current user's home directory (on recent versions of Windows, this is the Documents and Settings/username directory on the boot partition). Mac and Linux users generally know what their home directory is.

Running GR on platforms without an installer

On G2.3 and later, the best way to run GR is by starting it from the Add Items page in G2, in the Gallery Remote tab. Select run Gallery Remote immediately. This uses WebStart, and should work more reliably on new OS and Java versions.

For older versions of Gallery, the following applies:

Gallery Remote is written in Java. If you have Java 1.4 or later installed on your machine, you may be able to run the app with the command: java -jar GalleryRemote.jar assuming you are in the same directory as the GalleryRemote.jar file.
This will not include some libraries that GR needs to run effectively; most notably icons will be missing, and file saving may be disabled and EXIF information may be ignored. This is only available in Gallery Remote 1.3 and later.

Bundled (or not) software

If you get an error message saying ImageMagick or jpegtran is not installed please see Gallery Remote:Bundled.

Connecting to a G2 installation: Server contacted, but Gallery not found at this URL

If you are running Gallery 2, make sure that you have installed the 'Remote' module. It contains the 'Implementation for the remote control protocol' and enables the remote applet. This module is not included in the (current) 'Typical' installation package.

Make sure you are not running in maintenance mode - trying to connect from Gallery Remote while in maintenance mode also causes this error.

You will usually get this message when your web server is set up to return a nice-looking page to tell you when a page is missing rather than the 404 error message GR expects. You have two options:

  • create a fake gallery_remote2.php page in your gallery2 directory, with this content:
<?php
  header("HTTP/1.0 404 Not Found");
  exit;
?>
this will make sure that URL does return a 404 error, which GR will be able to use.
  • force GR to connect to G2 without first trying to check if the Gallery is a G1 installation: in your GalleryRemote.properties file, add this line:
forceGalleryVersion.n=2
where n is the number that matches your Gallery URL in the file.

Mac users you will have to go into the Terminal (shock horror) becuase this directory is hidden. Make sure you have run Gallery Remote at least once but that the application is closed before you start. Then open up Terminal app and type the following:

pico .GalleryRemote/GalleryRemote.properties

You will be confronted with the GalleryRemote.properties file in the PICO text editor. Use the arrow keys on keyboard to scroll down to bottom of file then paste the code from above. Change the letter n to the number of your url (mine was 0 as I only added one url).

Then save your changes by using the key combination [ctrl] - O

Then exit PICO by using the key combination [ctrl] - X

Now close Terminal app and relaunch Gallery Remote. This worked for me :)

Using GR in non-latin languages

Most of the time, GR (1.5.1-b5 and later) works out of the box in non-latin languages, but sometimes it's necessary to help it along add the following lines to your GalleryRemote.properties file:

fontOverrideName=SimSun
fontOverrideSize=12
fontOverrideStyle=0

If any of these lines is absent, GR won't apply the correct font settings. For example, if only fontOverrideName is set, the font won't change.

The installer for Gallery Remote doesn't work

Please note that the recommended way to run Gallery Remote is to run it directly from Gallery, please see this other FAQ.

Gallery Remote is installed using Install Anywhere, which is developed by Macromedia. In a small number of situations, the installer may not work correctly. When that is the case, please try to install the .jar version: download it from SourceForge and run the installer (you need to already have Java 1.5 or later installed)

java -jar GalleryRemote.jar

(the name of the file you downloaded may be slightly different)

Out of memory errors

Usually, the standalone version of Gallery Remote will not run out of memory, because it is configured to get a lot of it. The Gallery Remote applets, on the other hand, have to make do with whatever the web browser allocates for them, and that is often not enough.

If you get a message about an out of memory error, here are a few possibilities to ensure you can use your applets without problems:

  1. Install ImageMagick on your local computer: ImageMagick will do all the heavy-lifting associated with resizing large images, so the Java applet doesn't have to. This also speeds up slideshows and uploads considerably.
  2. Allocate more memory to Java applets. This has to be done differently on different platform. On Windows:
    • open the Java control panel
    • on the Java tab, click the top (Applet Runtime Settings) View... button
    • in the Java Runtime Parameters for the active (most recent) JRE, enter -Xmx128M

I want to implement a new Gallery client application

Then you'll want to take a look at the manual for the Gallery Remote protocol manual.

You can also check if you can reuse some of an existing such application (most are open-source).

I get "Gallery Remote can find no protocol implementation at the URL ..."

You need to install the Gallery Remote module on your web server. To do this, log in to your gallery as the administrator, go to "Site Admin," then "Plugins," "Get More Plugins," find "remote control" near the bottom, and download that module. Voila!

Enabling accelerated transitions

Starting with Java 1.6, you can enable smoother transitions by adding -Dsun.java2d.opengl=true to the Java command-line, which allows Java 2D to use OpenGL to composite images. For applets and on Windows, this is done in the Java control panel, in the Java tab, Java Applet Runtime Settings (click View...). Add the snippet above to the Java Runtime Parameters (to be safe, add it to all lines that correspond to a versions 1.6.0 or above).

Using GR causes 404 errors in my web server logs

When Gallery Remote runs as an applet or from WebStart, the Java VM attempts to load some files from your web server, which are not present by design. This causes the web server to log 404 errors (unknown document or incorrect URI). These messages can safely be ignored.

In Gallery 2.3 and later, when GR runs on a 1.6 Java VM, Java should not attempt to load these files, and the errors should not appear.

advertisements