Hello gnome-terminal

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • egbert

    #1

    Hello gnome-terminal

    When I start the following script in a gnome-terminal:

    #!/usr/bin/env python
    import os
    print "hello gnome-terminal"
    print os.environ["PYTHONPATH "]

    I see the expected results in the same gnome-terminal window.

    However starting this same script via a launcher in a panel,
    a new gnome-terminal window is opened for output only,
    and PYTHONPATH is an unknown entity.
    How can I open a terminal over whose environment and
    configuration I have more control ?
    --
    Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
    =============== =============== =============== =============== ============
  • gnukid

    #2
    Re: Hello gnome-terminal

    Hi

    Launcher may spawn a new shell to execute your program. The new shell
    wont have your PYTHONPATH environment variable.

    Cheers,
    Noorul

    egbert wrote:[color=blue]
    > When I start the following script in a gnome-terminal:
    >
    > #!/usr/bin/env python
    > import os
    > print "hello gnome-terminal"
    > print os.environ["PYTHONPATH "]
    >
    > I see the expected results in the same gnome-terminal window.
    >
    > However starting this same script via a launcher in a panel,
    > a new gnome-terminal window is opened for output only,
    > and PYTHONPATH is an unknown entity.
    > How can I open a terminal over whose environment and
    > configuration I have more control ?
    > --
    > Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
    > =============== =============== =============== =============== ============[/color]

    Comment

    • Mike Meyer

      #3
      Re: Hello gnome-terminal

      egbert <egbert.bouwman @hccnet.nl> writes:
      [color=blue]
      > When I start the following script in a gnome-terminal:
      >
      > #!/usr/bin/env python
      > import os
      > print "hello gnome-terminal"
      > print os.environ["PYTHONPATH "]
      >
      > I see the expected results in the same gnome-terminal window.
      >
      > However starting this same script via a launcher in a panel,
      > a new gnome-terminal window is opened for output only,
      > and PYTHONPATH is an unknown entity.
      > How can I open a terminal over whose environment and[/color]

      X has been breaking environments this way for decades. You have two
      choices:

      1) Tell gnome-terminal that it needs to start a login shell, assuming
      you can.

      2) Move the setting of PYTHONPATH into a different startup file, one
      that will be executed by all shells when they start.

      Whatever you do, don't ask about .MacOSX/preferences.pli st.

      <mike
      --
      Mike Meyer <mwm@mired.or g> http://www.mired.org/home/mwm/
      Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

      Comment

      Working...