OLD: mpdPup - Simplified MPD Music Server/Jukebox - v0.9.2

For talk and support relating specifically to Puppy derivatives
Message
Author
impmonkey
Posts: 4
Joined: Fri 10 Feb 2012, 21:09

Cron

#61 Post 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?

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#62 Post 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

impmonkey
Posts: 4
Joined: Fri 10 Feb 2012, 21:09

#63 Post 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!

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

crond

#64 Post 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.

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

Thanks

#65 Post 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.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#66 Post 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.

impmonkey
Posts: 4
Joined: Fri 10 Feb 2012, 21:09

#67 Post by impmonkey »

Awesome! Thanks. I would love a cron gui!

impmonkey
Posts: 4
Joined: Fri 10 Feb 2012, 21:09

#68 Post 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.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#69 Post 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

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#70 Post 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...

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#71 Post 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.

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#72 Post 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

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#73 Post 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.

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#74 Post 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?

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#75 Post by outis »

OK, setterm is on board now - let's give us a chance...

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#76 Post by outis »

Hm,

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

no chance...

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#77 Post 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.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#78 Post 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

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#79 Post 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 /

outis
Posts: 9
Joined: Tue 27 Mar 2012, 17:10

#80 Post by outis »

no luck with: setterm -powersave off -blank 0

Where can I configure the kernel flags in mpdPup?

Post Reply