Updated to work with root read-only fs

This commit is contained in:
P.M. Kuipers 2023-01-05 13:11:40 +01:00
parent bf256f6b87
commit 30109430d5
3 changed files with 16 additions and 15 deletions

View File

@ -2,6 +2,7 @@
Description=Start Mediaserver Description=Start Mediaserver
[Service] [Service]
Environment="HOME=/tmp"
ExecStart=/usr/bin/startx /usr/sbin/mediaserver ExecStart=/usr/bin/startx /usr/sbin/mediaserver
Restart=always Restart=always
RestartSec=10s RestartSec=10s
@ -9,4 +10,4 @@ KillMode=process
TimeoutSec=infinity TimeoutSec=infinity
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -3,15 +3,17 @@
# Copyright (c) 2014 Miqra Engineering # Copyright (c) 2014 Miqra Engineering
# #
import sys, os import os
import sys
# perform gstreamer imports (python3 style) # perform gstreamer imports (python3 style)
import gi import gi
gi.require_version('Gst','1.0') gi.require_version('Gst','1.0')
gi.require_version('GstGL', '1.0') gi.require_version('GstGL', '1.0')
gi.require_version('GstVideo', '1.0') gi.require_version('GstVideo', '1.0')
from gi.repository import GObject from gi.repository import GObject, Gst, GstGL, GstVideo
from gi.repository import Gst, GstGL, GstVideo
class BasicPlayer(GObject.GObject): class BasicPlayer(GObject.GObject):

View File

@ -3,27 +3,25 @@
# Copyright (c) 2021 Miqra Engineering # Copyright (c) 2021 Miqra Engineering
# #
import sys, os import os
import signal import signal
import sys
from optparse import OptionParser
from collections import OrderedDict from collections import OrderedDict
from optparse import OptionParser
from .resources import Resources
# perform gstreamer imports (python3 style) # perform gstreamer imports (python3 style)
import gi import gi
from .resources import Resources
gi.require_version('Gst', '1.0') gi.require_version('Gst', '1.0')
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version('GstGL', '1.0') gi.require_version('GstGL', '1.0')
gi.require_version('GstVideo', '1.0') gi.require_version('GstVideo', '1.0')
gi.require_version('GdkPixbuf', '2.0') gi.require_version('GdkPixbuf', '2.0')
from gi.repository import GObject from gi.repository import (Gdk, GdkPixbuf, GdkX11, Gio, GLib, GObject, Gst,
from gi.repository import Gst, GstGL, GstVideo GstGL, GstVideo, Gtk)
from gi.repository import GdkPixbuf
from gi.repository import GLib, Gio, Gtk, Gdk
from gi.repository import GdkX11
Gst.init(None) Gst.init(None)
@ -36,7 +34,7 @@ from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True) DBusGMainLoop(set_as_default=True)
# imports from module # imports from module
from . monitoredplayer import MonitoredPlayer from .monitoredplayer import MonitoredPlayer
class MediaService(dbus.service.Object): class MediaService(dbus.service.Object):