• My Book
  • About My website
  • Search

Amit Agarwal Linux Blog

PuTTY export client display on login for opening X application and terminal.

2010-04-11 1 min read Bash Linux

export DISPLAY=$(echo $SSH_CLIENT |awk '{print $1”:0.0”}’)

Explanation:

SSH_CLIENT contains the IP and the port of the client machine. So we need to export (Client IP):0.0 for the display on the client machine. If the above is put in .bashrc or .bash_profile or .profile, then the DISPLAY variable will be set based on the client machine.

Client Display Export PuTTY
Latest posts
  • run_multiple_commands_with_find
  • How to Use AI with zapgpt to Generate Git Commit Messages from a Git Diff
  • How to Install ExifTool and Detect AI-Generated Images
  • ai_ml_hacking
  • openrouter fusion - capabilities similar to Anthropic Fable
  • Leveraging ffuf for Timing Attacks: Practical Workflow and Burp Integration
  • Ollama Security Hardening: Practical Guide for Cloud Deployments
Categories
  • Linux (532)
  • Fedora (343)
  • Bash (218)
  • Uncategorized (191)
  • Learning (156)
  • Photo (76)
  • Vim Tips (37)
Social media
© 2018 - 2026 by Amit Agarwal - rss
Bilberry Hugo Theme