1

I recently installed Pidgin on my Ubuntu machine along with OTR plugin. When I tried to generate a key, I get the following error in my console:

>> Could not write private key file

I think that maybe the normal user doesn't have the privileges for that action so I switch to root user.

Then when I tried to generate the OTR key, all worked fine.

The problem now is that every time I run sudo pidgin in my console, I don't see any windows of the program. and I get the following error in my console:

(Pidgin:12241): IBUS-WARNING **: The owner of /home/georgegks/.config/ibus/bus is not root!

So all in all I have two questions:

  1. Why I can't generate an OTR key on a normal user account?
  2. Why no window pop ups when I run the pidgin as root?
Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • You should probably run the famous sudo chown -R $USER: ~ to get back possibly messed up ownership of all files in your home directory after having used sudo pidgin. Otherwise you might encounter problems later... – Byte Commander Jan 10 '16 at 19:30

1 Answers1

1

Ok I found it.

Install gksu

sudo apt-get install gksu

Then run the program using gksu and not sudo command

gksu pidgin

Explanation:

Based on Ubuntu Documentation Page:

You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root. (AFAICT, this is all that's special about the environment of the started process with gksudo vs. sudo).

So gksu is basically a graphical frontend for sudo that allows graphical command to be run without the need to run an X terminal emulator and using su directly

Reference: This Question