cannot open applications after using sudo
Author Message
Posted : Sat, 24 January 2009 09:37:40
Subject : cannot open applications after using sudo
Hi, I'm quite a newbie, using openSUSE 11.0. I encounter a problem when I want to connect to the internet. For this, I use sudo NetworkManager The problem is that I cannot open any applications anymore after having used the sudo command (so I also need to open the browser before connecting to the internet). The error I get is: Invalid MIT-MAGIC-COOKIE-1 keyError: cannot open display: :0.0 I have no clue why I suddenly have this problem, since it worked fine for a couple of days. Can anybody help?
arochester
Posted : Sat, 24 January 2009 11:29:26
Subject : cannot open applications after using sudo
Has sudo ever worked with using openSUSE 11.0 for you ? It uses : su ...as a separate step first ... Try that.
Reed
Posted : Sat, 24 January 2009 14:38:44
Subject : cannot open applications after using sudo
Well, I'm fairly sure the error is because your root account can't open the display while your user has it. I'm really unclear why you're using "sudo NetworkManager" to begin with. You should probably just start the network manager applet. From the command line type: nm-applet & No sudo necessary. Unless you're not using a panel or have no system tray?
mararie
Posted : Sat, 24 January 2009 17:14:45
Subject : Re: cannot open applications after using sudo
hi, i also think the problem is that the root account cannot open the display. when i try the networkmanager applet, i get the following error message: WARNING **: applet_dbus_manager_start_service(): Could not acquire the NetworkManagerUserSettings service as it is already taken. Return: 3 i don't know what this means, any ideas?
thobbs
Posted : Sat, 24 January 2009 18:30:54
Subject : Re: cannot open applications after using sudo
Well, honestly this is probably not the correct thing to do, but it's handy information for starting GUI programs from the shell, especially if you are using something like [b]cron[/b]. You can set the DISPLAY variable within the command, like this:[code=xml]sudo DISPLAY=:0.0 NetworkManager[/code]That might not fix anything for you, but I've used if for some cron things before.