Identifying label from within AppVM

21 views
Skip to first unread message

nicklaus...@gmail.com

unread,
Jun 12, 2016, 11:55:06 PM6/12/16
to qubes-users
Is there any mechanism to identify what label the AppVM has from with in it? I'm looking for a (hopefully) automated way to make other colors match the label, i.e. have my terminal prompt and tmux bar be green in green AppVMs and red in red AppVMs.

Unman

unread,
Jun 15, 2016, 5:59:12 PM6/15/16
to nicklaus...@gmail.com, qubes-users
On Sun, Jun 12, 2016 at 08:55:05PM -0700, nicklaus...@gmail.com wrote:
> Is there any mechanism to identify what label the AppVM has from with in it? I'm looking for a (hopefully) automated way to make other colors match the label, i.e. have my terminal prompt and tmux bar be green in green AppVMs and red in red AppVMs.
>

The red labelling is drawn from dom0 currently. I don't think there's a
way of pulling dom0 information from within a qube, so I think you will
be disappointed.
Although I cant see any reason why it wouldn't be possible to write label
information to he qube on boot, and then read that out. Might be worth
playing with this.

nicklaus...@gmail.com

unread,
Jun 15, 2016, 7:14:20 PM6/15/16
to qubes-users, nicklaus...@gmail.com, un...@thirdeyesecurity.org

I can't believe I didn't think of that. I'll try to work something out with qrexec and I'll post the code when I'm done in case anyone would like to use it. Thank you!

nicklaus...@gmail.com

unread,
Jun 16, 2016, 4:01:35 PM6/16/16
to qubes-users, nicklaus...@gmail.com, un...@thirdeyesecurity.org

I mocked up an example RPC here:
https://github.com/kulinacs/qubes-rpc-GetLabel
I'd love to get some feedback from anyone willing to take a look at it.

Marek Marczykowski-Górecki

unread,
Jun 16, 2016, 5:13:38 PM6/16/16
to nicklaus...@gmail.com, qubes-users, un...@thirdeyesecurity.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Use QREXEC_REMOTE_DOMAIN variable for calling VM name, instead of
getting it from that VM. Getting it from calling VM means that VM can
lie and get label for any VM, check what VM you have in the system etc.
Also an minor improvement - use `qvm-prefs $VMNAME label` instead of
grepping the output.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXYxZ5AAoJENuP0xzK19csU8MIAJqdAeYKhisxaoJrD4EEPBIc
9fZIha29oezkB0AOnQFBy9vAdTSC3UUsDMjeIFE52+h402mNQFYN2ehTvNUl9fuH
HYquqjDl869T20XTQ3ASo/jv7ATU5yWW13wDuu8Cwga5LNtg3CvbGlQvuONMjhXI
r/SUeksfk9BTL9YEc70K+0QA+VWWox+Je4MqQkw1jT2EwJCk9AXk8KSMpxI1Iaq2
DxM7Rh0YPdgMYIKfZuNcNAOEhg9yJBvq+k69cAEGExBVBILCTB0zG8e3y0DfT22J
o2bDLtUrQWDsaEUz+mVfC8jlicjC7Oe+y+k/3WpMqum2+K5U/zjAPvLY43bE4s8=
=i1oM
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages