-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Artwork
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login



Sponsoring


-
- Content .- Fans (4) .- Knowledge Base  . 

Fortune

   0.3  

Plasmoid Script

Score 79%
Fortune
zoom


Minimum required   PyKDE/PyQt
Downloads:  222
Submitted:  Apr 11 2010
Updated:  Jul 30 2010

Description:

Displays random fortune/quote on a chalkboard.
Requires Fortune package to be installed to function properly.




Changelog:

0.3:
- added UTF-8 support (hopefully :))

0.2:
- configuration dialog added, it's now possible to:
- change text font type and size (default: Monospace 7pt)
- change text color (default: white)
- set refresh delay, setting 0m 0s disables autorefresh (default: 1 minute)
- enter custom fortune command (default: fortune)
Note: Be sure to use monospaced font for ascii graphics
like cowsay/cowthink to make it look fine and resize the
applet accordingly to fit it. :)
- known problems: after closing fortune applet plasma desktop sometimes crashes after some delay.
can't figure out why or if it's applet-related. (KDE 4.3.5) :-S Any help appreciated.. :)

0.1:
- basic functionality. Displays random quote from application Fortune (needs to be installed for plasmoid to work correctly)
- update in every minute
- new fortune can be obtained clicking anywhere on the chalkboard




LicenseGPL
(fortune.plasmoid)
Send to a friend
Subscribe
Other  Artwork  from jramen
Report inappropriate content



-

 Cowsay ]:3

 
 by H00K on: Apr 11 2010
 
Score 50%

I usually run my fortune like this:

fortune -a | cowthink -f moose -T ' U' -e Oo -n

...so I'd really be interested in seeing a fortune plasmoid that would enable piping. Would that be an option? ;)


Reply to this

-
.

 Re: Cowsay ]:3

 
 by jramen on: Apr 11 2010
 
Score 50%

Yes, no problem. :)

I will play with it a little, make some neat configuration box for it or something and let you know. ;)


Reply to this

-

 About the crashes

 
 by mreloads on: Apr 13 2010
 
Score 50%

I haven't looked at source of this plasmoid, but usually crash is caused by accessing uninitialized pointers. Maybe you're trying to assign a value to such a pointer or trying to delete it?


Reply to this

-

 Re: About the crashes

 
 by mreloads on: Apr 13 2010
 
Score 50%

Oh, right, you're using Python.
My tongue is my enemy.


Reply to this

-
.

 Re: Re: About the crashes

 
 by jramen on: Apr 13 2010
 
Score 50%

I'm quite new to Python, I know "him" only for 5 days or so (not about his existence, just coding in it, mind you). :) I wouldn't dare to juggle with uninitialized pointers in C++ or Delphi, but I'm just learning this new language, so... I -really- appreciate any help. Some things I had to figure out by trial-and-error method, cuz I learn best from examples and there aren't many out there...
Definition of functions is pretty important, too, but it's just a half of the story. How to use them is sometimes quite a different one. :-S

Either way, many thanks for you comment and trying to help, I really appreciate that. :)


Reply to this

-

 Feature request

 
 by overmind88 on: Jul 30 2010
 
Score 50%

Does'nt work with cyrillic fortunes (in utf-8 charset). Show only strange symbols. Can you add support?

Thanks.


Reply to this

-
.

 Re: Feature request

 
 by jramen on: Jul 30 2010
 
Score 50%

Please, try the new version 0.3.

I had a very hard time to figure it out, because it's not very well documented (couldn't find any examples how to solve this), 'cuz I thought the problem was with python, but no, it was of Qt and its string interpretation/displaying.

So please test it, whether it works for you. :)


Reply to this

-

 Re: Re: Feature request

 
 by overmind88 on: Jul 30 2010
 
Score 50%

All works.

Many thanks!


Reply to this

-
.

 Re: Re: Re: Feature request

 
 by jramen on: Jul 30 2010
 
Score 50%

Glad to hear that!
Thank you very much for your feedback. :)


Reply to this

-
.

 How to add new quotes?

 
 by HardinComp on: Oct 31 2010
 
Score 50%

I saw a great line on the Ubuntu Forums that I'd love to see in Fortunes.

It takes an amateur to mess something up... but to REALLY screw something up requires an "expert".

What would be the best way to get this added?


J.M. 'Peng' Hardin
You'll find me on tech (and other) websites as BostonPeng

Reply to this

-
.

 Re: How to add new quotes?

 
 by jramen on: Oct 31 2010
 
Score 50%

Well, this plasmoid is just a "frontend" for Fortune package, so it doesn't handle fortunes directly. :(

Therefore the easiest way to add your custom fortune is to add it to Fortune files.

It can be a lil' bit tricky for linux beginners, but it's quite easy. :)

You need to create a new file, for example "myfortunes", containing quotes separated by %, put it into fortune data directory (usually /usr/share/fortune/) and then run "strfile" command on it.

All this requires root access, because only root can write into that directory and running strfile also requires root privileges.

So. Short recipe follows:

1. gain root access
2. create file /usr/share/fortune/myfortunes
containing:

It takes an amateur to mess something up... but to REALLY screw something up requires an "expert".
%

3. run:
# strfile /usr/share/fortune/myfortunes

This will create myfortunes.dat file in the same directory.
4. hopefully Fortune will pick this particular quote someday, too, 'cuz as I saw, there are gazillions of them there.
5. to see whether Fortune accepted your file run:
# fortune -f

and that will list all the files Fortune will pick quotes from.
:)

Hopefully this helps. ;)

PS: You can also put all your desired fortunes into "myfortunes" file and then specify fortune command in plasmoid as:
fortune myfortunes
and then only quotes from this particular file will be picked. :)


Reply to this

-

 Re: Re: How to add new quotes?

 
 by HardinComp on: Nov 1 2010
 
Score 50%

It worked pretty well at the beginning, other than the fact that my path to the fortunes folder is /usr/share/games/fortunes/, and I got

# strfile /usr/share/games/fortunes/myfortunes

to run without a hitch, but when I tried to run

#fortune -f

I got an error.


# fortune -f
Command 'fortune' is available in '/usr/games/fortune'
The command could not be located because '/usr/games' is not included in the PATH environment variable.
fortune: command not found

I'm not a total noob, as I've been running Linux for a few years now and am not the least bit afraid of the CLI, but I'm at a loss for how to fix this particular error.

Once I get it working I'll write a post for my blog letting others know how to add fortunes.


J.M. 'BostonPeng' Hardin
A proud Linux Mint KDE user

Reply to this

-
.

 Re: Re: Re: How to add new quotes?

 
 by jramen on: Nov 1 2010
 
Score 50%

Oh, I read somewhere that fortune is being installed in /usr/games/ directory on some distros. On my OpenSuse 11.3 executable is /usr/bin/fortune, right in the PATH.

I would solve the problem you are encountering by creating a symbolic link to /usr/games/fortune in some directory which is in the PATH, for example in /usr/bin.

You can do this by executing "ln" command at root's prompt (only root can write into /usr/bin directory):

# ln -s /usr/games/fortune /usr/bin/fortune

Hopefully this will solve that problem. :)


Reply to this

-

 It finally works!

 
 by HardinComp on: Nov 1 2010
 
Score 50%

Unfortunately that didn't help at all for some odd reason. After trying several things that didn't work, I noticed that the error was complaining that while it found '/usr/games/fortune/' it wasn't seeing 'usr/bin/games/fortunes'. I opened a root Dolphin window split bewteen two paths, /usr/games and /usr/bin. I alt-dragged a link form /usr/games/fortune to /usr/bin/fortune. I then ran fortune -f and got this:

# fortune -f
100.00% /usr/share/games/fortunes
0.65% linuxcookie
0.95% kids
1.02% ethnic
1.27% law
0.34% goedel
0.33% news
0.87% husse-helping
3.98% work
2.67% wisdom
0.79% riddles
4.11% miscellaneous
3.94% science
0.33% pets
1.79% disclaimer
0.40% myfortunes
0.11% husse-funny
2.86% bofh-excuses
0.27% debian-hints
0.19% magic
6.49% computers
2.12% linux
1.28% education
4.55% songs-poems
0.93% sports
1.43% startrek
0.13% husse-moderating
0.08% husse-self
1.31% drugs
0.06% ascii-art
7.59% definitions
1.24% humorists
7.86% people
0.47% medicine
0.95% love
1.25% food
0.45% paradoxum
2.93% art
0.08% translate-me
2.72% fortunes
7.16% cookie
3.41% knghtbrd
3.46% zippy
4.42% politics
3.68% men-women
0.54% debian
1.65% literature
3.16% platitudes
1.72% perl

Finally! I'm going to write a blog post about this in a few and share my myfortunes file, which also has a number of quotes I ran on an old blog under the heading Words To Live By. Thanks for the assists!


J.M. 'BostonPeng' Hardin
A proud Linux Mint KDE user

Reply to this

-

 Re: It finally works!

 
 by HardinComp on: Nov 1 2010
 
Score 50%

I just posted an article on my blog documenting how I added the myfortunes file. I also have a link to my file with over 60 quotations I've picked up over the years for anyone who wants it.

http://wp.me/p7lYn-OS

Thanks again for all the help, jramen. I definitely owe you a pint.


J.M. 'BostonPeng' Hardin
A proud Linux Mint KDE user

Reply to this

-
.

 Re: Re: It finally works!

 
 by jramen on: Nov 1 2010
 
Score 50%

:)

I'm very very happy that it finally worked! :)

And it was a pleasure to be of service. :)

But let me say this:
WOW! Sooo many fortune files! :))

My "fortune -f" lists only 7 that are included in basic package I presume, but you really have quite a collection! :)

I've read your blog article already and I find it very nicely written and informative (and amusing here and there)! :)) And of course I downloaded your myfortunes.txt file and added to my modest collection. ;)

Finally, thank you very much for all your kind words and interest in my lil' plasmoid. :)


Reply to this

-

 Re: Re: Re: It finally works!

 
 by HardinComp on: Nov 1 2010
 
Score 50%

I think I added a bunch more one day when I was going through KPackageKit or something. I'm glad you like my post. I try to include some humor in my posts (when I get a chance to write one that is) just to give my readers a chuckle as well as what I hope is good info.

I need to go through my fortunes and add some sources to a lot of them but it will have to wait until I can chase them down. When I do I'll post it to my Dropbox and add a comment that the file is updated so folk can get the newer version of the file.

Thanks for writing the plasmoid. Like I said in my post I discovered it on someone's desk when I was still a GNOME user and it was part of why I looked at KDE. It's now a must install plasmoid on my system.


J.M. 'BostonPeng' Hardin
A proud Linux Mint KDE user

Reply to this

-
.

 Did something change?

 
 by HardinComp on: Nov 5 2011
 
Score 50%

After my computer died earlier this year I recently got a laptop with Linux Mint Debian Edition installed. I added KDE to it (GNOME just looks weird to me now) and when I installed this plasmoid again it look different. Wasn't there a way to show the fortunes on a regular widget without the blackboard? I'd love to be able to get back to that look if I can.


J.M. 'BostonPeng' Hardin
A very happy Linux Mint 9 KDE user

Reply to this

Add commentBack






-

-
How do you like Plasma 5?
 The best KDE Desktop ever.
 Definitely a nice improvement.
 Not decided yet. Haven't tried it yet.
 I do not like some of the changes.
 KDE is taking the wrong way.
 I am still sticking with KDE 3.5.
 I have no opinion, but wanted to vote anyway.

resultmore




 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Artwork
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
News RSS   
Discussion RSS   
Events RSS   

Participate
Groups
Forum
Add Artwork
Public API
About KDE-Look.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2001-2014 KDE-Look.org Team  
All rights reserved. KDE-Look.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.