Reply
Thread Tools
Posts: 5 | Thanked: 0 times | Joined on Dec 2010
#1
I have N900 and some troubles with desktop icons.

The case is that i have a python script i want to have a nice shortcut for on my desktop.

What ive done so far is make and put a .desktop file in the /usr/share/applications/hildon folder. Put my icon in the /usr/share/icons/hicolor/64x64/apps folder. Restarted, nothing is changed.

What have i done wrong? What im trying to do is make a shortcut to my python test app, located in MyDocs/Python/TestApp/main.py

my icon name is simply pytest.png.

Am i putting stuff in the wrong directories?
 
cddiede's Avatar
Posts: 1,034 | Thanked: 784 times | Joined on Dec 2007 @ Annapolis, MD
#2
Did you double check the ownership and permissions of your .png and .desktop files to make sure they match the ownership/permissions of the files around them?

You know that if it works, the Icon would first appear at the bottom of your application menu. You would need to manually add it to your desktop.
 
Posts: 5 | Thanked: 0 times | Joined on Dec 2010
#3
I think there was a error in my .desktop file. I open up one of the other desktop files and copyed the needed information and it works.

BUT, if i made a terminal application what whould be the settings then?

im guessing the .desktop file needs to have
Terminal=true
Exec=/usr/bin/osso-xterm /path/to/file

but this does not work for me
 
cddiede's Avatar
Posts: 1,034 | Thanked: 784 times | Joined on Dec 2007 @ Annapolis, MD
#4
A .desktop file needs alot more values then just Terminal and Exec.

You're best off using an existing .desktop file as a template and modifying the name, exec, and icon fields as needed.
 
humble's Avatar
Posts: 355 | Thanked: 395 times | Joined on Dec 2009 @ USA
#5
i was thinking of making a pygtk Gui for this.

S.W.I.C
short for shortcut,with,icon,creator.

it would be based on my previous work(con900) as a base

all it would do is bring up a template; you enter in the goods and save it as.
with an option to write a random script(for what ever you like) and save it as with exec flags.

so..
we could have alot of little short cuts to scripts or what ever..

what do you guys think?
__________________
Would you like to Donate?

My"Current Project(s)":
[Resurrecting] DON
 

The Following 5 Users Say Thank You to humble For This Useful Post:
humble's Avatar
Posts: 355 | Thanked: 395 times | Joined on Dec 2009 @ USA
#6
@cddiede give me till like mid jan. mostly earlier thou.
__________________
Would you like to Donate?

My"Current Project(s)":
[Resurrecting] DON
 
humble's Avatar
Posts: 355 | Thanked: 395 times | Joined on Dec 2009 @ USA
#7
ok just for an update the program's substructure is set.
i need help thou. i want to tell python to open and read any ".desktop" file in the working DIR how to?

check this out but it dose not work. it's not like xterm and magic #'s.

Code:
# That "*" does not work for me.
    file = open(/opt/DSC/*.desktop) # By default it should read without 'r'
o yeah i changed the name to DSC = Desktop.Shortcut.Creator

pm me post here whatever

thanks,
__________________
Would you like to Donate?

My"Current Project(s)":
[Resurrecting] DON

Last edited by humble; 2011-01-03 at 12:13.
 
James_Littler's Avatar
Posts: 820 | Thanked: 436 times | Joined on May 2010 @ Portsmouth, UK.
#8
You could use queen beecon for this quite easily.
 
humble's Avatar
Posts: 355 | Thanked: 395 times | Joined on Dec 2009 @ USA
#9
Originally Posted by James_Littler View Post
You could use queen beecon for this quite easily.
(not sure)but i think those are "widget's"(correct me if im wrong) im talking full blown desktop shortcut not just on the home screen.
__________________
Would you like to Donate?

My"Current Project(s)":
[Resurrecting] DON
 
Posts: 992 | Thanked: 738 times | Joined on Jun 2010 @ Low Earth Orbit
#10
Originally Posted by humble View Post
i need help thou. i want to tell python to open and read any ".desktop" file in the working DIR how to?
Are you trying to read the filenames of all the .desktop files or are you trying to read their contents?

Code:
# That "*" does not work for me.
    file = open(/opt/DSC/*.desktop) # By default it should read without 'r'
open() expects a single filename, filename is a string, strings need to be delimited by single-quotes (') or double-quotes ("). So:

Code:
file = open('/opt/DSC/*.desktop')
This will open THE file named literally *.desktop.

Probably the easiest way to get list of files is:
Code:
import glob
files = glob.glob("/tmp/*.desktop")
Once you have that you can iterate through list using open() to get at their contents.
 

The Following User Says Thank You to kureyon For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:30.