Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Applet does not start (permission denied)
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Applet does not start (permission denied)
jesuisbenjamin English 3 matttbe [Read]
04 May 2011 à 07:33

jesuisbenjamin, Wednesday 04 May 2011 à 01:33


Subscription date : 28 October 2009
Messages : 415
Hello there,

I'm working on an applet from scratch (that'll be the next facebook applet too, but now i'm starting with Gmail, yes i know there is already an applet for that, but i just want to do it anyway), i call it "Gossip".

I basically created the applet by copy-pasting the working Facebook applet to a another folder, renamed the files, edited the auto-load and conf files etc. The folder name == script name (without extension). When i start the applet though (from command line) i get
sh: ./Gossip: Permission denied


Why is that? Any ideas?

Here is the code so far:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#       
#       
### IMPORTS ###
from BeautifulSoup import BeautifulSoup

### LOCAL IMPORTS ###
from CDApplet import CDApplet
import gmailgossip

class Gossip(CDApplet):
    
''' This is the applet class inheriting from the standard CDApplet. '''
    
def __init__(self):
        
# list of all services to be read
        
self.checkGmail bool
        
        
# initiate applet
        
CDApplet.__init__(self)
    
    
def get_config(self):
        
# retreive all user configuration
        ### DUMMY CONFIGURATION
        
self.checkGmail True
        gmailAccount 
AtomFeedMail()
        
gmailAccount.setupAccount('myusername''**********')
        
    
def begin(self):
        if 
self.checkGmail == True:
            
count gmailAccount.checkMail()
            print 
"...Gossip: you have"count"unread email(s)."
            
class AtomFeedMail(object):
    
''' This class is used for Gmail, it represents an atom feed email account. '''
    
def __init__(self):
        
# the variables represent the account's data
        
__username str
        __password 
str
        
# the xml data is returned by the atom feed
        
__xml str
        
# the quantity of unread email which will be extracted from the xml data
        
__count int
        
# initiate account
        
object.__init__(self)
        
    
def setupAccount(selfusernamepassword):
        
# set up email and password
        
self.__username username
        self
.__password password
        
    def provideAccount
(self):
        
# provides username and password
        
account = (self.__usernameself.__password)
        return 
account
    
    def setXml
(self):
        
# sets xml data from atom feed using the local gmailgossip module
        
data gmailgossip.requestGmail(self.provideAccount)
        if 
data:
            
self.__xml data.read()
        else:
            
self.__xml ''
    
    
def checkMail(self):
        
# checks the number of unread emails on the account and saves data if any
        
self.setXml()
        if 
len(self.__xml) > 0:
            
soup BeautifulSoup(self.__xml)
            
self.__count int(soup.fullcount.string)
        else:
            
# there is an error while reading mail
            
return -1
        
return self.__count
        
if __name__ == '__main__':
    
gossip Gossip()
    
gossip.run()



matttbe, Wednesday 04 May 2011 à 02:25


Subscription date : 24 January 2009
Messages : 12573
now i'm starting with Gmail, yes i know there is already an applet for that, but i just want to do it anyway
No this is a good idea to create a dedicated applet for only one task

Permission denied
This is simple => you can't execute it because of permission denied. In other words, you don't have the right to launch it so simply add the right to execute it by right clicking on your file or by launching this command:
chmod +x Gossip


PS: if it's an applet for GMail, why don't you name it "GMail"? (it's maybe better for the user )
PS²: and why do you use BeautifulSoup and not python-libxml2 or another XML parser? (it's maybe better to use the most used parser => if it's installed in most distribution by default, it's maybe better for the user...)

jesuisbenjamin, Wednesday 04 May 2011 à 02:37


Subscription date : 28 October 2009
Messages : 415
matttbe :
[it] is a good idea to create a dedicated applet for only one task ... if it's an applet for GMail, why don't you name it "GMail"?

The applet should read not only Gmail, but every mail / micro-blogging services. I start with Gmail cause it's clean and easy. Will extend with Facebook etc.

matttbe :
you can't execute it because of permission denied. In other words, you don't have the right to launch it so simply add the right to execute it by right clicking on your file or by launching this command:
chmod +x Gossip

Ha, that was simple indeed

matttbe :
why do you use BeautifulSoup and not python-libxml2 or another XML parser? (it's maybe better to use the most used parser => if it's installed in most distribution by default, it's maybe better for the user...)


Good point, i just discovered BS, i will look at libxml2. BS was incredibly easy to use, except i had to install it. I hope libxml2 is that easy too

matttbe, Wednesday 04 May 2011 à 07:33


Subscription date : 24 January 2009
Messages : 12573
BS was incredibly easy to use, except i had to install it.
You can also copy it into the forlder of your applet but it's not recommended!

The applet should read not only Gmail, but every mail / micro-blogging services. I start with Gmail cause it's clean and easy.
Don't hesitate to look at this application: CloudSN

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Applet does not start (permission denied)
jesuisbenjamin English 3 matttbe [Read]
04 May 2011 à 07:33


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Applet does not start (permission denied) Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.