Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-13 Thread cyrinux
Hi,
Very interesting.
Which template do you use?
I try to get this working with a fedora 25 based appvm and pulseaudio start yet.
Could you please do a summary?
Thanks a lot guys

-- 
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/ca78daf1-74b2-46f7-add1-3f937d160034%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-13 Thread daltong defourne
Okay, after a bit of fiddling I have managed to disable it in "app vms of 
choice" by simply placing a config that only has 

[Desktop Entry] 
OnlyShowIn=X-TemplateVM;

in "override" directory (~/.config/autostar) for pulseaudio

However, templates that have startup parameters for both pulseaudio and 
qubes-pulseaudio need both overriden as separate entries 

Thanks a huge lot!
You fellows rule!
On Wednesday, July 12, 2017 at 5:34:15 PM UTC+3, Noor Christensen wrote:
> On Wed, Jul 12, 2017 at 06:17:53AM -0700, daltong defourne wrote:
> > On Wednesday, July 12, 2017 at 3:04:44 AM UTC+3, Salmiakki wrote:
> > > Putting a name in there did not work for me but going to an AppVM and 
> > > doing this:
> > > mkdir ~/.config/autostart
> > > cp /etc/xdg/autostart/pulseaudio.desktop ~/.config/autostart/
> > > 
> > > and adding X-GNOME-Autostart-enabled=false
> > > to that worked!
> > 
> > Hi!
> > Tried that (X-GNOME-Autostart-enabled=false) and pulse still starts
> > 
> > Does it have to be the only line there (I mostly kept the original
> > content)
> > 
> > I also tried doing those manipulations with qubes-pulseaudio.desktop
> > file, to no result 
> 
> I don't know what the X-GNOME-Autostart-enabled does, but here's a short
> summary on how to use the "ShowIn" XDG fields.
> 
> You can provide multiple values for this field. For example, if you only
> want the application to run on AppVMs and DisposableVMs:
> 
> > [Desktop Entry]
> > OnlyShowIn=X-AppVM;X-DisposableVM;
> 
> The "ShowIn" field can also be negated. For example, if you want an
> application to never run in a TemplateVM but anywhere else:
> 
> > [Desktop Entry]
> > NotShowIn=X-TemplateVM;
> 
> From /etc/qubes/autostart/README.txt:
> 
> > This mechanism overrides only content of /etc/xdg/autostart, files
> > placed in ~/.config/autostart are unaffected, so can be used to
> > override settings per-VM basis.
> 
> It is suggested to use ~/.config/autostart if you need to override anything 
> for
> a specific VM. In your case, I guess you want something like the following...
> 
>   # In TemplateVM
>   # /etc/qubes/autostart/qubes-pulseaudio.desktop.d/30_qubes.conf:
> 
>   [Desktop Entry]
>   NotShowIn=X-QUBES;
> 
> On each AppVM you want to enable this application for, create:
> 
>   # ~/.config/autostart/qubes-pulseaudio.desktop.d/30_qubes.conf
> 
>   [Desktop Entry]
>   OnlyShowIn=X-AppVM;
>   NotShowIn=
> 
> Possibly you can skip "OnlyShowIn" and just clear the "NotShowIn" value.
> 
> I have found the following Qubes-specific identifiers so far, partly from an
> earlier qubes-users thread[0]:
> 
>   X-QUBES Seems to match any type of Qubes VM
> 
>   X-AppVM Any VM except TemplateVM, ProxyVM, NetVM
>   X-NetVM
>   X-ProxyVM
>   X-TemplateVM
>   X-DisposableVM
>   X-UpdateableVM  TemplateVM or StandaloneVM
>   X-NonUpdateableVM   Any VM except UpdateableVM
> 
> Also, here are some non-Qubes identifiers I've seen elsewhere:
> 
>   GNOME
>   KDE
>   MATE
>   Unity
>   Cinnamon
> 
> I am not aware of any way to specify a VM name in this context. Maybe because
> /etc/xdg/autostart is only relevant for a TemplateVM. And when you get to your
> custom files in ~/.config/autostart you are already in a specific VM so no 
> need
> to specify it there.
> 
> If you really want to do it on the TemplateVM and no config on AppVM, I guess
> you could put something in /rw/config/rc.local that only runs if $HOST 
> variable
> matches your VM name.
> 
> [0]  https://groups.google.com/forum/#!topic/qubes-users/smztkltkwOg
> 
> -- noor
> 
> |_|O|_|
> |_|_|O|  Noor Christensen  
> |O|O|O|~ 0x401DA1E0

-- 
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/835b448b-50ad-469c-a365-fb0e1401dda1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-12 Thread Noor Christensen
On Wed, Jul 12, 2017 at 06:17:53AM -0700, daltong defourne wrote:
> On Wednesday, July 12, 2017 at 3:04:44 AM UTC+3, Salmiakki wrote:
> > Putting a name in there did not work for me but going to an AppVM and doing 
> > this:
> > mkdir ~/.config/autostart
> > cp /etc/xdg/autostart/pulseaudio.desktop ~/.config/autostart/
> > 
> > and adding X-GNOME-Autostart-enabled=false
> > to that worked!
> 
> Hi!
> Tried that (X-GNOME-Autostart-enabled=false) and pulse still starts
> 
> Does it have to be the only line there (I mostly kept the original
> content)
> 
> I also tried doing those manipulations with qubes-pulseaudio.desktop
> file, to no result 

I don't know what the X-GNOME-Autostart-enabled does, but here's a short
summary on how to use the "ShowIn" XDG fields.

You can provide multiple values for this field. For example, if you only
want the application to run on AppVMs and DisposableVMs:

> [Desktop Entry]
> OnlyShowIn=X-AppVM;X-DisposableVM;

The "ShowIn" field can also be negated. For example, if you want an
application to never run in a TemplateVM but anywhere else:

> [Desktop Entry]
> NotShowIn=X-TemplateVM;

>From /etc/qubes/autostart/README.txt:

> This mechanism overrides only content of /etc/xdg/autostart, files
> placed in ~/.config/autostart are unaffected, so can be used to
> override settings per-VM basis.

It is suggested to use ~/.config/autostart if you need to override anything for
a specific VM. In your case, I guess you want something like the following...

# In TemplateVM
# /etc/qubes/autostart/qubes-pulseaudio.desktop.d/30_qubes.conf:

[Desktop Entry]
NotShowIn=X-QUBES;

On each AppVM you want to enable this application for, create:

# ~/.config/autostart/qubes-pulseaudio.desktop.d/30_qubes.conf

[Desktop Entry]
OnlyShowIn=X-AppVM;
NotShowIn=

Possibly you can skip "OnlyShowIn" and just clear the "NotShowIn" value.

I have found the following Qubes-specific identifiers so far, partly from an
earlier qubes-users thread[0]:

X-QUBES Seems to match any type of Qubes VM

X-AppVM Any VM except TemplateVM, ProxyVM, NetVM
X-NetVM
X-ProxyVM
X-TemplateVM
X-DisposableVM
X-UpdateableVM  TemplateVM or StandaloneVM
X-NonUpdateableVM   Any VM except UpdateableVM

Also, here are some non-Qubes identifiers I've seen elsewhere:

GNOME
KDE
MATE
Unity
Cinnamon

I am not aware of any way to specify a VM name in this context. Maybe because
/etc/xdg/autostart is only relevant for a TemplateVM. And when you get to your
custom files in ~/.config/autostart you are already in a specific VM so no need
to specify it there.

If you really want to do it on the TemplateVM and no config on AppVM, I guess
you could put something in /rw/config/rc.local that only runs if $HOST variable
matches your VM name.

[0]  https://groups.google.com/forum/#!topic/qubes-users/smztkltkwOg

-- noor

|_|O|_|
|_|_|O|  Noor Christensen  
|O|O|O|  n...@fripost.org ~ 0x401DA1E0

-- 
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/20170712143408.zcy4mqte7g3bcvpi%40mail.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-12 Thread daltong defourne
Hi!
Tried that (X-GNOME-Autostart-enabled=false) and pulse still starts


Does it have to be the only line there (I mostly kept the original content)

I also tried doing those manipulations with qubes-pulseaudio.desktop file, to 
no result 


On Wednesday, July 12, 2017 at 3:04:44 AM UTC+3, Salmiakki wrote:
> I liked this idea, so I wanted to try.
> 
> This seems to work:
> 
> in /etc/qubes/autostart/qubes-pulseaudio.desktop.d/30_qubes.conf 
> put this:
> 
> [Desktop Entry]
> OnlyShowIn=X-AppVM;
> 
> Now only AppVMs have audio.
> Putting a name in there did not work for me but going to an AppVM and doing 
> this:
> mkdir ~/.config/autostart
> cp /etc/xdg/autostart/pulseaudio.desktop ~/.config/autostart/
> 
> and adding X-GNOME-Autostart-enabled=false
> to that worked!

-- 
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/ce1b0357-30ad-4322-aad7-c4c8f3fb2476%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-11 Thread Salmiakki
I liked this idea, so I wanted to try.

This seems to work:

in /etc/qubes/autostart/qubes-pulseaudio.desktop.d/30_qubes.conf 
put this:

[Desktop Entry]
OnlyShowIn=X-AppVM;

Now only AppVMs have audio.
Putting a name in there did not work for me but going to an AppVM and doing 
this:
mkdir ~/.config/autostart
cp /etc/xdg/autostart/pulseaudio.desktop ~/.config/autostart/

and adding X-GNOME-Autostart-enabled=false
to that worked!

-- 
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/0d5e11a0-c204-4709-9f8a-9e863b1c79ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-11 Thread Salmiakki
And according to the README in /etc/qubes/autostart you can override everything 
from within the VM using ~/.config/autostart:

> This mechanism overrides only content of /etc/xdg/autostart, files placed in
> ~/.config/autostart are unaffected, so can be used to override settings per-VM
> basis.

-- 
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/22de68fc-a670-43ad-94a5-66b9dadef72c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-11 Thread Salmiakki
On Wednesday, 12 July 2017 00:58:11 UTC+2, daltong defourne  wrote:

> Is it possible to do this on a per-app-VM basis and not on a per-template 
> basis?
> 

> > TemplateVMs. There is a "OnlyShowIn" that can be used to define in what VMs
> > the application should autostart, either **by name** or type
> > (appvm/templatevm etc).

Shouldn't that cover your use-case?

-- 
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/06883438-8a36-47a4-96fe-7aef9ca8433c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-11 Thread daltong defourne
Thanks!

Is it possible to do this on a per-app-VM basis and not on a per-template basis?

On Tuesday, July 11, 2017 at 12:37:49 PM UTC+3, Noor Christensen wrote:
> On Tue, Jul 11, 2017 at 01:40:34AM -0700, daltong defourne wrote:
> > All other commands in rc. local are executed as expected, so it's not
> > a rc.local issue per se, but rather maybe something like pulseaudio
> > startup thing.
> > 
> > Any pointers as to how to reliably "de-pulse-ize" VMs at startup?
> > 
> > P.S.: uninstalling pulseaudio from template breaks things for me on
> > several VMs and is not an option.
> 
> You might want to take a look at /etc/qubes/autostart directory in your
> TemplateVMs. There is a "OnlyShowIn" that can be used to define in what VMs
> the application should autostart, either by name or type
> (appvm/templatevm etc).
> 
> Check the README.txt in that directory for some guidelines, and look at
> the existing files for examples.
> 
> -- noor
> 
> |_|O|_|
> |_|_|O|  Noor Christensen  
> |O|O|O|  

-- 
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/85d68d55-909f-4e1c-8b1e-6b1ccf05f336%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-11 Thread Noor Christensen
On Tue, Jul 11, 2017 at 01:40:34AM -0700, daltong defourne wrote:
> All other commands in rc. local are executed as expected, so it's not
> a rc.local issue per se, but rather maybe something like pulseaudio
> startup thing.
> 
> Any pointers as to how to reliably "de-pulse-ize" VMs at startup?
> 
> P.S.: uninstalling pulseaudio from template breaks things for me on
> several VMs and is not an option.

You might want to take a look at /etc/qubes/autostart directory in your
TemplateVMs. There is a "OnlyShowIn" that can be used to define in what VMs
the application should autostart, either by name or type
(appvm/templatevm etc).

Check the README.txt in that directory for some guidelines, and look at
the existing files for examples.

-- noor

|_|O|_|
|_|_|O|  Noor Christensen  
|O|O|O|  n...@fripost.org ~ 0x401DA1E0

-- 
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/20170711093746.qds3rradyiffsxfk%40mail.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


[qubes-users] Completely disabling pulse audio (playback and record) in service VMs that don't need sound

2017-07-11 Thread daltong defourne
Hi!

Basically, I want to disable pulseaudio for stuff like firewall VM and VPN VM 
and the like.

They don't need it and it makes pavucontrol pannel a mess.

I tried just doing a 

sudo pactl exit

in terminal of VMs that don't need sound and it works like a charm

HOWEVER

inserting a 
pactl exit
line into 
/rw/config/rc.local
has no effect pulse still starts after reboot and the VM is still seen in 
pavucontrol)

All other commands in rc. local are executed as expected, so it's not a 
rc.local issue per se, but rather maybe something like pulseaudio startup thing.

Any pointers as to how to reliably "de-pulse-ize" VMs at startup?

P.S.: uninstalling pulseaudio from template breaks things for me on several VMs 
and is not an option.

-- 
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/fc1b638f-66c6-4a52-8412-31121dd00ce2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.