8

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 command sudo 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?

dagrha
  • 962

1 Answers1

21

Try deleting this file:

sudo -H rm ~/.config/geany/geany_socket_*

if you want you can move them to some folder temporarily.

muru
  • 197,895
  • 55
  • 485
  • 740
Alex Jones
  • 7,982
  • 9
  • 55
  • 94
  • NOTE: sudo geany <filename> works fine on my Ubuntu 14.04 Works & a good idea aren't synonymous – doug Nov 23 '14 at 23:00
  • @doug i said that because some people in comment above are advising to use gksudo which may not solve the problem – Alex Jones Nov 23 '14 at 23:03
  • If you do want to use sudo, at least use sudo -H. – muru Nov 23 '14 at 23:04
  • I had same issue manually I did delete the socket file in .cofig/geany and worked for me too thanks :) – Varshaan Mar 24 '16 at 06:45
  • Unbelieveable! I would never solve this on my own! – user568021 Jun 29 '16 at 06:19
  • 3
    @edward-torvalds 'box' seems to be your specific machine name (as in uname -n). One better types sudo -H rm ~/.config/geany/geany_socket_ and then press tab to see, what comes for autocomple (i.e. ____0) – Frank N Jan 14 '17 at 06:50