[Mono-list] Administrator privileges for my App when running from MonoVS

Christopher David Howie me at chrishowie.com
Tue May 18 00:50:25 EDT 2010

On 05/17/2010 11:18 PM, ivancmz wrote:
> Thanks Christopher, I found that in OpenSuse ttyS0 is owned by the
> group "uucp", so I added my user to this group and it worked... I
> have access to the serial port, so thank you very much this is one
> big step... but like you said this is quick-and-dirty approach...

My apologies, I meant that changing the permissions (making the device
world-readable and world-writable) was quick-and-dirty.  Adding users to
groups that have access to devices is the proper way to grant
permissions to access such devices.  When possible, your users should
take this route.

> it would be kind of difficult for me to ask my clients to change 
> their users settings, if that's the way to do it, I'll have to write 
> a tutorial for them xD... but does anyone have another idea?

If you really want to you can write a shell script that tests if the
user has read and write access to the serial port.  If they do, it just
runs your program.  Otherwise, it runs gksu or su to invoke your Mono
app as root.

This is probably the cleanest mechanism if you don't want to require
that your users properly assign groups to users, since it separates the
authentication and authorization steps from your app entirely.

Chris Howie

If you correspond with me on a regular basis, please read this document:

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5


This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses you are
agreeing that I am, by definition, "the intended recipient," and that I
may do whatever I wish with the contents of any message you send me,
unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.

More information about the Mono-list mailing list