Answer the question
In order to leave comments, you need to log in
Autorun script after LXDE fully loaded?
Good day.
I have one problem here, at first glance simple, but I just can’t solve it, even after active searches in Google.
There's Debian with LXDE (on a Raspberry Pi, but that's not essential) and there's a Node.js server that runs xdotool (a mouse and keyboard simulation utility) when receiving messages. Accordingly, this server must be launched from X, so that xdotool can access LXDE elements.
The task is to make this server autostart when LXDE starts.
What I've already tried:
• Run as a service from init.d/. It's useless, as I understand it, these services are loaded regardless of X
• Put the startup command in ~/.config/autostart/auto.desktop. Doesn't work, I don't know why
• Now the following scheme works: when LXDE starts, I immediately launch the terminal, and in .bash_profile I prescribe the launch of this server. At startup, I check a variable created specifically to indicate the operation of this server, and if it is equal to zero (it means the server is not started), I execute the simplest xdotool version command, and if the error does not occur, then the X is already running and you can start the server. However, it seems to me that all this is very similar to a five-wheeled bicycle with an atomic rocket instead of a frame - I would like to start the whole thing somehow more correctly ...
Accordingly, the question is - How to autostart the server only after LXDE is fully loaded?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Try editing the file:
/etc/xdg/lxsession/Lubuntu/autostart
and add an entry like this:
@command
Here is an example of running the rdesktop command at startup:
@rdesktop server
Some links:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=27&t=11256
http://superuser.com/questions /146457/how-do-i-add-startup-applications-in-lubuntu-lxde
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question