Disable lock screen / screenshot question

21 views
Skip to first unread message

Shawn Creighton

unread,
Dec 22, 2020, 12:26:22 PM12/22/20
to qubes-users
How do you disable the automatic screen lock? I have the screensaver disabled and the lock screen option unchecked but it still locks after a few minutes.

Also when using the screenshot function in system tools, is it possible to save to the AppVM file system you are currently using rather than to Dom0? Or how do I access it once it is saved to Dom0? 

Jarrah

unread,
Dec 22, 2020, 4:18:23 PM12/22/20
to qubes...@googlegroups.com

> How do you disable the automatic screen lock? I have the screensaver
> disabled and the lock screen option unchecked but it still locks after a
> few minutes.


For me, there is a "presentation mode" on the battery icon (which shows
on both desktop and laptop) that disables the screen lock.

> Also when using the screenshot function in system tools, is it possible to
> save to the AppVM file system you are currently using rather than to Dom0?
> Or how do I access it once it is saved to Dom0?


You should be able to get them to your AppVM using `qvm-copy-to-vm <vm
name> <filename>`  from the terminal.

haaber

unread,
Dec 23, 2020, 3:14:46 AM12/23/20
to qubes...@googlegroups.com
Better: create in dom0 a file containing:

#!/bin/bash
qvm-copy-to-vm $(zenity --entry --title='Send to VM' --text='Destination
VM') "${BASH_ARGV[@]}"


Save that as an executable script, such as "~/.local/bin/send-to-vm.sh".
Then, open dom0 file manager, right click any png, click open with other
application, and under "use a custom command" enter "send-to-vm.sh %s".
This "registers" the script in the application list.

Then, when you take a screenshot, instead of choosing "save", choose
"open with..." and see if your script shows up in the list of available
applications. If still not, you might have to write a simple .desktop
file in ~/.local/share/applications in order for it to show
up as an option.



Ulrich Windl

unread,
Dec 29, 2020, 1:02:25 PM12/29/20
to qubes...@googlegroups.com
On 12/23/20 9:14 AM, haaber wrote:
> On 12/22/20 10:18 PM, Jarrah wrote:
>>
>>> How do you disable the automatic screen lock? I have the screensaver
>>> disabled and the lock screen option unchecked but it still locks after a
>>> few minutes.
>>
>>
>> For me, there is a "presentation mode" on the battery icon (which shows
>> on both desktop and laptop) that disables the screen lock.
>>
>>> Also when using the screenshot function in system tools, is it
>>> possible to
>>> save to the AppVM file system you are currently using rather than to
>>> Dom0?
>>> Or how do I access it once it is saved to Dom0?
>>
>>
>> You should be able to get them to your AppVM using `qvm-copy-to-vm <vm
>> name> <filename>`  from the terminal.
>>
> Better:  create in dom0 a file containing:
>
> #!/bin/bash
> qvm-copy-to-vm $(zenity --entry --title='Send to VM' --text='Destination
> VM') "${BASH_ARGV[@]}"
>
>
> Save that as an executable script, such as "~/.local/bin/send-to-vm.sh".
> Then, open dom0 file manager, right click any png, click open with other
> application, and under "use a custom command" enter "send-to-vm.sh %s".

When trying, it seems my Dom0 does not have a file manager in the menu.
I had to run "thunar" manually from the terminal.

Also: Wouldn't qvm-move-to-vm be preferrable (also replacing "Send" with
"Move")?

haaber

unread,
Dec 29, 2020, 2:23:24 PM12/29/20
to qubes...@googlegroups.com
On 12/29/20 7:02 PM, Ulrich Windl wrote:
>> Better:  create in dom0 a file containing:
>>
>> #!/bin/bash
>> qvm-copy-to-vm $(zenity --entry --title='Send to VM' --text='Destination
>> VM') "${BASH_ARGV[@]}"
>>
>>
>> Save that as an executable script, such as "~/.local/bin/send-to-vm.sh".
>> Then, open dom0 file manager, right click any png, click open with other
>> application, and under "use a custom command" enter "send-to-vm.sh %s".
>
> When trying, it seems my Dom0 does not have a file manager in the menu.
> I had to run "thunar" manually from the terminal.
you are right.

> Also: Wouldn't qvm-move-to-vm be preferrable (also replacing "Send" with
> "Move")?
you are right again. It was a "proof of concept" code. Thank you for the
correction!


>> This "registers" the script in the application list.
>>
>> Then, when you take a screenshot, instead of choosing "save", choose
>> "open with..." and see if your script shows up in the list of available
>> applications. If still not, you might have to write a simple .desktop
>> file in ~/.local/share/applications in order for it to show
>> up as an option.
Or write it by hand: like
~/.local/share/applications/userapp-screenshot.desktop containing

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/home/user/.local/bin/send-to-vm.sh %f
Name=Send a screenshot to VM
Comment=Custom definition for SCREENSHOT.sh


cheers

Andrew David Wong

unread,
Dec 30, 2020, 2:20:17 AM12/30/20
to Ulrich Windl, qubes...@googlegroups.com
On 12/29/20 10:02 AM, Ulrich Windl wrote:
> [...]
> When trying, it seems my Dom0 does not have a file manager in the menu.
> I had to run "thunar" manually from the terminal.

This is by design. Using a file manager in dom0 is a security risk and
is therefore discouraged:

https://github.com/Qubes-Community/Contents/blob/master/docs/security/security-guidelines.md#dom0-precautions

--
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org

OpenPGP_signature

Ulrich Windl

unread,
Jan 2, 2021, 12:05:45 PM1/2/21
to Andrew David Wong, qubes...@googlegroups.com
On 12/30/20 8:20 AM, Andrew David Wong wrote:
> On 12/29/20 10:02 AM, Ulrich Windl wrote:
>> [...]
>> When trying, it seems my Dom0 does not have a file manager in the
>> menu. I had to run "thunar" manually from the terminal.
>
> This is by design. Using a file manager in dom0 is a security risk and
> is therefore discouraged:
>
> https://github.com/Qubes-Community/Contents/blob/master/docs/security/security-guidelines.md#dom0-precautions
>

So is there an alternative that gets the user script registered for
saving a screenshot?

>

Andrew David Wong

unread,
Jan 2, 2021, 3:32:09 PM1/2/21
to Ulrich Windl, qubes...@googlegroups.com
I'm not sure exactly what you mean, but there's:

https://github.com/QubesOS/qubes-issues/issues/953
OpenPGP_signature

Ulrich Windl

unread,
Jan 6, 2021, 12:03:32 PM1/6/21
to qubes...@googlegroups.com
On 1/2/21 9:31 PM, Andrew David Wong wrote:
> On 1/2/21 9:05 AM, Ulrich Windl wrote:
>> On 12/30/20 8:20 AM, Andrew David Wong wrote:
>>> On 12/29/20 10:02 AM, Ulrich Windl wrote:
>>>> [...]
>>>> When trying, it seems my Dom0 does not have a file manager in the
>>>> menu. I had to run "thunar" manually from the terminal.
>>>
>>> This is by design. Using a file manager in dom0 is a security risk
>>> and is therefore discouraged:
>>>
>>> https://github.com/Qubes-Community/Contents/blob/master/docs/security/security-guidelines.md#dom0-precautions
>>>
>>
>> So is there an alternative that gets the user script registered for
>> saving a screenshot?
>>
>
> I'm not sure exactly what you mean, but there's:

I mean: It seems you need the file manager to open the file just to
register it as handler; is there an alternative not using the file manager?

>
> https://github.com/QubesOS/qubes-issues/issues/953

Unfortunately the issue is quite long, and you are not referring to a
specific comment...

>

haaber

unread,
Jan 7, 2021, 4:21:52 AM1/7/21
to qubes...@googlegroups.com
>> I'm not sure exactly what you mean, but there's:
>
> I mean: It seems you need the file manager to open the file just to
> register it as handler; is there an alternative not using the file manager?

not that I know. But you can register it "by hand" by creating a .dsktop
file yourself (as I explained earlier). Put these lines

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/home/user/.local/bin/send-to-vm.sh %f
Name=Send a screenshot to VM
Comment=Custom definition for send-to-vm.sh

in a new file in ~/.local/share/applications/userapp-screenshot.desktop

superiorimmunity

unread,
Jan 7, 2021, 5:16:39 AM1/7/21
to qubes...@googlegroups.com


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, December 22, 2020 5:26 PM, Shawn Creighton <scre...@gmail.com> wrote:

How do you disable the automatic screen lock? I have the screensaver disabled and the lock screen option unchecked but it still locks after a few minutes.

Also when using the screenshot function in system tools, is it possible to save to the AppVM file system you are currently using rather than to Dom0? Or how do I access it once it is saved to Dom0? 



1) Generally with default fresh install settings you go to System Tools --> Screensaver - there set "lock screen after" 0 minutes and "Disable Screen Saver" . It should stop screen from autolocking. Additionally you can go to tab "Advanced" and uncheck "Power Management Enabled"

2) There are several ways. Two of them proposed in replies.
Here another two:
2a) in Reddit thread https://reddit.com/r/Qubes/comments/es02rc/how_can_i_send_a_screenshot_from_dom0_to_a_vm/ user KingZiptie proposed convenient method of creating Action in Thunar. To do this right click on empty space on Dom0 desktop --> Desktop Settings --> Icons tab --> enable at least "Home" (or all existing for convenience) ; then open Thunar through any of newly appeared shortcuts. In upper menu choose "Edit" --> Configure custom actions --> click "+" --> and here examples for commands
   Name: "Move to vault" (since vault has no network access and already has extended functionality for copying to other VMs)
   Command: qvm-copy-to-vm vault %F && rm %F
   This command will copy file(s) to vault VM and delete file(s) from Dom0
  
   Name: "Copy to vault"
   Command: qvm-copy-to-vm vault %F
   This command will copy file(s) to vault VM while keeping original in Dom0
  
   In "Appearance Conditions" tab check all six checkboxes.
  
   Additionally you can right click on Pictures folder --> Send To --> Desktop (Create Link) - this will create desktop shortcut for quicker access to screenshots.
  
  
2b) And another method that can be longer to startup but can be more convenient in a long run (and compliments well to previous methods)
   Install https://github.com/evadogstar/qvm-screenshot-tool from Qubes Contributed Packages repository using instructions here https://www.qubes-os.org/doc/installing-contributed-packages/
   This tool allows to copy screenshots to any AppVM from screenshot window. I haven't tried it myself yet but gonna try later since it looks really useful.
Reply all
Reply to author
Forward
0 new messages