Sample Header Ad - 728x90

Show terminal window from systemd service daemon

0 votes
0 answers
855 views
**Setup:** - Raspberry Pi running raspbian with a display connected (HDMI) - A continuously running systemd service (daemon) **Goal:** - Starting a new terminal window that's visible on the display - As a proof of concept I would like to run a shell script Running the shell script within the service works without problem but opening a visible window on the display seems to be hard. **The code (daemon)** var process = new Process() { StartInfo = new ProcessStartInfo { FileName = "/bin/bash", Arguments = $"-c \"{Paths.Dotnet} /path/to/app.dll\"", WorkingDirectory = workingDirectory, RedirectStandardOutput = false, UseShellExecute = false, CreateNoWindow = false, WindowStyle = ProcessWindowStyle.Maximized } }; process.Start(); string result = process.StandardOutput.ReadToEnd(); process.WaitForExit(); ** **EDIT** ** Modyfying the arguments to: Arguments = $"-c \"DISPLAY=:0.0 lxterminal -e {Paths.Dotnet} /path/to/app.dll\"" Didn't fix the issue. app.dll is executed but still in the background.
Asked by Jobse (1 rep)
Dec 30, 2018, 02:02 PM
Last activity: Dec 30, 2018, 04:14 PM