Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]I want to make notification of log-on.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
chaoxifer
n00b
n00b


Joined: 04 Jan 2010
Posts: 18
Location: South Korea

PostPosted: Sat Jul 19, 2014 6:36 am    Post subject: [SOLVED]I want to make notification of log-on. Reply with quote

Hi~ all. I just moved from arch linux to gentoo because of package manager.

Anyway, I want to make "notification" which prints out a message to console and terminal like freebsd.
Is it possible to get message from system when other user log-on the system?
I found solution about this, but there are no "wall" and "message" commands on gentoo linux. How can I make it in Gentoo Linux?


Last edited by chaoxifer on Sat Jul 19, 2014 10:47 am; edited 1 time in total
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sat Jul 19, 2014 6:42 am    Post subject: Reply with quote

Actually, they do exist. It is just that they are not installed by default. you want to add an entry in /etc/portage/package.use like this
Code:
sys-apps/util-linux tty-helpers
then emerge -1 util-linux and you'll get the commands.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Jul 19, 2014 8:03 am    Post subject: Reply with quote

chaoxifer ...

zsh has a builtin called 'watch' that provides such notifications (see here).

Code:
# echo $SHELL
/bin/zsh
# watch=( khayyam )
# log
khayyam has logged on 1 from .
# chvt 2
login: khayyam
password:
# echo foo >/dev/null
khayyam has logged on 2 from .

best ... khay
Back to top
View user's profile Send private message
chaoxifer
n00b
n00b


Joined: 04 Jan 2010
Posts: 18
Location: South Korea

PostPosted: Sat Jul 19, 2014 10:46 am    Post subject: Thanks for reply Reply with quote

Thanks for reply.

I used to use zsh, but I didn't know about this.

zsh's 'watch' is more convenient, so I'll try it :)

Thank you 'The Doctor', 'khayyam'.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum