I needed to start a python program in background i.e daemonize it,so I wrote a init script for this purpose.But the problem is that whenever I write the command
sudo start service solon_server(name of script)
the program runs but the init script doesn't return.
In Debian-based distributions (and here I’m also talking about the widely-spread Ubuntu), there is no rc.local file preinstalled. The good thing is that you can make one easily so you can have a place to put commands to be started up automatically at boot. Here’s what you have to do:
sudo nano /etc/init.d/local.autostart
hy,
i have a python script. It works.
example:
Code:
#!/usr/bin/env python
print "hello world"
i have put this script in the startup applications (system -> preference -> startup application)
i don't know if this script work at the boot.
I have some parameters that I would like to change in /etc/xdg/lxsession/LXDE/autostart, before it is run. I get the parameters from a grep command. I would like to feed them to the autostart file but am not sure how.
Currently, what I have is grep "stuff" /file/one which outputs 1234.
I want to put 1234 in the autostart file like
....
@program 1234
....
Hello Crunchbangers,3 easy peasy questions regarding autostart and rc.local, so that I can have a clearer idea please!1 - What script language are these in? Shell, isn't it? Can I change them to bash by putting #! bin/bash in front?2 - I know rc.local is run as sudo at bootup after all other rc's. Is autostart run as sudo as well? is it run before or after rc.local?
I'm using simple tiling manager.This programm have one .py file.
How to autostart this .py file with parameters after login?
If it important, i'm using gnome 2.
Already tried to add bash script, which runs my .py to rc.local, but nothing.
Ok, very new to Linux and used an old PC to install Lubuntu. I'm trying to get a program to run on boot, instead of when you login. Program being Synergy.
I've got it to the point it will run when you login by adding a line to the /etc/xdg/lxsession/Lubuntu/autostart file. Added "synergyc 111.111.1.11" and it works perfect.
Hello,
Hello,