Code Monkey home page Code Monkey logo

Comments (4)

Roysten avatar Roysten commented on August 15, 2024

This library does not work from a graphical user interface (X11/Wayland), you have to make sure to run the code from the linux framebuffer (e.g. ctrl-alt-f1 on Ubuntu).

If you did, then I will have to investigate this further.

from rust-framebuffer.

Ziqi-Yang avatar Ziqi-Yang commented on August 15, 2024

Thank you for your advice! <3
I didn't run the code from tty before. However, this time I tried to run code from tty, the same error occurs again. Here is the screen shot, which is produced by fbgrab.
rust-framebuffer_error
Besides, there are some of my basic system information (IDW what to put here XD:

                   -`                    zarkli@myArch 
                  .o+`                   ------------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Kernel: 6.4.12-zen1-1-zen 
               `+oooooo:                 Shell: fish 3.6.1 
               -+oooooo+:                Resolution: 3200x2000 
             `/:-:++oooo+:               WM: sway 
            `/++++/+++++++:              Theme: Layan-Dark [GTK2/3] 
           `/++++++++++++++:             Icons: Tela-dracula [GTK2/3] 
          `/+++ooooooooooooo/`           Terminal: kitty 
         ./ooosssso++osssssso+`          CPU: 11th Gen Intel i7-11370H (8) @ 4.800GHz 
        .oossssso-````/ossssss+`         GPU: NVIDIA GeForce MX450 
       -osssssso.      :ssssssso.        GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
      :osssssss/        osssso+++.       Memory: 9926MiB / 15778MiB 

from rust-framebuffer.

Roysten avatar Roysten commented on August 15, 2024

I just verified this on my own Archlinux setup, and it seems that it is no longer allowed to access the framebuffer device as root. You can follow the steps in the readme on how to add you to the video group. Once you have added yourself it will work and you no longer have to use sudo to run cargo or your executables 😄.

I will remove the sudo part from the readme.

from rust-framebuffer.

Ziqi-Yang avatar Ziqi-Yang commented on August 15, 2024

It works! Thanks you <3

from rust-framebuffer.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.