sudo gedit Gtk-WARNING **: cannot open display:

27,350

Gedit is a graphical editor. However, SSH is a strictly NON-graphical interface. Therefore, use a text-based editor like nano or vim.

For example:

sudo vim /etc/inetd.conf
Share:
27,350

Related videos on Youtube

Hurricane Development
Author by

Hurricane Development

Updated on September 18, 2022

Comments

  • Hurricane Development
    Hurricane Development over 1 year

    I have a VPS on which I am attempting to install pure-FTPd via a root SSH account on a remote machine. I have already installed gedit and have gotten to the stage where I need to edit a config using gedit with the following command sudo gedit /etc/inetd.conf

    However doing do results in...

    error: XDG_RUNTIME_DIR not set in the environment.
    
    (gedit:6155): Gtk-WARNING **: cannot open display: 
    

    I am a newbie at linux, please help, thanks

    • Frank Thomas
      Frank Thomas almost 10 years
      you are using an SSH terminal connection, right? just text? if so, you want to use a text-based text editor like nano or pico or vi. if you are actually in a gnome session try using gksu or gksudo instead of sudo. gksu/gksudo are the same as sudo, but made for graphical sessions.