Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
sudo lshw -html>1.html 

works perfectly.I get system information in 1.html.

But,

gksudo lshw -html>1.html 

doesn't work.I get gksudo usage options in 1.html

Information: I am developing an app in Quickly.I need that my user will have to enter password in a graphical prompt in order to generate a system information report.But

os.system('gksudo lshw -html>1.html')

is not working.What is the solution?

EDIT: One solution found in http://ubuntuforums.org/showthread.php?t=1462426

gksudo -- lshw -html>1.html

But what is the significance of --?

share|improve this question

1 Answer 1

sudo is used for running command line utilities whereas gksudo is used for running graphical utilities.

While you can run the other with both these commands, it is not advisable to do so. Since lshw is a command line utility, it will work best with sudo.

Also, in the link that you've mentioned, one of the person has posted the use of --.

it tells the app to stop reading options. Without it, gksudo will treat any argument starting with a - as an option to gksudo. When it encounters --, all arguments following will no longer be treated as options to gksudo, and just passed on to the child process.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.