sudo subl - how to open sublime 3 by the terminal in Ubuntu?

0

I performed the installation of Sublime Text 3 on Ubuntu 17.10. I can open Sublime using the subl command on the terminal. However it does not work open as sudo , using the command nothing happens.

But it works by running the sudo subl -h commands to access the sublime help and sudo subl -v to see the version.

Below the contents of the sublime_text.desktop

--------------------------------------------------------

rodolfo@rodolfo-ntb:/usr/share/applications$ cat sublime_text.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
rodolfo@rodolfo-ntb:/usr/share/applications$ 
asked by anonymous 14.01.2018 / 00:39

1 answer

0

I received help from a group on the Telegram, and this is not a bug. Ubuntu 17.10 is using Wayland, and Wayland does not allow running programs like sudo. Before starting the user session I switched to start Ubuntu with Xorg and now the sudo subl command is running.

    
16.01.2018 / 03:14