sudo geany throws fatal error
Try deleting this file:
sudo -H rm ~/.config/geany/geany_socket_*
if you want you can move them to some folder temporarily.
Related videos on Youtube
dagrha
Updated on September 18, 2022Comments
-
dagrha over 1 year
I really like the Geany text editor, and would like to use it instead of gedit for all text editing. However, every time I try to launch Geany from the terminal using
sudo geany file.conf
, I get this error:(geany:10203): Geany-WARNING **: Geany tried to access the Unix Domain socket of another instance running as another user.
This is a fatal error and Geany will now quit.
I am the only user logged in to the machine. There are no instances of Geany already running when I type that command into the terminal. Geany has no trouble launching from the command line if I don't use a
sudo
. I also don't have any trouble running Gedit with elevated privileges; the commandsudo gedit file.conf
functions flawlessly.What is going on here? How can I fix this so that I can edit text files in Geany with elevated privileges?
-
Tim over 9 yearsWhy are you using
sudo
? -
dagrha over 9 yearsI'm using sudo when I want to edit a file that needs elevated privileges; as just one example,
/etc/samba/smb.conf
-
DK Bose over 9 yearsWhat about gksudo?
-
Tim over 9 yearsRight then, as the link above says, use gksudo.
-
dagrha over 9 yearsthanks,
gksudo
does the trick. why doessudo gedit
work-- shouldn't gedit also need thegksudo
? -
Tim over 9 yearsIt should... Gedit is assuming the user knows to do it right (not use
sudo
. It is a bad idea on GUI apps... -
Edward Torvalds over 9 years
sudo geany <filename>
works fine for me, on ubuntu 14.04 -
Rodrigo almost 8 years
sudo geany <filename>
has been working for more than a year. Today I got this error message for the first time. -
j0h almost 7 yearsWhy does this error happen, and what can be done to prevent it?
-
-
doug over 9 years
NOTE: sudo geany <filename> works fine on my Ubuntu 14.04
Works & a good idea aren't synonymous -
Edward Torvalds over 9 years@doug i said that because some people in comment above are advising to use gksudo which may not solve the problem
-
muru over 9 yearsIf you do want to use
sudo
, at least usesudo -H
. -
Varshaan about 8 yearsI had same issue manually I did delete the socket file in .cofig/geany and worked for me too thanks :)
-
user568021 almost 8 yearsUnbelieveable! I would never solve this on my own!
-
Frank Nocke over 7 years@edward-torvalds 'box' seems to be your specific machine name (as in
uname -n
). One better typessudo -H rm ~/.config/geany/geany_socket_
and then press tab to see, what comes for autocomple (i.e. __<my-machine>__0)