Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Only generic icons showing in gls #2

Closed
mjbright opened this Issue · 5 comments

2 participants

@mjbright

Installed graphterm (version 0.30) on a Raspberry Pi (ARM-based board running Raspbian - Debian "Wheezy").
Install was without problems.

Launched the graphterm server as
gtermserver --host=192.168.0.41 --auth_code=none
on the Raspi

Then connected from another machine (Ubuntu 12.04, Chrome 17) to http://192.168.0.41:8900/
Created a New session, enabled Icons (drop down selector at top of page).

Once PATH was set:
export PATH=/usr/local/lib/python2.7/dist-packages/graphterm-0.30.1-py2.7.egg/graphterm/bin:$PATH

I ran gls on a folder of jpeg files (*.jpg) and PNG files but only generic icons were displayed, not the actual images.

@mitotic mitotic was assigned
@mitotic
Owner

This is a known design problem that will be fixed in the next major release. The problem is that gls can generate file:///... urls pointing to the jpeg files. However, the browser will not display file:/// urls on normal web pages for security reasons. The graphterm window is just a normal web page, subject to all the usual restrictions like same origin policy etc. (This differs from xmlterm, which was not a server, but a privileged process within the browser which could display file urls.) There is an obvious solution, i.e., gls can generate http:// urls that map to local filenames. However, we need to think very carefully about the security implications of this, so that our files aren't visible to every hacker in the world! In addition to ensuring the http request for the file comes in from an "authenticated" user, it would be better to associate a unique token with each individual file. (gls currently uses generic icons for this reason.)

@mitotic mitotic closed this
@mitotic mitotic reopened this
@mitotic
Owner

gls now has the capability to display image files as icons (instead of generic icons). However, you need to specify the -i option to achieve this. It would be a bad idea to make it the default behavior, because whole image files are transferred to accomplish this, using up space in the browser's cache (and also bandwidth). A user could have 1 GB of photos in a directory and all of it would need to processed by the graphterm server and the browser just to display the output of gls. (The OS has access to preprocessed thumbnails, and thus avoids this. If I can find a way to access the thumbnails, then the default behavior can be changed.)

There is also another command, gimages, that can be used to display images inline, or as a slideshow. I actually used the "gimages -f" command to make my presentation at TexasLinuXFest

@mitotic mitotic closed this
@mjbright
@mjbright
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.