View Single Post
darethehair's Avatar
Posts: 273 | Thanked: 104 times | Joined on Mar 2007 @ Manitoba, Canada
#315
Originally Posted by mplawner View Post
Based on JohnX's a2dp script, I've made the following to toggle, enable or disable hostmode.

Copy the script below into /usr/bin/hostmode
Make the script executable with chmod +x /usr/bin/hostmode
Add the following line to /etc/sudoers:
user ALL = NOPASSWD: /usr/bin/hostmode
Add the command: /usr/bin/hostmode toggle to osso-statusbar-cpu's command settings and enjoy!
Mplawner, thanks for the script! The only thing I had trouble with it that it would not work using 'oss-statusbar-cpu', but only while root in a shell. I tracked it down to 'sudo' permissions. I think you must add 'sudo' to the command in that applet for this idea to work i.e.

sudo /usr/bin/hostmode toggle
 

The Following 2 Users Say Thank You to darethehair For This Useful Post: