Kilian / Trimage

A cross-platform tool for optimizing PNG and JPG files.
http://trimage.org
MIT License
706 stars 55 forks source link

trimage.py: cannot connect to X server #43

Closed edupo closed 7 years ago

edupo commented 7 years ago

On Ubuntu server 16.04. As you may imagine no Xserver is available and it will continue like that.

Either the statement

Trimage is a cross-platform GUI and command-line interface to optimize image...

is wrong or I'm doing something wrong.

The problem is that I'm a windows user opening my little Cygwin to a Linux server not controlled by me, so Xserver is not available there. My idea was to create a small script to upload images to server, using trimage and returning them to windows. But I'm afraid that is not possible. Isn't it?

Kilian commented 7 years ago

Trimage uses Qt and it's dependency is a running graphical environment, unfortunately also for the CLI interface. You can use Xvfb but if you're only ever on ssh, it might be easier to use the various command line tools that trimage uses (optipng, jpegoptim etc) directly.

edupo commented 7 years ago

@Kilian Thanks, I'll do it like that. I got into this project looking for a solution to avoid dealing with those complexities. For me, the command interface trimage proposes, was awesome in it's simplicity and it convinced me. But knowing the dependencies I would not publicize it as a command line tool or at least I would make clear the dependencies in the web page (that was my entry point to this project).

alexfornuto commented 3 years ago

I would not publicize it as a command line tool or at least I would make clear the dependencies in the web page

I second this point. The Command line options section of trimage.org implies that one could run this as a CLI-only tool.

In my use case, I work from a VM and access a terminal through code-server, so there's no X environment.