Re: [qubes-users] Re: How to recover Qubes when keyboard / mice is dysfunctional due to USB qube setup issues?

2017-09-27 Thread Ron Hunter-Duvar

On 09/27/2017 11:35 AM, Yethal wrote:

W dniu środa, 27 września 2017 14:08:56 UTC+2 użytkownik Patrick Schleizer 
napisał:

cooloutac:

On Sunday, September 24, 2017 at 12:23:39 PM UTC-4, cooloutac wrote:

On Sunday, September 24, 2017 at 12:23:23 PM UTC-4, cooloutac wrote:

On Sunday, September 24, 2017 at 9:25:24 AM UTC-4, Patrick Schleizer wrote:

Quote from https://www.qubes-os.org/doc/usb/


Caution: By assigning a USB controller to a USB qube, it will no

longer be available to dom0. This can make your system unusable if, for
example, you have only one USB controller, and you are running Qubes off
of a USB drive.

How can one recover from such a situation if there is no PS2
keyboard/mice available?

I guess... Unless there is a better way...? Boot the system using from
an external disk using a USB recovery operating system... Then modify
the local disk (with broken Qubes)... Then do what?

Cheers,
Patrick

ya that. exactly.

that would be the only way I would know of.

sorry i misunderstood.  you could use the qubes keyboard proxy.  or unhide it 
from dom0.  think they are both explained in the docs there, but don't think 
either are recommended but if you have no choice.


The Qubes documentation explains how to hide/unhide it with the gui. But
when the disk is not booted (for recovery booted from USB), the gui
cannot be used since it refers to the USB booted and not internal disk
supposed to be recovered.

To undo it some file on the internal disk needs to be modified. Which
files needs what modification?

Remove rd.qubeshideallusb parameter from grub and then rebuild grub

Incidentally, I believe that messing up the sys-usb setup, losing 
keyboard & mouse, and recovering from it is how I eventually made my 
system unbootable. That plus intervening updates and other tweaks.


So not sure I have much to add on how to do it properly. But maybe 
serves as a cautionary tale.


I used an old ps/2 keyboard to get control of the system again (no 
mouse), and get the USB controller I had my main keyboard and my mouse 
on assigned back to dom0 again (thankfully I have several controllers on 
this motherboard, with keyboard, mouse and nothing else on one of them).


I got it working, but I think I messed up something on sys-usb. From 
time to time after that I would get a kernel panic starting sys-usb 
during boot. Then after a recent dom0 update, I got a "non-system disk 
or disk error" BIOS error and that was it. Couldn't get it properly 
recovered.


So I booted from a Ubuntu live USB, mounted the Qubes partitions, copied 
everything off to a backup USB hard drive, then did a clean reinstall of 
Qubes. After the reinstall, I've been more careful in setting up 
sys-usb, and it's working fine so far.


Ron

--
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/54af4c88-0887-3e44-1b6b-0a27e4df25ee%40shaw.ca.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] How to recover VMs copied before reinstall?

2017-09-27 Thread Ron Hunter-Duvar

On 09/26/2017 09:36 AM, Ron Hunter-Duvar wrote:

On September 26, 2017 9:20:57 AM MDT, 'One7two99' via qubes-users 
 wrote:

Hello Ron,


 Original Message 
Subject: Re: [qubes-users] How to recover VMs copied before

reinstall?

Local Time: 26 September 2017 4:58 PM
From: ro...@shaw.ca

[...] I want to access my existing ones from the previous install,

not create new ones. I put a lot of hours into getting them set up the
way I wanted them, and they contain important data I don"t want to
lose. [...]

I am also building all sys- / template- and App-VMs based on the
available templates in Qubes. As I would like to rollout Qubes for
friends and maybe also co-workers I have documented each step when
configuring/provisioning new AppVMs or templates.

I've written a handful scripts which will take the default
qubes-templates and apply all updates / packe installation and
post-configuration tasks without user interaction.
This reduces time rebuilding the system but also allows another backup
policy where I only store the data and reinstall everything else from
my scripts.

If you're interested I can forward them to you.

[799]

I'm not sure if that will help, but I'll take a look. If I can at least get my 
files into new appvms of the same name, it would do the trick.

Thanks,
Ron
Turns out there's an easy way to restore my files and firewall settings. 
Here's what I did for each VM:


1. Create a new appvm of the same name and type as the old one (with the 
old ones in a different location of course).


2. Start then stop the appvm (to ensure it's properly initialized).

3. Copy the firewall.xml, private.img and volatile.img files from the 
old one to the new one.


4. Start the appvm, and everything's back where it should be (other than 
menu customizations, and possibly previously installed apps).


I don't know if all these steps are required (particularly #2, and both 
img files in #3), but the recipe works, so I'm sticking with it.


The hardest part was actually restoring the old appvm files, given the 
deliberate roadblocks to moving files into dom0.


Thanks,
Ron

--
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/7f668487-dfa8-7fef-26be-6f3604912ed0%40shaw.ca.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Re: Privacy in Qubes

2017-09-27 Thread Drew White
On Wednesday, 27 September 2017 01:45:09 UTC+10, Sven Semmler  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> On 09/25/2017 09:10 PM, Drew White wrote:
> > Debian, Slackware, CentOS, Windows 3.11,95,98,2000,xp,7,8,10 (32
> > and 64 bit versions of available). I run OSX, ESXi, PFSense,
> > Android 4, 5, 6, 7, Qubes 1,2,3, XEN, PASOS, COFFEE, OS/2,
> 
> why? (just curious, maybe off topic for this list)
> 
> /Sven

I'm a developer. A coder. A Programmer. Whatever you want to use as terminology.
Not to mention I like my privacy online. So I confuse things by using many 
different O/S.

Many different means that if a site will not work in one O/S or Browser, I can 
easily change.

-- 
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/004d5ac1-8f83-4d3c-b3f8-5ee875c2f88d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] auto-restarting nm-applet (on 3.2)

2017-09-27 Thread Holger Levsen
Hi,

I've just realized that (almost) everytime after my laptop resumes, I run
qvm-run sys-net "killall nm-applet ; nm-applet" manually and that's a bit silly,
so I want to automate this this workaround (certainly hoping nm-applet will
behave better in 4.0…) so I wonder if there's a better way than editing
/usr/lib64/pm-utils/sleep.d/51qubes-suspend-netvm ?


-- 
cheers,
Holger

-- 
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/20170927232611.55syus3nyqr43dmx%40layer-acht.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


[qubes-users] Re: Privacy in Qubes

2017-09-27 Thread Drew White
On Wednesday, 27 September 2017 10:04:58 UTC+10, Person  wrote:
> On Tuesday, September 19, 2017 at 11:02:50 AM UTC+8, Person wrote:
> > Let's say you have an online identity that you want to keep separate from 
> > your personal information. On Qubes, is it possible to keep i information 
> > completely separate without physical separation? I have considered using a 
> > separate OS virtualized in Qubes, but it may possibly leak the same device 
> > data. Multibooting with Qubes is also not the safest idea. 
> > 
> > What is the best way to keep online information from being traced back to 
> > you on Qubes?
> 
> Oh, okay. Can this issue can be minimized on Tor or other certain types of 
> browsers? Would a certain VPN work? (I normally distrust VPNs, and certain 
> ones don't work well with Tor, so I probably will not use VPNs.)


TOR merely anonomises you and your location, anything that can be seen from the 
browser and the interaction of the webpage to the server and vice-versa can 
still be seen and detected.

The User Agent doesn't give too much information, but it is advisable to alter 
it to be what you want to show what you want.

IF you want to see what else they can find out, have a look ingot the 
javascript BROWSER object.

VPNs are more for security.
If I'm on an insecure network with my laptop, I will VPN to my home network and 
thus have an encrypted connection out from the insecure network that I don't 
trust.

Also, I have VPN available so that if I need to connect to a server at my 
house, then I can VPN in and do what I need to without having other ports 
exposed to the outside world.

If you VPN, you can then TOR through the VPN. That will create another layer of 
security.
I have multiple locations where I can VPN to that I know and trust. Through one 
VPN I can TOR out to then create a VPN through that TOR tunnel to another 
location and TOR through that.

It hides my location and keeps data encrypted as best it can, but what they can 
find out about me is always going to be minimal, but determinable.

Thus I have multiple VMs for many things. One for one website, one for 
another.. That way, they can't connect the 2 using the browser data. Only by my 
external IP, which keeps changing because of TOR and such, unless I trust the 
site and connect directly to it.

This is why I block many advertising websites. I block and don't use FaceBook, 
I don't use Twitter or Instagram or any of those things.

I only use Google for Apps and even block most of Googles invasion stuff.

So I have many things that I am doing to protect myself.

In browsers (FF BASED), I run NoScript. I also use the Web Developer Toolbar 
and User Agent Switcher from Chris, and FireBug. It's a standard Setup for me.
It allows me to run only what locations I want scripts to run from.

-- 
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/4252d513-1783-4160-9914-e4eb0fb192dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Error Creating Ubuntu VM in Qubes 3.2

2017-09-27 Thread Person
On Sunday, September 24, 2017 at 10:24:25 AM UTC+8, Person wrote:
> I believe I downloaded to [sys-net] Downloads. I can find the file easily if 
> I just go to sys-net and click "Files".
> 
> However, I can't find the terminal you are speaking of in sys-net 
> specifically. I tried it on dom0 instead, but it doesn't work.

Is there any other way to install the server, or should I download a different 
operating system on the QVM instead?

-- 
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/7ce4f055-f43f-4df9-95ae-fdf5188e3615%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] How to script the creation of templates (Was: How to recover VMs copied before reinstall?)

2017-09-27 Thread Ron Hunter-Duvar

Thanks, 799, I'll take a look at them when I get a chance.

Ron


On 09/27/2017 03:52 AM, 'One7two99' via qubes-users wrote:

Hello Ron,

Me:
>> I've written a handful scripts which will take the default
>> qubes-templates and apply all updates / packe installation and
>> post-configuration tasks without user interaction.
>> This reduces time rebuilding the system but also allows another backup
>> policy where I only store the data and reinstall everything else from
>> my scripts.
>> If you"re interested I can forward them to you.

Ron:
> I"m not sure if that will help, but I"ll take a look. If I can at 
least get my files into new

> appvms of the same name, it would do the trick.

Here is a script I am using to rebuild my work-template, which is 
based on a fedora template.
The scripts allows me to install a Qubes 3.2 default and then run all 
commands to add a new template, update it, install additional packages 
and even installs some software (here only the VMware Horizon View 
Client) which is not available in the default repositories.


There is some "overhead" in the script as I'd like to run it even 
after having it done once.
As such it will also remove any existing VM with the same name 
(qvm-destroy).

qvm-destroy is another scripts:
[content of qvm-destroy]

#!/bin/bash
# Kill a running AppVM and remove it
# Usage: qvm-destroy 
echo "Killing VM: $1"
qvm-kill $1
echo "Removing VM: $1"
qvm-remove $1
echo "Waiting for 5s (just to be sure)"
sleep 5s

[content of my create-t-fedora-25-work.sh]
#!/bin/bash
templatebasevm=fedora-25
worktemplatevm=t-fedora-25-work
internetvm=my-untrusted

# Install minimal Fedora 25 template
sudo qubes-dom0-update qubes-template-$templatebasevm

# Remove existing Template VM
./qvm-destroy $worktemplatevm

echo "Clone template to $worktemplatevm"
qvm-clone $templatebasevm $worktemplatevm
# Hide original template
qvm-prefs -s $templatebasevm internal true

echo Launch new template-vm $worktemplatevm
qvm-start --skip-if-running --tray $worktemplatevm
echo "Wait for 10sec until Template VM is up"
sleep 10s
echo "Install updates and additional applications in $worktemplatevm"
qvm-run $worktemplatevm 'xterm -e "sudo dnf -y update && \
   sudo dnf -y install mc nano pass libreoffice gimp && \
   sudo dnf -y install gstreamer gstreamer-plugins-base libffi 
libpng12 libXSrnSaver"'

echo "Wait until all packages have been installed."
read -p "Press Enter to continue"

# Download VMware Horizon View
echo "Starting $internetvm to download Horizon View"
qvm-start --tray $internetvm
sleep 10s
# FIXME: the qvm-copy-to-vm has the name of the target template 
($worktemplatevm)

# hardcoded, as I didn't find a way to use the variable within this line
qvm-run $internetvm 'xterm -e "cd /home/user && wget 
https://download3.vmware.com/software/view/viewclients/CART17Q2/VMware-Horizon-Client-4.5.0-5650368.x64.bundle 
&& \
 mv VMware-Horizon-Client-4.5.0-5650368.x64.bundle 
VMware-Horizon-Client-4.5.0.bundle && \
 qvm-copy-to-vm t-fedora-25-work 
VMware-Horizon-Client-4.5.0.bundle && \

 sleep 10s"'
echo "(qvm-)Copy file VMware-Horizon-Client-4.5.0.bundle from 
$internetvm to $worktemplatevm"

read -p "Press Enter to continue"

# Install VMware Horizon View
qvm-run $worktemplatevm 'xterm -e "chmod +x 
~/QubesIncoming/my-untrusted/VMware-Horizon-Client-4.5.0.bundle && \
 sudo 
~/QubesIncoming/my-untrusted/VMware-Horizon-Client-4.5.0.bundle && \
 rm 
/QubesIncoming/my-untrusted/VMware-Horizon-Client-4.5.0.bundle && \

 shutdown -h now"'

You'll find this and also other scripts I use to rebuild my templates 
and appvms in the attached archive.

Any improvements are welcome.

I'll try to think if I'll add something like backing up the private 
image file and adding it when rebuilding an appvm makes sense.


[799]
--
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/gWaGUcU_dTBx_dZOXjYj1jHab3dHrtOWk8Fmxg5g7QQlxozzrnywgGdlGro9pnagdfywJ_ztlIwlzboaU6WOrWNCusCjuDdad6jNfkr5z4Q%3D%40protonmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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 emai

Re: [qubes-users] Re: How to recover Qubes when keyboard / mice is dysfunctional due to USB qube setup issues?

2017-09-27 Thread Yethal
W dniu środa, 27 września 2017 14:08:56 UTC+2 użytkownik Patrick Schleizer 
napisał:
> cooloutac:
> > On Sunday, September 24, 2017 at 12:23:39 PM UTC-4, cooloutac wrote:
> >> On Sunday, September 24, 2017 at 12:23:23 PM UTC-4, cooloutac wrote:
> >>> On Sunday, September 24, 2017 at 9:25:24 AM UTC-4, Patrick Schleizer 
> >>> wrote:
>  Quote from https://www.qubes-os.org/doc/usb/
> 
> > Caution: By assigning a USB controller to a USB qube, it will no
>  longer be available to dom0. This can make your system unusable if, for
>  example, you have only one USB controller, and you are running Qubes off
>  of a USB drive.
> 
>  How can one recover from such a situation if there is no PS2
>  keyboard/mice available?
> 
>  I guess... Unless there is a better way...? Boot the system using from
>  an external disk using a USB recovery operating system... Then modify
>  the local disk (with broken Qubes)... Then do what?
> 
>  Cheers,
>  Patrick
> >>>
> >>> ya that. exactly.
> >>
> >> that would be the only way I would know of.
> > 
> > sorry i misunderstood.  you could use the qubes keyboard proxy.  or unhide 
> > it from dom0.  think they are both explained in the docs there, but don't 
> > think either are recommended but if you have no choice.
> > 
> 
> The Qubes documentation explains how to hide/unhide it with the gui. But
> when the disk is not booted (for recovery booted from USB), the gui
> cannot be used since it refers to the USB booted and not internal disk
> supposed to be recovered.
> 
> To undo it some file on the internal disk needs to be modified. Which
> files needs what modification?

Remove rd.qubeshideallusb parameter from grub and then rebuild grub

-- 
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/e5aee8f4-3af5-43f9-8ad0-4cfcd5be72bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] 4.0-rc1 - No 'qvm-trim-template'?

2017-09-27 Thread Holger Levsen
On Tue, Aug 15, 2017 at 07:28:58AM +0200, Graumann, Johannes wrote:
> Can anyone enlighten me why 4.0-rc1 does not (yet?) have
> 'qvm-trim-template'? Is this not yet implemented or not needed any longer
> given the new infrastructure?

I'm curious about this as well. 
There is https://github.com/QubesOS/qubes-issues/issues/3033 also about this
issue, without a real reply, but hinting this is a missing feature currently.


-- 
cheers,
Holger

-- 
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/20170927131129.j5edeqhvm7ue5x6k%40layer-acht.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: [qubes-users] Re: How to recover Qubes when keyboard / mice is dysfunctional due to USB qube setup issues?

2017-09-27 Thread Patrick Schleizer
cooloutac:
> On Sunday, September 24, 2017 at 12:23:39 PM UTC-4, cooloutac wrote:
>> On Sunday, September 24, 2017 at 12:23:23 PM UTC-4, cooloutac wrote:
>>> On Sunday, September 24, 2017 at 9:25:24 AM UTC-4, Patrick Schleizer wrote:
 Quote from https://www.qubes-os.org/doc/usb/

> Caution: By assigning a USB controller to a USB qube, it will no
 longer be available to dom0. This can make your system unusable if, for
 example, you have only one USB controller, and you are running Qubes off
 of a USB drive.

 How can one recover from such a situation if there is no PS2
 keyboard/mice available?

 I guess... Unless there is a better way...? Boot the system using from
 an external disk using a USB recovery operating system... Then modify
 the local disk (with broken Qubes)... Then do what?

 Cheers,
 Patrick
>>>
>>> ya that. exactly.
>>
>> that would be the only way I would know of.
> 
> sorry i misunderstood.  you could use the qubes keyboard proxy.  or unhide it 
> from dom0.  think they are both explained in the docs there, but don't think 
> either are recommended but if you have no choice.
> 

The Qubes documentation explains how to hide/unhide it with the gui. But
when the disk is not booted (for recovery booted from USB), the gui
cannot be used since it refers to the USB booted and not internal disk
supposed to be recovered.

To undo it some file on the internal disk needs to be modified. Which
files needs what modification?

-- 
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/edcf8c23-7748-4931-aff6-16512e22010c%40riseup.net.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] 4.0-rc1: qvm- remove incomplete (?) - All qubes functionality (qubesd) down as a result

2017-09-27 Thread Johannes Graumann
Gentlepeople,

I recently managed to install the community whonix templates into my
4.0 setup and have since been striving to recreate the arrangements of
proxyvms etc. I ran in 3.2.

In this process I erroneously create a vm called 'sys-whonix-gw', using
the whonix-gw template. I proceeded to remove this vm using 'qvm-
remove' and ever since all qubes functionality does not come up at
reboot. Investigating the output of 'systemctl status qubesd' et al, I
became aware of an error thrown that reports 'sys-whonix-gw' as missing
... apparently there are remnants of that vm left in the system despite
me calling 'qvm-remove'. 

Short of a reinstall, is there anything I can do to rescue this
situation?

Thanks for any pointers.

Sincerely, Joh

-- 
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/1506511160.8970.41.camel%40graumannschaft.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] missing commands/options for scripting in Qubes OS (3.2)

2017-09-27 Thread 'One7two99' via qubes-users
Hello Johannes,

>  Original Message 
> Subject: Re: [qubes-users] missing commands/options for scripting in Qubes OS 
> (3.2)
> Local Time: September 27, 2017 1:09 PM
> From: nonse...@graumannschaft.org
>
> I strongly second these requests - the "qvm-shutdown --skip-if-not-
> running" can in fact be found in this mailing list as an earlier
> request from myself.
> My entire qubes setup is ansible maintained and making scripting easier
> as proposed here would cut out many lines of code.

I am very interested at what kind of tasks you've automated or try to script, 
also to shae possible good approachs to do so.
I have very basic scripting skills but if done right investing time in scripts 
will most time  pay off.
Would like to see this stuff shared here or within the documentation.

[799]

-- 
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/KR4mI9O2oc9plhVYNuw5gyGsMkTbDwiqYG2xF25qLolpfaPYYlG5kywZkFwEP-JhIiqxliltjBmfqcz3T1oqe6186Yi_CHoK3JWQ-1Hke-Q%3D%40protonmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] missing commands/options for scripting in Qubes OS (3.2)

2017-09-27 Thread Johannes Graumann
On Wed, 2017-09-27 at 06:12 -0400, 'One7two99' via qubes-users wrote:
> Hello,
> 
> while trying to script some basic tasks I found out that I am missing
> some small features in the qvm-* scripts, I have looked at the code
> of those script but it is to hard for me to understand exactly what
> needs to be done to chance that.
> Here my ideas, maybe someone with more skills is able to do so:
> 
> *** qvm-shutdown ***
> should have an option like "skip-if-not-running", so that the command
> will not throw out the message "ERROR: VM already stopped"
> Another options should be "skip-if-not-exist"
> 
> *** qvm-restart ***
> will shutdown and restart a VM.
> should also have an option like "skip-if-not-running","start-if-not-
> running", "skip-if-not-exist" and "wait".
> (the usecase of those options are clear I guess :-)
> I've written a script and saved it to /usr/bin which is only shutting
> down and starting a VM, but not doing any error checking, nor does it
> offer further options:
> #! /bin/bash
> qvm-shutdown --force --wait $1
> qvm-start $1
> 
> *** qvm-destroy ***
> including options: "skip-if-not-exist" and "wait"
> Will kill a running VM and remove it (basically qvm-kill and then
> qvm-remove)
> 
> *** qvm-check ***
> should have two other options:
> qvm-check shutdown 
> qvm-check exists 
> 
> Another great feature would be if dom0 gets an information when a
> scripts has been finished in an AppVM if has been started via qvm-
> run:
> 
> currently I am forcing the user to monitor if a command has been
> finished:
> 
> qvm-run  'xterm -e " && '"
> echo "WARNING: Only continue if the former command has been finished
> (terminal windows has been closed)"
> read -p "Press Enter to continue"
> 
> Something like "--wait" would be great. I know that this might not be
> that easy, but I guess there could be a way that the AppVM
> communicates back to dom0.
> 
> Maybe some of this is covered in Qubes 4.x, this would also be nice
> to know, still I think it would also be great if this is available in
> Qubes 3.2
> 
> I
> [799]

I strongly second these requests - the 'qvm-shutdown --skip-if-not-
running' can in fact be found in this mailing list as an earlier
request from myself.
My entire qubes setup is ansible maintained and making scripting easier
as proposed here would cut out many lines of code.

Sincerely, Joh

-- 
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/1506510585.8970.34.camel%40graumannschaft.org.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] missing commands/options for scripting in Qubes OS (3.2)

2017-09-27 Thread 'One7two99' via qubes-users
Hello,

while trying to script some basic tasks I found out that I am missing some 
small features in the qvm-* scripts, I have looked at the code of those script 
but it is to hard for me to understand exactly what needs to be done to chance 
that.
Here my ideas, maybe someone with more skills is able to do so:

*** qvm-shutdown ***
should have an option like "skip-if-not-running", so that the command will not 
throw out the message "ERROR: VM already stopped"
Another options should be "skip-if-not-exist"

*** qvm-restart ***
will shutdown and restart a VM.
should also have an option like "skip-if-not-running","start-if-not-running", 
"skip-if-not-exist" and "wait".
(the usecase of those options are clear I guess :-)
I've written a script and saved it to /usr/bin which is only shutting down and 
starting a VM, but not doing any error checking, nor does it offer further 
options:
#! /bin/bash
qvm-shutdown --force --wait $1
qvm-start $1

*** qvm-destroy ***
including options: "skip-if-not-exist" and "wait"
Will kill a running VM and remove it (basically qvm-kill and then qvm-remove)

*** qvm-check ***
should have two other options:
qvm-check shutdown 
qvm-check exists 

Another great feature would be if dom0 gets an information when a scripts has 
been finished in an AppVM if has been started via qvm-run:

currently I am forcing the user to monitor if a command has been finished:

qvm-run  'xterm -e " && '"
echo "WARNING: Only continue if the former command has been finished (terminal 
windows has been closed)"
read -p "Press Enter to continue"

Something like "--wait" would be great. I know that this might not be that 
easy, but I guess there could be a way that the AppVM communicates back to dom0.

Maybe some of this is covered in Qubes 4.x, this would also be nice to know, 
still I think it would also be great if this is available in Qubes 3.2

I
[799]

-- 
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/U099ayZhHqpdAldGMfbBa8KeWkv_GQH2lxJCyJpXO9foVo25km7OkfxWbAeUMNKmuzKR34anWq0FC2gtSEMIVJq6I48zW5Rdpjr-TquOeV0%3D%40protonmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Re: External monitor not getting highest resolution

2017-09-27 Thread Markus Kilås
On 09/22/2017 09:38 AM, Markus Kilås wrote:
> On 09/20/2017 10:16 PM, yuraei...@gmail.com wrote:
>> On Wednesday, September 20, 2017 at 3:16:59 PM UTC, Markus Kilås wrote:
>>> On 09/08/2017 06:17 AM, Pagebao wrote:
 Same thing is happening to me since the last Dom0 update. My ultrawide 29" 
 LG external screen stopped working at the native 2560x1080 resolution and 
 instead is working at 1920x1080.
>>>
>>> Oh, that is interesting to know. I did not know this was a regression as
>>> I did not use external monitor before.
>>>

 I have a Lenovo Thinkpad T430s. I was using nouveau driver but the same 
 thing is happening with the integrated Intel graphic card.

 Fortunately I had a full backup from August 9 so, reinstalling Qubes 3.2 
 and  restoring Dom0 and all the VM the problem is, temporarily, fixed and 
 I have back 2560x1080 resolution.

 But the most maddening thing is that I tried several different distro 
 (Linux Mint 18.2, MX 16.0, Manjaro) and I have the same problem. Only 
 1920x1080px. In the previous 1.5 years I had no problem of resolution with 
 Qubes 3.2 and Linux Mint 18.1.

>>>
>>> So it could be more of generic Linux issue then? Some problem with
>>> certain kernel or nouveau versions perhaps?
>>>
 Tried cvt and xrandr --newmode and --addmode to no avail so far (no effect 
 on Qubes, screen blanked on Linux Mint).

 Again, any idea?>
 Thanks

>>>
>>> Anything else one can try to resolve this?
>>>
>>> Cheers,
>>> Markus
>>
>> Did you try going back to the previous kernel? The 4.9.35-20? or even the 
>> 4.4'ish version if its still in your system?> Also it may not be relevant as 
>> my problem with the new kernel
> (4.9.45-21) is of a seemingly very different nature (didn't boot due to
> wanting root account, whatever odd bug was causing that error). Albeit I
> never made it as far to see whether I lost my resolution as well while
> running the new kernel.
> 
> I believe I was on 4.9.35-20 and had the issue but will double check.
> 
>>
>> Assuming you haven't gone back to older kernels before, it's easy to do 
>> without uninstalling/installing anything. If you got Grub2 (Legacy Qubes 
>> install mode), then just change to the old kernel during early boot in 
>> Grub2's advance menu. If you boot up with UEFI/EFI then you need to change 
>> the default boot kernel in the /boot/efi/Qubes/xen.conf (somewhere there 
>> abouts. Be careful though, wrong settings will make your system unable to 
>> boot up).
>>
>> Obviously far easier to quickly change with Grub2, but it isn't much of a 
>> hassle either with editing the xen.cong file if you boot via the modern UEFI 
>> instead. Just be careful with the settings.
> 
> Thank you, this instructions are very helpful.
> 
> 
> I am using Grub2 and legacy boot so will try the different kernels on
> Tuesday when I am back in office and have access to the monitor.
> 
> 
>>
>> Also if it may be of any help, I run Qubes with 3840x2160, 4k resolution 
>> with kernel 4.9.35-20, nvidia/integrated Intel-M processor graphics, and 
>> XFCE4 as my DE. As mentioned earlier, I'm holding back on the current new 
>> Dom0 update with the 4.9.45-21, since it gives me boot issues. Furthermore, 
>> I have a lot of issues getting my HDMI TV back on my laptop after 
>> suspend/hibernation on my current older kernel. Also if I unplug the HDMI, 
>> etc. usually I need to go into "xfce4-display" and turn on the screen 
>> manually. Maybe its related to some of the black screen mentioned issues, 
>> albeit it might be different too.
>>
>> I'm afraid I can't try help with anything deeper if the problem still 
>> persists. Remember to make backups before experimenting with solutions 
>> though, it's such a pain to loose things...
>>
>> If kernels are a suspect, we should list our kernels in case we can find 
>> clues. Try throw "uname -r" in your Dom0 terminal to list it.
>>
> 
> Currently I have uname -a:
> Linux dom0 4.9.45-21.pvops.qubes.x86_64 #1 SMP Tue Aug 29 14:21:02 UTC
> 2017 x86_64 x86_64 x86_64 GNU/Linux
> 
> I will retry 4.9.45-20 and also try the oldest I have which is 4.9.35-19.

I have the issue with all three available kernels:
4.9.45-21
4.9.35-20
4.9.35-19

Is there a way to install older kernels?

I tried "sudo qubes-dom0-update --action=list kernel-qubes-vm" but those
are the only available.


Regards,
Markus

-- 
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/528f367a-6ef9-a586-f702-5187d58a7dd8%40xn--kils-soa.se.
For more options, visit https://groups.google.com/d/optout.