In your Linux desktop that gets the actual samba messages:
edit /etc/samba/smb.conf
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s;sudo -u your_username /usr/local/bin/n810sambamessage "%f@ %m says: $(cat %s)";rm %s' &
restart samba
sudo /etc/init.d/samba restart
sudo visudo
nobody ALL=(your_username) NOPASSWD: /usr/local/bin/n810sambamessage
nobody ALL=(your_username) NOPASSWD: /usr/bin/aplay
create a file /usr/local/bin/n810sambamessage
#!/bin/bash
ssh -x root@ip-or-hostname-of-the-NIT /usr/local/bin/sambamessage $@
make it executable
chmod a+x /usr/local/bin/n810sambamessage
create rsa key
ssh-keygen -t rsa
copy the key to the NIT
ssh-copy-id -i ~/.ssh/id_rsa.pub root@ip-or-hostname-of-the-NIT
In the tablet:
create a file /usr/local/bin/sambamessage
#!/bin/sh
message="$@"
run-standalone.sh dbus-send --print-reply --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"$message" uint32:0 string:'OK'
make it executable
chmod a+x /usr/local/bin/sambamessage
Now, when your desktop receives a samba message, it will also be displayed in your NIT when you are in the same network.
No comments:
Post a Comment