Can not open GUI in disposable VM

Hello

When i try to open GUI to view or edit in disposable VM its opening directly firefox…

Any tips?

What are you trying to open?

Just normal .txt file

You simply need to change the default application then. Same process as you would do for any other OS based on the template you’re using.

If you want the change to be persistent, make the change in your TemplateVM.

Could you be able to send a link where i can follow step by step?

It’s not related to qubes, any guide will do, just search one that matches your template’s distribution.

Then open up a terminal in your template and make the changes:

$ qvm-run template-name xterm

Change xterm with the terminal emulator of your choice.

Mate im ashamed but the truth is that i do not really understand linux yet… I bought certificate qubes machine and basically i started from top to the bottom…
When bought that laptop it was Qubes 4.0 and everything came automatically inatalled but few months ago i upgraded to 4.1 and some of the extras has gone…

So now as i mentioned above when i try to open .txt file in disposable VM based on fedora is opening fire fox…

If you could continue the command for me that would be huge help!

Thanks in advance

$ qvm-run template-fedora-36 …

I didn’t get a notification for this, hence the delay in the response.

You have a few ways to change the default editor:

Terminal: run the following in dom0:

$ qvm-run -p -u root fedora-36 'echo "EDITOR=/usr/bin/gedit" >> /etc/environment'
$ qvm-shutdown --wait fedora-36

If that doesn’t work, try doing the same thing with a variable named VISUAL

Note: I selected gedit as an example, so you’ll need to choose the editor that you prefer. If you’re unsure on what the correct path is, run the following in a terminal window: whereis your-editor (change your-editor with the command to launch your editor).

If you also want to change the gui editor:

$ qvm-run -p -u root fedora-36 'echo "text/plain=/usr/bin/gedit;" >> /usr/share/applications/defaults.list'
$ qvm-shutdown --wait fedora-36

If you want to do it from gui, start fedora-36 (the TemplateVM), open the File Manager and right click a text file to change the default editor; then shut down the template.