Feh on auto start from rc.local ERROR: Can't open X display. It *is* running, yeah?
0
votes
4
answers
4717
views
I'm trying to run my dotnet app from rc.local file. Where i start playing video(working) or show image slide show with feh player. If i run my scrip manually from bash is working how it' should.
When i try to run feh player i get:
feh ERROR: Can't open X display. It *is* running, yeah?
From rc.local
$(cd /home/pi/DigitalSignage/ ; sh startUpDigitalSignage.sh) &
startUpDigitalSignage.sh
#!/bin/bash
echo "Start Digital Signange"
sudo DISPLAY=:0 dotnet DigitalSignage.dll
I try to add DISPLAY=:0 before starting my app but no help.
From dotnet app i'm using Process call and i don't know how to add to call Display settings.
process = new Process();
process.StartInfo.FileName = "feh";
process.StartInfo.UseShellExecute = false;
string geometry = screenType == ScreenOutputType.HDMI_1 ? "1920x1080" : "1920x1080+1920";
string textInfo = string.IsNullOrEmpty(outputText) ? "" : "--font yudit/48 --info \"echo " + outputText + "\"";
process.StartInfo.Arguments = " -Y -z "+ textInfo + " --geometry=" + geometry + " -x --zoom fill \"" + path + "\" ";
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.Start();
Asked by MiselMoj
(11 rep)
Nov 3, 2021, 07:44 AM
Last activity: Dec 18, 2023, 03:00 PM
Last activity: Dec 18, 2023, 03:00 PM