You are not logged in.

#1 2017-05-08 03:38:58

zxcvb
New Member
Registered: 2017-05-08
Posts: 2

fortune notifications?

i had crunchbang installed on my aspire one zg5 for awhile, and recently have been looking to switch distros... one thing i loved in the old crunchbang was the fortunes that randommly popped up and said "statler says: ..."
is there any other linux that does this? (i noticed #!++ and bunsenlabs seem to have removed this functionality which is my main criteria for a suitable distro)
i think i lost the iso for the crunchbang version i had been using which was from 2011

Offline

#2 2017-05-08 04:04:25

Sector11
Tpyo Knig
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,149

Re: fortune notifications?

@ zxcvb

I think I still hsve a CD/DVD of #! around here but it shouldn't be too hard to setup a fortunein bunsen.

It's still here, just needs a cron job to get it going  smile

 08 May 17 @ 01:02:17 ~
  $ fortune
Law of Procrastination:
	Procrastination avoids boredom; one never has
	the feeling that there is nothing important to do.
 
 08 May 17 @ 01:02:24 ~
  $ 

smile


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#3 2017-05-08 04:17:58

damo
....moderator....
Registered: 2015-08-20
Posts: 4,376

Re: fortune notifications?

Try @ohnonot's  fortune-mod package as discussed here

It combines #! and BL forum quotes, but you could include other quote databases if you want.

I run mine with this line in autostart:

(sleep 20;notify-send --icon="/usr/share/pixmaps/Beaker.png" "$(fortune)") &

I made my own icon for the notification, so just remove the '--icon=...' section, or choose something else on your system.

Last edited by damo (2017-05-08 04:21:14)


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#4 2017-05-08 08:35:12

zxcvb
New Member
Registered: 2017-05-08
Posts: 2

Re: fortune notifications?

awesome, that's so fun. i have very little experience with linux, i just stumbled on #! years ago trying to get a lightweight OS on my aspire one netbook.  at first i got scared of the notifications, because i didn't know what was going on, but then i liked it.  i never saw another distro that does that sends quotes thru the notifications, is that just something the creator of #! thought up or has that been done before? it's so simple but brilliant. i have been using windows 10 lately, and they seem to have ripped off the idea by having cortana send a random notification when booting up, but she's a bitch.


ps. i think the extent of my linux skills will be used trying to get these fortune notifications up and running, but it will be a nice little project.

Last edited by zxcvb (2017-05-08 08:36:41)

Offline

#5 2018-03-10 23:09:24

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: fortune notifications?

This is fun. Just put in autostart

(sleep 3; notify-send --icon="/usr/share/icons/Papirus/symbolic/emotes/face-cool-symbolic.svg" -t 15000 "$(fortune cbbl)") &

@ohnonot When running ./mk.sh and saying yes, I want to install it, I'm not sure that a simple enter for the default path did work (I run it again with manually writing the path and hitting enter and it worked that way with /usr/share/games/fortunes). Thank you anyhow for maintaining fortune cbbl.

Offline

#6 2018-03-11 04:36:17

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

It's been on my to-do list for ages to package this for BunsenLabs.
Once Helium is done, it'll be nearer the top. smile


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#7 2018-03-11 13:24:46

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: fortune notifications?

Thanks heaven M$oft stopped supporting W98. Otherwise you might still spend your days with endless virus scans, suspicious .exe-files, messed up security updates and gaudy system cleaners instead of developing an awesome GNU/Linux distro like BunsenLabs.   cool


notifyfortunecbbl.md.png


A package would be great, but it's easy for anyone without apt too:

1. Download zip file from here (or use git).

2. Extract

3. Cd to fortune-mod-cbbl-master

4. Run

./mk.sh

5. Give as path when asked (for a system wide install)

/usr/share/games/fortunes

6. Run "fortune cbbl" or on start up use the line in autostart from my post above.

Offline

#8 2018-03-12 02:35:16

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

^Thanks. That might help when setting up the package building.
Having a package will make it easier to ship bunsen-fortune by default (if there is enough demand for it) and anyway, I need some practice in making Debian package source that actually does more than just copy some files into place... roll


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#9 2018-03-12 08:19:36

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

johnraff, go ahead, i'd be pleased! and i will continue to update this repository as i have been for quite a while; via bl backports maybe a unique chance to get almost-up-to-date fortunes from the forums straight to bl desktops?

martix: thanks for confirming that the build script still works.
however, i just looked it over and there was a really bad brainfart in it (it would be preposterous to call that a bug) that probably means that either it didn't work or you kept recompiling the same old version. frankly, i'm confused that nobody complained yet.
of course it is fixed now, and i tried to make the script a little easier to understand.

johnraff:
the "build" just looks at the plain text cbbl file and creates an accompanying cbbl.dat file that makes it possible for fortune to randomize output or something.
it's not really compiling anything.
resulting files are architecture-independent.
so it's hardly more than just copying files.
and assuming that "cbbl" is a unique identifier, it really shouldn't be a problem to copy it to the already existing /usr/share/games/fortunes folder.

Last edited by ohnonot (2018-03-12 08:20:50)

Offline

#10 2018-03-14 10:46:55

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: fortune notifications?

johnraff wrote:

It's been on my to-do list

I just noticed: bl-fortune is already announced in autostart

## bl-fortune - have the system come up with a little adage (not yet enabled)
#(sleep 120; bl-fortune) &

@ohnonot For new users it might be confusing that it's called fortune-mod-cbbl on github, while it's supposed to be called bl-fortune on the distro. It's similar with bl-conkyzen and BunsenLabs Conky Manager. Not really an issue, but as mentioned, sort of confusing (having different names for the same thing).

Offline

#11 2018-03-15 03:21:06

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

^all our executables are named bl-something. It avoids name clashes with other commands. BL packages are all bunsen-something, but github repos, themes etc etc can be called anything...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#12 2018-03-15 05:56:54

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

it wouldn't be a problem to rename the github repo if need be.

johnraff, when and how would this become part of bunsenlabs? would someone make a package straight from my repository?
i could also open this one for contributions from interested others (never done that, need to check out). interested?

disclaimer:

as of march, 12th, the build script has been fixed.
there's a chance that it didn't work properly before that, so please build again!

Offline

#13 2018-03-15 06:25:52

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

ohnonot wrote:

it wouldn't be a problem to rename the github repo if need be.

No, no need at all.

johnraff, when and how would this become part of bunsenlabs? would someone make a package straight from my repository?

Details will have to wait till Helium is out and I have time to play with it.
I'm thinking, one of:
1) Do the build process by hand and put the results in a Debian package.
2) Learn the "proper" way to package from an upstream tarball, and use debian/rules to do the build automatically every time a new tarball is pulled down from GitHub.
3) Learn how to build Debian packages directly from an upstream git repository.
4) Do something like the Flash installer, ie the Debian package is just an install script which downloads and builds the data on the local computer, whenever the user wants, or according to a systemd timer or cron job.

Whichever looks easier/safer/more_interesting...

If anyone can do one of these already, please speak!

Once the package is available, people can install it and uncomment the entry in openbox/autostart.
If there are no snags, and there is popular acclaim, we could put it in the default BL setup.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#14 2018-03-17 06:22:17

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

johnraff wrote:

4) Do something like the Flash installer, ie the Debian package is just an install script which downloads and builds the data on the local computer, whenever the user wants, or according to a systemd timer or cron job.

this looks like the only solution that would update the fortunes regularly?
it should be safe enough because all you need to fetch is 1 text file, and the (already-installed) fortune package contains the tool necessary to build it.

Offline

#15 2018-03-17 06:30:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

^Well, all the other solutions would mean the package maintainer putting out upgrades every now and then, depending on how many new fortunes had arrived. It wouldn't necessarily be a lot of work, if the build process was automated, and does have security advantages, even if it is only a text file being downloaded. If some future evil-doer took over or hacked into your GitHub account...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#16 2018-03-17 06:47:36

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

johnraff wrote:

^Well, all the other solutions would mean the package maintainer putting out upgrades every now and then

but i do that all the time!
i guess what you mean is some sort of debian upgrades? not sure i understand.

It wouldn't necessarily be a lot of work, if the build process was automated

ah, you mean i'd need to "compile" the files every now and then.

and does have security advantages, even if it is only a text file being downloaded. If some future evil-doer took over or hacked into your GitHub account...

....the worst that could happen is that you see corrupted fortunes.
unless the fortune-mod package itself has some serious security flaws.
no hurry, but when you get the time take a look at what my github repo actually does, i'm sure you'll understand better.

Offline

#17 2018-03-17 07:54:26

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

Yes I mean upgrades to the Debian package, which, although it would also be a repo in the GitHub BunsenLabs section, would be a different entity from your "upstream" repository.

You wouldn't have to do anything at all beyond what you're doing now, unless you're volunteering to be the Debian package maintainer that is. Have you made Debian packages before? If you're interested in having a go, I'd be happy to help. Otherwise I don't mind trying, as I'm also curious to learn about how to auto-build from an upstream tarball. All our packages to date have been "in-house".

Anyway, as you say, later... I'll have a proper look at your repo. smile


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#18 2018-05-13 09:45:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

Starting on this now. Adding a "helium" branch (in my local git repo) with a "debian" subdirectory to hold all the required files, and an install script.

I've decided for now not to use mk.sh because it's an interactive script for users. We'll need an automatic install - simpler in some ways, but needing some checks too.

Looking at the git log, with new fortunes arriving every month or so, I think for now it won't be necessary to ship a user-end update script - package upgrades can be put out when some new fortunes have built up. That can be changed of course.

I'm provisionally naming the package "fortune-mod-cbbl", same as upstream, but it could be "bunsen-fortune" I guess.

I'm not sure whether to ship a bl-fortune script which calls a custom fortune and passes it to notify-send (as implied in the commented-out autostart code) or just let users call "fortune cbbl" as they wish...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#19 2018-05-13 15:19:49

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

johnraff wrote:

Starting on this now.

i'm excited!

I've decided for now not to use mk.sh because it's an interactive script for users. We'll need an automatic install - simpler in some ways, but needing some checks too.

i see.
the only things that matter:
a) the package containing 'strfile' is a dependency, and 'strfile' is in PATH
b) where fortune puts its fortune files (or looks for them) is distro-specific

the bit with folding the output to standard terminal width is a little pointless i guess.

Offline

#20 2018-05-14 03:12:12

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

strfile comes with fortune-mod which will have to be a dependency of this package anyway.

Since this is a Debian package, the Debian file location will be appropriate I guess. smile

If bl-fortune sends to notify-send then folding is done anyway. We'll have to see if any pre-formatting is needed to make the longer messages look right. The package will install the compiled files in the standard location so users can use 'fortune cbbl' to display them any way they like, and the bl-fortune script also, so the openbox/autostart line can work right off.

Any suggestions for a nice icon? I'd like to use Beaker for a BunsenLabs theme, but I guess there might be copyright issues with Disney. (Like damo, I've made a personal Beaker icon.)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#21 2018-05-14 04:47:08

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

i thought about what i wrote yesterday and most of it does not apply to making a (precompiled) debian package. sad
i'm sure you'll figure it out.

there was talk about an icon a while back, i like this, but copyright issues.

Here's one that's likely not copyrighted. no really, i like it.

more copyright-free options:
an actual fortune cookie - examples: https://play.google.com/store/apps/deta … od.fortune
a stylised chemical glass thingie (that's not actually a beaker, but i think it looks
better): https://st3.depositphotos.com/4177785/1 … r-icon.jpg

to clarify, these are just examples, but these sort of images are definitely available at openclipart or so.
https://openclipart.org/search/?query=beaker
https://openclipart.org/search/?query=fortune
etc.
i'm sure it's possible to gimp/inkscape something from there, that would go well with the paper icon theme, maybe:
Beaker.svg

Last edited by ohnonot (2018-05-14 04:58:16)

Offline

#22 2018-05-14 05:15:24

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?

ohnonot wrote:

i like this, but copyright issues

I like that one too... make a bunsen-nonfree package to hold stuff like this?

The lab flask is OK but has a watermark. Maybe something from openclipart would be safest.
As you say, we have gimp wiz's here who could improve on anything we pulled in.

Last edited by johnraff (2018-05-14 05:16:44)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#23 2018-05-14 05:55:06

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,671
Website

Re: fortune notifications?


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#24 2018-05-14 18:35:39

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: fortune notifications?

^ copyright, i'd steer clear of it.
maybe the copyright holders have a lawyer-bot that has nothing better to do then crawl the web and sniff out fair use violations...

johnraff wrote:

The lab flask is OK but has a watermark. Maybe something from openclipart would be safest.

there's an svg of a chemical flask/beaker in my previous post, all grey, that does NOT have any watermark.
personally, i like the abstraction: beaker == beaker

Last edited by ohnonot (2018-05-14 18:36:10)

Offline

#25 2018-05-14 20:13:40

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: fortune notifications?

As a sidenote it's a bit unfortunate if a fortune is too long and the notification disappeares before someone finished reading. Sometimes I get the feeling that certain messages appear very often, others rarely, but it has been working fine so far.

Offline

Board footer

Powered by FluxBB