Hello gnome-terminal

E

egbert

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 ?
 
G

gnukid

Hi

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

Cheers,
Noorul
 
M

Mike Meyer

egbert said:
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

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.plist.

<mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,323
Members
48,007
Latest member
Elvis60357

Latest Threads

Top