ioi-2023 / contestant-vm

Contestant virtual machine for online IOI (since 2020)
1 stars 1 forks source link

Name in top-right corner is not refreshed until logout+login #76

Open radl97 opened 1 year ago

radl97 commented 1 year ago

Describe the bug The IOI-Contestant text on the top-right corner does not update after logging in.

To Reproduce 1) start up VM (with the servers configured) 2) add credentials for user in ioisetup prompt. 3) The name in the top-right corner remains IOI Contestant.

Expected behavior After ioisetup, the name should update to the contestant code (e.g. IDN1).

Please complete the following information:

Additional context

add-username-ext GLib.get_real_name() does not work as expected.

Even disabling and re-enabling the extension does not work.

pobrn commented 1 year ago

glib caches the result of getpwnam/getpwuid on the first use, so this needs a login-logout cycle at the very least.

radl97 commented 1 year ago

Thanks for your input! Logging out and in works. So that really is the issue.

If someone has the time to look for alternative solutions (e.g. in an extension, can I load /etc/passwd by hand and parse it like this? or is there some place I could put the current user? How do I reload the extension? Does disable+enable work to reinitialize this data?)

radl97 commented 1 year ago

@horcsinbalint and @pobrn I think you have some experience with it. It is not high priority, but I think the live version in the contest should contain a fix or workaround

radl97 commented 12 months ago

If I remember correctly, the live contest will lock the screen, so it will not disrupt the real contest. Only on certain special occasions. (e.g. if the laptop is logged in after thr contest started)