Especially If you just switched from Ubuntu to Linux Mint Debian Edition (LMDE) or pure Debian, you might get a bit confused or even frustrated when trying to start a program with root privileges. This might especially happen when you have multiple users setup or trying to start a program with root privileges remotely. In this article you should find some explanation and of course a way to get things the way you're used to. Note: This issue seems not to happen if you chose the Ubuntu based Linux Mint version.
The Local Issue
- Let's assume during installation you setup a user named John,
- on first bootup you setup another user account named Peter, and you're now logged in as Peter and want to start Synaptic.
- As usual you try to enter Peter's user password but it doesn't work.
- Just for fun you try John's password, it works and you don't think you know linux anymore
1. What actually happened
- Nevertheless the installer helps you setting up Linux Mint Debian Edition very comfortable, it doesn't tell you what actually happens when you setup the user John.
- John did not only become a regular user, but John's password became the password for the root account
- If a root account exists, Debian doesn't use (gk)sudo for starting up programs that demand root priviliges but is using (gk)su. The difference: gksudo asks for the user password, giving the user admin rights for starting up a program, gksu actually means starting up a program as root. Therefore gksu asks for the root password and gksudo for the user password. The same happens in a terminal: su is for root, sudo for a user that is in the sudo group
- Unfortunately this is not mentioned at all when you're asked for the password
2. How to get things back the way you are used to
- So it seems the task is to make LMDE use gksudo or sudo instead of gksu or su again. If you already went through forums to solve this issue, you might got the tip to just edit all menu links from programs that show this issue in a way that they are started with gksudo instead of gksu. This actually fixes the problem, but a much nicer and quicker way exists to solve it:
- open up a terminal window, copy/paste the following command and hit enter: sudo update-alternatives --config libgksu-gconf-defaults
- choose the gconf-defaults.libgksu-sudo option by entering the right number (normally it is option 3)
- to make the window manager use these new settings by default use the following command: sudo update-gconf-defaults
The Remote Issue
- Anytime you wanted to start let's say Synaptic on a remote machine using Ubuntu, you just locked in as a normal user, and entered sudo synaptic
- With almost pure Debian system like LMDE, you'll end up getting an error that starts with "X11 connection rejected because of wrong authentication......"
- To make sudo work again as you know it from Ubuntu is actually quite complicated. But there is a different way to start a program remotely with root previliges and using it is actually very easy:
- instead of using sudo synaptic just use gksudo synaptic or gksu synaptic
- having applied the changes above gksu now even asks for the user password instead of the root password