Take the 2-minute tour ×
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 http://ubuntuforums.org/showthread.php?t=1462426

gksudo -- lshw -html>1.html

But what is the significance of --?

share|improve this question
add comment

1 Answer

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
add comment

Your Answer


