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

Please just add a -i in the geany.desktop for not stuck in "other use socket" improperly. #3871

Open
osergioabreu opened this issue May 11, 2024 · 13 comments

Comments

@osergioabreu
Copy link

osergioabreu commented May 11, 2024

It is very frustrating to click on a textfile and Geany gives an error 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
@eht16
Copy link
Member

eht16 commented May 19, 2024

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.

@elextr
Copy link
Member

elextr commented May 19, 2024

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.

Edit: of course don't delete the socket link if you have another Geany running :-)

@b4n
Copy link
Member

b4n commented May 19, 2024

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.

@elextr
Copy link
Member

elextr commented May 19, 2024

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 ...

@b4n
Copy link
Member

b4n commented May 20, 2024

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.

@osergioabreu
Copy link
Author

osergioabreu commented May 20, 2024

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!!

@osergioabreu
Copy link
Author

osergioabreu commented May 20, 2024

Instead of an alert and impeding the user to open and view the file text - that's the job of a TEXT EDITOR, 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!

@elextr
Copy link
Member

elextr commented May 20, 2024

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 and is not what is in the OP.

@osergioabreu
Copy link
Author

Not shouting, emphasis

@elextr
Copy link
Member

elextr commented May 20, 2024

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.

@elextr
Copy link
Member

elextr commented May 20, 2024

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?

@b4n
Copy link
Member

b4n commented May 20, 2024

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.

@elextr
Copy link
Member

elextr commented May 20, 2024

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.

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

4 participants