xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Changes between Initial Version and Version 1 of Ticket #2041, comment 16


Ignore:
Timestamp:
11/29/18 09:05:20 (3 years ago)
Author:
Nathan Hallquist
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2041, comment 16

    initial v1  
    11Thanks very much for the feedback!
    22
    3 I hadn't meant to upload the get_username thing yet, as I hadn't tested it at all.  (Big Oops!).  My apologies, but now I am wonder about how to do this right.
     3I hadn't meant to upload the getuser thing yet, as I hadn't tested it at all.  (Big Oops!).  My apologies.  Now I am wondering about how to do this right.
    44
    5 In [https://xpra.org/trac/attachment/ticket/2041/p2.txt p2] I have already altered the launcher so that it won't connect without a user.  I had intended to only interactively get a user when on command line mode.
     5In [https://xpra.org/trac/attachment/ticket/2041/p2.txt p2] I have already altered the launcher so that it won't connect without a user.  I had, therefore, intended to only interactively get a user when on command line mode, which I presume is always TTY.
    66
    7 In UNIX there will be a tty.  I don't really understand how python works with command line in windows, so I've been just trying things and sticking with whatever works.  My plan had been to just guess at the code (my first guess was the get_username), try to run it and then see what happens when I test the command line tomorrow, which is how I missed this flaw.
     7In UNIX I am pretty sure, then, that there will be a TTY.  However, I don't really understand how MINGW Python works with command line in windows, so I've been just trying things and sticking with whatever works.  My plan (when I wrote the getuser line) had been to just guess at the code (my first guess was the getuser); try to run it, which I hadn't done yet; and then see what happens when I test the command line tomorrow, which is how I missed this flaw.
    88
    9 Maybe I should alter the command line to require a username as well?  If I do that, though I may break some script somewhere, so I am hesitant to do a thing like that.
     9Maybe I should alter the command line to require a username like I've done in the launcher?  If I do that, though I may break some script somewhere, so I am hesitant to do a thing like that.
    1010
    1111What is the best way, then, to gather interactively gather a username on TTY?  Alternatively, should I alter the command line parser to fail unless the usernames is set there?