Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh)
#!/bin/sh
RUNNING=
export DISPLAY=:0.0
pd -open /home/abortx/pd/pdp-gem-bridge-3.pd &
while true; do
RUNNING=pidof pd
if [ -z $RUNNING ]; then
pd -open /home/abortx/pd/pdp-gem-bridge-3.pd &
fi
sleep 10
done
Thanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Ben,
I would like the script to be respawnd, in the rare case the script might crash. Afaik putting it in .xsessions only cares of starting the script, right?
Chrs, bart
On 02/17/2010 04:35 AM, B. Bogart wrote:
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
helllo,
if your desktop supports the freedesktop spec (LXDE, Gnome...), you just have to add a *.desktop entry in the ~/.config/autostart folder.
A .desktop looks like this (though you could refine/simplify it):
[Desktop Entry] Name=mypdlauncher Exec=/bin/sh /home/pduser/pd-daemon.sh Terminal=true
I read somewhere, although I've never tested it that you can add a @ in front of the .desktop entry to have restarted if it crashes.
Bart Koppe wrote:
Hi Ben,
I would like the script to be respawnd, in the rare case the script might crash. Afaik putting it in .xsessions only cares of starting the script, right?
Chrs, bart
On 02/17/2010 04:35 AM, B. Bogart wrote:
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Or, you can use 'while true <pd somefile.pd>' as the last command in your .xsession or .xinitrc
Oli44 wrote:
helllo,
if your desktop supports the freedesktop spec (LXDE, Gnome...), you just have to add a *.desktop entry in the ~/.config/autostart folder.
A .desktop looks like this (though you could refine/simplify it):
[Desktop Entry] Name=mypdlauncher Exec=/bin/sh /home/pduser/pd-daemon.sh Terminal=true
I read somewhere, although I've never tested it that you can add a @ in front of the .desktop entry to have restarted if it crashes.
Bart Koppe wrote:
Hi Ben,
I would like the script to be respawnd, in the rare case the script might crash. Afaik putting it in .xsessions only cares of starting the script, right?
Chrs, bart
On 02/17/2010 04:35 AM, B. Bogart wrote:
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Ubuntu, I call my startup script in ~/.bash_profile and my shutdown/cleanup script in ~/.bash_logout.
Also, you will need to put ". .bashrc" at the beginning of the .bash_profile so all the default shell settings will be setup when it is called.
On Feb 17, 2010, at 10:49 AM, Bart Koppe wrote:
Hi Ben,
I would like the script to be respawnd, in the rare case the script might crash. Afaik putting it in .xsessions only cares of starting the script, right?
Chrs, bart
On 02/17/2010 04:35 AM, B. Bogart wrote:
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by.≈?¬- Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Dan Wilcox danomatika.com robotcowboy.com
Hey Bart,
When the script running in xsession exits, it will restart X, so if you have autologin, and PD crashing does cause an exit, then it will restart automatically when it crashes. Note I don't find PD doing that on linux very often...
Also if PD stalls without exiting you can get the gallery staff to just "control-alt-backspace" to restart the patch without restarting the computer.
.b.
Bart Koppe wrote:
Hi Ben,
I would like the script to be respawnd, in the rare case the script might crash. Afaik putting it in .xsessions only cares of starting the script, right?
Chrs, bart
On 02/17/2010 04:35 AM, B. Bogart wrote:
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Ok, solved!
In the end I did the following (or one way to build a kiosk pd):
I'm running a fresh install of Debian Lenny, I now disabled gdm. update-rc.d -f gdm remove
Then I changed (thanks to the debian forums) the 1:2345:respawn:/sbin/getty 38400 tty1 entry in /etc/inittab to: 1:2345:respawn:/sbin/rungetty tty1 --autologin myusername and installed rungetty. Then put the following at the top in ~/.bash_profile
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then while [ 1 == 1 ] do startx sleep 10 done fi
And ran init q, which made me happy.. :)
Then I edited my .xinitrc to:
#!/bin/sh /home/abortx/./sw-daemon.sh & sleep 4 /home/abortx/./pd-daemon.sh & exec gnome-session
and all works. I only have to think about why using the standard gnome window manager ;)
Actually pd does crash sometimes. I have one script sending live mjpeg streams to vloopback (dev/video0). pdp_v4l seems to be the only object that can read virtual loopback devices.. This I send again to GEM. Then I also change the streams going to /dev/video0, so I don't make live easy for pd ;)
Thanks all for your help, greatly appreciated!
Bart
On 02/17/2010 06:09 PM, B. Bogart wrote:
Hey Bart,
When the script running in xsession exits, it will restart X, so if you have autologin, and PD crashing does cause an exit, then it will restart automatically when it crashes. Note I don't find PD doing that on linux very often...
Also if PD stalls without exiting you can get the gallery staff to just "control-alt-backspace" to restart the patch without restarting the computer.
.b.
Bart Koppe wrote:
Hi Ben,
I would like the script to be respawnd, in the rare case the script might crash. Afaik putting it in .xsessions only cares of starting the script, right?
Chrs, bart
On 02/17/2010 04:35 AM, B. Bogart wrote:
Hey Bart,
Put the PD startup stuff in your ~/.xsession, and configure your display manager to use xsession. (eg chosee 'Xclient script' in GDM)
.b. Bart Koppe wrote:
Hi,
I use PD-extended in Debian Lenny, this for a small media-installation. After the pc boots and logged into X, i would like pd (with gui) to start automatically. I made the script below and wanted to use that in /etc/inittab. It seems to start as root and does not show a gui either.
The script itself works perfectly ok when I run it myself. How can I configure inittab correctly so it runs as user instead of root, and shows the gui to?
My current inittab entry [to say: I don't know anything about inittab (blush) ] TY:23:respawn:/home/abortx/pd-daemon.sh
the script (pd-daemon.sh) #!/bin/sh RUNNING= export DISPLAY=:0.0 pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & while true; do RUNNING=
pidof pd
if [ -z $RUNNING ]; then pd -open /home/abortx/pd/pdp-gem-bridge-3.pd & fi sleep 10 doneThanks!
Bart
-- -----//////----- Bart Koppe bk at a-bort dot org http://a-bort.org -----//////-----
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list