Skip to content

[Linux] Use “feh” Command to Open Image in Local Terminal from Remote Server

If you are used a terminal to connect to remote server to develop, maybe you want to found a fastest method to see a remote server picture.

Before I have more time to study the method of remotely opening pictures, I have been using scp command to send the pictures to local side for viewing. But it spent a lot of time.

My conclusion is that using the feh command with ssh -Y to build a remote graphical connection is a faster way to view the pictures.


How to use feh

First, we need to use ssh -Y to connect the remote server.

ssh -Y user@server_ip


And you can check the localhost value of environment variable $DISPLAY. (Such as [Linux] Open remote server GUI program via terminal)


If you have no feh command in your environment, you need to use the following command to install it:

sudo apt install feh


After the installation is over, we can quickly open the picture on the terminal connected to the remote end! Here is an example:

Output:

The opening speed is less than one second. If I use “eog” here, it feels about two or three seconds.


References

Tags:

Leave a ReplyCancel reply

Exit mobile version