So first off, I'm half a newbie (experienced with coding in python and sql, but not so much on linux, ubuntu, or on what I think is Debian.
I need to find out how to open an image through the terminal. I'm also using a docker image that I pulled so I'm not a hundred percent sure what settings I can change. I've gone to the folder with the files and also done...
sudo su
sudo apt-get update
sudo apt-get install eog
when I try to eog image.JPEG , I get
Unable to init server: Could not connect: Connection refused
(eog:15434): Gtk-WARNING **: 21:21:33.463: cannot open display: :0
I've looked around and tried most things from export displaying to different numbers, did xhost localhost, I've checked x11 forwarding, although at some point if I xauth list, like I've read in some threads, I don't get anything back.
What information do you need from me so that you all can help me? Let me help you help me.
Again this is from a docker image I pulled.
edit: ANY way to open the image would help. If there's a way to save the files to local host for example, that would be fine too.
editedit: I also found this https://stackoverflow.com/a/22050116/12465516 and it looks interesting but the folder I need to access, I have to sudo su to see, I'm able to transport the folder to my downloads folder for example but I can't access the folder
CodePudding user response:
I solved it! I mkdir another folder in the previous folder then went back in the encrypted folder, made permissions open to everyone then moved all files to the new folder , control p and control q to keep image running while back in a new terminal, then i cp the new folder into the host folder of my choosing. all images are there, voila!
CodePudding user response:
Sounds like xhost won't let you run programs with gui from the shell. Try to disable the access control of xhost and then open your jpg:
xhost && eog image.JPEG
For more type "man xhost" as a command in the shell.