qvm-run --dispvm in dom0

46 views
Skip to first unread message

john.david.r.smith

unread,
Feb 3, 2017, 11:04:25 AM2/3/17
to qubes-users
hi.
is there some way to launch a dispvm from dom0 and execute a command (just like `qvm-run --dispvm` in domu) or do i need to create a temporary vm?

-john

Unman

unread,
Feb 3, 2017, 11:44:15 AM2/3/17
to john.david.r.smith, qubes-users
Yes -
echo xterm |/usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red

will open term in new dispVM

I have this as keyboard shortcut - you can obviously script it to take
input for command to run.

john.david.r.smith

unread,
Feb 3, 2017, 12:57:12 PM2/3/17
to Unman, qubes-users
thank you.
qfile-daemon-dvm is a very interesting command.
i figured out how to do some stuff with it (e.g. LAUNCH + FINISH) by reading the code.
is there somewhere a list of all qubes specific commands (+ some documentation)?
i don't mean https://www.qubes-os.org/doc/dom0-tools/ , since there is some stuff documented, but a useful command like qfile-daemon-dvm is not listed.

or do i just need to `find / ...` and find out what everything does?

Holger Levsen

unread,
Feb 12, 2017, 8:48:39 AM2/12/17
to qubes-users
On Fri, Feb 03, 2017 at 04:44:14PM +0000, Unman wrote:
> echo xterm |/usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red
>
> will open term in new dispVM
>
> I have this as keyboard shortcut - you can obviously script it to take
> input for command to run.

thanks, this is very handy!

I'm just puzzled that this doesnt work:

echo gnome-terminal |/usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red

it starts a new disposible VM but no gnome-terminal pops up, despite it's
installed and when I start it manually from an xterm it comes up just fine?!?
(This is with a Debian 8 dvm.)


--
cheers,
Holger
signature.asc

Unman

unread,
Feb 12, 2017, 9:23:21 AM2/12/17
to qubes-users
This comes up quite often - perhaps it should be in the FAQ.

I cant do better than quote my last reply:

This is because gnome-terminal is a stub that calls
gnome-terminal-server to open a new window and then exits. Because the
command you have called exits, the dispVM closes. It's expected
behaviour.

There was a solution proposed in issues - #2581 if you are
interested, but it's ugly (proposer's words) and has significant security
risks. I wouldn't touch it, but then I tend not to sue gnome-terminal
anyway.

And, as Marek pointed out in that thread, this is the reason why the
default config has xterm.

Holger Levsen

unread,
Feb 12, 2017, 10:12:03 AM2/12/17
to qubes-users
On Sun, Feb 12, 2017 at 02:23:20PM +0000, Unman wrote:
> > I'm just puzzled that this doesnt work:
> > echo gnome-terminal |/usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red

> This comes up quite often - perhaps it should be in the FAQ.

probably, though best with a satisfying answer :)

> I cant do better than quote my last reply:
>
> This is because gnome-terminal is a stub that calls
> gnome-terminal-server to open a new window and then exits. Because the
> command you have called exits, the dispVM closes. It's expected
> behaviour.

ah. (some sort of expected behaviour ;)

> There was a solution proposed in issues - #2581 if you are
> interested, but it's ugly (proposer's words) and has significant security
> risks. I wouldn't touch it, but then I tend not to sue gnome-terminal
> anyway.
>
> And, as Marek pointed out in that thread, this is the reason why the
> default config has xterm.

hm, xfce4-terminal is a somewhat better terminal, IMHO, but what I really
want is one which I can easily configure to support font-size-resizing
via keyboard-ctrols (ctrl +- works out of the box in gnome-terminal) and
xfce4-terminal doesn't support that :/

For now my workaround is: (using i3) $mod-Shift-Return gives me an xterm in a
new disposable VM and then $mod-Return will give me a gnome-terminal in there…


--
cheers,
Holger
signature.asc

Holger Levsen

unread,
Feb 12, 2017, 11:36:15 AM2/12/17
to qubes-users
On Sun, Feb 12, 2017 at 03:11:59PM +0000, Holger Levsen wrote:
> hm, xfce4-terminal is a somewhat better terminal, IMHO, but what I really
> want is one which I can easily configure to support font-size-resizing
> via keyboard-ctrols (ctrl +- works out of the box in gnome-terminal) and
> xfce4-terminal doesn't support that :/

sakura and roxterm-gtk(2|3) both satisfy this…


--
cheers,
Holger
signature.asc
Reply all
Reply to author
Forward
0 new messages