Friday, March 2, 2018

tty - Run a command on GUI (TTY7) on boot/login

I am using an Xenial Xerus minimal Ubuntu install.


I want a command ("antimicro") to be run on boot/login (doesn't matter) to map my Bluetooth controller buttons to keyboard keys.
The farthest I could get is:


DISPLAY=":0" antimicro --hidden

Which does not work as a cron job, gdm postlogin commands or ~/.profile (gdm and Kodi not running), it seems to require a logged in terminal. It worked well when I execute it manually on tty1, it will display log and "occupies" the terminal until the application is closed.


I don't mind turning on auto login or disabling password etc. It's a HTPC running Kodi, and that's why I want it to be run automatically on each boot.


I am quite new on Linux and this may just be a stupid question, sorry if that's the case. I have tried my best to find information online.


EDIT: it's probably not a duplicate, none of the solutions worked.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...