Problems with gksu & gksudo

Asked by Marcus

When I try to launch an application that uses gksu the busy mouse wheel 'spins' for a few minutes then stops & the program I tried to open doesn't. There is no prompt for the root password. To use these applications requiring gksu I end up having to use the terminal. I've checked the line that starts the code int the menu window & can find no errors. After the password is accepted by sudo in terminal, I can use sudo from within terminal, but not by using launchers from menus. When I open these applications in the terminal I also get the following message before I can enter the root password, " unable to resolve host eod-laptop" .

gksudo does not work in the terminal.

How can I correct this problem, thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Elfy
Solved:
Last query:
Last reply:
Revision history for this message
sr0 (sr0) said :
#1

I don't know what's happening, but try reinstalling gksu:

     sudo aptitude reinstall gksu

Tell me if this works.

Revision history for this message
Marcus (mark-westrick) said :
#2

Thanks for the quick response. I just tried sudo aptitude reinstall gksu & it still doesn't work. I did not reboot after running this command but I don't think it matters. When I come back later I will check it again once I reboot (I need to walk away for a bit).

I'm wondering if "unable to resolve host {name of computer}" in the terminal window has anything to do with this, just wondering.

Again thanks for the quick response.

Revision history for this message
Tony Mugan (tmugan) said :
#3

Sounds a bit like something I've seen before...

http://sentana.net/ruben/2008/04/how-to-upgrade-ubuntu-gutsy-710-to-hardy-804/

Read the bit at the end...

"There is one bug that is very annoying when upgrading Ubuntu from Gutsy (or other version) to Hardy, and that relates to the user being unable to ’sudo’ anymore. The only way around it is to change the ‘/etc/hosts’ file prior to the upgrade by adding a line like this one:

127.0.0.1 computerhostname

If you have a domain name trailing the system host name, then it is better to copy that line, and delete the domain."

You may be able to use terminal and "sudo nano /etc/hosts" to edit the offending line.
If not, you could boot from the Ubuntu CD again in "live" mode and edit it.

Revision history for this message
Marcus (mark-westrick) said :
#4

I'm not sure what needs editing in the /etc/hosts file after upgrading to hardy 8.04. Can you elaborate? I've looked at the web page & it says to make the change before upgrading. Since I've upgraded already. My etc/hosts file has the following:

127.0.0.1 localhost
127.0.1.1 eod-laptop.EOD Wireless LAN

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Thanks!

Revision history for this message
Best Elfy (elfy) said :
#5

Change the /etc/hosts file to read like this in second line

127.0.1.1 eod-laptop

Open the file with gksudo if it let's you

gksudo gedit /etc/hosts

save, close and reboot

If you can't edit it there, boot recovery mode and do it from the command line with nano - Ctrl+O and enter to save, Ctrl+X to exit

nano /etc/hosts

Revision history for this message
Marcus (mark-westrick) said :
#6

Thank you to all who read this & provided help. This issue is resolved & why why Ubuntu will become the preeminent OS!