Terminal in the same disposable

When I open firefox in the disposable I get an appvm with a number something like disp-5697, but then when I try to open a terminal to do something inside that disposable, I get another disposable number like disp-8635…
How do I open terminal inside the same disposable???

1 Like

In dom0 tray open “Qubes Domains” widget → disp5697 → Run Terminal.
If you’re using Qubes OS 4.2 then you can run apps for specific disposable using Qubes App Menu Q → APPS → disp5697 → Xfce terminal

2 Likes

Cool, thanks.
But what if I wanna use a minimal appvm and run terminal there? The way you described it it’s only for the user and not the root, but I can’t start it with the command line on dom0 because it opens another completely different disposable

1 Like

You mean you want to run root terminal in disposable qube based on minimal template without passwordless sudo package?
You can run root terminal from dom0 terminal:

qvm-run -u root disp5697 uxterm &
4 Likes

You rock man! Much appreciate it!

1 Like

You can fairly easily have keyboard shortcuts which will run such
commands in the qube that has focus.
(easily in KDE - I assume somewhat easily in Xfce.)
I can post examples later if interest.

2 Likes

Yes, please!

1 Like

In the morning

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

2 Likes

Better late than never:

  1. Create a script at /home/user/bin/open_terminal.sh
#!/bin/bash

ID=`xdotool getwindowfocus`
QUBE=`xprop _QUBES_VMNAME -id $ID|cut -f2 -d\" `
if [[ "$QUBE" == "_QUBES_VMNAME:  not found." ]]; then
	exit
else
  qvm-run $QUBE /usr/bin/qubes-run-terminal &
fi
  1. Make script executable
    sudo chmod +x /home/user/bin/open_terminal.sh

  2. Create shortcut

  3. In KDE:
    * SystemSettings->Shortcuts->“Custom Shortcuts”
    * Edit-New->Global Shortcut->Command/URL
    * Optionally Provide Name for action
    * Under “Trigger” enter keyboard combo
    * Under Action, enter path to script
    * Apply

  4. Xfce:
    * Settings->keyboard
    * On Application Shortcuts pane, select “Add”
    * Use chooser to select command
    * Define Keyboard combo

  5. The script at 1 is completely generic - you can use it for any
    commands- eg echo $QUBE|speak-ng -- will speak the name of the
    focussed qube.
    You can use one-liners of complex scripts as you will.

The first if statement tests for lack of QUBES_VMNAME - that is dom0.
Instead of exit call you can run program/script here.

  1. To have a root terminal use qvm-run -u root..
    You can, of course, have separate scripts and shortcuts for spawning root and
    user terminals, or run different applications by qube name using elif
    statements.
I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.
1 Like

Thanks!

I will look at it as soon as I find time (so in half a year haha)