Fixing AppVM's Terminal Window Title (user@local-host)

Hello,

I’ve noticed that one of my appVMs terminal title menu is inconsistant with the appVM title. Normally, the appVM title matches the terminal title menu exactly. But in this appVM the title is localhost.

I’ve seen that title and I always wondered why was it named so? [Testing-appVM] user@local-host

Is there a method to change that title in the terminal menu so it reflects the appVM title?
[testing-appVM] user@testing-appVM

Thanks,

Well, this is not Qubes-specific. The title of a window is entirely decided by the AppVM (apart from the [testing-appVM]). So it’s just a matter of figuring it out how to do that for linux.

I would suggest you search on Linux forums how to change the hostname. And then doing that within that AppVM.

I’ve also tweaked the title slightly to make it more concrete. Feel free to tweak it.

1 Like

What is Qubes specific is why the title isn’t shown correctly here - I
mean correctly for Qubes.
@Libertad -
what is the template?
Does this affect all qubes using that template or just one?
What shell is running?
Does it affect only a terminal (which terminal application?) or all
windows from that qube?

1 Like

Thanks, I’ll look it up on Fedora. The template is Fedora 32, the names of the other applications in that VM are not affected nor does it affect all VMs made with that template. It’s only the “testing-VM” that has a naming issue. The issue is present with “run-terminal” and “terminal” applications. However, all other windows for other applications seem fine.

The default shell when I open a new terminal is: bin/bash
Whereas the current shell is bash
and the user’s current shell is bin/bash

You might want to look in your bashrc startup files in the VM template for any kind of escape sequences. Anything that prints the proper ANSI sequences can change the Xterm title fairly easily. So if it’s just a matter of making it say the-right-thing™ the link below can show you how to easily change it.

https://tldp.org/HOWTO/Xterm-Title-3.html

Thanks, I’ll try that and follow up. I was concerned I wouldn’t be able to change it. One thing is for sure, local-user is not the right thing. thanks,

I was able to fix this temporarily by running the following command on the qube:

sudo hostnamectl set-hostname $(qubesdb-read /name)

Permanently this by adding the following command to the ~/.bashrc file.

1 Like

Thanks for the suggestions. I am thinking the hostname was not set properly. As mentioned in the link.

I did try the command suggested and it worked when I opened a new terminal, However, I was not able to save add the commands to the bash file due to privileges. How would you change the owner status of the file? Somehow, I would have to login as the owner.

Thanks,

That’s weird. You should have permissions to edit the file… What commands did you type exactly?

Sorry for the delay, I got caught up with other topics and emergencies. It turns out the file in read only and I can’t seem to change to permissions,

sudo hostnamectl set-hostname $(qubesdb-read /name)

I think it’s due to some bad configurations. I also, noticed that same hostname issue with other VMs.

I imagine, now I have to figure out how to change the VM permission so I may update it the file.