After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770300 - Allow access to more virtual terminals
Allow access to more virtual terminals
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal enhancement
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-08-23 20:51 UTC by Michael Catanzaro
Modified: 2016-10-05 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add the terminal options from tty3 to tty6 (2.32 KB, patch)
2016-09-04 20:40 UTC, Quey-Liang Kao
none Details | Review
Adding support for more virtual terminals (2.43 KB, patch)
2016-09-09 15:03 UTC, Quey-Liang Kao
none Details | Review
keys-input-popover: Add TTY3 support (1.56 KB, patch)
2016-10-04 17:32 UTC, Quey-Liang Kao
committed Details | Review

Description Michael Catanzaro 2016-08-23 20:51:38 UTC
Currently Boxes supports sending Ctrl+Alt+F1, Ctrl+Alt+F2, and Ctrl+Alt+F7 key sequences. That's nice, but really frustrating when I need to access a virtual terminal, since none of those key combinations work anymore in most distrors:

 * Ctrl+Alt+F1 is by default the login screen
 * Ctrl+Alt+F2 is by default the first GNOME session
 * Ctrl+Alt+F7 is by default nothing, since tty6 is the final virtual terminal unless you add more

Debian and openSUSE have some downstream patches to put the graphical session on tty7, avoiding this issue, but in other distros (at least Fedora and Endless), the only way to get a tty is to use F3-F6, precisely the keys that aren't available in Boxes. Would be nice to have a way to send one of these key combinations.
Comment 1 Zeeshan Ali 2016-08-24 12:49:34 UTC
Well I'd really like to solve this without crowding the UI much. Would replacing F7 with F3 or F6 work for all/most distros?
Comment 2 Michael Catanzaro 2016-08-24 13:45:38 UTC
Nope, because while tty7 doesn't exist by default in most distros anymore, Debian/Ubuntu and openSUSE all patch something (systemd?) to put the desktop there.

Unfortunately, I think we just have to add one more (F3 or F6, does not matter).
Comment 3 Quey-Liang Kao 2016-09-04 20:40:49 UTC
Created attachment 334759 [details] [review]
Add the terminal options from tty3 to tty6

Hi, 

I implemented the enhancement in this patch.
If there is any violation of conventions, the coding style, 
the culture of GNOME, etc., please let me know.

Thanks!
Comment 4 Zeeshan Ali 2016-09-08 13:09:34 UTC
(In reply to Quey-Liang Kao from comment #3)
> Created attachment 334759 [details] [review] [review]
> Add the terminal options from tty3 to tty6
> 
> Hi, 
> 
> I implemented the enhancement in this patch.

Thanks.

> If there is any violation of conventions, the coding style, 
> the culture of GNOME, etc., please let me know.

I'll do a more thorough review later but please ensure that you follow this guideline to the best of your abilities: 

https://wiki.gnome.org/Git/CommitMessages

Take a look at existing commits in git log of gnome-boxes for inspiration (Ignoring translation commits).

Also please ensure you create the patch file using git-format-patch (or use git-bz tool to handle everything for you).
Comment 5 Quey-Liang Kao 2016-09-09 15:03:58 UTC
Created attachment 335202 [details] [review]
Adding support for more virtual terminals

Hi, 

I am sure that I generate this patch with git format-patch,
but I agree that the original attached patch was lack of description,
so I add more details in the patch.

Thanks.
Comment 6 Zeeshan Ali 2016-09-29 13:22:12 UTC
Review of attachment 335202 [details] [review]:

* From https://wiki.gnome.org/Git/CommitMessages:

  * Use present tense. For example use "Add Hindi translation" instead of "Added Hindi translation".
  * Be sure to not exceed 72 characters. Try to not exceed 50.

In this case: "keys-input-popover: Add more VTs" would have been a perfect summary.

* "Originally, there was " -> "Currently, there are ".
* Abbreviations are supposed to be in caps. i-e TTY1 etc
* In all languages I know, there is supposed to be an empty line between paragraphs. In this case I don't see the need to put the only two sentences into separate paragraphs.

::: src/keys-input-popover.vala
@@ +10,3 @@
+        {"ctrl+alt+f4", ctrl_alt_fn_activated},
+        {"ctrl+alt+f5", ctrl_alt_fn_activated},
+        {"ctrl+alt+f6", ctrl_alt_fn_activated},

As I said in the bug, I don't want to clutter the UI but adding all of them. We need to decide a few that work for major distributions.
Comment 7 Quey-Liang Kao 2016-09-29 13:42:56 UTC
(In reply to Zeeshan Ali (Khattak) from comment #6)
> Review of attachment 335202 [details] [review] [review]:
> 
> * From https://wiki.gnome.org/Git/CommitMessages:
> 
>   * Use present tense. For example use "Add Hindi translation" instead of
> "Added Hindi translation".
>   * Be sure to not exceed 72 characters. Try to not exceed 50.
> 
> In this case: "keys-input-popover: Add more VTs" would have been a perfect
> summary.
> 
> * "Originally, there was " -> "Currently, there are ".
> * Abbreviations are supposed to be in caps. i-e TTY1 etc
> * In all languages I know, there is supposed to be an empty line between
> paragraphs. In this case I don't see the need to put the only two sentences
> into separate paragraphs.

Thanks for your advice.

> ::: src/keys-input-popover.vala
> @@ +10,3 @@
> +        {"ctrl+alt+f4", ctrl_alt_fn_activated},
> +        {"ctrl+alt+f5", ctrl_alt_fn_activated},
> +        {"ctrl+alt+f6", ctrl_alt_fn_activated},
> 
> As I said in the bug, I don't want to clutter the UI but adding all of them.
> We need to decide a few that work for major distributions.

Sometimes people do need more TTYs.  For example, the anaconda installer occupies TTY1~TTY7 for different usages.
What about reducing all the options to only one "ctrl+alt+fx", and then, says, 
pop a prompt to ask the user to input the value of x?
Comment 8 Zeeshan Ali 2016-09-29 14:41:09 UTC
(In reply to Quey-Liang Kao from comment #7)
> (In reply to Zeeshan Ali (Khattak) from comment #6)
> > Review of attachment 335202 [details] [review] [review] [review]:
> > 
> > * From https://wiki.gnome.org/Git/CommitMessages:
> > 
> >   * Use present tense. For example use "Add Hindi translation" instead of
> > "Added Hindi translation".
> >   * Be sure to not exceed 72 characters. Try to not exceed 50.
> > 
> > In this case: "keys-input-popover: Add more VTs" would have been a perfect
> > summary.
> > 
> > * "Originally, there was " -> "Currently, there are ".
> > * Abbreviations are supposed to be in caps. i-e TTY1 etc
> > * In all languages I know, there is supposed to be an empty line between
> > paragraphs. In this case I don't see the need to put the only two sentences
> > into separate paragraphs.
> 
> Thanks for your advice.

No problem.

> > ::: src/keys-input-popover.vala
> > @@ +10,3 @@
> > +        {"ctrl+alt+f4", ctrl_alt_fn_activated},
> > +        {"ctrl+alt+f5", ctrl_alt_fn_activated},
> > +        {"ctrl+alt+f6", ctrl_alt_fn_activated},
> > 
> > As I said in the bug, I don't want to clutter the UI but adding all of them.
> > We need to decide a few that work for major distributions.
> 
> Sometimes people do need more TTYs.  For example, the anaconda installer
> occupies TTY1~TTY7 for different usages.

Once you are on a TTY, you can use alt+FN on your keyboard. The issue is CTRL+ALT+FN and that's why we need these menu items.

> What about reducing all the options to only one "ctrl+alt+fx", and then,
> says, 
> pop a prompt to ask the user to input the value of x?

That would be very a bad user experience.

P.S not a big deal for this patch but in future please use the 'Review' link to reply inline to inline comments in the code.
Comment 9 Quey-Liang Kao 2016-09-29 15:27:33 UTC
(clean the discussion above)

> Once you are on a TTY, you can use alt+FN on your keyboard. The issue is 
> CTRL+ALT+FN and that's why we need these menu items.

OK, I see the redundancy here.

> > What about reducing all the options to only one "ctrl+alt+fx", and then,
> > says, 
> > pop a prompt to ask the user to input the value of x?
> That would be very a bad user experience.

Sorry for my bad suggestion.
Obviously, I am still learning the implementation/design decision making processes in open source projects like this.

> P.S not a big deal for this patch but in future please use the 'Review' link to > reply inline to inline comments in the code.

I'll remember that.

Let me summarize your words.
This is not actually a bug, but should be a reconsideration of which TTYs to support.  It make sense, and is convincing.
So I am wondering: me, a volunteer try to help this project, but there is more concern on issues that I cannot decide than technical problems.

Would you please give me some advice on the future direction?  
From your, which is this project's, point of view, I don't think this patch is needed.

Thanks.
Comment 10 Zeeshan Ali 2016-10-04 15:17:56 UTC
(In reply to Quey-Liang Kao from comment #9)
> (clean the discussion above)
> 
> > Once you are on a TTY, you can use alt+FN on your keyboard. The issue is 
> > CTRL+ALT+FN and that's why we need these menu items.
> 
> OK, I see the redundancy here.
> 
> > > What about reducing all the options to only one "ctrl+alt+fx", and then,
> > > says, 
> > > pop a prompt to ask the user to input the value of x?
> > That would be very a bad user experience.
> 
> Sorry for my bad suggestion.
> Obviously, I am still learning the implementation/design decision making
> processes in open source projects like this.
> 
> > P.S not a big deal for this patch but in future please use the 'Review' link to > reply inline to inline comments in the code.
> 
> I'll remember that.

Great thanks.

> Let me summarize your words.
> This is not actually a bug, but should be a reconsideration of which TTYs to
> support.  It make sense, and is convincing.
> So I am wondering: me, a volunteer try to help this project, but there is
> more concern on issues that I cannot decide than technical problems.

It's ok, everyone starts somewhere and this is a normal review process. The conclusion from comment#1 and comment#2 was that we need to add F3 or F6 (I'd prefer F3).

> Would you please give me some advice on the future direction?  
> From your, which is this project's, point of view, I don't think this patch
> is needed.

For future ref, you want to follow the existing discussion. If your patch goes in the wrong direction still or you misunderstand, it's not a problem.
Comment 11 Quey-Liang Kao 2016-10-04 17:32:56 UTC
Created attachment 336937 [details] [review]
keys-input-popover: Add TTY3 support

This patch is re-based on gnome-3-22 branch and provides the support of TTY3.
Comment 12 Zeeshan Ali 2016-10-05 08:30:20 UTC
Review of attachment 336937 [details] [review]:

Patch is fine otherwise and i'll be pushing it in a bit but in future please add some description, describing the change (if it's not obvious/simple, which in this case it is) and rationale.
Comment 13 Quey-Liang Kao 2016-10-05 12:00:46 UTC
Thanks!