Linux Companion App (LNXlink)

@vijaykbhatia My app is not meant to be working on headless machines because it depends on some graphical components.
You can delete some files that might cause the problem:

  • send_keys.py
  • media.py
  • notify.py

It’s best to create issues on github because it’s easier for me to keep track of them.

And even on non headless machine, I think it wiil not work if service is started as root user, cause it require (again) some graphical component and most of Linux distros are not allowing the use of X to root (at least, not out of box).

Thanks for the advice, ill create an issue and will give your idea a go.
Cheers

hi I’m trying to install, but can’t seem to get it work.
I’m running manjaro. This is the error that I get

Looking for GIT…
Looking for Python3…
Looking for PIP3…
Already exists, updating…
From https://github.com/bkbilly/lnxlink

  • branch master → FETCH_HEAD
    Already up to date.
    Installing Python requirements…
    Requirement already satisfied: PyYAML>=5.3.1 in /usr/lib/python3.10/site-packages (from -r /opt/lnxlink/requirements.txt (line 1)) (5.4.1)
    Requirement already satisfied: paho-mqtt>=1.5.1 in /usr/lib/python3.10/site-packages (from -r /opt/lnxlink/requirements.txt (line 2)) (1.6.1)
    Requirement already satisfied: notify2>=0.3.1 in /usr/lib/python3.10/site-packages (from -r /opt/lnxlink/requirements.txt (line 3)) (0.3.1)
    Requirement already satisfied: psutil>=5.8.0 in /usr/lib/python3.10/site-packages (from -r /opt/lnxlink/requirements.txt (line 4)) (5.9.0)
    Requirement already satisfied: mpris2>=1.0.2 in /usr/lib/python3.10/site-packages (from -r /opt/lnxlink/requirements.txt (line 5)) (1.0.2)
    Requirement already satisfied: pynput>=1.7.3 in /usr/lib/python3.10/site-packages (from -r /opt/lnxlink/requirements.txt (line 6)) (1.7.6)
    Requirement already satisfied: evdev>=1.3 in /usr/lib/python3.10/site-packages (from pynput>=1.7.3->-r /opt/lnxlink/requirements.txt (line 6)) (1.4.0)
    Requirement already satisfied: python-xlib>=0.17 in /usr/lib/python3.10/site-packages (from pynput>=1.7.3->-r /opt/lnxlink/requirements.txt (line 6)) (0.31)
    Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from pynput>=1.7.3->-r /opt/lnxlink/requirements.txt (line 6)) (1.16.0)
    sudo: apt: command not found
    User configuration setup…
    Traceback (most recent call last):
    File “/opt/lnxlink/config.py”, line 29, in
    with open(config_file) as f:
    FileNotFoundError: [Errno 2] No such file or directory: ‘/opt/lnxlink/config.yaml’
    Installing as a service…

All done!
Enjoy!!!

Any ideas on whats going on?

If I’m not mistaking, Manjaro is similar as Archlinux, right? I’m running on Arch and if I remember correct, /opt/lnxlink/config.yaml file wasn’t exist after installation. Instead, there was a config_temp.yaml on mentioned location, so I created config.yaml by copying content from config_temp.yaml

Is there any way for this to check if the screen is locked or not?
I want to trigger my lights when I unlock or lock the machine.

It seems to be possible, but I have to look deeper so that I can be sure.
I’ve created a feature request issue on my github.

1 Like

Is it possible to send the “screen on” command to wake the screen?

I’ve added support for many sensors, including the screen on/off that @Iceman24 wanted.

1 Like

It would be ace if LNX Link could you show whether systems updates are available (yum/apt).

1 Like

It’s a nice idea, I’ve created a feature request on my github.

1 Like

Worth mentioning that the install instructions and modules now support running on a headless server.

Hello together,
sorry but i need a little help, im a little confused about the installation instruction.

  • Download the LNXlink application and install it on your Linux machine: pipx install lnxlink

On which linux machine? The Home Assistant ? Or on the machine i want to control?

When i try on Home Assistant machine i get the error : pipx : command not found.
So i need to install pipx i think. But on which machine? i dont want to install it unnecessary on one of my linux machines.

Sorry, copy paste the text was not possible

This won’t work on your Home Assistant instance. You will need to install it on the machine you want to control.
Keep in mind that you need to have an MQTT broker installed on your Home Assistant instance for the LNXlink app to communicate with Home Assistant.

1 Like

Thank you very much for your reply.

Hi Thanks for this. I have sensors working and i can suspend etc but the media player is not working for me. The entity is there but it is showing as unavailable (grayed out in Media browser, music assistant etc) if I send a service call in developer tools I get a green checkmark but nothing happens on my computer. Any thoughts?

With the use of hass-mqtt-mediaplayer you can control the current media that’s playing, play TTS and some other things. You can find more information about it here. Keep in mind that it depends on cvlc to play media, so it needs to be installed.

Unfortunately currently it doesn’t support playing media from the Media Browser, so most likely it won’t support the music assistant that you mentioned.