How would you view a JPG over SSH? I have tried ForwardX11, but I get an error saying 'X11 forwarding request failed on channel 0'. I can use vim, but display, eog, ty-and-imgcat have all failed with the error 'Command not found'. Could anyone give me a hand? Also, the JPG has no extension – M5KDAN44.
Thanks!
Best Answer
I assume you are using Ubuntu Desktop to connect to the Ubuntu server. Since the remote computer is an Ubuntu server, it does not have any graphical interfaces like x.org. Therefore you cannot use X forwarding from the server to the desktop. Here is an alternate approach to viewing the jpeg file from the Ubuntu server. We will use
sftp
which in turn usesssh
.Setup
sftp
using NautilusOpen Nautilus and find the Menu item "Other Locations". At the bottom find Connect to Server:
Under Server Address Enter:
The part after
//
is as you would use tossh
to the server.Press Connect. You will see a password dialog box:
Enter the password associated with laptop_user_id and select if you want the password is to be remembered or not. Again click Connect.
Now you should see your home folder of the laptop.
Notice there is a new entry under Network on the left panel of Nautilus that begins with
server_user_id
. Right click on it and choose "Add Bookmark" to create a permanent bookmark for your server's home folder in the Nautilus of the Desktop.Navigate to your file
Navigate to the folder where you have the jpeg file you want to view:
As the file does not have any extension Nautilus will not recognize it as a jpeg file yet. It will show up as a generic binary file as seen above.
Rename the file
Right click on the file and select rename
Add the file extension
jpg
to the end of the filenameDouble click on the renamed file
The jpeg file from the server will now open in the default image file viewer in the local desktop.
Hope this helps