Originally Posted by bigearsbilly
sounds like a bad idea,
what are you trying to do?
I made a GTK based GUI tool for configuring network, thus network files need to be manipulated. But this can be done only as root. So the tool is to be executed through terminal as root but if if it is executed directly or say as normal user it reports bug and exits. What I want to do id make another GTK based dialog in the same tool which when executed first asks for root password and then provides root priviledges to itself, i.e., the step of switching to the root through the terminal is not to be done rather this is done when the app is executed.