قالب وردپرس درنا توس
Home / Tips and Tricks / How to remotely open a GUI application with PuTTY

How to remotely open a GUI application with PuTTY



  SSH on Laptop Concept
Eny Setiyowati / Shutterstock.com

Want to remotely access a Linux computer and start a graphical application? With the option "Activate X1

1 forwarding" you can support the rescue. You can even do this from Windows – all you have to do is quickly install an X server.

The PuTTY program was originally written for Windows 20 years ago. It has since been ported to many other platforms. It is a graphical application that provides a terminal window and a remote connection to other computers. Normally, the connection is made through SSH, but other protocols are supported.

In addition to the traditional terminal window command-line interface, PuTTY can be configured to open graphical applications on the remote computer.

Installing PuTTY

If PuTTY is not already installed on your computer, you can install it as follows:

Download PuTTY from the Internet on Windows.

To install PuTTY on Ubuntu, use the following command:

  sudo apt-get install putty 

  sudo apt-get install putty in a terminal window

Use this command to PuTTY to install under Fedora:

  sudo dnf install putty 

  sudo dnf install putty in a terminal window

Use this command to install PuTTY on Manjaro:

  sudo pacman -Syu putty [19659017] sudo pacman -Syu putty in a terminal window " width="646" height="57" src="/pagespeed_static/1.JiBnMqyl6S.gif" onload="pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);" onerror="this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);"/>

Using PuTTY on Windows

When running PuTTY On Windows, you must install an X server before you can continue. The rest of the process will work just like Linux.

Linux graphical applications require an X server to provide a graphical desktop environment. The graphical applications have to be opened and executed somewhere. Windows does not have an X server because it does not need one. Therefore, we need to install one, just as you would when you start graphical Linux applications from the Windows 10 Windows subsystem for Linux.

The Xming X server was used to examine this article and ran flawlessly. Download and install it. You can accept all defaults. It will run as soon as it is installed and displayed as an icon in the system tray.

 xming about window "width =" 259 "height =" 208 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this. onerror = zero; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

Starting PuTTY

menu after installation. Under GNOME, you can start PuTTY by pressing the Super key - the key between the right Ctrl and Alt keys - and typing "putty".

<img class = "alignnone size-full wp-image-428348" data-pagespeed-lazy-src = "https://www.howtogeek.com/wp-content/uploads/2019/07/xputty_17.png .pagespeed.gp + jp + jw + pj + ws + js + rj + rp + rw + ri + cp + md.ic.S_iesj3NEu.png "alt =" The PuTTY icon "width =" 422 "height =" 252 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); " onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMay] The icon will appear at the top of the screen, click to start PuTTY.

Connect to PuTTY

The PuTTY window will appear In the Hostname field, enter the IP address or network name of the remote computer you want to connect to. You must have an SSH server running on the remote computer.

 Host details have been added in the PuTTY window : "width =" 572 "height =" 516 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); " onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

Scroll down the page window until the tree appears Item Expand, expand" Auth " and highlight the entry "X11."

 X11 forwarding option "width =" 572 "height =" 516 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon ( this); onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

Select the" Forward X11 "check box. In the page area, scroll to the top of the list and select "Session". Enter a name for these settings. Click the Save button in the Saved Sessions text box. Typically, you save the settings under the name of the remote computer so you can easily reuse them for future connections.

 Save PuTTY settings "width =" 572 "height =" 516 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); Connecting to the remote computer.

When you connect to a remote computer for the first time, a warning appears that you have not yet connected to this computer.

 First Connection Warning "width =" 453 "height =" 256 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null;

Click the "Accept" button to connect.

An x-term window is displayed. Enter the name of the user account under which you are connecting and press Enter. You will be asked to enter the password for this account. Enter the password and press Enter.

 Log on to the Remote Computer in a Terminal Window

The remote computer prompt appears.

Starting a Graph Application Type the name on the command line with the parameters that you want to pass to the application. We will use the Leafpad Editor to edit the .bashrc file.

  leafpad .bashrc 

<img class = "alignnone size-full wp-image-428357" data-pagespeed-lazy-src = "https://www.howtogeek.com/wp-content/uploads/2019 /07/putty_12.png.pagespeed.ce.-vym5l8Tb5.png "alt =" leafpad .bashrc in a terminal window "width =" 496 "height =" 57 "src =" / pagespeed_static / 1 .JiBnMqyl6S.gif "onload = "pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);" onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); bashrc file loaded.

 Leafpad editor loaded with .bashrc" width = "602" height = "402" src = "/pagespeed_static/1.JiBnMqyl6S.gif" onload = "pagespeed.lazyLoadImages. LoadIfVisibleAndMaybeBeacon (this);" onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this)

As another example, we start the Epiphany Browser

  in Epiphany 50 a terminal window "width =" 496 "height =" 57 "src =" /pagespeed_static/1.JiBnM qyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "/> 

The Epiphany browser opens and you can navigate to a favorite Web site.

 Epiphany browser window "width =" 646 "height =" 547 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; (This);

And yes, it also works under Windows! Here we started the inactive Python IDE on a remote Linux system. It appeared on our Windows desktop. Just start it by typing the command like in Linux.

 The Idle Python ID "width =" 637 "height =" 224 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed .lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

Note that it does not have the usual Windows window decorations. It is a Linux application that runs on your Windows desktop with Linux window attributes. Courtesy of PuTTY and the Xming X server.

Closing the connection

To close the connection, close all applications and use the exit command in the PuTTY terminal window.

  exit 

 exit in a terminal window "width =" 496 "height =" 57 "src =" /pagespeed_static/1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

This is really impressive Happy on a Windows desktop, with a few simple steps, nothing is less than stumble.




Source link