[SOLVED] How to run Fortune?

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
devildog
Posts: 25
Joined: Thu Jul 08, 2021 11:28 am
Has thanked: 9 times
Been thanked: 2 times

[SOLVED] How to run Fortune?

Post by devildog »

It's not *nix if fortune isn't running!

The attached zip contains the command itself (/usr/games/fortune) some missing deps, and some fortune cookie files (lists of jokes and quotations) to get you started!

Unzip the file and right click/install, at minimum...
fortune-mod-1:1.99.1_7build1-amd64-DEB.txz
fortunes-min-1:1.99.1_7.3-all-DEB.txz
recode-3.6_25-amd64-DEB.txz
librecode0-3.6_25-amd64-DEB.txz

Invoke it ...
/usr/games/fortune

Question:
Is there a more elegant solution than digging for .debs, then converting them? Fortune and its deps were missing from slapt.

Question:
How can I make the default FD terminal (urxvt) run this on opening so I receive a new fortune each time the terminal is opened?

Basically I want this to run when the terminal opens...

Code: Select all

echo
/usr/games/fortune -s
echo

Failed attempt 1...

Modified .bash_profile and added...

No joy and no output.

Failed attempt 2...

Modified /etc/.profile

Can see fortune run on bootup but that's not really what I was after!

Ideas welcome!

Attachments
recode.lib.v3.6.25.zip
recode libs unzip then rt click install
(517 KiB) Downloaded 44 times
recode.v3.6.25.zip
recode text dep unzip then rt click install
(179.99 KiB) Downloaded 36 times
fortune.fatdog64.zip
fortune command unzip then rt click install
(156.87 KiB) Downloaded 48 times
Last edited by devildog on Sun Sep 17, 2023 8:17 am, edited 1 time in total.
step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: How to run Fortune?

Post by step »

devildog wrote: Mon Sep 04, 2023 11:29 am

It's not *nix if fortune isn't running!

The attached zip contains the command itself (/usr/games/fortune) some missing deps, and some fortune cookie files (lists of jokes and quotations) to get you started!

Thank you.

[Moderator]: I'm going to take the liberty to move this thread to the Fatdog64 Software sub-forum, where other contributed packages are usually posted.

Question:
Is there a more elegant solution than digging for .debs, then converting them? Fortune and its deps were missing from slapt.

Covering a broader spectrum of related topics, here are some software package basics:

1. Additional software packages: http://distro.ibiblio.org/fatdog/web/fa ... kages.html
2. Why doesn't this Debian/Ubuntu package work? http://distro.ibiblio.org/fatdog/web/faqs/Debian.html
3. How to make packages for Fatdog64 http://distro.ibiblio.org/fatdog/web/fa ... ckage.html
4. sbopkg: Slackbuilds.org Package browser (Fatdog64 900) viewtopic.php?t=9306

Digging for .debs (or other foreign packages) is part of #2 above. Unfortunately it's time consuming and prone to error. This is the main resource https://www.debian.org/distrib/packages. You can also try packages from other major distributions but you won't have a point-and-click method to convert them to Fatdog package format as it's the case for .debs.

Question:
How can I make the default FD terminal (urxvt) run this on opening so I receive a new fortune each time the terminal is opened?

Basically I want this to run when the terminal opens...

Code: Select all

echo
/usr/games/fortune -s
echo

Short answer: put your code in $HOME/.shinit

Modified .bash_profile and added...
Modified /etc/.profile
...

Roughly cut:
- "profile" files run when the shell is a login shell, which typically happens when you boot the system.
- "rc" files run every time a new shell is started, which typically involves opening a terminal window or entering an interactive sub-shell.

So what about the .shinit file? There is no "profile" nor "rc" in its name.

".shinit" is like an "rc" file but it works for all Bourne-like shells, like sh, bash, dash, zsh, etc., whereas ".bashrc" would only run for the bash shell (an the sh shell when it's linked to /bin/bash).

Note: the .shinit file runs only because $ENV=/etc/shinit and /etc/shinit runs $HOME/.shinit.

Clarity
Posts: 3842
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1632 times
Been thanked: 526 times

Virtual Desktop uses in FATDOG (and other forum ISOs)

Post by Clarity »

Yes! Virtual Terminals...an old and VERY useful tool for isolating tasks and behaviors in separate "Virtual Terminals" (VT). @jamesbond is very familiar with this use case.

In my past I have used it to isolate one Window Manager from another by running the default in the Default VT (ctrl-alt-F1) while starting and testing another Window manager in another separate VT (ctrl-alt-F2).

Another of my use cases is running my QEMU-KVMs in a separate VT (ctrl-alt-F?) from my main desktop in the primary VT (ctrl-alt-F1).

There are other use cases. For me, this is an very uncomplicated method of workload management.

I do have one question: What is recommended to expand the number of VTs from the standard 2?

jamesbond
Posts: 717
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

How to add more VTs

Post by jamesbond »

Good to see you still around, @Clarity.

To add more VTs:
1. Edit /etc/inittab
2. Add more of the following lines:

Code: Select all

tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
tty7::respawn:/sbin/getty 38400 tty7
tty8::respawn:/sbin/getty 38400 tty8

... etc as needed. You need to reboot for the change to take effect.

Clarity
Posts: 3842
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1632 times
Been thanked: 526 times

Re: How to run Fortune?

Post by Clarity »

Thank you @jamesbond

BTW: I responded to your PM.

User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1314 times
Contact:

Re: How to add more VTs

Post by fredx181 »

jamesbond wrote: Sun Sep 10, 2023 10:32 am

Good to see you still around, @Clarity.

Yeah! Where were you?! Had a little vacation from all the Puppy misery perhaps :lol:

Post Reply

Return to “Software”