Re: [qubes-users] /usr/bin/notify-send does not work when invoked via qubes-rpc

2019-04-22 Thread tomhet
> Can I ask why you want to do this?
> Why dont you just call notify-send in the qube? 

First some introduction:
- I have 'storage' vm. It takes storage devices (few HDDs) on startup and 
exposes them via NFS & Samba to other VMs and physical machines. Each VM can 
access just what is exported for it, rw or r/o. 
- When 'storage' is started it has to trigger assignment of block devices to 
itself (and un-assign them on shutdown). Achieving this is discussed here 
https://groups.google.com/d/topic/qubes-users/RogG5rXG_Pw/discussion
- Assign/un-assign is triggered from storage via qubes-rpc actions 
'storage-attach/detach'

I just want to be notified on screen for each device that is 
assigned/de-assigned. And since assign/de-assign happens in dom0, 'notify-send' 
is called there. It seems clumsy that dom0 calls back 'storage' to run 
'notify-send' there, but if this is the only working option in Q4 - I'll do it. 
Will try it on next Q4 run

  Tom

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/5f1c1c39-b396-4ae0-ad33-abdd6187b183%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] /usr/bin/notify-send does not work when invoked via qubes-rpc

2019-04-21 Thread unman
On Sun, Apr 21, 2019 at 06:50:06AM -0700, tom...@gmail.com wrote:
> Hi all,
> 
> I struggle to get something that's working in Q3.2 also in Qubes4:
> 
> - I need to display message from AppVm on the screen (via notify-send in 
> dom0) and do it via qubes-rpc executed in AppVm "storage". rpc procedure is 
> named 'storage.log'
> - allow policy in dom0:
>   > cat /etc/qubes-rpc/policy/storage.log:
>   > storage dom0 allow
>   > $anyvm $anyvm deny
> - procedure:
>   > cat /etc/qubes-rpc/storage.log
>   > #!/usr/bin/bash
>   > 
>   > read message
>   > /usr/bin/notify-send "$message"
> 
> RPC is called this way in appvm 'storage':
>   > echo 'message from vm'|qrexec-client-vm dom0 storage.log
> 
> What happens:
> - In Q3.2 this works since years
> - In Q4 action is executed, but nothing is displayed on screen. Action is 
> actually executed-in journalctl I see 'storage.log' is allowed, and if I add 
> 'echo $message|systemd-cat' that message is logged also.
> 
> 
> - If its run in dom0, message is displayed on the screen:
>   > echo 'dom0 message'|/etc/qubes-rpc/storage.log
> 
> 
> It seems like /usr/bin/notify-send does nothing when invoked via RPC.
> 
> Any ideas?
> 

Can I ask why you want to do this?
Why dont you just call notify-send in the qube? 
What is the advantage of using a qubes-rpc call here?

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20190422020659.u7d5by5wffuzmy4m%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] /usr/bin/notify-send does not work when invoked via qubes-rpc

2019-04-21 Thread tomhet
Hi all,

I struggle to get something that's working in Q3.2 also in Qubes4:

- I need to display message from AppVm on the screen (via notify-send in dom0) 
and do it via qubes-rpc executed in AppVm "storage". rpc procedure is named 
'storage.log'
- allow policy in dom0:
  > cat /etc/qubes-rpc/policy/storage.log:
  > storage dom0 allow
  > $anyvm $anyvm deny
- procedure:
  > cat /etc/qubes-rpc/storage.log
  > #!/usr/bin/bash
  > 
  > read message
  > /usr/bin/notify-send "$message"

RPC is called this way in appvm 'storage':
  > echo 'message from vm'|qrexec-client-vm dom0 storage.log

What happens:
- In Q3.2 this works since years
- In Q4 action is executed, but nothing is displayed on screen. Action is 
actually executed-in journalctl I see 'storage.log' is allowed, and if I add 
'echo $message|systemd-cat' that message is logged also.


- If its run in dom0, message is displayed on the screen:
  > echo 'dom0 message'|/etc/qubes-rpc/storage.log


It seems like /usr/bin/notify-send does nothing when invoked via RPC.

Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/a3bfbe56-9408-4253-be6f-87bb0e244345%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.