View Full Version : "Screenlets" v0.0.10 (like OSX Dashboard)
RYX
February 8th, 2007, 01:29 AM
It seems as if there is some serious error ... the dbus-calls to ScreenletsIFace.add don't reach their destination. I have to look into that some further ... (it worked ike a charm and I didn't really change it ... strange ):? )
RYX
February 8th, 2007, 02:31 AM
Hi RYX,
When I run ./screenletsd.py start, I get this error:
Session-file /home/bluebyt/.config/Screenlets/screenletsd.ses not found.
This is no real error, it is only a notification. The session-file is automatically created when the session changes for the first time.
i like your pager
can the mailcheck screenlet be made to use the google account (for gmail users) so we don't have to put our password in plain text ?? (infact so we don't have to put in our password at all)
The pager is only a skeleton and not really pretty yet :) ... The gmail-integration should be possible, maybe someone can implement that feature ... but the better way would be integration with evolution so you can use your normal email-accounts (would also mean no password ;)).
I am still unsure why you can't add screenlets with add-screenlet.py ... mysterious.
:|
delfick
February 8th, 2007, 03:20 AM
The pager is only a skeleton and not really pretty yet :)
agreed, though the potential is there :D
will it be possible to eventually have it as a 3d cube ??
... The gmail-integration should be possible, maybe someone can implement that feature
that would be awsome :D
especially if it had something like this http://userscripts.org/scripts/show/1554 :D
I am still unsure why you can't add screenlets with add-screenlet.py ... mysterious.
but you will eventually :P :D
robgig1088
February 8th, 2007, 04:48 AM
benjiku, I LOVE the calculator screenlet!! 2 things: firstly, only the keyboard has full functionality (I'm sure you knew this) and secondly, repeating decimals don't show up correctly (like 11/7 for example) I guess do a len(str(num)) and if its greater than 11, truncate it. Other than that, its FANTASTIC. Also, this algorithm is not the "Reverse Polish" method. The way i described at first was the reverse polish. The way below it is the standard method (popularized by Texas Instruments back in the 70s). Keep up the great work!!
one more thing i just noticed: if you type "1/2", it gives you "0.5" but then you can still type after it instead of it starting a new problem, if you catch what i mean....
Treviņo
February 8th, 2007, 05:06 AM
And finally, i modified the Calendar screenlet for french display (week starting with monday).
Hi, I think that the Monday as first day isn't only a "French" problem, but most of people uses it (I'm Italian...), so I did this fix already the same day of the calendar screenlet release (but I posted it only on Beryl forum), and it is slightly different from the version you've posted (that if I'm not wrong doesn't work well for people who want Sunday as first day of the Week).
You can check it here: http://phpfi.com/201448
robgig1088: feel free :roll: to include it on your code, and please check if it is completely compatible also with your "calendar order standard" ;)
Bye
robgig1088
February 8th, 2007, 05:20 AM
Yeah i didnt have much of a plan when i wrote the CalendarScreenlet so unless I get some fantastic ideas about it, I think im just going to ... slowly stop working on it (plus the code is pretty bad..) If anyone wants to pick it up and finish it or make themes, please feel free to!
favalessa
February 8th, 2007, 11:21 AM
I got this message after tryng to install it
./screenletsd.py start
Traceback (most recent call last):
File "./screenletsd.py", line 40, in ?
from xdg import BaseDirectory
ImportError: No module named xdg
@RYX thanks for your good job on this project!! :D
vishytk
February 8th, 2007, 12:25 PM
you need pyxdg installed
I got this message after tryng to install it
./screenletsd.py start
Traceback (most recent call last):
File "./screenletsd.py", line 40, in ?
from xdg import BaseDirectory
ImportError: No module named xdg
@RYX thanks for your good job on this project!! :D
favalessa
February 8th, 2007, 01:19 PM
you need pyxdg installed
I got this message after tryng to install it
./screenletsd.py start
Traceback (most recent call last):
File "./screenletsd.py", line 40, in ?
from xdg import BaseDirectory
ImportError: No module named xdg
@RYX thanks for your good job on this project!! :D
..which name I can use to install it via apt-get??
RAOF
February 8th, 2007, 01:49 PM
python-xdg
mikedee
February 8th, 2007, 02:43 PM
KDE doesnt seem to provide org.freedesktop.Notifications so this latest version crashes when it cannot find the service name. Does anyone know a package which will just provide this?
I commented out the notification connections and it works, although I assume certain things like the email applet might not work.
Sorcerer
February 8th, 2007, 02:53 PM
The org.freedesktop.Notifications service is provided by the notification-daemon package.
RYX
February 8th, 2007, 03:07 PM
KDE doesnt seem to provide org.freedesktop.Notifications so this latest version crashes when it cannot find the service name. Does anyone know a package which will just provide this?
I commented out the notification connections and it works, although I assume certain things like the email applet might not work.
Sorry 'bout the notifications - could have guessed that it doesn't work on KDE ... I'll try to find something better. For now it's only for testing (to let the screenletsd put out important messages when it has no stdout). I was already thinking about some NotificationScreenlet which shows messages whithin a themeable bubble/popup ... maybe accessible through its own dbus-object. (And it doesn't affect the MailCheckScreenlet :)).
Maybe you (mikedee) have some ideas how the screenletsd can be improved (just in case you have time for that) - I didn't know how to pass objects over dbus so I used IDs ... but it seems to me as it's a bad way of doing it :) ...
@RYX thanks for your good job on this project!!
Thank you, too! It's always nice to make people happy. :)
Yeah i didnt have much of a plan when i wrote the CalendarScreenlet so unless I get some fantastic ideas about it, I think im just going to ... slowly stop working on it (plus the code is pretty bad..) If anyone wants to pick it up and finish it or make themes, please feel free to!
If you don't mind - I think I'll "take it over", clean it up and make it compatible with the new version. I really want that one to be part of the standard package.
I am surprised about the xdg-dependancy ... is xdg not part of the official python-package? I don't want to enforce so many deps ....
:)
baze
February 8th, 2007, 03:13 PM
I am surprised about the xdg-dependancy ... is xdg not part of the official python-package? I don't want to enforce so many deps ....
no, pyxdg is a separate package. and this one is actually a good dependency as it is built to provide _desktop independent_ fd.o libraries for python.
Amaranth
February 8th, 2007, 04:10 PM
What do you use pyxdg for? That project is unmaintained.
favalessa
February 8th, 2007, 04:30 PM
..no better situation after installed python-xdg (thanks RAOF :D )
./screenletsd.py start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
Traceback (most recent call last):
File "./screenletsd.py", line 476, in ?
service = ScreenletsService(bus_name)
File "./screenletsd.py", line 232, in __init__
self.backend = CachingBackend(path =
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str
:cry: :oops: :x
RYX
February 8th, 2007, 04:41 PM
@favalessa: Manually create the directory $HOME/.config/Screenlets/ (... the xdg-stuff sucks, I think I'll rip it off)
:)
Vasek
February 8th, 2007, 04:46 PM
Hello!
In the first place, thanks to all the excellent developers who participate in this great project! Screenlets have made my desktop much more clean (I have finally found the right place for notes and clock) and user friendly that I have ever dreamed.
A little idea: what about making a simple central site, just something like http://www.anykeysoftware.co.uk/compiz/plugins/, for all the widgets made so far, with possibility to download the latest version of each, information about what stage the development is in, what version of "screenlets" are they guaranteed to work with, and so on?
Yes, I know about The "third-party" Screenlets will be officially included in the 0.1.0-release once the core and basics are in a "non-draft" state. from http://www.go-compiz.org/index.php?title=Desktop_Screenlets, but I think such a page should be around before as well as after that merge.
Edit: OK, OK, it's on the first page of this topic, too :) BTW. Someone should update the page mentioned above, it still refers to 0.0.4. Seems simple enough for a loser like me to do, so can I just copy the text from the start of this topic?
Treviņo
February 8th, 2007, 05:07 PM
Well... As KDE user I got the freedesktop service bug, so I fixed it sudo apt-get install notification-daemon.
Now the daemon run smoothly, but runninng add_screenlet I get
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
Class ControlScreenlet not found.
So I can run nothing... Just the control can be ran by commandline, but it doesn't launch anything... :(
RYX
February 8th, 2007, 05:19 PM
In the first place, thanks to all the excellent developers who participate in this great project! Screenlets have made my desktop much more clean (I have finally found the right place for notes and clock) and user friendly that I have ever dreamed.
Thanks Vasek! Glad to hear that ... (may I quote this on the official site :D ?)
A little idea: what about making a simple central site, just something like http://www.anykeysoftware.co.uk/compiz/plugins/, for all the widgets made so far, with possibility to download the latest version of each, information about what stage the development is in, what version of "screenlets" are they guaranteed to work with, and so on?
The central site is in work and will allow user-uploads for screenlet-developers to create exactly what you think of ... (I think of something like gnome-look.org).
The wiki-page can only be updated by amgeex (I think) ... so we'll have to wait for him ... :)
:)
RYX
February 8th, 2007, 05:24 PM
Well... As KDE user I got the freedesktop service bug, so I fixed it sudo apt-get install notification-daemon.
Now the daemon run smoothly, but runninng add_screenlet I get
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
Class ControlScreenlet not found.
So I can run nothing... Just the control can be ran by commandline, but it doesn't launch anything... :(
That's strange - delfick has the same problem. Do you run the screenletsd.py from within its directory?
A little workaround for that is copying/pasting this into your screenletsd-session file ($HOME/.config/Screenlets/screenletsd.ses):hsz349nstzyasdif:ControlScreenlet
73ndifHe3L8W5cIf:ClockScreenlet
If that doesn't work, there seems to be some problem with the dbus-service ... does the daemon give any output? Try launching it on a separate terminal ... does it output anything when you launch a screenlet directly (like ./ClockScreenlet.py)?
Vasek
February 8th, 2007, 05:42 PM
In the first place, thanks to all the excellent developers who participate in this great project! Screenlets have made my desktop much more clean (I have finally found the right place for notes and clock) and user friendly that I have ever dreamed.
Thanks Vasek! Glad to hear that ... (may I quote this on the official site :D ?)
You must be joking :) Do with it whatever you want. I did nothing more than many before me -- and using bad English. Just wanted to express how I admire people able to make from scratch something so good working, good looking and of such usability.
BTW. Does one need much talent to make such fine graphics all the widgets have, or is it possible to learn the basics somewhere, some tutorial or guidelines?
The wiki-page can only be updated by amgeex (I think) ... so we'll have to wait for him ... :)
Right now I tried to fix a typo at the beginning of the "Future" paragraph (first letter missing) and got no problem. The text I was talking about is yours, that's why I asked.
RYX
February 8th, 2007, 06:12 PM
If you don't mind, it would be great if you could update the wiki page - I have no problem with it if you "use" my text (obviously :)) ... thanks in advance :D
Designing new themes should be no problem if you know how to work with inkscape (a free vector-painting program) or another app that can create svg-files (e.g. xaralx) ... It is best to open an existing theme's individual files in inkscape, understand how it works and then modify it to your likings ... important is that all theme files need to have the same size.
The great thing about svg and vector-graphics is that they are "open-source", so they can be edited by anyone without needing any xcf/psd/*-files to get good results.
Vasek
February 8th, 2007, 06:54 PM
Done :-)
I cut out the "TODO" section, since I think who is interested in development will find it in this thread. Or should I add it as well?
I hope that amgeex won't kill me for this :?
vishytk
February 8th, 2007, 07:02 PM
No backend running - failed to add Screenlet.
I get this error when i run some screenlets like weather or memory.
Can some tell me how to get these working with screenlets-0.0.6
mikedee
February 8th, 2007, 07:30 PM
Did you type this before starting the screenlets?
./screenletsd.py start &
RYX
February 8th, 2007, 07:39 PM
No backend running - failed to add Screenlet.
I get this error when i run some screenlets like weather or memory.
Can some tell me how to get these working with screenlets-0.0.6
If you have the screenletsd.py running and get that error it is because Weather and Memory are not updated yet - there is some modification needed to make them work with 0.0.6 ... you should wait for robgig1088 and the others to update their screenlets to the new version before using them with 0.0.6.
I apologize for that incompatibility, but I guess in versions lower than 0.1 this is acceptable :D ... will not happen again (so soon) ...
:)
favalessa
February 8th, 2007, 07:44 PM
@favalessa: Manually create the directory $HOME/.config/Screenlets/ (... the xdg-stuff sucks, I think I'll rip it off)
:)
..you mean I must create that folder with everything of you packet extracted move there?
vishytk
February 8th, 2007, 07:44 PM
No backend running - failed to add Screenlet.
I get this error when i run some screenlets like weather or memory.
Can some tell me how to get these working with screenlets-0.0.6
If you have the screenletsd.py running and get that error it is because Weather and Memory are not updated yet - there is some modification needed to make them work with 0.0.6 ... you should wait for robgig1088 and the others to update their screenlets to the new version before using them with 0.0.6.
I apologize for that incompatibility, but I guess in versions lower than 0.1 this is acceptable :D ... will not happen again (so soon) ...
:)
yes i get this error even when screenletsd.py is running.
i guess i need to wait till the screenlets are updated :(
Treviņo
February 8th, 2007, 07:45 PM
Do you run the screenletsd.py from within its directory?
Sure...!
A little workaround for that is copying/pasting this into your screenletsd-session file ($HOME/.config/Screenlets/screenletsd.ses):hsz349nstzyasdif:ControlScreenlet
73ndifHe3L8W5cIf:ClockScreenlet
If that doesn't work, there seems to be some problem with the dbus-service ... does the daemon give any output? Try launching it on a separate terminal ... does it output anything when you launch a screenlet directly (like ./ClockScreenlet.py)?
It doesn't work... That session file is generally empty... Only launching each screenlet from command line add something to it, but then add_screenets doesn't work anyway, with same error. :(
I don't see any error from dbus too...
I'd like also to create a deb for this package (that I could share from my repo), but could you add some pyton setup entries to install (and then package) this in easier way?
RYX
February 8th, 2007, 08:11 PM
It doesn't work... That session file is generally empty... Only launching each screenlet from command line add something to it, but then add_screenets doesn't work anyway, with same error. :(
I don't see any error from dbus too...
It sounds like the daemon doesn't play well for some reason ... If you start the daemon, then start some screenlets (on commandline), then close the daemon, then close the screenlets and finally restart the daemon - is the session restored? If not, is anything output?
I'd like also to create a deb for this package (that I could share from my repo), but could you add some pyton setup entries to install (and then package) this in easier way?
I will add that soon - I already read some docs about python-distutils. But I think it makes no real sense to simplify distribution before the first stable version (0.1.0). Most people tend to think that "package==working-software" and that's not the case yet (only causes unneeded work). It will come once the daemon is running good for everyone and the remaining bugs are fixed ... I will not do (m)any more dramatical changes before 0.1-release.
:)
RYX
February 8th, 2007, 08:13 PM
@favalessa: Manually create the directory $HOME/.config/Screenlets/ (... the xdg-stuff sucks, I think I'll rip it off)
:)
..you mean I must create that folder with everything of you packet extracted move there?
No, simply run this command in a terminal:mkdir $HOME/.config/Screenlets
Then it should work ... :)
RYX
February 8th, 2007, 08:15 PM
i guess i need to wait till the screenlets are updated :(
You can do it by hand, but if you have no programming-experience I recommend waiting (shouldn't take long) ... :)
vishytk
February 8th, 2007, 08:18 PM
Finally, I got weather screenlets working with screenlets-0.0.6 :D
Grab it here
http://www2.penguindia.com/beryl/weather.tar.gz
See the changes here
http://phpfi.com/201613
RYX
February 8th, 2007, 08:41 PM
Good job, vishytk! Thanks ... :)
And robgig, I really like your WeatherScreenlet (even though it only shows rain and snow :( ...). It looks really nice, but it has a problem - you should cache the weather data instead of loading it on each draw. Instead use a timeout and let it update after a certain interval (I think each hour would be a good default).
favalessa
February 8th, 2007, 08:45 PM
..almost got it....
./screenletsd.py start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
CachingBackend: Loading cache ...
Session-file /home/thasme/.config/Screenlets/screenletsd.ses not found.
Introspect error: The name org.freedesktop.Notifications was not provided by any .service files
Traceback (most recent call last):
File "./screenletsd.py", line 483, in ?
service.notify('Screenlets-backend has been shut down .... ', 5000)
File "./screenletsd.py", line 316, in notify
0, '', 'Screenlets-Daemon', message, [], {}, timeout)
File "/var/lib/python-support/python2.4/dbus/proxies.py", line 93, in __call__
iter.append(arg)
File "dbus_bindings.pyx", line 1081, in dbus_bindings.MessageIter.append
File "dbus_bindings.pyx", line 1305, in dbus_bindings.MessageIter.append_array
IndexError: list index out of range
..almost! :)
mikedee
February 8th, 2007, 08:56 PM
..almost got it....
./screenletsd.py start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
CachingBackend: Loading cache ...
Session-file /home/thasme/.config/Screenlets/screenletsd.ses not found.
Introspect error: The name org.freedesktop.Notifications was not provided by any .service files
Traceback (most recent call last):
File "./screenletsd.py", line 483, in ?
service.notify('Screenlets-backend has been shut down .... ', 5000)
File "./screenletsd.py", line 316, in notify
0, '', 'Screenlets-Daemon', message, [], {}, timeout)
File "/var/lib/python-support/python2.4/dbus/proxies.py", line 93, in __call__
iter.append(arg)
File "dbus_bindings.pyx", line 1081, in dbus_bindings.MessageIter.append
File "dbus_bindings.pyx", line 1305, in dbus_bindings.MessageIter.append_array
IndexError: list index out of range
..almost! :)
Installing notification-daemon should fix it :)
Vasek
February 8th, 2007, 09:14 PM
Thanks, vishytk!
I made exactly the same changes to CalendarScreenlet and it works now for me :)
--- dalsi/calendar/CalendarScreenlet.py 2007-01-23 23:33:49.000000000 +0100
+++ ./CalendarScreenlet.py 2007-02-08 21:06:18.000000000 +0100
@@ -37,7 +37,7 @@
# constructor
- def __init__(self, width, height, text="", parent_window=None):
+ def __init__(self, text="", parent_window=None):
#call super (and not show window yet)
- screenlets.Screenlet.__init__(self, 200, 200)
+ screenlets.Screenlet.__init__(self, width=200, height=200)
# set theme
self.theme_name = "ryx"
@@ -94,5 +94,5 @@
return True
- def draw(self, ctx):
+ def on_draw(self, ctx):
# get dates
date = self.get_date_info()
@@ -140,5 +140,5 @@
ctx.save()
ctx.translate(5 + (day-1)*13, 25 + 12*(row - 1))
- if str(int(x)+1) == str(date[0]):
+ if int(x)+1 == int(date[0]):
self.theme['day-bg.svg'].render_cairo(ctx)
p_layout.set_markup('' + " "+str(x+1) + '') ### draw the days
@@ -154,5 +154,5 @@
- def draw_shape(self,ctx):
+ def on_draw_shape(self,ctx):
if self.theme:
# set size rel to width/height
@@ -164,5 +164,5 @@
# interpreter then create a Screenlet instance and show it
if __name__ == "__main__":
- screenlet = CalendarScreenlet(100, 100)
+ screenlet = screenlets.create_new_instance('CalendarScreenlet' )
screenlet.main()
Yes, one more change: changing if str(int(x)+1) == str(date[0]): to if int(x)+1 == int(date[0]): helps if days before the 10th are not highlighted. Were it not today, I wouldn't find it :D
robgig1088
February 8th, 2007, 09:59 PM
Good job, vishytk! Thanks ... :)
And robgig, I really like your WeatherScreenlet (even though it only shows rain and snow :( ...). It looks really nice, but it has a problem - you should cache the weather data instead of loading it on each draw. Instead use a timeout and let it update after a certain interval (I think each hour would be a good default).
Yeah I agree. Maybe incorperate a function that checks if currenthour = lastchecked+1 then get data again. Wouldnt take more than a 8 lines to do. Probably do it tonight.
And yes, please do take over the CalendarScreenlet. I would like to see this improved but I don't have much time to do it (and i have other screenlets I want to make too!)
julio
February 9th, 2007, 12:16 AM
Great work !!
There are still many bugs though, especially when playing with the widget plugin of compiz :(, but this is both useful and real eye-candy
There is a bug in the CPUMeter Screenlet.
CPU percent depends on the interval !
You probably need to add
load = int(load / self.update_interval)
after line 106 of CPUMeterScreenlet.py
When I'll have a little more time I'll try to add support for multi proc...
See you
delfick
February 9th, 2007, 01:00 AM
the weather screenlet is acting a little strange...
have a look at this video (made with the capture plugin :D) to see what i mean...
http://delfick.videos.googlepages.com/weather_screenlet_odd.mp4
Vasek
February 9th, 2007, 01:36 AM
the weather screenlet is acting a little strange...
have a look at this video (made with the capture plugin :D) to see what i mean...
http://delfick.videos.googlepages.com/weather_screenlet_odd.mp4
Looks like it is only a small part of a much bigger window, doesn't it?
I tried changing both the values 350 on line 53 to 100 and it seems better.
Wow! Now it looks this was the source of other problems I have experienced so far, e. g., not saving the window position and some weird graphics artifacts during load.
RYX
February 9th, 2007, 01:52 AM
Yes, there is still some problem with the default width/height. The idea is that the scale is at 1,0 when width/height are like the ones passed to the superconstructor - but it doesn't work yet. A workaround would be to create themes always with images of 100x100 pixel size ...
Another thing - should I use a makefile/shellscript or the python-distutils? I don't really need to install something into the python-packages ... It would greatly simplify things if the screenlets would reside in some global path ... but I don't really know ...
Any suggestions are welcome ... :)
Vasek
February 9th, 2007, 01:59 AM
Now I don't know at all. Was my "solution" correct or was it a workaround? I have actually no idea of where the 350 came from, all the background SVGs of the Weather screenlet are 100x100.
delfick
February 9th, 2007, 02:19 AM
Looks like it is only a small part of a much bigger window, doesn't it?
hmm, it does too..
the plot thickens :D :P
btw, how do free up the terminal after doing ./screenletsd.py start ??
because i can't do anything else in that terminal untill i ctrl+c it ......
(doing it with a & after it doesn't seem to work...)
also the ./add-screenlet.py thing doesn't want to work with any screenlet ...
Vasek
February 9th, 2007, 02:26 AM
btw, how do free up the terminal after doing ./screenletsd.py start ??
because i can't do anything else in that terminal untill i ctrl+c it ......
(doing it with a & after it doesn't seem to work...)
What does not work with &? If you have your terminal full of output, you can simply do ./screenletsd.py start > /dev/null &
robgig1088
February 9th, 2007, 03:17 AM
yes the window is indeed 350 tall and 350 wide. I did it like this to greatly simplify the drawing.... The default values for the weather plugin are whole numbers (i.e. 300x300, etc) so it has to be like this.... =\
RYX
February 9th, 2007, 04:54 AM
It don't has to be like that. Setting width/height bigger than 100 currently only causes the windows to be much bigger than they should (instead of scale*100 the window's rectangle is scale*350 in your case). I will fix that width/height thing soon (by adding a default_scale-attribute as argument to the constructor). Just always use a base-size of 100 for now ... it gives much better performance.
:)
delfick
February 9th, 2007, 07:38 AM
What does not work with &? If you have your terminal full of output, you can simply do ./screenletsd.py start > /dev/null &
oooo....i thought you couldn't still use it because it was still outputting stuff...
(still new to linux really (less than a year) :D)
./screenletsd.py start > /dev/null & works well, thankyou :D
brokencrystal
February 9th, 2007, 01:23 PM
Will there be a website that has a tab for Screenlets (The Engine) download and a tab for Screenlets (The Scripts) downloads and screenshots with descriptions of these Screenlets that others can contribute to by uploading community written Screenlets?
Yes, a website for that is already in work. I want it to be exactly as you describe - one place to download the official package and an unlimitied number of subsections for offering community-downloads.
So what about a repository for Ubuntu / Debian, or possibly .deb and .rpm packages in the download section? Is this a possibility? If you need help from myself, please don't hesitate to ask. I'd be glad to help out.
Thanks again,
mcz
February 9th, 2007, 01:25 PM
I can use weatherScreenlet with the command: ./WeatherScreenlet.py.
It woks fine but the configuration is not saved.
So I tried to launch screenletsd (with the command ./screenletsd.py start > /dev/null &) but I get this error:
Traceback (most recent call last):
File "./screenletsd.py", line 476, in ?
service = ScreenletsService(bus_name)
File "./screenletsd.py", line 232, in __init__
self.backend = CachingBackend(path =
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
What can I do? (I use KDE).
RYX
February 9th, 2007, 02:26 PM
@mcz: Simply run this command:mkdir $HOME/.config/Screenlets
Then it should work ... (He is just missing a directory). And try to launch screenletsd.py without piping the output to /dev/null ... otherwise you won't see any error messages. If everything works, then you can let it output to /dev/null ...
@brokencrystal: Thank you, I will try to get a packageable version ready until the next release (messed around with setup.py the last night ... going nearly craszy ... and finally found that deleting the MANIFEST can help a lot :) ...) ..
:)
mcz
February 9th, 2007, 02:31 PM
Thank you, but I get this error now:
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
CachingBackend: Loading cache ...
Traceback (most recent call last):
File "./screenletsd.py", line 476, in ?
service = ScreenletsService(bus_name)
File "./screenletsd.py", line 237, in __init__
self.load_session()
File "./screenletsd.py", line 303, in load_session
classname = data[1].replace("\n", "")
IndexError: list index out of range
RYX
February 9th, 2007, 04:21 PM
The errors seems to be related to the empty session-file ... Copy/paste this into the file $HOME/.config/Screenlets/screenletsd.ses (and create file if it not exists):hsz349nstzyasdif:ControlScreenlet
73ndifHe3L8W5cIf:ClockScreenlet
I will release a new version today or tomorrow ... it will fix those file-related errors and allow installation of the screenlets (to be able to run them from wherever you like) ...
mcz
February 9th, 2007, 04:46 PM
Thank you, now it works.
I see that control has some programs to launch (Firefox, Inkscape,...).
It's possible to add some other programs?
Vasek
February 9th, 2007, 04:52 PM
This reminds me of another question: is it possible for a screenlet to be active in both the normal and the "widget" modes?
mikedee
February 9th, 2007, 05:04 PM
This reminds me of another question: is it possible for a screenlet to be active in both the normal and the "widget" modes?
It could be possible but would require a lot of extra work. Normally this means that you have to justify your request with some cool reason to have a screenlet in both layers ;)
RYX
February 9th, 2007, 05:22 PM
I see that control has some programs to launch (Firefox, Inkscape,...).
It's possible to add some other programs?
Edit the file control/menu.xml in the screenlets-folder. You can add any shell-command to a menuitem ... for the names of the icons you can either look into your desktop's icon-theme or simply find them via trial&error ... (most of the time it is the application-name).
:)
Vasek
February 9th, 2007, 05:47 PM
Normally this means that you have to justify your request with some cool reason to have a screenlet in both layers ;)
OK. The Control screenlet is able to add screenlets to both layers and to run extern applications. If this was (in some simple way) possible, it could make the new screenlets with is_widget = True by default when activated in the widget layer and vice versa*. Now I have set it up to make them is_widget, but
a) some screenlets, e.g., the Windowlist one, are best useful in the normal layer,
b) the switching of individual screenlets is still a bit buggy (when created with is_widget, it is not checked in the screenlet's menu, making the sl. a bit confused).
Now, with this setting, there's no point in having the ControlScreenlet not also as a widget. But then, in contrary, I can't make much use of its ability to run applications.
Another, more childish example: I love a small image of Tux sitting in the corner of my desktop. Now it's a GTK+ application, but there's no problem in accomodating the RulerScreenlet ot ExampleScreenlet to do the same. In this case it would be great if it was the same in both modes, again, if this was not too big problem.
A quick look at the code of widget.c shows this was probably meant not to be possible, but we know well it is (for example, when PrintScreen is pressed with widget plugin active).
Edit: For those not believing their eyes: I really didn't mean I wanted the function depend on something that may be considered a bug. I just wanted to point out there is maybe such possibility -- a "widget child" or something like.
*) Now I have no idea of how to get the information whether Widget is currently active... but that's unrelated for now.
mcz
February 9th, 2007, 06:17 PM
Edit the file control/menu.xml in the screenlets-folder.
Thank you very much !
benjiku
February 9th, 2007, 06:19 PM
Hi,
RYX : A lot of changes on the 0.0.6 release... Bravo ;)
Here is the 0.0.1 release of the CalcScreenlet
http://download.yousendit.com/3531A1573D8E233F
CHANGES :
- All the buttons work from the mouse (at last)
- keypress on "Backspace/Delete" makes a "CE", the second makes a "C"
- Float operations are available with float mode for big numbers
- memory mode (m+,m-,mc,mr)
- focus on/off svgs for the screen
I've got some TODO's :
- better historic display (with no limit)
- removable historic panel
- bug: time limit on mouse clicks for 'repeating numbers'
Vasek
February 9th, 2007, 10:41 PM
Many thanks, benjiku, I looked forward to a calculator a lot!
Just have read through Python tutorial and started hacking seriously :D It works :D ...
Hope I don't bother you all with my spams :oops:
... So I have right some ideas for the calculator, maybe you will find some useful among them.
1) - bug: time limit on mouse clicks for 'repeating numbers'
You are receiving GTK's 2BUTTON_PRESS and 3BUTTON_PRESS events. Note that the digits repeat in subsequent clicks only. You can filter these events out:
def button_press(self, widget, event):
#print "Button press"+str(event.button)
if event.type != gtk.gdk.BUTTON_PRESS:
return False
2) The main display doesn't work well for me, I probably have different fonts. The more digits are shown, the more is the text aligned right (the last digits run off the window quickly). Here I consider it safer to use right-aligned text:
p_layout.set_font_description(p_fdesc)
p_layout.set_width(88 * pango.SCALE)
p_layout.set_alignment(pango.ALIGN_RIGHT)
p_layout.set_markup(value)
ctx.set_source_rgba(0, 0, 0.6, 0.5)
ctx.show_layout(p_layout)
p_layout.set_alignment(pango.ALIGN_LEFT)
ctx.restore()..., then the draw_text calls can be simplified to
self.draw_text(ctx, '' + all + '', 5, 5, 6)
self.draw_text(ctx, '' + current + '', 5, 13, 10)
3) You can enable use of the numerical keypad by
key = gtk.gdk.keyval_name (event.keyval)
KPCONVERT = {'KP_Add': 'plus', 'KP_Subtract': 'minus', 'KP_Multiply': 'asterisk',
'KP_Divide': 'slash', 'KP_Enter': 'Return'}
if KPCONVERT.has_key(key):
key = KPCONVERT[key]
elif key[:3] == 'KP_':
key = key[3:]
ONLYDIGITS="([0-9]|comma|period|plus|minus|BackSpace|Delete|Return|a sterisk|slash|equal)"
Oh, my posts become the further the longer... Stop me before I fill up the capacity of forum.go-compiz.org :shock:
Seriously, if you find it annoying, feel free to tell me.
delfick
February 10th, 2007, 12:58 AM
Here is the 0.0.1 release of the CalcScreenlet'
thnx :D
though it isn't coming up for me..........
RYX
February 10th, 2007, 01:06 AM
The CalcScreenlet needs some fixes to work with 0.0.6 ... the draw-handler should be named on_draw, the draw_shape-handler can be ripped off, the width/height-args to the CalScreenlet.__init__ must be deleted and the Screenlet.__init__-call should have additional args "width=200, height=350". Further, at the bottom of the file, replace the two last lines ("screenlet = CalcScreenlet [...] screenlet.main()") withsl = screenlets.create_new_instance('CalcScreenlet')
sl.main()
:)
(I will release a new version of the screenlets this weekend ... it will install into a global path and should fix some errors)
Vasek
February 10th, 2007, 01:52 AM
..., the draw_shape-handler can be ripped off, ...
I tried to delete the draw_shape handler and the calculator became transparent for clicks. This makes it a bit useless :? Furthermore, I don't know how to move the screenlet and to remove it properly. This behaviour is going to change in 0.0.7? Or am I doing something wrong?
What helped me was to rename it to on_draw_shape like in the previous cases discussed here.
RYX
February 10th, 2007, 02:25 AM
Yes, you're right ... draw_shape should be on_draw_shape and it should call the on_draw-handler (not draw). Thanks :)
EDIT: or simply let it draw the background-shape for best performance (instead of calling the whole on_draw-handler) ...
vishytk
February 10th, 2007, 09:34 AM
Has anyone got idea why the window frame for weather screenlets is so large. As there is no information displayed in the extra region, is there a way to reduce the size of to that of the actual size of the screenlets.
arrow indicating the size of the window frame i am referring to in the screenshot attached
http://www2.penguindia.com/beryl/weather-frame.png
Vasek
February 10th, 2007, 12:10 PM
Yes, this was discussed here yesterday and we got the author's and RYX's expression.
yes the window is indeed 350 tall and 350 wide. I did it like this to greatly simplify the drawing.... The default values for the weather plugin are whole numbers (i.e. 300x300, etc) so it has to be like this.... =\
It don't has to be like that. Setting width/height bigger than 100 currently only causes the windows to be much bigger than they should (instead of scale*100 the window's rectangle is scale*350 in your case). I will fix that width/height thing soon (by adding a default_scale-attribute as argument to the constructor). Just always use a base-size of 100 for now ... it gives much better performance.
:)
This means you can safely change both values of 350 on line 53 of WeatherScreenlet.py to 100. No function or graphics will be affected, except for the window frame size.
Sorcerer
February 10th, 2007, 01:56 PM
New screenlet: SystemStatus!
Displays information about your computer (uptime, memory usage, etc)
Download:
http://hendrik.kaju.pri.ee/screenlets/SystemStatusScreenlet.tar.gz
Screenshot:
http://hendrik.kaju.pri.ee/screenlets/SystemStatusScreenlet.png
Updated RssScreenlet (works with 0.0.6) is available here: http://hendrik.kaju.pri.ee/screenlets/RssScreenlet.tar.gz.
vishytk
February 10th, 2007, 02:01 PM
Has anyone seen this problem :?:
I have three screnlets running on my desktop and are placed separately on the desktop. When i initiate the "Fade to Destop" using <Super>F6, all windows on the desktop disappear and on pressing <Super>F6 i get back the windows on the screen but the screenlets gets overlapped.
Is this a bug in "Fade to Desktop" plugin ?
BTW, i am using Beryl
screenshot
http://www2.penguindia.com/beryl/fadetodesktop.png
Vasek
February 10th, 2007, 04:18 PM
I like the original idea of all the system info provided by one screenlet. Having one for CPU, one for memory and one for all another (yes, it does contain memory...), every one from a different author, using different themes and attitude and every one updating at slightly different time, makes it a bit messy. Can't you merge your projects somehow?
Once, I have made a tiny application showing the output of "top" in a undisturbing manner - little and transparent of course... Indeed, there is it everything: CPU usage, memory usage (turned off in the screenshot), uptime, load average, number of processes and logged users and currently the most demanding processes.
Unfortunately, it is too "ugly" to be a screenlet, but it's a quick and effortless way to get all these data at once and giving it some graphical frontend is the only task.
http://img306.imageshack.us/img306/9518/topjq4.png
Maybe someone can make some use of it.
Sorcerer
February 10th, 2007, 07:21 PM
Here's a Debian package for easier installation. It includes the screenlets start script from beryl-forums and a tray icon (by me).
http://hendrik.kaju.pri.ee/screenlets/tray.png
Download (http://hendrik.kaju.pri.ee/screenlets/screenlets-0.0.6-1_i386.deb)
robgig1088
February 11th, 2007, 03:39 AM
Heres a little update to the weather screenlet. Includes all the patches for 0.0.6. Also, the extended forecast is a little better. Here it is. (p.s. anyone want to make themes?)
http://forum.beryl-project.org/download.php?id=685&f=38
revertex
February 11th, 2007, 04:26 AM
... (p.s. anyone want to make themes?)
Thank you, i will release some themes soon.
wilk
February 11th, 2007, 11:06 AM
Hi,
Here is the 0.0.1 release of the CalcScreenlet
http://download.yousendit.com/3531A1573D8E233F
I'd very much like to try your calendar and calc screenlets but I can't get them to run : nothing gets displayed when I run for instance
python CalendarScreenlet.py
If I try to run it from the Control screenlet, I get a
No backend running - failed to add Screenlet
even though screenletsd *is* running according to ps.
I'm running the 0.0.6 version of Screenlets from the deb made by Sorcerer.
Thanks for your help
Vasek
February 11th, 2007, 11:08 AM
Hello!
Here is an update to CalendarScreenlet. Changes follow:
- option to select the first weekday (this is a part of locale, but absolutely unreliable)
- buttons to show neighboring months, optional => two new files in theme
- localized day names (month names used to be thanks to strftime)
- default size 100x100 to comply better with 0.0.6, but counting on default scale = 2.0 to the future
- tweaked text positioning
- attempt to clean the code a bit, fixed comments, imports, and unused variables
Download:
http://kfe.fjfi.cvut.cz/~potocek/storage/calendar.tar.gz
@RYX: thanks for an introduction to Inkscape. It's really simple and intuitive :)
Edit:TODO:
- ideas expected :)
Vasek
February 11th, 2007, 11:24 AM
I feel I should explain my suggestion to use top in my last post. I like the contemporary version of SystemStatusScreenlet except that it takes on my computer about 7% :!: of CPU time only to get the needed data when updated once in a second. I don't know why this happens, but if I let all as it is and only substitute the data acquisition by random fixed answers, I can see such difference. Using piped top takes no more than 1%.
turistaaccidental
February 11th, 2007, 12:58 PM
Hello all,
I've recently added a theme for clock screenlet in gnome-look.
Could be a good place to post new themes.
http://www.gnome-look.org/content/show.php?content=52980
Also you can use "other" category to post new screenlets. What do you think?
Bye.
Vasek
February 11th, 2007, 01:48 PM
- option to select the first weekday (this is a part of locale, but absolutely unreliable)
- buttons to show neighboring months, optional => two new files in theme
- localized day names (month names used to be thanks to strftime)
- default size 100x100 to comply better with 0.0.6, but counting on default scale = 2.0 to the future
- tweaked text positioning
- attempt to clean the code a bit, fixed comments, imports, and unused variables
Grr, looks like I have done something that has been before... just found it somewhere in the Beryl forum* (I don't visit it, just occasionaly find something using Google). But mine is better :P You can set Saturday as well :)
*) Should my changes be accepted, someone please keep it synchronized, I am not going to look after it :shock:
Sorcerer
February 11th, 2007, 02:25 PM
I like the contemporary version of SystemStatusScreenlet except that it takes on my computer about 7% :!: of CPU time only to get the needed data when updated once in a second. I don't know why this happens, but if I let all as it is and only substitute the data acquisition by random fixed answers, I can see such difference. Using piped top takes no more than 1%.
Good point, I noticed it just now. I increased the default update interval to 10 seconds. Top now reports about 1-1,7% CPU usage. Updated version is available here (http://hendrik.kaju.pri.ee/screenlets/SystemStatusScreenlet.tar.gz)
@wilk: The screenlets are probably not updated to work with 0.0.6. Try downloading a newer version.
@robgig, benjiku, Vasek: Is it OK if I include your Screenlets (Weather, Calendar, Calc) in the Debian package?
wilk
February 11th, 2007, 02:32 PM
Hello!
Here is an update to CalendarScreenlet. Changes follow:
Download:
http://kfe.fjfi.cvut.cz/~potocek/storage/calendar.tar.gz
Works great, thanks, but so far I can't run it throuth ControlScreenlet. I still get the :
No backend running - failed to add Screenlet
even though
python CalendarScreenlet.py
works.
delfick
February 11th, 2007, 02:41 PM
Hello!
Here is an update to CalendarScreenlet. Changes follow:
Download:
http://kfe.fjfi.cvut.cz/~potocek/storage/calendar.tar.gz
awsome :D
i love the month-change buttons :D
Vasek
February 11th, 2007, 03:22 PM
@Sorcerer: I still consider robgig the author of Calendar, maybe he should decide. I'd be only glad to let it include :)
And thanks for the actualised SystemStatus, it's good that to extend it over disk usage and net speed. The latter is implemented partly - is it to be awaited in the next version?
@wilk: strange, it doesn't happen to me and the code doesn't show major differences to another working plugins. I have edited it to use exactly the same commands as CPUMeter in __init__, maybe this can be a bit better.
http://kfe.fjfi.cvut.cz/~potocek/storage/calendar.tar.gz (minor differences)
If it isn't, could you please try running screenletsd.py start from the command line and looking if some error is printed in the reaction to adding Calendar through ControlScreenlet?
Idea: Did you restart the backend? Right now I realized it caches the screenlets somehow :? and doesn't use new version if you just replace the file!
@delfick: Thank you, I tried my best :D
RYX
February 11th, 2007, 04:15 PM
Hello all,
I've recently added a theme for clock screenlet in gnome-look.
Could be a good place to post new themes.
http://www.gnome-look.org/content/show.php?content=52980
Also you can use "other" category to post new screenlets. What do you think?
Bye.
Cairo-clock has already a section there. I think we owe MacSlow a lot (without him I wouldn't have had such nice examples about transparent/shaped windows), so we should put clock-themes into the cairo-clock section for now. Maybe we can convince them (gnome-look) to create a "Sreenlets"-section (or can that be done by a registered user?) ... However, the long-term solution will be the screenlets-website where we will have a Screenlet-/Theme-download area ... but I have to get the 0.1.0 version ready before I can start working on the site ...
@everyone: Keep up the good work, mates!!!! But _please_ don't make packages of the current version to avoid a lot of trouble for all of us. The next release 0.0.7 will be out in a few hours .... It will introduce some more _very_ important structural changes and will be installed into a global path.
Stay tuned, I'll only need one or two hours ... ;)
:)
turistaaccidental
February 11th, 2007, 04:52 PM
Ok. changed clock theme to the cairo clock section, I will wait for the new website :D
4 All, you are doing a wonderful job !
http://www.gnome-look.org/content/pre2/52980-2.jpg
RYX
February 11th, 2007, 06:33 PM
OK, the new release it there. The structure and directory-layout of the package is totally re-packaged and re-organized to allow installation of screenlets-module to pyton's lib-path. The daemon and all screenlets go into /usr/local/share/screenlets.
Changes for users:
- The Screenlets-core now needs to be installed and thus can be launched from anywhere in the system.
- Screenlets are now easily added with "screenletsd add <Name>" from anywhere you like (also Alt/F2-dialog in gnome)
- module "options" is now "screenlets.options"
- Third-party screenlets "packages" can be placed into $HOME/.screenlets now. The daemon will first look in that folder and then in /usr/local/share/screenlets ...
Changes for developers:
- The screenlets' class-files now need to be placed inside their directory (where the themes-folder is) and the directory now has to be named like the screenlet (without trailing "Screenlet"), not further only lowercase!
- The Screenlet's __init__-methods now need **keyword_args as last argument (see ExampleScreenlet for an example).
- some more I forgot now because of total overload in my brain :)
Have fun! Please test as much as possible. If you want to create packages, please ensure that only one package per platform/architecture is created to avoid a "package-mess". Basically there is no need for anything but the source-package because there is nothing to compile - it's all scripts.
:)
wilk
February 11th, 2007, 06:39 PM
OK, the new release it there.
Where exactly ? :wink:
There is still only 0.0.6 on http://www.go-compiz.org/index.php?title=Desktop_Screenlets
Vasek
February 11th, 2007, 06:44 PM
Where exactly ? :wink:
In the very first post of this topic.
It took me quite long to discover this by 0.0.6 :D
mikedee
February 11th, 2007, 07:05 PM
Tested 0.0.7 and its looking good :)
Last time I used screenlets I deleted the control screenlet. Now I cannot get it back. I tried deleting .screenlets.conf but it cached that somewhere and now I only have a clock and a CPU meter. How can I reset back to default again?
Also I changed the theme for the clock and now every time the screenlet loads I get a warning that the theme is not the default.
EDIT : also deleted .config/Screenlets/ - still no control screenlet.
wilk
February 11th, 2007, 07:11 PM
Where exactly ? :wink:
In the very first post of this topic.
It took me quite long to discover this by 0.0.6 :D
Thanks, I have it and it's looking very good. I can't get 3rd party screenlets to run though :
Unable to load '/home/wilk/.screenlets/Weather/WeatherScreenlet.WeatherScreenlet' - No module named options'
I tried duplicating the structure of /usr/local/share/screenlets/ in $HOME/.screenlets for the weather screenlet.
Vasek
February 11th, 2007, 07:19 PM
Unable to load '/home/wilk/.screenlets/Weather/WeatherScreenlet.WeatherScreenlet' - No module named options'
At the beginning of WeatherScreenlet.py, find a line like
from options import ...
and edit it like
from screenlets.options import ...
What's worrying me is that themes for third party screenlets seem to be looked for in current directory, not home/.screenlets.
Error while loading ScreenletTheme in: /home/vasek/prog/src/compiz/screenlets-0.0.7/themes/default
Error while loading theme: /home/vasek/prog/src/compiz/screenlets-0.0.7/themes/default
Running from /home/vasek/.screenlets/Calendar works.
robgig1088
February 11th, 2007, 07:26 PM
sorry i posted the weatherscreenlet with a bug. Heres the fixed version
http://forum.beryl-project.org/download.php?id=691&f=38
RYX
February 11th, 2007, 07:30 PM
@wilk: Looks like the Weather-Screenlet is not 0.0.7-compatible ("options" is now called "screenlets.options"). I have done some more (neccessary) changes to the class and introduced another incompatibility :oops: ... sorry :)
@mikedee: Thanks :D .. You can clear the "cache" with "screenletsd reset". It should clear all state-files and the session. Then you can add a control with "screenletsd add Control" ... (screenlets.conf is deprecated)
The problem with the theme is odd. Could be because the Clock has no "default"-theme and uses "station" instead. Or - currently, the themes are always loaded from the screenlets location - so when you load a screenlet from its directory in $HOME/.screenlets, it will use the themes in that folder. If you launch a screenlet from /usr/local/share/screenlets/dir, it will use the global themes. That will change in the future, then the themes will be loaded from either $HOME/screenlets or /usr/local/share/screenlets (depending which is found first) ...
EDIT: I think that's what you meant, Vasek - right? ... I will look into that later.
:)
Vasek
February 11th, 2007, 07:36 PM
Sorry, it was my fault, I wanted to correct myself right now. I didn't forward the **keyword_args.
robgig1088
February 11th, 2007, 07:39 PM
@robgig, benjiku, Vasek: Is it OK if I include your Screenlets (Weather, Calendar, Calc) in the Debian package?
please do :). make sure to use the most recent version (see previous post) :)
edit: apparently, weatherscreenlet doesnt work with .0.0.7.... I won't have time to fix it in the next couple days (I have a trebuchet to build). Anyone want to fix it for me?
mikedee
February 11th, 2007, 07:43 PM
Reset seemed to work but there is still no Control
$ screenletsd add Control
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
No handlers could be found for logger "dbus.proxies"
Error: Screenlets-Backend (screenletsd) not found.
screenletsd was started and is in /usr/local/bin/
Vasek
February 11th, 2007, 07:44 PM
Could be because the Clock has no "default"-theme and uses "station" instead.
This is in contrast with the last but one point of "Coding/Naming Rules" in the README, isn't it? I have just read it through once more :) and thought whether to rename the (currently only) theme of CalendarScreenlet from "ryx" to "default", so should I take this point so seriously?
wilk
February 11th, 2007, 07:52 PM
At the beginning of WeatherScreenlet.py, find a line like
from options import ...
and edit it like
from screenlets.options import ...
Running from /home/vasek/.screenlets/Calendar works.
Thanks to your patch, I can run it with $HOME/.screenlets/Weather/WeatherScreenlet.py
but adding it from screenletsd still doesn't work :
import_and_create_screenlet: WeatherScreenlet
Unable to load '/home/wilk/.screenlets/Weather/WeatherScreenlet.WeatherScreenlet' - __init__() got an unexpected keyword argument 'path'
RYX
February 11th, 2007, 07:55 PM
Reset seemed to work but there is still no Control
$ screenletsd add Control
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
No handlers could be found for logger "dbus.proxies"
Error: Screenlets-Backend (screenletsd) not found.
screenletsd was started and is in /usr/local/bin/
Hmmm - looks like some "hidden" exception. Please try removing the try/catch block in add-screenlet.py (line 38-45) and see if you can get any more detailed source of the error .... It fails to create the new instance for some reason ...
RYX
February 11th, 2007, 07:57 PM
@wilk: The constructor-definition should look like this "WeatherScreenlet.__init__(self, **keyword_args)"
Vasek
February 11th, 2007, 08:07 PM
@wilk: The constructor-definition should look like this "WeatherScreenlet.__init__(self, **keyword_args)"
...and the second line under it must also be changed, that's what I have forgotten in Calendar. In a few lines' neighborhood it should look like this:
updated_recently = 0 ## don't keep showing the error messages until a connection has been established
## and then lost again.
# constructor
def __init__(self, **keyword_args):
#call super (and not show window yet)
screenlets.Screenlet.__init__(self, width=100, height=100, **keyword_args)
# set theme
self.theme_name = "novum"
wilk
February 11th, 2007, 08:21 PM
@wilk: The constructor-definition should look like this "WeatherScreenlet.__init__(self, **keyword_args)"
...and the second line under it must also be changed, that's what I have forgotten in Calendar. In a few lines' neighborhood it should look like this:
updated_recently = 0 ## don't keep showing the error messages until a connection has been established
## and then lost again.
# constructor
def __init__(self, **keyword_args):
#call super (and not show window yet)
screenlets.Screenlet.__init__(self, width=100, height=100, **keyword_args)
# set theme
self.theme_name = "novum"
It's working just fine now, thanks a lot
Sorcerer
February 11th, 2007, 08:41 PM
Good news! Debian repository is now up with version 0.0.7 of screenlets :D
Just add
deb http://hendrik.kaju.pri.ee/ubuntu edgy screenlets
to your sources.list and run
wget http://hendrik.kaju.pri.ee/ubuntu/619A3D4E.gpg -O- | sudo apt-key add - && sudo apt-get update
to import my gpg key. Then you can install screenlets with 'sudo apt-get install screenlets'
The package also includes updated WeatherScreenlet and CalendarScreenlet
freedreamer
February 11th, 2007, 08:42 PM
installed with "make install" but when i start deamon:
File "/usr/local/share/screenlets/screenletsd.py", line 46, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 28, in ?
pygtk.require('2.0')
File "/usr/lib/python2.4/site-packages/pygtk.py", line 61, in require
assert not sys.modules.has_key('gtk'), \
any idea?
Thanks a lot
wfarr
February 11th, 2007, 08:50 PM
Good news! Debian repository is now up with version 0.0.7 of screenlets :D
Just add
deb http://hendrik.kaju.pri.ee/ubuntu edgy screenlets
to your sources.list and run
wget http://hendrik.kaju.pri.ee/ubuntu/619A3D4E.gpg -O- | sudo apt-key add - && sudo apt-get update
to import my gpg key. Then you can install screenlets with 'sudo apt-get install screenlets'
The package also includes updated WeatherScreenlet and CalendarScreenlet
Great work Sorcerer.
Just one issue (after an apt-get update):
will@will-laptop:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
python-feedparser
The following packages will be upgraded:
gdb screenlets
2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 261kB/2855kB of archives.
After unpacking 1139kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://hendrik.kaju.pri.ee edgy/screenlets screenlets 0.0.7-1 [261kB]
Fetched 603kB in 22s (26.7kB/s)
Failed to fetch http://hendrik.kaju.pri.ee/ubuntu/pool/edgy/screenlets/screenlets-0.0.7-1_i386.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Neither of the presented "fixes" resolves it.
RYX
February 11th, 2007, 08:51 PM
@freedreamer: Maybe a too old pygtk-version? Never seen that error before ... what distribution/desktop do you use?
wfarr
February 11th, 2007, 08:58 PM
@freedreamer: Maybe a too old pygtk-version? Never seen that error before ... what distribution/desktop do you use?
I get similar errors:
will@will-laptop:~$ screenlets-tray
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
Traceback (most recent call last):
File "/usr/local/share/screenlets/screenletsd.py", line 46, in <module>
import screenlets
ImportError: No module named screenlets
Traceback (most recent call last):
File "/usr/local/bin/screenlets-tray", line 61, in <module>
gtk.main()
KeyboardInterrupt
will@will-laptop:~$
amgeex
February 11th, 2007, 09:30 PM
Updated wiki page with new info and debian repo:
http://www.go-compiz.org/index.php?title=Desktop_Screenlets
RYX
February 11th, 2007, 09:30 PM
Looks like a problem with python2.5 - that's why I recommend using the source-package ;) ... could be the that .deb-packge only installed for 2.4 - but it's only a guess ... I don't really know where that 2.5 problems come from - guess I gotta install Feisty to find out :) ...
@amgeex: Thank you ... :D
:)
wfarr
February 11th, 2007, 09:42 PM
Looks like a problem with python2.5 - that's why I recommend using the source-package ;) ... could be the that .deb-packge only installed for 2.4 - but it's only a guess ... I don't really know where that 2.5 problems come from - guess I gotta install Feisty to find out :) ...
@amgeex: Thank you ... :D
:)
I'll look into it some more and report back.
EDIT: Just copy /usr/lib/python2.4/site-packages/screenlets DIR to /usr/lib/python/2.5/site-packages/screenlets
mikedee
February 11th, 2007, 10:02 PM
Reset seemed to work but there is still no Control
$ screenletsd add Control
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
No handlers could be found for logger "dbus.proxies"
Error: Screenlets-Backend (screenletsd) not found.
screenletsd was started and is in /usr/local/bin/
Hmmm - looks like some "hidden" exception. Please try removing the try/catch block in add-screenlet.py (line 38-45) and see if you can get any more detailed source of the error .... It fails to create the new instance for some reason ...
Here is the full error message - looks like a problem with introspections.
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
Adding: ControlScreenlet to <Interface <ProxyObject wrapping <dbus.Bus on SESSION at 0x2ac71d83bf50> :1.7 /org/freedesktop/Screenlets at 0x2ac71d866c20> implementing 'org.freedesktop.Screenlets' at 0x2ac71d866c68>
No handlers could be found for logger "dbus.proxies"
Traceback (most recent call last):
File "/usr/local/share/screenlets/add-screenlet.py", line 41, in ?
if backend.add(cname):
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 87, in __call__
return self._proxy_method(*args, **keywords)
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 157, in __call__
message.append(signature=introspect_sig, *args)
TypeError: More items found in D-Bus signature than in Python arguments
wfarr
February 11th, 2007, 10:07 PM
After finally getting this release up, the only buggy nature I've noticed deals with screenlets generally 'forgetting':
a) their size on restarting daemon
b) their window status (Widget etc) on restarting daemon
----
Anyways, RYX, since I've not the time or patience to learn Python right now, and I wanted to help in any way I could with the project, I'm going to be freely hosting the source packages as an alternate download source, as can be seen here (http://www.kalmwave.com/ryxs-screenlets/).[/url]
bluebyt
February 11th, 2007, 11:49 PM
When I do make install, I have this error:
python setup.py install
running install
error: invalid Python installation: unable to open /usr/include/python2.5/pyconfig.h (No such file or directory)
make: *** [install] Error 1
I search this file pyconfig.h couldn't find it.
Maybe it is because I have Feisty Fawn?
RYX
February 12th, 2007, 12:19 AM
Could be because the Clock has no "default"-theme and uses "station" instead.
This is in contrast with the last but one point of "Coding/Naming Rules" in the README, isn't it? I have just read it through once more :) and thought whether to rename the (currently only) theme of CalendarScreenlet from "ryx" to "default", so should I take this point so seriously?
Yes - it breaks the rules :) ... I haven't completely finished applying the rules to all the Screenlets yet ... it's all still a little messy (but I think it's getting better with each release) :D
RAOF
February 12th, 2007, 12:22 AM
When I do make install, I have this error:
python setup.py install
running install
error: invalid Python installation: unable to open /usr/include/python2.5/pyconfig.h (No such file or directory)
make: *** [install] Error 1
I search this file pyconfig.h couldn't find it.
Maybe it is because I have Feisty Fawn?
You may need to install python-all-dev, or just python-dev. I'm not sure which one is necessary, though.
freedreamer
February 12th, 2007, 12:36 AM
@RYX
I use ubuntu Edgy ... no idea?
RYX
February 12th, 2007, 12:46 AM
Anyways, RYX, since I've not the time or patience to learn Python right now, and I wanted to help in any way I could with the project, I'm going to be freely hosting the source packages as an alternate download source, as can be seen here (http://www.kalmwave.com/ryxs-screenlets/).[/url]
Thank you very much - I have put a link into the first post ...
@freedreamer: Do you have python-gnome2-desktop installed? I am working on Edgy and it runs fine ... It must be some missing dependancy.
wfarr
February 12th, 2007, 01:03 AM
@RYX
I use ubuntu Edgy ... no idea?
Can I see the output of: "$ locate screenlet|grep python"?
jackkerouac
February 12th, 2007, 02:24 AM
I get this error when trying to apt-get screenlets:
patrick@patrick-desktop:~$ sudo apt-get install screenlets
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-feedparser
Recommended packages:
xcompmgr compiz
The following NEW packages will be installed:
python-feedparser screenlets
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 261kB/373kB of archives.
After unpacking, 1135kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://hendrik.kaju.pri.ee edgy/screenlets screenlets 0.0.7-1 [261kB]
Fetched 603kB in 5s (104kB/s)
Failed to fetch http://hendrik.kaju.pri.ee/ubuntu/pool/edgy/screenlets/screenlets-0.0.7-1_i386.deb Size mismatch
E: Unable to fetch some archives, try running apt-get update or apt-get --fix-missing.
EDIT: Never mind; I downloaded the deb seperately, installed and now everything works great.
RYX
February 12th, 2007, 03:14 AM
Here is the full error message - looks like a problem with introspections.
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
Adding: ControlScreenlet to <Interface <ProxyObject wrapping <dbus.Bus on SESSION at 0x2ac71d83bf50> :1.7 /org/freedesktop/Screenlets at 0x2ac71d866c20> implementing 'org.freedesktop.Screenlets' at 0x2ac71d866c68>
No handlers could be found for logger "dbus.proxies"
Traceback (most recent call last):
File "/usr/local/share/screenlets/add-screenlet.py", line 41, in ?
if backend.add(cname):
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 87, in __call__
return self._proxy_method(*args, **keywords)
File "//usr/lib/python2.4/site-packages/dbus/proxies.py", line 157, in __call__
message.append(signature=introspect_sig, *args)
TypeError: More items found in D-Bus signature than in Python arguments
Sorry, I don't have a single idea what's going wrong there. Do you get any useful information out of this? The key-info should be that he cannot find handlers for logger "dbus.proxies" ... but I don't know what that means.
mikedee
February 12th, 2007, 03:31 AM
Sorry, I don't have a single idea what's going wrong there. Do you get any useful information out of this? The key-info should be that he cannot find handlers for logger "dbus.proxies" ... but I don't know what that means.
I suspect it is related to this line.
File "/usr/local/share/screenlets/add-screenlet.py", line 41, in ?
if backend.add(cname):
It looks like you are exposing an object to dbus but when you call it you are using the wrong number of arguments. I will have a closer look tomorrow to see if I can see exactly what is wrong.
If you have a dbus viewer app then you should be able to see your screenlets interface and check what it is reporting for the add method. It is probably different to what you are calling.
This code should help if you do not have a dbus viewer app
dbus-send --session --type=method_call --print-reply --dest=org.your.dest /org/your/object org.freedesktop.DBus.Introspectable.Introspect
EDIT : OK - I debugged it in the end, the backend.add should take a second parameter which is is_widget, I just manually set that to False and it is working :)
RYX
February 12th, 2007, 03:49 AM
Funny - I just found out and then read your EDIT ... I wanted to say nearly the same :)
Seems like the dbus-calls need the (optional) is_widget-argument - very interesting and good to know for future cases ...
good night :D
bluebyt
February 12th, 2007, 03:50 AM
EDIT : OK - I debugged it in the end, the backend.add should take a second parameter which is is_widget, I just manually set that to False and it is working :)
Could you show me exactly what to do to apply the patch?
RYX
February 12th, 2007, 04:07 AM
Edit the file src/share/add-screenlet.py and change the line 41 to look like this:if backend.add(cname, False):
... so simply add ", False" to the function call. And reinstall.
:)
Sorcerer
February 12th, 2007, 08:14 AM
Sorry about the repo error. I'll fix it as soon as possible. But until then you can download the deb from http://hendrik.kaju.pri.ee/ubuntu/dists/edgy/screenlets/
freedreamer
February 12th, 2007, 12:27 PM
locate screenlet|grep python
/usr/lib/python2.4/site-packages/screenlets
/usr/lib/python2.4/site-packages/screenlets/XmlMenu.py
/usr/lib/python2.4/site-packages/screenlets/__init__.py
/usr/lib/python2.4/site-packages/screenlets/options.py
/usr/lib/python2.4/site-packages/screenlets/XmlMenu.pyc
/usr/lib/python2.4/site-packages/screenlets/__init__.pyc
/usr/lib/python2.4/site-packages/screenlets/options.pyc
@RYX
i've got python-gnome2-desktop :
http://img465.imageshack.us/img465/3668/schermatafe5.png
Darko82
February 12th, 2007, 01:00 PM
Hi.
When i try to start screenletsd I have this
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7/bin$ ./screenletsd start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7/bin$ Traceback (most recent call last):
File "/usr/local/share/screenlets/screenletsd.py", line 46, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 28, in ?
pygtk.require('2.0')
File "/usr/lib/python2.4/site-packages/pygtk.py", line 61, in require
assert not sys.modules.has_key('gtk'), \
AssertionError: pygtk.require() must be called before importing gtk
I'm on an Ubuntu Edgy
turistaaccidental
February 12th, 2007, 01:21 PM
Hi.
When i try to start screenletsd I have this
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7/bin$ ./screenletsd start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7/bin$ Traceback (most recent call last):
File "/usr/local/share/screenlets/screenletsd.py", line 46, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 28, in ?
pygtk.require('2.0')
File "/usr/lib/python2.4/site-packages/pygtk.py", line 61, in require
assert not sys.modules.has_key('gtk'), \
AssertionError: pygtk.require() must be called before importing gtk
I'm on an Ubuntu Edgy
Do you have python-gtk installed?
laurent
February 12th, 2007, 02:08 PM
hi all
Thanks RYX. It work great for me. and thanks to everybody for third party screenlets (weather, calendar, systemstatus, ...)
So stable and nice.
regards
Vasek
February 12th, 2007, 02:13 PM
Hi.
When i try to start screenletsd I have this
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7/bin$ ./screenletsd start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7/bin$ Traceback (most recent call last):
File "/usr/local/share/screenlets/screenletsd.py", line 46, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 28, in ?
pygtk.require('2.0')
File "/usr/lib/python2.4/site-packages/pygtk.py", line 61, in require
assert not sys.modules.has_key('gtk'), \
AssertionError: pygtk.require() must be called before importing gtk
I'm on an Ubuntu Edgy
Do you have python-gtk installed?
I thought that sys.modules recflect which modules have you actually imported at the time of asking -- since __init__.py begins with "import pygtk" and then directly "pygtk.require('2.0')" it should be False regardless of whether you have it installed in your system or not :?: But I have learned the basics of Python some 3 days ago... what do the experienced say?
Vasek
February 12th, 2007, 02:22 PM
Anyways, RYX, since I've not the time or patience to learn Python right now, and I wanted to help in any way I could with the project, I'm going to be freely hosting the source packages as an alternate download source, as can be seen here (http://www.kalmwave.com/ryxs-screenlets/).[/url]
Thank you very much - I have put a link into the first post ...
Sorry if I ask bad, but what has happened on this thread?
http://forum.go-compiz.org/viewtopic.php?t=502
I'm not sure whether anyone reads it now other way than pure randomly.
Sorcerer
February 12th, 2007, 03:13 PM
Hi, everyone. Please try the repos again. It should be OK now.
RYX
February 12th, 2007, 03:43 PM
@Darko82, freedreamer: Do you have the package "python-gtk2" installed? Maybe you only have the 1.2 version of pygtk installed. (It is very strange, though ... Edgy comes with pygtk2 installed by default). What happens, if you open src/lib/__init__.py in an editor and comment out the line 28 (put a # in front of it) and then re-install?
RYX
February 12th, 2007, 03:49 PM
@Darko82, freedreamer: And what do these commands output? python -c "import pygtk; print pygtk._get_available_versions()"
ls /usr/lib/libgtk-x*
freedreamer
February 12th, 2007, 05:01 PM
RYX
python -c "import pygtk; print pygtk._get_available_versions()" :
{'2.0': '/usr/lib/python2.4/site-packages/gtk-2.0', '1.2': '/usr/lib/python2.4/site-packages/gtk-1.2'}
and
ls /usr/lib/libgtk-x*:
/usr/lib/libgtk-x11-2.0.so.0 /usr/lib/libgtk-x11-2.0.so.0.1000.6
Darko82
February 12th, 2007, 05:10 PM
These are my outputs:
dario@dario-desktop:~$ python -c "import pygtk; print pygtk._get_available_versions()"
{'2.0': '/usr/lib/python2.4/site-packages/gtk-2.0', '1.2': '/usr/lib/python2.4/site-packages/gtk-1.2'}
dario@dario-desktop:~$ ls /usr/lib/libgtk-x*
/usr/lib/libgtk-x11-2.0.a /usr/lib/libgtk-x11-2.0.so.0
/usr/lib/libgtk-x11-2.0.la /usr/lib/libgtk-x11-2.0.so.0.1000.6
/usr/lib/libgtk-x11-2.0.so
RYX
February 12th, 2007, 05:17 PM
The only difference I can see is that you have BOTH pygtk2 and pygtk1.2 installed. Does commenting out the line "pygtk.require('2.0')" fix the problem? If you do not use apps that require pygtk1.2, try to remove the 1.2 version ...
Darko82
February 12th, 2007, 05:50 PM
Removing pygtk1.2 doesn't resolve the problem :cry:
Darko82
February 12th, 2007, 05:55 PM
Commenting line "pygtk.require('2.0')" I have this
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7$ screenletsd start
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
dario@dario-desktop:~/Download/Screenlets/screenlets-0.0.7$ CachingBackend: Loading cache ...
Session-file /home/dario/.config/Screenlets/screenletsd.ses not found (will be created automatically).
But when i try to add a screenlet i have this:
dario@dario-desktop:~$ screenletsd add Clock
Screenletsd v0.0.1 | (c) RYX (Rico Pfaus) 2007 | released under the GPL
add-screenlet-utility | (c) RYX (Rico Pfaus) 2007 | released under GPL
ADD: ClockScreenlet
import_and_create_screenlet: ClockScreenlet
Unable to load '/usr/local/share/screenlets/Clock/ClockScreenlet.ClockScreenlet' - pygtk.require() must be called before importing gtk
Class ClockScreenlet not found.
Class ClockScreenlet not found.
benjiku
February 12th, 2007, 06:04 PM
Hello,
sorry if you thought I was dead.. but I'm not ;-)
So I've got some changes to do to make the CalcScreenlet working on the 0.0.7.
I didn't succeed to have a 0.0.6 or 0.0.7 running on my laptop but I'll finish to read the next pages of the forum (I'm at page 22 for now ;-)) and see if there's an answer to my problem.
RYX : I'll do a 0.0.7 compatible version
Vasek : Thanks for your "good coding" advices. I'm a newbie in python so i was afraid at the beginning to submit my calc screenlet (because I was ashamed of myself). Your comment makes me go in the good direction and more than that will garantee a better screenlet so.. Thanks again.
Sorcerer : As soon as I'll have a 0.0.7 compatible version, no problem to put it in a debian package. It's total open source so you can do what you want :-)
I continue to read the forum and reply later (with a new version I hope)
freedreamer
February 12th, 2007, 06:44 PM
Commenting line 28 :
File "/usr/local/share/screenlets/screenletsd.py", line 46, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 266, in ?
class Screenlet(gobject.GObject, EditableOptions):
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 288, in Screenlet
bus = dbus.SessionBus()
File "/var/lib/python-support/python2.4/dbus/_dbus.py", line 266, in __new__
return Bus.__new__(cls, Bus.TYPE_SESSION, use_default_mainloop, private)
File "/var/lib/python-support/python2.4/dbus/_dbus.py", line 99, in __new__
bus._connection = dbus_bindings.bus_get(bus_type, private)
File "dbus_bindings.pyx", line 1692, in dbus_bindings.bus_get
dbus_bindings.DBusException: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
benjiku
February 12th, 2007, 06:50 PM
ok, so i have read from page 22 to page 26 and it seems that there is no clue yet for the gtk2.0 problem.
... because, it's my problem too, I'm on Edgy and with 0.0.7, I have :
[ben@cobra ~] $ Traceback (most recent call last):
File "/usr/local/share/screenlets/screenletsd.py", line 46, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 28, in ?
pygtk.require('2.0')
File "/usr/lib/python2.4/site-packages/pygtk.py", line 61, in require
assert not sys.modules.has_key('gtk'), \
AssertionError: pygtk.require() must be called before importing gtk
So I change the file /usr/local/share/screenlets/screenletsd.py by adding the missing import at the beginning (before gtk import) :
/usr/local/share/screenlets/screenletsd.py (line 32)
import pygtk
pygtk.require('2.0')
And it works for me ;-)
I can now update my calc screenlet
benjiku
February 12th, 2007, 07:12 PM
Here is a 0.0.7 compliant CalcScreenlet ;-)
http://download.yousendit.com/DBF96A75497CDF01
freedreamer
February 12th, 2007, 07:22 PM
if i add :
import pygtk
pygtk.require('2.0')
same error!! :(
Traceback (most recent call last):
File "/usr/local/share/screenlets/screenletsd.py", line 48, in ?
import screenlets
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 266, in ?
class Screenlet(gobject.GObject, EditableOptions):
File "/usr/lib/python2.4/site-packages/screenlets/__init__.py", line 288, in Screenlet
bus = dbus.SessionBus()
File "/var/lib/python-support/python2.4/dbus/_dbus.py", line 266, in __new__
return Bus.__new__(cls, Bus.TYPE_SESSION, use_default_mainloop, private)
File "/var/lib/python-support/python2.4/dbus/_dbus.py", line 99, in __new__
bus._connection = dbus_bindings.bus_get(bus_type, private)
File "dbus_bindings.pyx", line 1692, in dbus_bindings.bus_get
dbus_bindings.DBusException: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Treviņo
February 12th, 2007, 07:39 PM
The .deb package should be fixed, actually it is installed in /usr/local :?
Btw I'll think to host a deb also in my beryl-svn repo ;)
RYX, does screenlets 0.0.7 can read widgets from an home dir (to install extra widgets in userspace)? From changelog it seems it does it...
Darko82
February 12th, 2007, 08:27 PM
@benjiku:
It works!!!! :D
Thanks a lot
RYX
February 12th, 2007, 08:29 PM
The .deb package should be fixed, actually it is installed in /usr/local :?
The screenlets install into /usr/local by default (mostly because of the tradition - its a "local-only" application), is it better to install into /usr? I can change it in the next version if everybody prefers installing into /usr. It was just too much hassle to make it an option because the path is used in several files (I bet there is an easy way, though) ...
Btw I'll think to host a deb also in my beryl-svn repo ;)
Thank you. Let's finally give the beryl-users some eye-candy, too ... (just joking) :)
RYX, does screenlets 0.0.7 can read widgets from an home dir (to install extra widgets in userspace)? From changelog it seems it does it...
Yes - you can place user screenlets into $HOME/.screenlets. The user's are preferred over the global screenlets ... There is one "bug" yet: The screenlets will ONLY use themes from the directory they were started from ... I will change that soon.
I'm a newbie in python so i was afraid at the beginning to submit my calc screenlet (because I was ashamed of myself).
I am a newbie in python myself. I can assure you that I was very impressed by your Calculator - it looks great, performs well and shows a lot of "passion" in it ... simply great work. Please continue like that! :D
@Darko82, freedreamer: Are you using KDE or xfce? Maybe you are missing some dbus-related packages. I'll try to get a list all dependancies that have to be met ...
RYX
February 12th, 2007, 08:42 PM
@benjiku: If you want scaling-support for the Calculator, change line 65 to thisctx.scale(self.scale, self.scale)
and line 207 to this:scale = int(self.scale)
Then you can resize the Screenlet using the scale-option ...
And you can use the on_focus and un_unfocus handlers instead of connecting to the signals ... (the same will come for keydown, keyup). But that's up to your personal taste ...
A small note on this topic: The big advantage of abstracting the toolkit (gtk in this case) from the screenlets (by implementing custom handlers within the screenlet-class) is that future versions could be aimed at allowing various toolkits as different baseclasses. (That would mean switching from qt to gtk to win32 to osx would be as difficult as changing the name of the superclass) ...
Vasek
February 12th, 2007, 09:13 PM
Thanks, benjiku!
The CalcScreenlet works well here and I like it much.
It's good it supports nested operations, but there is a small bug somewhere, which makes the calculation behave as if there was no support: typing 5+1*2 gives 12 instead of 7. But I believe this will take only a minor change to work right, it's well prepared for this.
One more little idea: by typing a digit after "=", I expect to begin a new calculation, not appending the digit to the result. May I wish for this, please? :wink:
Vasek
February 12th, 2007, 09:56 PM
and line 207 to this:scale = int(self.scale)
No, the int() conversion causes problems. I'd suggest only scale = self.scale
RYX
February 12th, 2007, 10:32 PM
Yes, you're right. I just quickly looked over the source ...
freedreamer
February 13th, 2007, 12:09 AM
@RYX
i'm using gnome...
delfick
February 13th, 2007, 01:09 AM
for those who don't read ubuntuforums, another repo has been made
http://www.ubuntuforums.org/showthread.php?p=2146678#post2146678
(though it doesn't seem to work for me ...)
RAOF
February 13th, 2007, 01:15 AM
The screenlets install into /usr/local by default (mostly because of the tradition - its a "local-only" application), is it better to install into /usr? I can change it in the next version if everybody prefers installing into /usr. It was just too much hassle to make it an option because the path is used in several files (I bet there is an easy way, though) ...
...
Why do you need the absolute path in those files? It should be easy enough to add freedesktop.org XDG handling to everything :). I might have a look at it over the next few days and publish a bzr branch on the launchpad page - the changes will probably be too invasive for a simple patch.
RYX
February 13th, 2007, 02:07 AM
Sorry, but I don't really think the screenlets themselves should be placed into XDG-compliant paths. I thought about that and I'd say putting them into /usr/*/share/screenlets and $HOME/.screenlets/ is the common way for "add-ons" (.icons/, .themes/, ...). The $HOME/.config/-dir doesn't seem like the right place to me ... but I'll think it over again :)
RAOF
February 13th, 2007, 02:37 AM
Sorry, but I don't really think the screenlets themselves should be placed into XDG-compliant paths. I thought about that and I'd say putting them into /usr/*/share/screenlets and $HOME/.screenlets/ is the common way for "add-ons" (.icons/, .themes/, ...). The $HOME/.config/-dir doesn't seem like the right place to me ... but I'll think it over again :)
XDG is all over this :). I'll use $XDG_DATA_DIRS (http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html).
It's $HOME/.local/share + /usr/local/share + /usr/share. The XDG spec is not just for config :).
Alternatively, you could just install screenlets into the $PYTHONPATH.
Vasek
February 13th, 2007, 02:38 AM
@RYX: If I want to add both XML menu and the default items, the Size, Theme and Window menus are not added. I have read that XML (-only?) based menus are preferred, but currently the Theme menu is not properly programmable through it, is it? I'd personally consider it a bug, if you do too, I believe it is a few seconds' thing for you to fix. What works for me is to give off the menu variable in Screenlet.add_default_menuitems and use self.menu instead.
delfick
February 13th, 2007, 03:20 AM
So I change the file /usr/local/share/screenlets/screenletsd.py by adding the missing import at the beginning (before gtk import) :
/usr/local/share/screenlets/screenletsd.py (line 32)
import pygtk
pygtk.require('2.0')
and it works for me too :D
thnx :D
vishytk
February 13th, 2007, 03:46 AM
If anyone has got Weather screenlets working with screenlets-0.0.7 version, please post the changes needed for weather to work.
delfick
February 13th, 2007, 04:10 AM
i'm loving the calculator :D
though can it have a "history" like a graphics calculator (see screenshot (that's an emulator running)....
http://delfick755.googlepages.com/graphicscalc.jpg
(along with the cursor keys, to edit the function as you put it in, and to go back and forth between functions :D)
benjiku
February 13th, 2007, 11:01 AM
i'm loving the calculator :D
though can it have a "history" like a graphics calculator (see screenshot (that's an emulator running)....
Hello Delfick,
"Historic" is in my TODO list but it will not be in the next version. I want to correct some bugs on float operation before and make it scalable as RYX said. I'll also add the "equal-then-start-with-new" functionnality :-)
Finally, I want to "clean" and optimize the code and display. I tried some graphic animation and it was too slow so I need to find a way ;-)
wilk
February 13th, 2007, 11:32 AM
Here is a 0.0.7 compliant CalcScreenlet ;-)
http://download.yousendit.com/DBF96A75497CDF01
And for me too, nice work on the calculator. I have a list of suggestions :
scientific fonctions (sin/exp/ln/power/powers of ten) would be very helpful (for me at least).
On another topic : I'm having trouble with mixed widget/non widget screenlets. I'm using calendar/weather/cpumeter as widgets and windowlist/mailcheck as non widgets. Upon restarting screenletsd, only the widgets are actually launched. The non widgets are nowhere to be seen and subsequent launches by screenlets add of these screenlets result in many entries in the .ses file but no actual screenlet.
I'm also having the display problem previously noted : widgets truncated and overlapping (is there a way to attach a file in this forum ?)
Vasek
February 13th, 2007, 11:55 AM
@wilk:
I had had the same problem (losing widgets) but I thought it had been because I played with the widget plugin source, and, moreover, it ceased to happen in 0.0.6. But it's possible the problem is elsewhere and you have the same. If you look in the config directory and print out the files corresponding to widget screenlets, don't they have 'x' and 'y' parameters outside your screen?
benjiku
February 13th, 2007, 12:03 PM
I have a list of suggestions :
scientific fonctions (sin/exp/ln/power/powers of ten) would be very helpful (for me at least).
I'm sorry, it's not in my todo list... at least for now... :-(
...but I want to explain why I want to keep it simple and clean.
If you take the gnome-calculator for example, you have 4 modes (basic, advanced, financial and scientific). For each one of these modes, you have different functions. Your needs are "scientific" operations but others could prefer "finances" operation or others could also prefer a binary/hexa/decimal conversion mode.
For me a widget "needs" to be as clean and simple as possible but efficient for 80% of your needs. For most people, i think, and it's only a guess, every day operations are "basic" operations. This is why I took this osx widget look and feel because (i think) it's simple and efficient.
In the other hand, we could have an extended version of the CalcSL to cover your needs. i'm open ;-)
What the others think ?
Vasek
February 13th, 2007, 12:25 PM
I think plugging in evaluation of inserted formulas (which will go along with extended history) and using scientific functions leaves the original idea far behind. Implementing even the most basic functions and things they need (e.g. for goniometric functions, you would probably need a button for entering pi and conversion between deg and rad) would make the calculator similar to Sci-mode of the windows calc.exe, which, however, needs a window thrice as big. (I won't post the screenshot, because it's copyrighted for sure :D)
I need these functions very often, too, but along with many more special functions and ability to plot graphs and compute derivatives and... So I open Maple for this :) For the calculator screenlet, I'd vote for something like a square root and rounding and maybe powers only.
delfick
February 13th, 2007, 02:11 PM
i'm loving the calculator :D
though can it have a "history" like a graphics calculator (see screenshot (that's an emulator running)....
Hello Delfick,
"Historic" is in my TODO list but it will not be in the next version. I want to correct some bugs on float operation before and make it scalable as RYX said. I'll also add the "equal-then-start-with-new" functionnality :-)
Finally, I want to "clean" and optimize the code and display. I tried some graphic animation and it was too slow so I need to find a way ;-)
sure thing :D
clean code is good code :D
RYX
February 13th, 2007, 02:53 PM
@RYX: If I want to add both XML menu and the default items, the Size, Theme and Window menus are not added. I have read that XML (-only?) based menus are preferred, but currently the Theme menu is not properly programmable through it, is it? I'd personally consider it a bug, if you do too, I believe it is a few seconds' thing for you to fix. What works for me is to give off the menu variable in Screenlet.add_default_menuitems and use self.menu instead.
I am still unsure which menu-type to choose as default (or if to rip off everything but properties/delete). I wanted to let that decide by feedback of screenlet-developers ... The XML-menus have problems with bool-items (check/uncheck) and need some improvement in their <scandir>-functionality, but if we can extend and improve the screnlets.XmlMenu, they should be the better choice (more flexible). If you use both menu-types together there are some small issues with separators ...
So I'd say you can use any workaround you like for now, if you have an idea to improve the menu - let me know. :)
Vasek
February 13th, 2007, 03:31 PM
Hello!
Here is my first own screenlet for a task I personally need very often - number conversions between the three "computer" bases. It has become a framework for various other conversions as well during its development. Enjoy!
http://kfe.fjfi.cvut.cz/~potocek/storage/Convert.tar.gz
More ideas for conversions are welcome. But please think only of some that can be really of general daily use, for this reason I consider the "Aspect Ratio" only an example which may be deleted from future versions. I think that keeping it about 5 modes is fairly enough.
@RYX: I wanted to use the combination of menus here, after detaching the converter modules from the main file, but not using the file name surpasses even the imaginable possibilities of <scandir>, so I finally made it non-XML.
Edit: I have just found a bug causing error when user tries to insert decimal point. It's fixed now on the address above.
Sorcerer
February 13th, 2007, 06:48 PM
Vasek: Very nice screenlet! I found a bug with the cm/inches converter though. When I click on inches field and start typing, it gives an IndexError
1
Traceback (most recent call last):
File "/home/hendrik/.screenlets/Convert/ConvertScreenlet.py", line 107, in key_press
if self.__converter.on_key_press(gtk.gdk.keyval_name( event.keyval)):
File "/home/hendrik/.screenlets/Convert/ConvertScreenlet.py", line 251, in on_key_press
self.values[self.active_field] = key
IndexError: list assignment index out of range
But I can navigate to the inches field with arrow keys and it works fine.
I wrote a B/kB/MB/GB converter (patch (http://hendrik.kaju.pri.ee/screenlets/sizeconverter.patch)) but I can't click on the GB field, I have to use arrow keys. Also the B/kB/MB/GB converter option is shown only when I run the ConvertScreenlet from .screenlets/Convert.
Vasek
February 13th, 2007, 07:15 PM
Vasek: Very nice screenlet! I found a bug with the cm/inches converter though. When I click on inches field and start typing, it gives an IndexError
1
Traceback (most recent call last):
File "/home/hendrik/.screenlets/Convert/ConvertScreenlet.py", line 107, in key_press
if self.__converter.on_key_press(gtk.gdk.keyval_name( event.keyval)):
File "/home/hendrik/.screenlets/Convert/ConvertScreenlet.py", line 251, in on_key_press
self.values[self.active_field] = key
IndexError: list assignment index out of range
But I can navigate to the inches field with arrow keys and it works fine.
I wrote a B/kB/MB/GB converter (patch (http://hendrik.kaju.pri.ee/screenlets/sizeconverter.patch)) but I can't click on the GB field, I have to use arrow keys. Also the B/kB/MB/GB c