It is very borring to click on a textfile and Geany gives an Erro Window: You accessed with the socket of other user. Avoid this JUST ADDING A "-i" in the geany.desktop (/usr/share/applications) in linux at the "Exec line"
Now on Line 142: Exec geany %F Better usability is: Exec geany -i %F
I don't think this would be better. Then every time a new instance would be started which works indepedent of the existing one. This is especially unconvenient when opening files via the .desktop items (task bar, app menus, file managers, ...).
To me it sounds rather like this would only fix the symptom for another problem: why does Geany think the socket it wants to use belongs to another user?
In any case, you always can override the .desktop yourself via `~/.local/share/applications/geany.desktop`.
The socket file message probably means either Geany crashed (or was crashed by logging out or shutting down with it still running) or Geany was run as root or `sudo` and that still owns the socket link in your config directory. You can look there and the link will be obvious, so you should be able to just delete it.
I don't think this would be better. Then every time a new instance would be started which works indepedent of the existing one. This is especially unconvenient when opening files via the .desktop items (task bar, app menus, file managers, ...).
Agreed, we ain't gonna do that.
The socket file message probably means either Geany crashed
Does it lead to this? I don't think so
Geany was run as root or `sudo` and that still owns the socket link in your config directory.
More likely. This is another example of a misconfigured sudo that wrecks dotfiles in the user's directory */me sighs*.
The socket file message probably means either Geany crashed
Does it lead to this? I don't think so
Crashed ... as another user, eg database_admin ...
BTW, I want to point out that having other-user-owned files in your homedir is not a problem specific to Geany, and is gonna cause more trouble (and possibly more subtle) than just this message. Think impossibility to save (or possibly even read) configuration or plain files, etc.
Check your homedir with e.g. `find ~ '!' -user "$USER"` (untested right now, but should be close enough): if you get any result, you might have issues with those files. You can limit that to `~/.config/` first if you have a lot of things in your homedir as s first indicator.
Other mature editors let you open the file without this disgusting and policial alert. They only do not allow to save, but OPENING TO VIEW the content, mature editors like Vim, Gediit and all others is OK. Only Geany Iimpedes you to EVEN open the file!!
Instead of an alert and impeding the user to open, a more **elegant** approach would be a colored bar on the top as it shows when it's going to be overwritten saying that ** the file is in read-only mode**!
Ranting is not needed and unhelpful, volunteers using their own time to develop software do not need to be SHOUTED at.
What version of Geany is that and where did you get it? The error message in Geany code is [here](https://github.com/geany/geany/blob/529f5d496b0182e495b3262407fa6e86533000fc...) and is not what is in the OP.
Not shouting, emphasis
The OP relates to accessing the socket file that is used for communication to an existing copy of Geany, that stops Geany execution to avoid corruption, it is nothing to do with opening the file.
And you havn't answered the question of where did you get the copy of Geany that gives a different message to the original, and what else has been changed in that copy?
Realistically the only thing we could do is add a button "Start a new instance anyway" kind of button to that dialog that would work as `-i`, or **maybe** offer to delete the problematic socket file as well, but that's not guaranteed to work either (depending on permissions). But that's adding support for a *fundamentally broken* use case.
We really should not be supporting operation with broken systems, and remember two Geanys in the same config do not share settings and sessions nicely anyway, its just generally a "bad thing" to do. Perhaps `-i` should prevent saving settings and sessions.
yeah i got this error when trying to run flatpak geany from terminal. had to install as system package
Closed #3871 as completed.
@TheMCMan the Geany project does not make the flatpack, so has no control of options it uses/does not use.
Closing because the OP is not going to be done for the reason clearly explained by @eht16 above, irrespective of various passionate views relative to root/sudo behaviour :smile:
github-comments@lists.geany.org