Results 1 to 5 of 5

Thread: Can't init SDL unless running as root?

  1. #1
    Join Date
    Apr 2012
    Beans
    4

    Can't init SDL unless running as root?

    I finally replaced my nine-year-old Linux computer and am trying to get the new one set up. After installing Ubuntu 20.04 LTS, I installed both Tile World, which I compiled from source, and Dosbox which I installed through apt-get. Both of them require SDL so I had to install this first.


    The problem: The installed games won't run unless I'm root. If I run from the start menu, nothing happens. In console, it tells me that it can't initialize SDL because "No available video device".


    Interestingly, I can run either of these games via sudo. When I do, though, it runs it full screen, not in a window.


    I'm wondering if some library file needs permissions? Anyway, any suggestions or other help would be appreciated. Thanks in advance.



    In case it matters, my graphics card is a NVIDIA Corporation GK208B [GeForce GT 710] using NVIDIA driver metapackage nvidia-driver-440.

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,221
    Distro
    Ubuntu

    Re: Can't init SDL unless running as root?

    There should be a conf file in ~/.dosbox.
    Check the ownership and perhaps try changing the output setting.
    The file gives the options available. Default should be surface, but there should be others like opengl and overlay.

    (check the ownership because chances are if run as root the ownership is now root,
    so maybe resetting the owner to your user may help.)

    Oh, and...
    Thread moved to Emulators
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Apr 2012
    Beans
    4

    Re: Can't init SDL unless running as root?

    Thank you for looking at this. I tried moving the dosbox executable from /root/ (where the installer put it for some reason) to /usr/bin, and made sure that my user has access to both that and the config file as well as ownership of both. Also tried moving the executable into my own home directory. Also tried various other options for output in the config file. Still no dice. When running as myself it says Can't init SDL No available video device. When running as root via sudo, it insists on going full-screen even though that option isn't set in the config file. It also messes up the keyboard mapping, but that's probably a separate issue.

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,221
    Distro
    Ubuntu

    Re: Can't init SDL unless running as root?

    I tried moving the dosbox executable from /root/ (where the installer put it for some reason) to /usr/bin
    ?
    How'd you install it?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  5. #5
    Join Date
    Apr 2012
    Beans
    4

    Re: Can't init SDL unless running as root?

    I believe it was through sudo apt-get.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •