Friday, May 3, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 6085  / 1 Year ago, sat, november 19, 2022, 7:29:15

In my terminal, I did



 $su nextuser


and logged in to that account. Now, when I try to open a text file in the home directory of that user by



$gedit test.c


I get



No protocol specified
Cannot open display:
Run 'gedit --help' to see a full list of available command line options.


How can I use the graphical text editor to display files on the new user's account?


More From » command-line

 Answers
4

As root, run



echo $DISPLAY
xhost local:nextuser


Then



su - nextuser
export DISPLAY=<the value got from echo $DISPLAY above>
(or SET DISPLAY.. if export does not work)


And you are good to go. :)


[#36550] Sunday, November 20, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nnaisdio

Total Points: 369
Total Questions: 112
Total Answers: 108

Location: Kenya
Member since Mon, Jun 14, 2021
3 Years ago
;