Page 4 of 24

Cron

Posted: Fri 10 Feb 2012, 21:16
by impmonkey
Just installed this and it is great!
Having a bit of trouble getting cron jobs to run in this though. I'm sure I am just over looking something.

Inside /var/spool/cron/crontabs I have two files.
update.sc
and root

The contents of update.sc

Code: Select all

#!/bin/sh
echo 'updating...'
mpc update > /dev/null
while [ -n "$(mpc | grep Updating)" ] ; do sleep 5 ; done
echo 'adding...'
mpc clear
mpc add / > /dev/null
mpc random 1
mpc play
The contents of root

Code: Select all

09 12 * * * /var/spool/cron/crontabs/startup
The script runs great when run manually.

Output of crontab -l

Code: Select all

09 12 * * * /var/spool/cron/crontabs/startup
Crond is running. Output of # ps -ef | grep cron

Code: Select all

root      5333     1  0 12:06 ?        00:00:00 crond
root      5410  5193  0 12:15 pts/0    00:00:00 grep cron
Any ideas?

Posted: Sat 11 Feb 2012, 03:00
by ldolse
Thanks for the heads up - I hadn't messed around with Cron at all yet, so not sure why it's not working - what are you doing to start crond? Did you start it manually or create some sort of init script?

btw, mpd.conf is configured to auto-update the db any time the music directory changes - is this not working? (note I haven't really tested that either)

Give me a couple days to dig into it and repro/find a solution

edit: don't have a solution, but just looked at the system to see what version of crond is installed, and it's using busybox cron, this isn't necessarily a bad thing, but I know busybox often has some quirks vs the official variant of a util.

This thread had some Puppy specific advice that seemed to help people:
http://www.murga-linux.com/puppy/viewtopic.php?t=23544

Posted: Mon 13 Feb 2012, 17:03
by impmonkey
The big thing is I need to to not only update the database but also the playlist.
I started cron manually with crond

Thanks!

crond

Posted: Fri 02 Mar 2012, 08:07
by ldolse
Sorry it took me so long to dig into this. I just got it working with some minor changes to what you posted originally.

update.sc I left alone in terms of content, but I did make sure it was executable:

Code: Select all

chmod +x /var/spool/cron/crontabs/update.sc
The content of /var/spool/cron/crontabs/root needed to be edited so that it called 'update.sc' instead of startup:

Code: Select all

* * * * * /var/spool/cron/crontabs/update.sc
Note I only changed minutes/hours to '*' for testing, feel free to set as desired.


As long as we're on the topic of cron, I was thinking it would be nice to set up a GUI front end for cron to use for alarm clocks, etc. Does anyone know of any CLI friendly GUI's for cron? I know there are various GUIs for X, but something ncurses based would be better for people using mpdPup headless. An alternative would just to use the dialog/Xdialog date/time interface as a front end, but I don't think it outputs in a cron friendly manner - some massaging and converting would be required.

Thanks

Posted: Tue 06 Mar 2012, 10:18
by Magellan
Hi!
I just wanted to say thank you very very much for setting upp this MPD puppy dist and for sharing it with us. I have just installed it and it works nice and the sound is even better I think than with my previous Windows driven music player. It even works with 24bits over USB. I have tried to set up voyager MPD some year ago, but despite I am not completly new to linux, I found voyager to be rather complicated. This is much better.

Posted: Thu 08 Mar 2012, 18:52
by ldolse
Hi Magellan, glad to hear mdpPup is working well for you. If you have any feedback/requests feel free to let me know.

Posted: Fri 16 Mar 2012, 15:17
by impmonkey
Awesome! Thanks. I would love a cron gui!

Posted: Mon 26 Mar 2012, 18:32
by impmonkey
what would be the best way to have crond start at boot? I don't run the GUI as this is a virtual machine so I don't think the usual start up folder will work.

Posted: Tue 27 Mar 2012, 06:25
by ldolse
The correct way would probably be to create an init script and stick it in /etc/init.d/

A simpler way (but perhaps more of a hack) is to just add a line to the end of /etc/rc.d/rc.sysinit which starts /usr/sbin/crond

Posted: Tue 27 Mar 2012, 17:22
by outis
@Idolse
mpdPup - great job !

A few questions/annotations:

1. Every time I log in with PuTTY there is the message "Change your pw". I did this more than once, but next login the messagebox is there again. Changes are saved at shutdown/reboot.

2. date/time: On the commandline the date/time is correct but not for PuTTY.

3. Is it possible to install additional software e.g. screen or phpmp?

TIA

p.s. Please excuse my poor english...

Posted: Tue 27 Mar 2012, 17:58
by ldolse
Thanks for the feedback!

The password prompt is a bug in the ssh login script - been meaning to fix that, will get it into the next version. You can remove the prompt by deleting /root/.ssh/rc

Regarding your installation query, package management is a weak spot for some unofficial Puppy variants, and unfortunately this puplet is one of them. The answer is yes, other packages can be installed, but at the moment it's not easy. It looks like the Puppy Package Manager is broken at the moment, I'll need to try to fix this in the next release. Generally when I want something I just download the sources and compile/install it (using the developer devx file on the first page of this thread). mpdPup is also binary compatible with Debian Squeeze, so in many cases you can just install the Debian package, but that still requires you to jump through a few hoops, so it's not ideal.

Not sure about the issue with the time and Putty - I'm on a Mac for my primary machine and haven't seen this - I'll look into it.

Posted: Thu 05 Apr 2012, 15:28
by outis
Hi,

I have a litte vga-monitor and wont to display (with big letters) on it the playlist or the tags of the title mpd is playing. How can I do that?

TIA

Posted: Fri 06 Apr 2012, 01:45
by ldolse
Is the system booting to the console in VGA mode, or in Hi Res? If it's already booting to console in VGA then you just need to run ncmpc or ncmpcpp. Both apps are CLI and allow interface customization, seek out the docs for those apps to tweak them.

If it's booting to the cosole in a HiRes mode then you need to mess with some other files to get VGA, let me know if that needs to be tweaked, I forget the file that needs to be modified at the moment.

Posted: Fri 06 Apr 2012, 11:53
by outis
The box is booting into the vga mode. So there a two problems:

1. There is no setterm to disable the CLI-screensaver

2. The little fontsize. May be framebuffer mode would be better. But how do I activate that mode on mpdPup?

Posted: Fri 06 Apr 2012, 12:26
by outis
OK, setterm is on board now - let's give us a chance...

Posted: Fri 06 Apr 2012, 18:15
by outis
Hm,

1. setterm -blank 0
2. setterm -powersave off
3. setterm -powerdown 0
4. setvesablank -b off

no chance...

Posted: Sat 07 Apr 2012, 01:02
by ldolse
Are you saying you got setterm installed in some other way? Messing with terminal font sizes isn't something I have any experience with. Have you tried setfont?

I don't think you want to try enabling the framebuffer if you've already got VGA - framebuffer always seems to choose a higher resolution (XGA?) resulting in a smaller font, although it's possible it may allow more font size tweaking.


An alternate way (though not free) to solve this would be to go with an LCD/VFD display. These iMon based options should work out of the box:
http://www.soundgraph.com/vfd-feature-en/
http://www.silverstonetek.com/product.php?pid=39
http://www.antec.com/Believe_it/product.php?id=NzExJjE2

Though for full disclosure i've only tested the OEM version in a Silverstone ML02 case. The lcdproc drivers for other LCDs are built-in as well, so any lcdproc compatible LCD should theoretically work, there are cheaper options out there than iMon if you go this route.

Posted: Sat 07 Apr 2012, 01:06
by ldolse
outis wrote:Hm,

1. setterm -blank 0
2. setterm -powersave off
3. setterm -powerdown 0
4. setvesablank -b off

no chance...
Did you try

Code: Select all

setterm -powersave off -blank 0
Edit: looks like you can add a kernel boot flag to set the screen saver to zero as well:
http://superuser.com/questions/152347/c ... g-behavior

Posted: Sat 07 Apr 2012, 05:27
by outis
THX a lot, I'll try that.

Yes, I installed setterm/setvesablank: You can extract the original squeeze-deb with dbkg-deb -x, then cp the programm e.g. setterm in it's original directory e.g. /usr/sbin. Or extract the whole stuff dbkg-pkg -x your.deb /

Posted: Sat 07 Apr 2012, 06:16
by outis
no luck with: setterm -powersave off -blank 0

Where can I configure the kernel flags in mpdPup?