3

I've a Ubuntu 12.04 VPS with no graphical environment installed. In that VPS, I'm trying to open a file from terminal using gedit with this command

gedit config/database.yml

But unfortunately it is showing following error

(process:3790): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
Cannot open display: 
Run 'gedit --help' to see a full list of available command line options.

How can I solve this problem?

tuxtu
  • 3,185
  • 9
  • 31
  • 44
  • what is config is that a directory? – Avinash Raj Dec 17 '13 at 16:57
  • If there is no graphical environment installed, then how would you like to start a graphical program? If on the other hand you are connecting to the server with ssh, then you can use X11 forwarding, and that way you can use gedit. – falconer Dec 17 '13 at 17:43

1 Answers1

2

gedit is a graphical editor. All graphical applications need an environment variable called $DISPLAY.

If you have running graphical session start gedit like this:

user@host:~# DISPLAY=:0 gedit config/database.yml

In case you dont have access to a graphical session try

user@host:~# nano config/database.yml

Max
  • 75
chaos
  • 28,256