General > Feature requests & roadmap
News flash
brononius:
Maybe a nice feature would be that a LinuxMCE "administrator" could send a kind of news flash that's pushed to all LinuxMCE installation?
Today, when you log in with ssh, you see from time to time update messages. Mostly i do this, but i'm always afraid that i can/will break something with this. For examply the message "New release precise available". I've seen on this forum that this will break the system?! So luckly i've seen the message? But i think that not everyone is looking each time all posts on the forum.
So maybe it would be nice that we can see a message from 'linuxMCE' that this is a bad idea?
This could also be used for mayor updates messages, new features...?
The message could/should appear when you login with ssh.
And maybe also on the admin page, an orbiter... ?
fe after log in with ssh
--- Quote ---Linux dcerouter 2.6.32-42-generic #95-Ubuntu SMP Wed Jul 25 15:57:54 UTC 2012 i686 GNU/Linux
Ubuntu 10.04.4 LTS
Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/
5 packages can be updated.
5 updates are security updates.
New release 'precise' available.
Run 'do-release-upgrade' to upgrade to it.
LinuxMCE messages
----------------------
- Don't do the 'do-release-upgrade' for the package 'precise'. It will break your system...
More info on http://forum.linuxmce.org/Topic123456
- Don't forget to checkup out our new XYorbiter: http://XYorbiter.linuxmce.org
username@dcerouter:~$
--- End quote ---
mkbrown69:
Just a thought... It could be implemented as a re-usable component, like a Twitter/XMPP/RSS feed reader...
/Mike
tschak909:
ok, cool, awesome. make it, i'm as always in the #linuxmce-devel channel to provide support. :)
-Thom
stedaniels:
Something like this would probably do. I've used SVN as the source, the URL is configurable. Twitter doesn't provide the flexibility we'd likely want, and they are getting more closed by the day.
--- Code: ---#!/bin/sh -e
#
# 95-lmce-dynamic-motd - display the motd message from LinuxMCE SVN
# useful to advise against release upgrades
#
# Based on the below:
# 91-release-upgrade - display upgrade message or update the cache
# in the background
#
# Originally Copyright (C) 2010 Canonical Ltd.
#
# Original Authors: Dustin Kirkland <kirkland@canonical.com>
# Authors: Steve Daniels <ste@stedaniels.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
lmce_dynamic_motd_url='http://svn.linuxmce.org/svn/trunk/lmce-dynamic-motd'
lmce_dynamic_motd=''
stamp=/tmp/95-lmce-dynamic-motd
if [ -s "$stamp" ]; then
# Stamp exists and is populated, so display
lmce_dynamic_motd=`cat $stamp`
echo
echo -e "$lmce_dynamic_motd"
echo
elif [ -f "$stamp" ]; then
# Stamp exists, but is empty, see if it's expired
now=$(date +%s)
lastrun=$(stat -c %Y "$stamp") 2>/dev/null || lastrun=0
expiration=$(expr $lastrun + 86400)
if [ $now -ge $expiration ]; then
# But is older than 1 day old, so update and output
lmce_dynamic_motd="`exec wget -q -O - $lmce_dynamic_motd_url`"
echo
echo -e "$lmce_dynamic_motd" | tee $stamp
echo
fi
else
# No cache at all, so update and output
lmce_dynamic_motd="`exec wget -q -O - $lmce_dynamic_motd_url`"
echo
echo -e "$lmce_dynamic_motd" | tee $stamp
echo
fi
--- End code ---
The file needs to exist here: /etc/update-motd.d/95-lmce-dynamic-motd
It also needs to be executable:
--- Code: ---sudo chmod 755 /etc/update-motd.d/95-lmce-dynamic-motd
--- End code ---
Obviously the URL "http://svn.linuxmce.org/svn/trunk/lmce-dynamic-motd" needs to be changed to something else, or a file checked in there and maintained. You can even use COLOURS as listed here: https://wiki.archlinux.org/index.php/Color_Bash_Prompt plain text otherwise please.
Can make this a ticket and attach it if needed. Questions and improvements welcome.
Steve
tschak909:
I would recommend reading the MessageSend page on the wiki.
You will want to send a message to the Orbiter Plugin, for Display Message. This will do what you want.
You can prototype the message using the web admin advanced>configure>devices, going to the orbiter plugin, selecting send command, and looking for the Display Message command. It will show you the messagesend command it constructs, as you build the message.
-Thom
Navigation
[0] Message Index
[#] Next page
Go to full version