473,797 Members | 3,199 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1990
je*********@gma il.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*********@gma il.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*********@gma il.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*********@gma il.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*********@gma il.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.dyn dns.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*********@gma il.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.dyn dns.org> R'lyeh wgah'nagl fhtagn!
Nov 22 '05 #7
On 2005-11-16, je*********@gma il.com <je*********@gm ail.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 "applicatio n 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*********@gma il.com <je*********@gm ail.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 "applicatio n 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

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

Similar topics

4
2825
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 users (all, or some) can "reach" java? eg one could presumably create a java.sh or aliases ... Where is the standard Linux directory to put such a script (and why)?
0
1666
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 a desktop. Now that I have them working on the desktop, I need to move the part destined for a PDA to a PDA. I had originally planned to use a Sharp Zaurus because it runs Linux (the OS of my desktop system) and I had found a Python port that...
8
2482
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 machine... and, of course, spending time on their very busy mailing list. :-) I didn't find any mention of Ubuntu in a quick scan of recent messages, so... Ubuntu is a Linux distribution that starts with the breadth of Debian and adds regular...
17
8477
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. if that's not possible then I at least need the code for useing some library for connecting to acrobat reader and giving the print command on windows and some thing similar on ubuntu linux. the problem is that I want to display reports in my...
15
2965
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, controlled via Plesk control panel, and turned over to me with Fedora Core 6 in an empty state. This is the standard way you get a server in a colo today. Bringing Python up in this completely clean environment is a huge hassle, and it doesn't...
8
2823
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) Control Center. After installation, how then can I get access to DB2? How can I place a desktop icon in linux for easy access to DB2? Also, I will like to know how I can make DB2 control center in my windows environment detect the recent DB2...
4
7567
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 variable is not in the os.environ dictionary. I know that cron runs in a subshell that does not have all of the normally set environment variables. HOSTNAME is not one of those variables, it is set even in cron's subshell. Why doesn't python get...
0
19317
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 shell you get on your iPhone currently) Cydia =Install Finder (graphical alternative to using SSH/MobileTerminal for setting permissions, navigating file system, moving/copying files, etc.) Cydia =Install Python (currently installs CPython 2.5.1)
0
9537
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
10469
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
10246
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
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
5459
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...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2934
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.