From owner-freebsd-questions@FreeBSD.ORG Mon Feb 21 20:44:20 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B3C716A4CE for ; Mon, 21 Feb 2005 20:44:20 +0000 (GMT) Received: from prosporo.hedron.org (hedron.org [66.11.182.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE10943D5F for ; Mon, 21 Feb 2005 20:44:19 +0000 (GMT) (envelope-from ean@hedron.org) Received: from localhost.hedron.org (localhost.hedron.org [127.0.0.1]) by prosporo.hedron.org (Postfix) with ESMTP id B278CC120; Mon, 21 Feb 2005 15:44:27 -0500 (EST) From: Ean Kingston To: freebsd-questions@freebsd.org, brianjohn@fusemail.com Date: Mon, 21 Feb 2005 15:44:26 -0500 User-Agent: KMail/1.7.2 References: <1048.209.87.176.132.1109017540.fusewebmail-19592@www.fusemail.com> In-Reply-To: <1048.209.87.176.132.1109017540.fusewebmail-19592@www.fusemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502211544.27322.ean@hedron.org> Subject: Re: How can I start a GUI application through SSH X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2005 20:44:20 -0000 On February 21, 2005 03:25 pm, Brian John wrote: > Hello, > I would like to be able to start an X application through ssh. I want the > app to actually run on my local box (meaning I want the window to pop up > on the box that I am ssh-ing to), but I just want to be able to start it > remotely. Can someone help me figure out how to do this? For the purpose of this discussion, the 'server' is the remote system the one you are ssh-ing to. The 'client' is the one you are ssh-ing from. 1) Before you leave, go to the server and logon at the console so that you have X running. Make a note of the 'DISPLAY' variable setting. Probably ":0.0". $ echo $DISPLAY :0.0 Do NOT log out. 2) Use SSH to connect to the server as the same user that logged on. 3) Set the DISPLAY variable to the one indicated in step 1. $ export DISPLAY=:0.0 4) Run the command you want (with nohup and in the background. $ nohup xterm -sb & That will run the command so that output is displayed on the server console and let you log out of your ssh session. If you want to learn more, you should read up on the xauth command. Also, try to understand X toolkit basics. Why do you want to do this anyway? -- Ean Kingston E-Mail: ean AT hedron DOT org URL: http://www.hedron.org/