Tech-FZ / EmuGUI

A QEMU GUI that I made.
https://tech-fz.github.io/EmuGUI-doc/
GNU General Public License v3.0
103 stars 10 forks source link

os.getlogin() doesn't work sometimes on Linux #46

Closed Tech-FZ closed 1 year ago

Tech-FZ commented 1 year ago

For EmuGUI 0.7.2.5108, I had to rewrite the unixSpecific code to get the Linux version working. - Else it would have thrown a permission error. Here's what I mean: OS: Linux Mint 20.3 Cinnamon x64 Processor: Intel Core 2 Duo E8400 @ 3 GHz RAM: 4 GB DDR3 Graphics: VMware SVGA Adapter HDD: 90 GB QEMU: Although I had to reinstall the VM but forgot to install QEMU, I was able to test it without it. EmuGUI: 0.7.2.5108 Note: This configuration has been virtualized with VMware Workstation Player 12.5.9 in order to not mess around with my Windows installation.

How to reproduce this error: Just try to run EmuGUI (the Python script version on the repository) on Linux. If it works, you're not affected! If it doesn't, I found a fix. In the Linux binaries, I replaced os.getlogin() with pwd.getpwuid(os.getuid()) to get it working again. To make it more compatible with other distributions again, I want to make a try-except block in the next version (unixSpecific only, doesn't affect Windows at all).

Tech-FZ commented 1 year ago

This could be fixed now but not yet in the pre-release repositories.