make sudo suggestions/help text 'sudo' aware

Bug #236158 reported by Paul Sladen
4
Affects Status Importance Assigned to Milestone
powertop (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: powertop

By default, 'powertop' prints information such as:

  "PowerTOP needs to be run as root to collect enough information"

and:

  "echo 1500 > /proc/sys/vm/dirty_writeback_centisecs"

The first message can be changed to be more generic "root, or using 'sudo $0'". The second message can check $0 of the parent process and if being run via sudo display suggestions as:

  echo 1500 | sudo tee -a /proc/sys/vm/dirty_writeback_centisecs

Paul Sladen (sladen)
Changed in powertop:
importance: Undecided → Wishlist
Revision history for this message
Simon Bohlin (simon-bohlin) wrote :

Talking to Arjan (of the original authors), the language change could be done if the opinion for doing this would be strong enough, i.e. ovewcome the nuisance of having to get new translations. It seems translations are handled outside of the original authors' source trees.

Revision history for this message
Simon Bohlin (simon-bohlin) wrote :

In powertop.c (http://code.google.com/p/powertop/source/browse/trunk/powertop.c) there's a message when run without root capabilities.

901: if (geteuid() != 0)
902: printf(_("PowerTOP needs to be run as root to collect enough information\n"));

A change suggestion that would help beginner users:
      printf(_("PowerTOP must be run as root (sudo powertop) for full functionality\n"));

Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

I am marking this bug as confirmed.

Changed in powertop (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.