HyperPixel 4 touchscreen installation issues

Copied and pasted form another thread I asked in, and decided for better visibility to start anew post.
__________________________________________________________________
Hey all, I see this thread is a bit old, but I am having issues with this exact install setup and am looking for help after all day banging my head on it. 

RPi4, HyperPixel4, I can get it to install fine on a standard raspian installation, but I cannot for the life of me get it to even finish the hyperpixel script with the Repetier Server installed. It either returns a 

main: line 116: /dev/tty: Permission denied

or an Unrecognized hardware error. Screen works great with everything else I've tried. Octoprint, Octodash. 

Any thoughts? 

Will also open a new thread for visibility, but thought I'd ply the knowledge amongst you folks as well. 

Comments

  • I don't have the display so no idea which commands you are running here, but permission denied is quite clear and easy to solve. Normally you install hardware as root so you have all required permission.

    On pi you can run
    sudo -i
    to be root for the rest of the session (until ctrl+D logs you out). So try running installation as root would be the first I'd try.
  • edited January 2021
    Greetings, and thanks for the reply. Looks like the curl command is not running properly as repetier server is installed on a buster lite version from what I can tell. Total pain in my ass. Is there anyway to install repetier server while I already have a full raspbian install?

    the command I'm running is

    curl https://get.pimoroni.com/hyperpixel4 | bash
    Broken
  • edited January 2021
    what in the fuck

  • wow even this forum is frustrating ot use. no delete...must be French or something
  • Image is based on raspbian lite with latest updates at time of creation. There is no full raspbian image since we did not want to waste all the disk space with all the extra stuff we do not need.
    Try
    sudo -i
    curl https://get.pimoroni.com/hyperpixel4 | bash

    To install as root. You can install addition packages if the display needs them.

    You can of course also install server on a regular pi installation image. You just will miss all our preconfigured stuff like webcam autodetection, automounting, network setup, autostart of chromium, shutdown button in gui. But you can of course do that on your own. Most of it is documented on our website and manual and the regular server functions are there anyway.

  • Repetier said:
    Image is based on raspbian lite with latest updates at time of creation. There is no full raspbian image since we did not want to waste all the disk space with all the extra stuff we do not need.
    Try
    sudo -i
    curl https://get.pimoroni.com/hyperpixel4 | bash

    To install as root. You can install addition packages if the display needs them.

    You can of course also install server on a regular pi installation image. You just will miss all our preconfigured stuff like webcam autodetection, automounting, network setup, autostart of chromium, shutdown button in gui. But you can of course do that on your own. Most of it is documented on our website and manual and the regular server functions are there anyway.

    I'm having the same issue and follow most of the helps here in the forum and nothing
    got this error with your sugestion

    Running as root, please log in as a regular user with sudo rights!

    maybe I'm too noob for this.....
  • What exactly are you executing and which error do you get?
  • Repetier said:
    What exactly are you executing and which error do you get?
    When I run this command ( curl https://get.pimoroni.com/hyperpixel4 | bash ) as Pi user I get this error message
    - main: line 116: /dev/tty: Permission denied

    When I run as root the command ( curl https://get.pimoroni.com/hyperpixel4 | bash) I got this message
    - Running as root, please log in as a regular user with sudo rights!
    and I cant install 
  • curl https://get.pimoroni.com/hyperpixel4 | sudo bash

    should run it as root while curl is run as pi. With sudo -i you become root. Guess curl does not like being run as root.
  • Repetier said:
    curl https://get.pimoroni.com/hyperpixel4 | sudo bash

    should run it as root while curl is run as pi. With sudo -i you become root. Guess curl does not like being run as root.
    Yes I did sudo -i
    and then I run the command and got (Running as root, please log in as a regular user with sudo rights!)
    How can I solve this issue? I would not like to downgrade to Octopi..... 
  • Did you test the new command I gave you run as pi:

    curl https://get.pimoroni.com/hyperpixel4 | sudo bash


  • Repetier said:
    Did you test the new command I gave you run as pi:

    curl https://get.pimoroni.com/hyperpixel4 | sudo bash


    Yes I did and got the same message

    main: line 116: /dev/tty: Permission denied 

  • Hab mir grad den code angesehen. Da stehen schon sudo drin, sollte also als use pi ausgeführt werden.
    wget https://get.pimoroni.com/hyperpixel4
    bash ./hyperpixel4

    Zeile 116 ist ein read um die Tastatur abzufragen. Möglich das es wegen der pipe so nicht klappt.
  • This is the same

    pi@RepetierServer:~ $ curl https://get.pimoroni.com/hyperpixel4 | sudo bash
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 40051  100 40051    0     0  98164      0 --:--:-- --:--:-- --:--:-- 97924

    This script will install everything needed to use
    HyperPixel4

    Always be careful when running scripts and commands copied
    from the internet. Ensure they are from a trusted source.

    If you want to see what this script does before running it,

    Running as root, please log in as a regular user with sudo rights!

  • Repetier said:
    Hab mir grad den code angesehen. Da stehen schon sudo drin, sollte also als use pi ausgeführt werden.
    wget https://get.pimoroni.com/hyperpixel4
    bash ./hyperpixel4

    Zeile 116 ist ein read um die Tastatur abzufragen. Möglich das es wegen der pipe so nicht klappt.
    pi@RepetierServer:~ $ wget https://get.pimoroni.com/hyperpixel4
    --2021-04-27 22:06:59--  https://get.pimoroni.com/hyperpixel4
    Resolving get.pimoroni.com (get.pimoroni.com)... 46.137.105.129
    Connecting to get.pimoroni.com (get.pimoroni.com)|46.137.105.129|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 40051 (39K) [application/octet-stream]
    Saving to: ‘hyperpixel4’

    hyperpixel4         100%[===================>]  39.11K  --.-KB/s    in 0.009s

    2021-04-27 22:07:00 (4.48 MB/s) - ‘hyperpixel4’ saved [40051/40051]

    pi@RepetierServer:~ $ bash ./hyperpixel4

    This script will install everything needed to use
    HyperPixel4

    Always be careful when running scripts and commands copied
    from the internet. Ensure they are from a trusted source.

    If you want to see what this script does before running it,


    ./hyperpixel4: line 116: /dev/tty: Permission denied

    Aborting...

  • This is where you get permission denied:
    confirm() {
        if [ "$FORCE" == '-y' ]; then
            true
        else
            read -r -p "$1 [y/N] " response < /dev/tty
            if [[ $response =~ ^(yes|y|Y)$ ]]; then
                true
            else
                false
            fi
        fi
    }

    especially  "read -r -p "$1 [y/N] " response < /dev/tty"  which is reading the terminal input stream.

    I can run the command
     read -r -p "$1 [y/N] " response < /dev/tty
    manually in terminal. Can you do the same?

    When I check permissions
    ls -l /dev/tty
    crw-rw---- 1 root tty 5, 0 Jan 28 15:17 /dev/tty

    I see you need to member of group tty

    Checking if pi belongs to tty:
    cat /etc/group | grep tty
    tty:x:5:repetierserver,pi

    answer is yes. If you are running this as user pi you should get same permissions. If you always want to say yes you can also run
    bash ./hyperpixel4 -y

    so it never uses /dev/tty where you have permission problems.
  • Repetier said:
    This is where you get permission denied:
    confirm() {
        if [ "$FORCE" == '-y' ]; then
            true
        else
            read -r -p "$1 [y/N] " response < /dev/tty
            if [[ $response =~ ^(yes|y|Y)$ ]]; then
                true
            else
                false
            fi
        fi
    }

    especially  "read -r -p "$1 [y/N] " response < /dev/tty"  which is reading the terminal input stream.

    I can run the command
     read -r -p "$1 [y/N] " response < /dev/tty
    manually in terminal. Can you do the same?

    When I check permissions
    ls -l /dev/tty
    crw-rw---- 1 root tty 5, 0 Jan 28 15:17 /dev/tty

    I see you need to member of group tty

    Checking if pi belongs to tty:
    cat /etc/group | grep tty
    tty:x:5:repetierserver,pi

    answer is yes. If you are running this as user pi you should get same permissions. If you always want to say yes you can also run
    bash ./hyperpixel4 -y

    so it never uses /dev/tty where you have permission problems.

    pi@RepetierServer:~ $ read -r -p "$1 [y/N] " response < /dev/tty

    -bash: /dev/tty: Permission denied

  • Waiting for the answer to the other parts I wrote as well.
  • pi@RepetierServer:~ $read -r -p "$1 [y/N] " response < /dev/tty

    -bash: /dev/tty: Permission denied


    pi@RepetierServer:~ $ ls -l /dev/tty

    crw-rw---- 1 root tty 5, 0 Apr 27 23:10 /dev/tty


    pi@RepetierServer:~ $ cat /etc/group | grep tty

    tty:x:5:repetierserver


    bash ./hyperpixel4 -y

    ./hyperpixel4: line 642: /dev/tty: Permission denied

    Invalid choice:


    Hope I answer all the parts :)





  • for some reason use pi is not member of tty. Run
    sudo adduser pi tty
    log out and log in again. Now
    groups
    should list that pi is also in tty and script should work. 
  • edited April 2021
    Repetier said:
    for some reason use pi is not member of tty. Run
    sudo adduser pi tty
    log out and log in again. Now
    groups
    should list that pi is also in tty and script should work. 
    Thank you I was able to install it but now I got and error.... and the touch is not working 

    pi@RepetierServer:~ $ hyperpixel4-rotate left
    Rotating display
    Can't open display
    Traceback (most recent call last):
      File "<stdin>", line 3, in <module>
    ImportError: No module named screenlayout
    Setting matrix: 0 -1 1 1 0 0
    Unable to connect to X server
    Saving touch settings to /etc/udev/rules.d/98-hyperpixel4-calibration.rules

  • When you run from ssh you need to define which display you mean, so normally you send
    export DISPLAY=:0

    then displays are found for commands depending on x server.
Sign In or Register to comment.