Your idea for testing if we are root is interesting. But what would be the right Unix command to request root access? In your example I see mainly access to file. I could try to request write access to a system file such as /etc/hosts. But that's not clean. This could look like a malware trying to alter the computer. Is there any better way to ask Linux whether you are root user?
No, if we are root, than we have already rw access to any file. So code doesn't request for anything. That code just change file owner to user for a while to have r/w access if file can't open by permissions... Since user has to know "root password" to issue that port owner change command, it's normal that he could also change /etc/hosts file with it also. If you have root command, you can issue anything. It's not malware approach but standard linux rule... If root doesn't want to user to do that, its also displayed which file wanted to open at that owner change screen. There is nothing weird on this.
For the help issue, the problem is more complex. Because I cannot restore the file ownership modified by the browser as you do in your example because I don't know which files are modified by the browser. My idea was rather to set the home directory of the browser running context to root home directory so that it will modify files that are not the user files. But I don't know how it is possible to go further than sudo: sudo changes only the privilege level but not the current user. I would like my help browser to actually be root to access only root files.
Hey, you don't needed to execute browser with the code at top... Since users just changed Serial ports owner, program doesn't run as a root user! There is no need for that anymore. So no one needs to use program with sudo command... Does it clear?
I have no MAC and no MAC emulator at this time. So I have not even thought to trying WxPic on MAC!
If you have some hardware available, why not testing on MAC !
Unfortunately, your program resist to run even on my linux. It show licence.txt bla bla... than closes...
Why do you needed those licenses for program running? You needed to include that license into code. Program needed to be executed by exe.
I can't run it even from codeblocks. There is some problems when I run program, couldn't find license dir....
About static building, this can be an improvement when you deliver the program as a binary tar (as I did) so that users don't have to search for missing libraries. But if it is delivered as a package, I suppose it is better to let the package manager to get libwxgtk automatically.
I just say for static binaries. I released like that. rpm compile farm handles the requirements. But since your program has problem with startup I cannot look and try to put debian control files nor broken spec file...
Regards
Erdem