I am on a Windows PC and tried connecting to AWS running Ubuntu. I tried opening a file using gedit, was unsuccessful. Someone suggested MobaExtreme. Then I had to install gksudo in the server and tried gedit in the MobaExtreme shell and this solved the problem.

What I am really wondering is:

  1. Why couldn't I open gedit in the first place(This involved discussion about using ssh -X, and something regarding display not set)
  2. What does gksudo establish? (Can you elaborate on 'Owner is not the root'? I have no understanding of this concept).

Edit: Suggested merge answer only part of the question. I can accept the merge but I feel I'll not know other parts which I am curious about!

marked as duplicate by muru, Eric Carvalho, user68186, Zanna, Eliah Kagan Jan 29 '17 at 18:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Please ask one question at a time. Display not set most likely has nothing to do with gksudo/gksu. – user68186 Jan 17 '17 at 12:33
  • What file did you try to open? – steeldriver Jan 17 '17 at 13:11
  • @muru not really. I understand how to do it. Just don't understand what is happening. – Anirudh Ramesh Jan 17 '17 at 16:12
  • @user68186 I understand your frustration. I'm kinda a noob. So I'm just stating all the problem I've seen from google search. – Anirudh Ramesh Jan 17 '17 at 16:12
  • @WhatIfTheyGetMe you did read the first two lines of the top answer, didn't you? – muru Jan 17 '17 at 16:13

For point#2:

  1. gksudo is used to pop up the password prompt in a GUI window, no matter whether the application is GUI or CLI.
  2. sudo, asks for the password at the terminal instead of in a GUI window, regardless of the type of application being run.
  3. In scripts that don't run in an interactive terminal, gksu is the easiest way to get a user-entered password straight to sudo.
  • Thanks for your answer @Nisheet, but you have elaborated more about sudo vs gksudo. Can you tell me why I have to use gksudo and not sudo gedit file_name – Anirudh Ramesh Jan 17 '17 at 16:15

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