Closed mjbright closed 12 years ago
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.)
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
Sounds like great progress, I'll have to take a look at this.
Don't suppose your presentation will be available online at some point, will it?
Cheers, Mike.
On 5 August 2012 15:26, R. Saravanan < reply@reply.github.com
wrote:
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
Reply to this email directly or view it on GitHub: https://github.com/mitotic/graphterm/issues/2#issuecomment-7509979
The presentation is available at http://2012.texaslinuxfest.org/sites/default/files/slides/TXLF12-CommandLine-talk_3.pdf
Thank-you very much.
Sorry I haven't been more active ... give me a few days and I'll check out the new software and provide feedback on the "PATH" bug I was seeing.
Regards, Mike.
On 7 August 2012 05:28, R. Saravanan notifications@github.com wrote:
The presentation is available at http://2012.texaslinuxfest.org/sites/default/files/slides/TXLF12-CommandLine-talk_3.pdf
— Reply to this email directly or view it on GitHubhttps://github.com/mitotic/graphterm/issues/2#issuecomment-7542910.
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.