473,795 Members | 3,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3578
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.pli st.

<mike
--
Mike Meyer <mw*@mired.or g> 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
2380
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. (http://www.onlamp.com/pub/a/python/2000/07/25/gnome_applet.html?page=2) There is no AppletWidget attribute anymore and 'Gtk' prefix at gtk module functions Please let me know some sample code or website about that.
1
2945
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
1326
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 *** to remove the old version of GTK+. You may also be able to fix the error *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing *** /etc/ld.so.conf. Make sure you have run ldconfig if that is *** required on your system. *** If...
1
2138
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 that comes with PyGNOME (clock-applet.py). It works fine when I run it from the shell, but when I log out and log in again, there's just a tiny GNOME-foot icon where the applet should be. After poking around in ~/.gnome/panel.d, I think I've...
1
4233
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 last): File "conftest.py", line 17, in ? import gnome.gconf ImportError: No module named gconf cat: conftest.out: No such file or directory configure: error:
4
2306
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. The lack of font selection, the lack of anti-aliasing, and the gaudiness of the widgets were a real disappointment. I wish I could have something like a Gnome-Idle IDE, so I can have the beautiful IDE I'm enjoying in Windows over in...
3
1594
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 'Server Settings/Services' Icon within gnome, nothing happens... i tried to run the 'start services' command from a command line, and got the
2
1806
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 run as a daemon when linux is booted. I want the buttons to be displayed at the presession login screen. I am using Fedora core 4 with GNOME I cannot seem to get the buttons to display at the presession screen.
8
1643
by: Simon | last post by:
using System; using System.Collections; class Test { static void Main() { ArrayList replies = new ArrayList();
2
1575
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
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.