Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 5836  / 2 Years ago, mon, may 30, 2022, 10:16:38

I love a quote. Now I want every time my computer starts, the quote to be on the screen, like a welcome note.Is there any way to do that in ubuntu 13.04?


More From » startup

 Answers
7

You could pop up a simple zenity dialog on login with the content of your quote.


Put the following code into a script then add that script to your "Startup Applications"


zenity --info --text=$quote --title="A Quote"



Using fortune


Install the fortune-mod package (sudo apt-get install fortune-mod) then you can integrate the fortune command into your script like this:


zenity --info --text="$(fortune literature)" --title="A Quote" --no-wrap

You can just add that command to your Startup Applications without putting it in a script.


The literature option is used to specify that you want a quote specifically, otherwise it will give you jokes, riddles and other 'fortunes'.


Note: some of the fortunes are quite long, use --text="$(fortune -s literature)" instead of --text="$(fortune literature)" in the command above to print short quotes only.


Screenshot below:
Fortunes in a dialog


Fortune also has many different options to customize the type of quotes you'll get (literature, riddles, etc.) See the fortune man page for more information. To use those options, just change fortune in the command above to fortune SOME_OPTION.


Credits to FreudianSlip for the fortune command


[#29039] Tuesday, May 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
assionortly

Total Points: 423
Total Questions: 121
Total Answers: 115

Location: Chad
Member since Wed, Sep 30, 2020
4 Years ago
;