[kde-linux] executing python program from desktop link
James Richard Tyrer
tyrerj at acm.org
Wed Apr 12 05:12:11 UTC 2006
Chakkaradeep C C wrote:
> Hi Kevin and all,
>
> On 4/11/06, *Kevin Krammer* <kevin.krammer at gmx.at
> <mailto:kevin.krammer at gmx.at>> wrote:
>
> On Tuesday 11 April 2006 13:07, Chakkaradeep C C wrote:
> > hi all,
> >
> > i created a launcher in the kde desktop to start a python
> program. But it
> > is not starting without selecting the "run in terminal" option being
> > selected. When i do this, the konsole window comes up. I would be
> happy if
> > anyone could tell me how to run python programs in kde desktop by
> creating
> > launchers.
>
> One possible reason for this can be a different environment setting.
> For example if you set or change environment variables in the user's
> shell
> configuration files (e.g. bashrc) then a program running in a
> terminal will
> see this change, but a program running in the KDE environment won't.
>
>
> Please find my attached bashrc file along with this mail.Am using Fedora
> Core 3. Is any settings in this file affecting me?
This code should not be in your "bashrc" file. It should be in "profile":
if ! shopt -q login_shell ; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
. $i
fi
done
unset i
fi
I presume that this is the code that came with Fedora. All I can tell
you is that the RedHat people don't know what they are doing. They try
to address issues with kludges rather than finding the actual problem
and doing it correctly.
What you need to do is make sure that your "/etc/profile" file executes
the scripts in "/etc/profile.d" and that "/etc/profile" is being run
before KDE is started.
From my "/etc/profile" script:
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
Note that the "." means 'source'.
If you use KFM to start KDE (graphical or automatic login) you need to
check your: "Xsession" script ($KDEDIR/share/config/kdm/Xsession" is the
default location) to see that it is sourcing or calling the
"/etc/profile" script. There are two ways for it to do this, it can be
called or sourced explicitly or the Xsession script can be made a login
script by using the first line:
#! /bin/bash --login
--
JRT
More information about the kde-linux
mailing list