-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
/dev/shm permission denied on shared memory file with resolution #514
Comments
Thanks for opening this issue. The unfortunate short answer to all this is...I don't know :) The SingleApplication library is what is used to prevent multiple application instances which is what is using the shared memory. It would be best to open an issue with that repository. I know there was some changes with Qt6.6, and that project is aware of it. I'm not sure what version of Qt your package is using since only the flatpak and appimage are the only supported distributions. |
Thank you for your much appreciated contributions to NotepadNext ! . So it seems the bug is to be handled in an upstream project.
I understand, in which case we must wait until its fixed in the upstream SingleApplication Library. Unless flatpak and appimage, in a different way manage shared
The binary is built against Qt6 using the system libraries that ships with fedora releases, the current version as of 20240227 being 6.6.2-1.fc39.x86_64 .
|
@hgkamath |
Description
NotepadNext does not start with
QSharedMemory::PermissionDenied
message.Problem may have happened because program was first run as root before closing and re-running as regular user.
Resolution included below.
More Details
Linux Fedora-39
dnf copr enable birkch/NotepadNext
dnf install NotepadNext
package installed: NotepadNext-0.7-1.fc39.x86_64
I first ran NotepadNext as root, and it worked fine bringing up the window.
Then i closed window, and re-ran NotepadNext as regular user, but when running as user it fails to start and gives the error in the terminal. If started via the gui app menu, it fails silently.
strace output
Resolution
When I had run NotepadNext as root, a file was created in
/dev/shm
with root ownership and permissionsDelete the file, and next time NotepadNext when run as regular user, will recreate the file with regular user ownership and permissions and it will run fine.
mv-ing the file (and then later delete when problem resolved, which is what I really did at first) or chown-ing the file back to the regular user also will work
Questions:
Q1) should NotepadNext, when run as root user, check to see if the desktop belongs to a user and create the shm-file with ownership of user, or maybe not?
Q2) should NotepadNext give a different filename to the shm-file per-User-per-Desktop in order to prevent name collision?
Q3) should NotepadNext give a better error message to inform the user as to how to correct the problem?
Q4) should NotepadNext delete the shm-file after the last user-process using it exits?
Q5) should the shm-file's filename have the string NotepadNext in it, in order to clue the user that the file was created by NotepadNext. At first, I was hesitant to delete the file as I did not know if it was created by some other process. The
ls -l
timestamp strongly hinted that the shm-file might have been freshly created by NotepadNext.The text was updated successfully, but these errors were encountered: