![]() |
Help needed giving application root access during debugging/development
Hi
I'm trying to develop a bluetooth application for the n900 using Qt. However i'd like to test my app on my linux machine before porting it to maemo. I'm using hci_write_class_of_dev(dd,0x200408,0); from the bluez library to make the device the application is running on identify itself as a bluetooth handsfree device. But this function needs root access so I can't debug my application because the call to this function will always fail. Any Idea's on how I can solve this? I'm using Qt creator on Kubuntu as my development environment. Thanks in advance :) |
Re: Help needed giving application root access during debugging/development
How do you run anything as root? Run the app as the user root, or set the binary suid root. Or is there something more to this seemingly straightforward request that you forgot to include? Im sure i'm missing some detail that would make this make more sense.
|
Re: Help needed giving application root access during debugging/development
Quote:
How do i set the binary suid? |
Re: Help needed giving application root access during debugging/development
I found a work around. I just lunch Qtcreator as root and all my problems go away.
|
Re: Help needed giving application root access during debugging/development
Running Qtcreator as root is plain bad. This will let it destroy anything and everything if you foul up your build scripts. Furthermore, all files generated by it will be owned by root but saved in places where you'd most likely want to play around as normal user.
So, NEVER run build tools as root! |
Re: Help needed giving application root access during debugging/development
Quote:
|
Re: Help needed giving application root access during debugging/development
Quote:
You've got at least two suggestions in other comments already. But... SUID binaries are bad. Use sudo if you really want to run an application as root. Or start the application as root, and run the build process as a normal user. |
All times are GMT. The time now is 23:10. |
vBulletin® Version 3.8.8