This is a test version of Biostars. For the public version, visit https://www.biostars.org.
FastQC Error Problem

I would really like to use FastQC for my project but am getting the following error message when I try to run it on my Ubuntu server 15.04

bio@ubuntu:~$ fastqc &

[1] 716
rafay@ubuntu:~$ Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
        at java.awt.Window.<init>(Window.java:535)
        at java.awt.Frame.<init>(Frame.java:420)
        at java.awt.Frame.<init>(Frame.java:385)
        at javax.swing.JFrame.<init>(JFrame.java:174)
        at uk.ac.babraham.FastQC.FastQCApplication.<init>(FastQCApplication.java:71)
        at uk.ac.babraham.FastQC.FastQCApplication.main(FastQCApplication.java:324)

Whereas java is already installed

bio@ubuntu:~$ java -version

java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.15.04.1)
OpenJDK Client VM (build 24.79-b02, mixed mode, sharing)
fastqc ubuntu

3 answers

It is complaining X11 is not set (maybe not even installed?). When you call fastqc without arguments, it opens the graphical interface. Try:

fastqc *.fastq &

Another thing to consider is whether you're ssh-ing into the server, and by default X11 forwarding isn't enabled. If that's the case, add a -X flag into your command and then try and open fastqc as standard (or firefox or any graphical program).

i.e.:

ssh -X bio@ubuntu.co.uk
$ fastqc &

X still needs to be installed on the server, and X-forwarding needs to be enabled on sshd. A trick to sped up X11-forwarded sessions is to use blowfish, which is faster (according to the documentation) than the default 3des:

ssh -X -c blowfish user@server.dot

And if your internet is slow, compressing data may help too:

ssh -X -C -c blowfish user@server.dot

Unfortunately there's a bug in Ubuntu 15.04 for SSH X11 Forwarding.

ssh-based X11 forwarding not working in 15.04 following upgrade from 14.10

ramky@DESKTOP-M8Q6BRT:/mnt/c/Users/Ramakrishnan$ fastqc
Exception in thread "main" java.awt.HeadlessException:

No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
        at java.awt.Window.<init>(Window.java:536)
        at java.awt.Frame.<init>(Frame.java:420)
        at java.awt.Frame.<init>(Frame.java:385)
        at javax.swing.JFrame.<init>(JFrame.java:189)
        at uk.ac.babraham.FastQC.FastQCApplication.<init>(FastQCApplication.java:63)
        at uk.ac.babraham.FastQC.FastQCApplication.main(FastQCApplication.java:338)

(base) ramky@DESKTOP-M8Q6BRT:/mnt/c/Users/Ramakrishnan$

Log in to answer this question.