View Full Version : How to get root access from a gui?

February 7th, 2009, 01:46 AM
So I'm writing a java app to (rid some personal annoyances)/(set some personal variables) on some things in ubuntu that either frustrate me or simply I want set to something else...either way.. what I need to do is get root privileges to do some of these things. The idea is to pop up gnome's password screen, like if you were to open synaptic, and ask for the users root password before continuing with the program. I'm not entirely sure on how to do this, so any ideas?

Christopher Dancy

February 7th, 2009, 01:47 AM

February 7th, 2009, 01:48 AM
gksudo <command> or
sudo command

The latter would be for a terminal script

February 7th, 2009, 02:04 AM
yup that worked. Thanks guys.