Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtWidgets programs on Linux access things from the system #16

Open
DavidEGrayson opened this issue Oct 27, 2017 · 1 comment
Open

QtWidgets programs on Linux access things from the system #16

DavidEGrayson opened this issue Oct 27, 2017 · 1 comment

Comments

@DavidEGrayson
Copy link
Owner

DavidEGrayson commented Oct 27, 2017

There is some code in Qt or the libraries it uses that looks for files in fixed locations on the user's system at run time. For maximum reliability, it should not do that. I used strace on the Tic Configuration Utility compiled for linux-x86 by nixcrpkgs and grepped for /usr:

stat64("/usr/share/upstart/xdg/QtProject/qtlogging.ini", 0xffc6ab50) = -1 ENOENT (No such file or directory)
stat64("/usr/share/X11/xkb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/share/ubuntu/mime/mime.cache", 0xffc6a9f0) = -1 ENOENT (No such file or directory)
stat64("/usr/share/gnome/mime/mime.cache", 0xffc6a9f0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/share/mime/mime.cache", 0xffc6a9f0) = -1 ENOENT (No such file or directory)
stat64("/usr/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=125732, ...}) = 0
open("/usr/share/mime/mime.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
stat64("/usr/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=125732, ...}) = 0
stat64("/usr/share/ubuntu/mime/image/vnd.microsoft.icon.xml", 0xffc6aa20) = -1 ENOENT (No such file or directory)
stat64("/usr/share/gnome/mime/image/vnd.microsoft.icon.xml", 0xffc6aa20) = -1 ENOENT (No such file or directory)
stat64("/usr/local/share/mime/image/vnd.microsoft.icon.xml", 0xffc6aa20) = -1 ENOENT (No such file or directory)
stat64("/usr/share/mime/image/vnd.microsoft.icon.xml", {st_mode=S_IFREG|0644, st_size=1475, ...}) = 0
open("/usr/share/mime/image/vnd.microsoft.icon.xml", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 8
stat64("/usr/share/ubuntu/mime/image/vnd.microsoft.icon.xml", 0xffc6aa70) = -1 ENOENT (No such file or directory)
stat64("/usr/share/gnome/mime/image/vnd.microsoft.icon.xml", 0xffc6aa70) = -1 ENOENT (No such file or directory)
stat64("/usr/local/share/mime/image/vnd.microsoft.icon.xml", 0xffc6aa70) = -1 ENOENT (No such file or directory)
stat64("/usr/share/mime/image/vnd.microsoft.icon.xml", {st_mode=S_IFREG|0644, st_size=1475, ...}) = 0
open("/usr/share/mime/image/vnd.microsoft.icon.xml", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 8

I already noticed that Qt is being compiled with the -DDFLT_XKB_CONFIG_ROOT=\"/usr/share/X11/xkb\" flag but I have not looked into why.

@DavidEGrayson
Copy link
Owner Author

I also noticed it trying to access /nix/store/blahblah/qtlogging.ini.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant