FastQt
FastQt copied to clipboard
fastqt command line does not work: QXcbConnection: Could not connect to display
When trying to run fastqt 0.2.3 in a screen session over ssh connection to a remote host, the following error is displayed:
QXcbConnection: Could not connect to display
Aborted
Did you try -X arguments with ssh :
ssh -X user@server
Otherwise, you can run fastqt as command line by using giving arguments.
fastqt fileA.fastq fileB.fastq
I can confirm this bug if I want use fastqt in cli or in gui remotely i need use ssh -X
.
Use ssh -X
can be a temporary solution.
So it's not a bug . It's same for all GUI application.
If it's appear in cli mode it's a bug.
ah ok. Understood.. We should detect if X server is avaible. Otherwise run as CLI
I am not sure but maybe this page can help https://stackoverflow.com/questions/23844867/qt-application-with-optional-gui
I'd just like to add 2 thing to the discussion:
- It is recommended to use
ssh -Y
instead ofssh -X
for security reasons (please check ssh's man page for more information) - I'm not sure this applies to C++, but when I built a Qt app in python, using pyQt that has both a GUI and CLI interface I solved the problem with modules (the "back-end" part of the code is completely independent of the GUI "front-end")