0

I want sublime text editor open via sublime command, i've all ok for install sublime text 2, but when type sublime in terminal then showing me error, see below, anyone know how i can fix this ?

root@tmdwc:~# sublime
(sublime:22192): Gtk-WARNING **: cannot open display:
muru
  • 197,895
  • 55
  • 485
  • 740

1 Answers1

0

If you download sublime text 2 from here, you will get Sublime Text 2.0.2.tar.bz2

After unpacking archive with command

tar xfvj Sublime\ Text\ 2.0.2.tar.bz2

you will get directory Sublime Text 2, go to dir

cd  /path_to_dir/Sublime Text 2

and start text editor with command

./sublime_text

If you want to start text editor only with command sublime create sim link in /usr/bin

cd /usr/bin
sudo ln -s /path_to_dir/Sublime\ Text\ 2/sublime_text sublime

This link will allow to run text editor with command sublime

First part of problem is solved.

Exporting X Display via ssh you can have with option -X

ssh -l username ssh_server -X

With this command probably you will get your text editor in you display.

2707974
  • 10,553
  • 6
  • 33
  • 45
  • username means root@tmdw ? and ssh_server ? @2707974 – Rasel Khan Apr 24 '15 at 07:46
  • you also can use command in format ssh root@tmdw -X. In command ssh -l username ssh_server -X, -l - mean login name on server. command ssh root@tmdw -X is the same like ssh -l root tmdw -X – 2707974 Apr 24 '15 at 07:51
  • root@tmdwc:~# ssh -l root@tmdwc ssh_server -X not working – Rasel Khan Apr 24 '15 at 07:55
  • only ssh root@tmdwc -X or ssh -l root tmdwc -X – 2707974 Apr 24 '15 at 07:57
  • root@tmdwc:~# ssh root@tmdwc -X root@tmdwc's password: Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)
    • Documentation: https://help.ubuntu.com/

    Last login: Fri Apr 24 07:58:17 2015 from tmdwc root@tmdwc:~# sublime

    (sublime:27953): Gtk-WARNING **: cannot open display: `

    – Rasel Khan Apr 24 '15 at 07:59
  • Ok, you change question. You do not need to ssh on you own pc to start some app. Do you have installed ubuntu server without X? – 2707974 Apr 24 '15 at 08:08
  • I'm working in SSH server and with install lamp-server^ – Rasel Khan Apr 24 '15 at 08:12
  • Ubuntu server do not have X and can not be exported. Try another text editor. nano, vi, pico. – 2707974 Apr 24 '15 at 08:17