Score:1

Why does starting a terminal on a different tty end up opening the program on the graphical console?

in flag

I have tried starting gnome-terminal on my tty3 using startx gnome-terminal and it ends up opening a terminal window in my GNOME session which I can access using Ctrl-Alt-F2. xterm opens up on tty3 as expected. I tried installing i3 window manager, and I tried opening a terminal inside i3 and the same behaviour is repeated. Pressing Alt-Enter in i3 ends up opening up gnome-terminal in my GNOME session. Why is this happening? What should I do to stop this?

Output of uname -a:

Linux myHostName 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ChanganAuto avatar
us flag
`gnome-terminal`is a **graphical** terminal emulator. Knowing this it should be easy to understand why it does what it does.
Vishal Subramanyam avatar
in flag
@ChanganAuto I'm able to start other graphical terminal emulators in the ttys by using startx
Vishal Subramanyam avatar
in flag
Examples include Terminator and xterm
Terrance avatar
id flag
I'm just spitballing here, but it appears as though gnome-terminal was written with native Wayland support where all the others are not. https://en.wikipedia.org/wiki/List_of_terminal_emulators Any that I have been trying from that list that don't state Native Wayland appear to launch just fine in the tty of my choice. This might be a bug then and probably needs to be filed as such. `ubuntu-bug gnome-terminal`
raj avatar
cn flag
raj
Maybe that's because `gnome-terminal` is actually a client-server application. When you start up a GNOME session, `gnome-terminal-server` service is started in the background and I suppose that each invocation of `gnome-terminal` actually sends request to that service to open a new terminal. So the terminal opens on the screen where the service is running. Other terminals are standalone applications, so you can open them on other screens.
Vishal Subramanyam avatar
in flag
@Terrance I just realized this problem is not limited to terminals. I tried opening the Brave browser in i3, and it ended up on my GNOME session. So, where should I file a bug report since this appears to be something related to Wayland?
Vishal Subramanyam avatar
in flag
@raj Does the Brave browser also use a similar structure? Because I'm facing the same issue with it too.
raj avatar
cn flag
raj
I don't know of Brave, but for Firefox it is for sure so that if you already have one running Firefox instance then following invocations of Firefox do not start the new process, but just open the new tab in the already running Firefox (unless you use `-no-remote` option to the `firefox` command, which explicitly tells it to start a new process)
Terrance avatar
id flag
I can't say 100%, but I started testing with the browsers too. https://en.wikipedia.org/wiki/List_of_web_browsers_for_Unix_and_Unix-like_operating_systems It appears that browsers that are GTK do not open in a TTY as well. But any that are like XUL or something that is X based opened without an issue.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.