Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #22554

Re: Python Script Works Locally But Not Remotely with SSH

References <2750c67d-859f-46a3-ab00-a8a3da06cc4c@l14g2000vbe.googlegroups.com>
Date 2012-04-02 19:17 -0400
Subject Re: Python Script Works Locally But Not Remotely with SSH
From Jerry Hill <malaclypse2@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1245.1333408669.3037.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Mar 27, 2012 at 8:51 PM, goldtech <goldtech@worldpost.com> wrote:
> I have a WinXP PC running an SSH server and I have a Linux PC with an
> SSH client  and logged into the XP seemingly OK. It's all on my
> personal LAN, the connection seems OK.
>
> I have a py file on the XP that I run via SSH from the Linux, it's:
>
> import webbrowser
> webbrowser.open('www.google.com')
>
> This runs OK started on the local XP PC, the browser Firefox opens and
> goes to the site, or it opens a tab to the site. But executing that
> same file via SSH does not open Firefox...doing it via SSH starts
> Firefox ( I see it begin in the process manager and I see web
> activity) but Firefox does not open it's window.
>
> Why the does the window not open when the script is started remotely?

How are you running the ssh server on the windows machine?  Is it a
windows service?  If so, what user does it run as, and is the service
configured to be allowed to interact with the desktop?

IIRC, by default most windows services run as a different user than
you, and do not have permission to interact with your desktop session.
 You may be able to get the firefox window to pop up on the ssh server
machine if you allow it to interact with the desktop, assuming that's
what you're trying to do.

Jerry

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Python Script Works Locally But Not Remotely with SSH goldtech <goldtech@worldpost.com> - 2012-03-27 17:51 -0700
  Re: Python Script Works Locally But Not Remotely with SSH goldtech <goldtech@worldpost.com> - 2012-04-01 10:32 -0700
  Re: Python Script Works Locally But Not Remotely with SSH Jedrzej Krzysztof Dec <jdec@jedrzejdec.eu> - 2012-04-01 12:32 -0700
    Re: Python Script Works Locally But Not Remotely with SSH Rod Person <rodperson@rodperson.com> - 2012-04-03 07:37 -0400
      Re: Python Script Works Locally But Not Remotely with SSH goldtech <goldtech@worldpost.com> - 2012-04-07 09:59 -0700
  Re: Python Script Works Locally But Not Remotely with SSH Emile van Sebille <emile@fenx.com> - 2012-04-02 14:04 -0700
  Re: Python Script Works Locally But Not Remotely with SSH Jerry Hill <malaclypse2@gmail.com> - 2012-04-02 19:17 -0400

csiph-web