473,388 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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
================================================== ======================
Sep 30 '05 #1
2 3565
Hi

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

Cheers,
Noorul

egbert wrote:
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
================================================== ======================


Sep 30 '05 #2
egbert <eg************@hccnet.nl> writes:
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
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Oct 1 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nabugoon | last post by:
Hi all. I'm trying to write gnome applet program with python. But, it is too difficult to find any document about that. One web page I had found was old....
1
by: Charlie Kim | last post by:
Here is gnome applet source of mine. -------------------------------------------------- #!/usr/bin/env python import pydic import gtk import gnome.applet
0
by: Dan Nawara | last post by:
when installing gnome-python I get the following error.... *** 'pkg-config --modversion gtk+-2.0' returned 2.2.4, but GTK+ (2.2.1) *** was found! If pkg-config was correct, then it is best ***...
1
by: Vincent Montressor | last post by:
I'm playing around with writing my own panel applets, and I'm trying to figure out how to get my panel applets to be restored when I log in. As an experiment, I'm using the simple clock applet...
1
by: Jeremy C. Reed | last post by:
Configuring gramps (genealogy software) says: checking Python bindings for gtk... ok checking Python bindings for GNOME... ok checking Python bindings for gconf... Traceback (most recent call...
4
by: Dave Anderson | last post by:
I love using Idle as my IDE for python on Windows. I've briefly tried some other IDE's, but the clean and simple nature of Idle keeps me coming back to it. Recently, I tried out Idle on Fedora....
3
by: bruce | last post by:
hi... i'm running rh8.0 with gnome.. i'm not sure of the version (it's whatever rh shipped). i've recently updated (or tried to update) python to the latest version. when i try to run the...
2
by: Mulac | last post by:
Is Tkinter also compatible wih GNOME? I wrote a program in python that displays 2 buttons for starting and stopping the execution of a program. I used Tkinter for the gui. I want the program to...
8
by: Simon | last post by:
using System; using System.Collections; class Test { static void Main() { ArrayList replies = new ArrayList();
2
by: veronikadoo | last post by:
can anybody tell me in detail about GNOME or perfect website from where i get everything about GNOME thanks in advance veronika
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.