Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
sudo lshw -html>1.html 

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


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

gksudo -- lshw -html>1.html

But what is the significance of --?

share|improve this question

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


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.