Fairly simple question: is it possible to use lock screen text which is not baked-in to the setting on Cinnamon?
i.e. Could you display the output of fortune when you lock the screen, such that the message changes every time (I know the intended purpose of this feature is something along the lines of "I'll be back in x minutes" but I'm asking if I can, not if I should).
If it matters, I'm using Cinnamon 3.6.7 in Mint 18.2 with kernel 4.13.0-43-generic x86_64
Auto generated lock screen text
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- cabbagetreemo
- Level 3
- Posts: 147
- Joined: Fri Mar 31, 2017 2:36 am
- Location: Spain
Auto generated lock screen text
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Auto generated lock screen text
Mmmm,
There's the option to input a custom message when you manually lock the screen..but that is probably not what you want.
The only way I can think of doing this is to use a bash script to change the settings programmatically and lock the screen. You can set up shortcuts in the menu / panel / desktop to run the script or maybe set it to run once after every login in your start up commands or regularly in a cronjob (without the
e.g.
There's the option to input a custom message when you manually lock the screen..but that is probably not what you want.
The only way I can think of doing this is to use a bash script to change the settings programmatically and lock the screen. You can set up shortcuts in the menu / panel / desktop to run the script or maybe set it to run once after every login in your start up commands or regularly in a cronjob (without the
cinnamon-screensaver-command -l
)e.g.
Code: Select all
#!/bin/bash
#Description: A script to set the lock screen message from a fortune.
MESSAGE=$(fortune -s);
gsettings set org.cinnamon.desktop.screensaver default-message "$MESSAGE";
cinnamon-screensaver-command -l;
Last edited by smurphos on Wed May 23, 2018 3:09 am, edited 1 time in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Auto generated lock screen text
You can even get a cowsay in there if you tweak the font sizes...
Code: Select all
#!/bin/bash
#Description: A script to set the lock screen message.
MESSAGE=$(fortune -s | cowsay);
gsettings set org.cinnamon.desktop.screensaver default-message "$MESSAGE"
cinnamon-screensaver-command -l
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
- cabbagetreemo
- Level 3
- Posts: 147
- Joined: Fri Mar 31, 2017 2:36 am
- Location: Spain
Re: Auto generated lock screen text
When I put your first script in an executable file I got this message when trying to run it
Repinning the ctrl+alt+l shortcut to this script
has the desired (silly) effect, except for text getting clipped by a small bounding box. I suspect fixing that would require messing around with the theme .css file
Code: Select all
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
Code: Select all
#!/bin/bash
MESSAGE=$(fortune -s);
cinnamon-screensaver-command -l -m "$MESSAGE";
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Auto generated lock screen text
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Auto generated lock screen text
Nice - didn't think of checkingcabbagetreemo wrote: ⤴Wed May 23, 2018 6:20 am When I put your first script in an executable file I got this message when trying to run it
Code: Select all
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
Code: Select all
#!/bin/bash MESSAGE=$(fortune -s); cinnamon-screensaver-command -l -m "$MESSAGE";
cinnamon-screensaver-command -h
for other options. BTW setting a mono variant font for the message might help with clipping issues...Re the gsettings failure - I've not seen that before but it is probably something you want to troubleshoot - do you have any issues with OS settings not sticking between reboots? Anyway a couple of links that might give some insight / possible solutions as to why that is happening.
viewtopic.php?f=47&t=244360
https://askubuntu.com/questions/558446/ ... untu-reins
aptitude moo && aptitude -v moo && aptitude -vv moo && aptitude -vvv moo && aptitude -vvvv moo && aptitude -vvvvv moo && aptitude -vvvvvv moo
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.