473,386 Members | 1,883 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,386 software developers and data experts.

Python, Linux, Desktop Environment

So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?

Nov 22 '05 #1
12 1962
je*********@gmail.com wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?


There are *no* "click and run" on linux, since the GUI is an option,
not a part of the OS.

What you're looking for is WM/DesktopManager specific. You'll find the
answers in the Gnome and KDE manuals.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 22 '05 #2
je*********@gmail.com wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?


There are *no* "click and run" on linux, since the GUI is an option,
not a part of the OS.

What you're looking for is WM/DesktopManager specific. You'll find the
answers in the Gnome and KDE manuals.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 22 '05 #3
je*********@gmail.com wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?

I don't really understand what you mean... Have you tried simply
creating a "shortcut"
that points to your script.py?
That should make it run with a click...
HTH,
Yves
Nov 22 '05 #4
je*********@gmail.com wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?

I don't really understand what you mean... Have you tried simply
creating a "shortcut"
that points to your script.py?
That should make it run with a click...
HTH,
Yves
Nov 22 '05 #5
On Wed, 16 Nov 2005 19:56:51 +0100, bruno at modulix <on***@xiludom.gro> wrote:
je*********@gmail.com wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?


There are *no* "click and run" on linux, since the GUI is an option,
not a part of the OS.

What you're looking for is WM/DesktopManager specific. You'll find the
answers in the Gnome and KDE manuals.


Yeah, and please don't accidentally remove the option to type 'myscript.py'
on the command line -- that's how I almost always start GUI programs. If I
like them enough, I edit my window manager's config so that it appears in a
suitable place in the menus. Nine applications have made that list during
the past fifteen years ;-)

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn!
Nov 22 '05 #6
On Wed, 16 Nov 2005 19:56:51 +0100, bruno at modulix <on***@xiludom.gro> wrote:
je*********@gmail.com wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?


There are *no* "click and run" on linux, since the GUI is an option,
not a part of the OS.

What you're looking for is WM/DesktopManager specific. You'll find the
answers in the Gnome and KDE manuals.


Yeah, and please don't accidentally remove the option to type 'myscript.py'
on the command line -- that's how I almost always start GUI programs. If I
like them enough, I edit my window manager's config so that it appears in a
suitable place in the menus. Nine applications have made that list during
the past fifteen years ;-)

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn!
Nov 22 '05 #7
On 2005-11-16, je*********@gmail.com <je*********@gmail.com> wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?

Have you heard of a "shebang line"?

That is when the first line of a file starts with #!

You probably want ...

#!/usr/bin/env python
That will run the commandline from that first line.
Remember, it must be the very first thing (no spaces).
You may also need to be in a particular directory in
order to access program resources. I usually end up
making a little .sh script like ...

#!/bin/sh

cd /my/python/prog/dir && python myprog.py

Most of the recent window managers are using the
so called .desktop files. You could copy one of
those from another program (try creating a "link
to application" or an "application launcher" on
your desktop).

I think most wms will also just run your shell
script if the permissions are set correctly.

Nov 22 '05 #8
On 2005-11-16, je*********@gmail.com <je*********@gmail.com> wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?

Have you heard of a "shebang line"?

That is when the first line of a file starts with #!

You probably want ...

#!/usr/bin/env python
That will run the commandline from that first line.
Remember, it must be the very first thing (no spaces).
You may also need to be in a particular directory in
order to access program resources. I usually end up
making a little .sh script like ...

#!/bin/sh

cd /my/python/prog/dir && python myprog.py

Most of the recent window managers are using the
so called .desktop files. You could copy one of
those from another program (try creating a "link
to application" or an "application launcher" on
your desktop).

I think most wms will also just run your shell
script if the permissions are set correctly.

Nov 22 '05 #9
Thanks everyone.

Making a shortcut was just too obvious for me...

I just made a KDE shortcut that runs the python command for me.

Nov 22 '05 #10
Thanks everyone.

Making a shortcut was just too obvious for me...

I just made a KDE shortcut that runs the python command for me.

Nov 22 '05 #11
je*********@gmail.com <je*********@gmail.com> wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?


If you can start it from command line, you can start it from any menu
etc. As it's not Python related your favourite Linux newsgroup/mailing
list/user group/... should be a better place to ask.
Maybe <http://www.opendesktop.org> is helpfull too.

Florian
--
Einen Troll zu füttern ist das gleiche als würde man einen Haufen
Hundescheisse sehen, absichtlich reinsteigen und sich dann beschweren.
(Christian Schneider in <20*****************@bofh.my-fqdn.de>)
Nov 22 '05 #12
je*********@gmail.com <je*********@gmail.com> wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it a "click and
run" sort of application in KDE or Gnome on Linux?


If you can start it from command line, you can start it from any menu
etc. As it's not Python related your favourite Linux newsgroup/mailing
list/user group/... should be a better place to ask.
Maybe <http://www.opendesktop.org> is helpfull too.

Florian
--
Einen Troll zu füttern ist das gleiche als würde man einen Haufen
Hundescheisse sehen, absichtlich reinsteigen und sich dann beschweren.
(Christian Schneider in <20*****************@bofh.my-fqdn.de>)
Nov 22 '05 #13

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

Similar topics

4
by: Jhuola Hoptire | last post by:
Just installed J2RE 1.4.2 on a Linux server. I am very knew to the POSIX world. I couldn't dig-up much in the docs or via google about the following: 1 - Is there a standard way to make sure...
0
by: Jeffrey Barish | last post by:
I have been developing a Python program with two intercommunicating (using sockets) parts, one of which runs on a desktop and the other on a PDA. For ease of development, I developed them both on...
8
by: Martin Maney | last post by:
Apologies if this isn't news here - I've been too busy this last week or so for even skimming the traffic here, in part because I've been messing around with Ubuntu's preview release on a spare...
17
by: krishnakant Mane | last post by:
hello all, I am stuck with a strange requirement. I need a library that can help me display a pdf file as a report and also want a way to print the same pdf file in a platform independent way....
15
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility,...
8
by: Okonita | last post by:
Hi all, I have gone through the process of installing DB2 UDBv9 Express-C in my local linux environment. I am used to having icon placed on my Desktop or taskbar for easy access to (db2cc)...
4
by: Stephen Cattaneo | last post by:
Hello all, I am attempting to execute an automated test (written in Python) via cron. I have to check the HOSTNAME variable as part of the test, oddly under cron the HOSTNAME environment...
0
by: Python Nutter | last post by:
Mini install guide for python on the iPhone: Cydia =Install SSH helps make initial configuration easier until you get used to MobileTerminal Cydia =Install MobileTerminal (closest to a bash...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.