qubes/ext/gui: adjust shm.id path
It's moved to /var/run/qubes and now is built based on $DISPLAY.
This commit is contained in:
parent
1c20aae98a
commit
a317e81d7e
@ -135,8 +135,8 @@ class GUI(qubes.ext.Extension):
|
|||||||
GUI daemon securely displays windows from domain.
|
GUI daemon securely displays windows from domain.
|
||||||
''' # pylint: disable=no-self-use,unused-argument
|
''' # pylint: disable=no-self-use,unused-argument
|
||||||
|
|
||||||
if not start_guid or preparing_dvm \
|
|
||||||
or not os.path.exists('/var/run/shm.id'):
|
if not start_guid or preparing_dvm:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.is_guid_running(vm):
|
if self.is_guid_running(vm):
|
||||||
@ -150,6 +150,18 @@ class GUI(qubes.ext.Extension):
|
|||||||
vm.log.error('Not starting gui daemon, no DISPLAY set')
|
vm.log.error('Not starting gui daemon, no DISPLAY set')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
display = os.getenv('DISPLAY')
|
||||||
|
if not display.startswith(':'):
|
||||||
|
vm.log.error('Expected local $DISPLAY, got \'{}\''.format(display))
|
||||||
|
return
|
||||||
|
|
||||||
|
display_num = display[1:].partition('.')[0]
|
||||||
|
shmid_path = '/var/run/qubes/shm.id.{}'.format(display_num)
|
||||||
|
if not os.path.exists(shmid_path):
|
||||||
|
vm.log.error(
|
||||||
|
'Not starting gui daemon, no {} file'.format(shmid_path))
|
||||||
|
return
|
||||||
|
|
||||||
vm.log.info('Starting gui daemon')
|
vm.log.info('Starting gui daemon')
|
||||||
|
|
||||||
guid_cmd = [qubes.config.system_path['qubes_guid_path'],
|
guid_cmd = [qubes.config.system_path['qubes_guid_path'],
|
||||||
|
Loading…
Reference in New Issue
Block a user