I have installed filezilla on ubuntu, which I need to run from the command line. But when I try to run it showing eg. help or version I get:

~$ filezilla -h
Error: Unable to initialize gtk, is DISPLAY set properly?
~$ filezilla -v
Error: Unable to initialize gtk, is DISPLAY set properly?

As I understand a commandline interface should exists for linux:


  • What does "echo $DISPLAY" say? Are you trying to run Filezilla via SSH? – Ernestas Jan 2 '13 at 11:20
  • On my debian sid work box (yes, I know) I get this; $ filezilla -v FileZilla 3.5.3, compiled on 2012-06-29 No output actually attaches to the X-server, though I have one running. What happens here if you artificially set DISPLAY=:1 or something similar and try it again? – Xyon Jan 2 '13 at 11:20
  • echo $DISPLAY gives nothing, but why do I need to set the display when running from commandline/headless/without gui? "set DISPLAY=:1" does not help - it still gives empty output when doing echo $DISPLAY – u123 Jan 2 '13 at 12:03
  • Try it like: DISPLAY=:1 filezilla -v – Xyon Jan 2 '13 at 12:30
  • Still gives: Error: Unable to initialize gtk, is DISPLAY set properly? I have tried to do "export DISPLAY=:1" but I still get the above error - but now it actually has a value when I echo it. – u123 Jan 2 '13 at 12:33

Many GUI apps have command line options but this does not mean you can use them without X running. The command line options are there for launchers and menus to use.

Even if you figure out the DISPLAY setting properly, it's just going to launch the GUI.

If you want an FTP application that doesn't require a GUI, try lftp.

| improve this answer | |

You need to enable server access control program for X by invoking xhost + in your normal user terminal. It will grant any user to connect to X-server. Once you are done, just make sure to restrict it by xhost - since its enable by default for security reasons.

| improve this answer | |
  • Maybe I am missing the big picture here but is a X-server not only required for running gui apps? I just need to run the command line version of filezilla. I have tried "xhost +" which gives: "~$ xhost + xhost: unable to open display ":1" – u123 Jan 3 '13 at 8:13
  • xhost + : Turns off access control (all remote/local hosts will have access to X server) When every I run into issues like ` Gtk-WARNING **: cannot open display: :0.0` I turn the access control off, and it works. – WeloSefer Jan 3 '13 at 8:51
  • and make sure you have gtk installed on your machine – WeloSefer Jan 3 '13 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.