Trimage icon indicating copy to clipboard operation
Trimage copied to clipboard

Remove QT dependency when run from command line

Open incidentist opened this issue 12 years ago • 6 comments

I want to run Trimage as a command-line tool on a server, but it complains about a lack of QT when I try. It would be great if Trimage didn't use the QT library unless it is needed.

incidentist avatar Apr 12 '12 20:04 incidentist

Removing the QT library is a pretty big thing since the threading is managed with QThread, and the command-line tool is just a nice quick add-on to the main GUI. I don't see this happening soon.

Kilian avatar Apr 13 '12 11:04 Kilian

Hi, guys! https://github.com/Kilian/Trimage/blob/master/src/trimage/trimage.py#L433 These two lines code (!!!) is all logic Trimage.

eagleas avatar Sep 28 '12 13:09 eagleas

Removing the QT library is a pretty big thing since the threading is managed with QThread, and the command-line tool is just a nice quick add-on to the main GUI. I don't see this happening soon.

Even if QT is present, if $DISPLAY is not set then you get an error message "cannot connect to X server". Is it using some sort of hidden window or something when it runs in command line mode, or could this be fixed?

AlisterH avatar Jul 05 '13 03:07 AlisterH

on CentOS 6.5 it wants to install 40Mb of data, when i run "yum install PyQt4" and im unsure if that is all that needs to be installed..

slrslr avatar Oct 17 '14 00:10 slrslr

There should be a disclaimer on the site where anywhere it says CLI it's got fine print "Depends on GUI". Save so much time

mikemcguire avatar Sep 21 '16 19:09 mikemcguire

I was able to get this to run on google colab by adding the command line option -platform vnc. I can't guarantee that this will work on other headless environments, but for anybody else who's wanting to get this to work in a headless environment it's worth trying this.

FrostBird347 avatar Jan 13 '24 05:01 FrostBird347