|
-
April 8th, 2005, 08:04 PM
#1
legalnotice popup in linux?
In windows xp, we can have a legalnotice popup by changing a particular key in the registry. (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon) This causes a window to pop up before the login screen. Is there any way to get such a popup in linux as well? I'd like to do it in mandrake 10.1. It could even be a text based message, but it should require the user to 'press any key to continue....' and then go to the login screen. Can this be done?
-
April 9th, 2005, 02:00 PM
#2
Hi alamuru420123,
Try here...
http://www.google.ca/search?client=f...=Google+Search
Google Search: creating a popup in linux
-
April 9th, 2005, 07:25 PM
#3
The traditional way to do this is to edit /etc/motd.
It shows up after the user logs in but before login runs.
Motd also shows up after a remote user logs on.
See motd(5).
Oliver's Law:
Experience is something you don't get until just after you need it.
-
April 9th, 2005, 08:06 PM
#4
TCL/TK should be on most Linux distributions.
Code:
#!/usr/bin/wish
# Create the main message window
message .m -text "Like Whatever" -background white
pack .m -expand true -fill both -ipadx 100 -ipady 40
# Create the main menu bar with a Help-About entry
menu .menubar
menu .menubar.help -tearoff 0
.menubar add cascade -label "Help" -menu .menubar.help -underline 0
.menubar.help add command -label "About ..." \
-accelerator "F1" -underline 0 \
-command showAbout
# Define a procedure - an action for Help-About
proc showAbout {} {
tk_messageBox -message "Tcl/Tk\nHello Windows\nVersion 1.0" \
-title "About"
}
# Configure the main window
wm title . "Legal Notice"
. configure -menu .menubar -width 200 -height 150
bind . "<Key F1>" {showAbout}
I came in to the world with nothing. I still have most of it.
-
April 11th, 2005, 09:40 AM
#5
Hi
We have quite a nice solution here, so I asked the responsible guy
how they did it. Fairly simple actually:
Since you would like a popup, I assumed you want this message to appear
in the X11 system. This solution pops up the content of /etc/motd, as suggested
by SirDice, after you have logged in.
In /etc/X11/Xsesssion.d, create a new file, e.g.
Code:
> vi 45legalnotice
with
Code:
xmessage -center -file /etc/motd
where in /etc/motd there is the legal notice (it then also is shown, when
you remotely login, if configured correspondingly - as SirDice said).
The man-page of xmessage also tell you, how to create buttons (e.g.
if you want a "cancel" in addition to "ok".
Cheers.
If the only tool you have is a hammer, you tend to see every problem as a nail.
(Abraham Maslow, Psychologist, 1908-70)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|