Solved

You have mail Wav.

Posted on 1998-01-14
10
275 Views
Last Modified: 2008-02-01
I would like to setup a "You have Mail" wav file so when a user logs into the server and if they have mail it will play the wav over their speakers. Or put a window up on their system. Which ever way would be easier.

Is there an easy way to do this.

Thanks
Bob Ross
0
Comment
Question by:bross073097
  • 6
  • 4
10 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 1635379
in /etc/.profile:

if [ -s /var/spool/mail/$user ] ; then
   echo You have mail.
   your_wv_playing_program your.wav
fi

Similar in /etc/csh.login, or whatever your user shell's startup file is.
0
 

Author Comment

by:bross073097
ID: 1635380
They log in with PAP, I'm not sure which login shell is used.

I will try the above and let you know.

Thanks for the quick response.

Bob Ross

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1635381
login shell is specified in /etc/passwd
0
 

Author Comment

by:bross073097
ID: 1635382
It's not mentioned there, it is in mgetty.config, it shows bin/login

Thanks
Bob Ross

0
 

Author Comment

by:bross073097
ID: 1635383
You mention your_wv_playing_program.

I'm not sure what to put here. In an html, I just tell it to play a wave and it does. This will play on the user end after they get connected if it does.

Thanks
Bob

0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:bross073097
ID: 1635384
mgetty uses it's own login, I found login.c. My system is set for AutoPPP, the password file does not give a shell unless I give a shell account /bin/bash, all other users get /dev/null so they can't log in at the prompt.

I can send it to you if you want.

Thanks
Bob Ross
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1635385
Send it (email), it's nice to see other/new configurations :-)

You may find  your_wv_playing_program  in your servers mime.types configuration file.
Or search with:
  find / -xdev -perm +x -name '*wav*' -print

Ciao
Achim   hoagascht@gmx.net
0
 

Author Comment

by:bross073097
ID: 1635386
The mime.types show

audio/x-wav            wav

That's it.

Bob

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1635387
mime.types was useless, sorry.

On my system the programs are named  play  and  x-play
0
 

Author Comment

by:bross073097
ID: 1635388
Any other Idea to make this work?.

Thanks
Bob Ross

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LINUX ZIP - UNCOMPRESS WINDOWS PATH 3 87
Issue to mail 11 72
Linux as a middle box 7 63
How to install Ubuntu 16 in DELL venue 8 pro 20 48
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now