Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start LCD in background or as a service #3

Closed
rvencu opened this issue Feb 26, 2021 · 3 comments
Closed

start LCD in background or as a service #3

rvencu opened this issue Feb 26, 2021 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@rvencu
Copy link

rvencu commented Feb 26, 2021

Hi, I wonder is there a way to start the LCD in the background or as a service at boot? Running it in the foreground is a bit annoying...

@alexhorner
Copy link
Owner

Hey @rvencu

Apologies for the delay, I have indeed achieved this with a modified service file found at /usr/lib/systemd/system/LCDd.service. Here is how I have it set up:

[Unit]
Description=LCD display daemon
Documentation=man:LCDd(8) http://www.lcdproc.org/

[Service]
User=root
ExecStartPre=bash -c "echo \"255\" > /sys/class/hwmon/hwmon1/pwm3"
ExecStart=/usr/sbin/LCDd -s 1 -f -c /etc/LCDd.conf
ExecStartPost=bash -c "sleep 5 && lcdproc C P M U S K"
ExecStop=bash -c "echo \"128\" > /sys/class/hwmon/hwmon1/pwm3"

[Install]
WantedBy=multi-user.target

This will bring the LCD brightness to 100% and then start lcdproc with a slight delay of 5 seconds in order to allow LCDd to fully start.

When the service is stopped, LCDd stops which in turn kills lcdproc. In addition, it also sets the LCD brightness to 50% which is approx the default after boot.

Please see the lcdproc help menu for info on what lcdproc C P M U S K means, as the characters represent the rotating screens I have selected for display on my system

@alexhorner alexhorner self-assigned this Mar 5, 2021
@alexhorner alexhorner added the question Further information is requested label Mar 5, 2021
@alexhorner alexhorner pinned this issue Mar 5, 2021
@rvencu
Copy link
Author

rvencu commented Mar 6, 2021

Great !

@rvencu rvencu closed this as completed Mar 6, 2021
@blairjj
Copy link

blairjj commented Jan 28, 2023

FYI if you are running Debian 11, you will need to make sure that you use: 'apt-get install lcdproc lcdproc-extra-drivers' to ensure that you have the extra drivers for hd44780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants