Running build as root

Sysprogs forums Forums VisualGDB Running build as root

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12305
    Brian Beuken
    Participant

    I’m having a bit of trouble running a demo on a Linux (Debian) based machine. It works perfectly on Rasbian and I discovered the reason was that my key read system loads the kbd event file to process key reads.. On Rasbian, these are open and accessible, but on Linux they are restricted to root/admin. I can set chmod to alter the permission level of /dev/input/* but that means going into a terminal ever time I reset the system (often) and I would rather execute my project with sudo from visual studio,
    is it possible to do that in VisualGDB? I have been hunting in the build options for a way to run my build with a sudo ./ myapp but can’t see anything?

     

    #12307
    support
    Keymaster

    Hi,

    Please use the following option:

    Solution Explorer->VisualGDB Project Properties -> Debug Settings->Run debugger as root with sudo.

    #12312
    Brian Beuken
    Participant

    Aha…there it is right in front of my all this time, thanks

     

    unfortunatly this does not solve my issue, in fact it creates new ones, my build runs, but no longer opens an X11 or GLES2.0 context to render to.

     

    Any idea why that might be? *

     

     

    *This could be normal linux behaviour, I’m honestly not a linux coder so things like this are quite confusing to me.

    #12318
    support
    Keymaster

    Hi,

    If your program uses X11, the ‘sudo’ command won’t automatically forward the X11 connections. The easiest way around it would be to create a new ‘root’ connection to your Linux machine (instead of the current user name). You may need to enable root logins explicitly in your sshd configuration (check your Linux distro manual for specific steps to do that).

    #12320
    Brian Beuken
    Participant

    Ah, sadly my understanding of linux means I have no clue how to do that, but I appreciate its not a Visual GDB issue,  I’ll try to locate a linux guru to assist me, thanks for the advice.

    #12323
    support
    Keymaster

    Hi,

    Yes, this is a known limitation of Linux systems, although it’s very well-known and relatively well-documented, so as long as you can find someone with basic Linux knowledge, they should be able to figure it out quickly.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.