legalnotice popup in linux?
Results 1 to 5 of 5

Thread: legalnotice popup in linux?

  1. #1
    Senior Member
    Join Date
    Oct 2004
    Posts
    118

    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?
    Never trouble another for what you can do for yourself.
    -Thomas Jefferson

    http://www.AntiOnline.com/sig.php?imageid=777

  2. #2
    T̙͓̞̣̯ͦͭͅͅȂͧͭͧ̏̈͏̖̖Z̿ ͆̎̄
    Join Date
    Dec 2004
    Posts
    3,171
    Hi alamuru420123,

    Try here...

    http://www.google.ca/search?client=f...=Google+Search
    Google Search: creating a popup in linux

  3. #3
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    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.

  4. #4
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    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.

  5. #5
    Senior Member
    Join Date
    Mar 2004
    Posts
    557
    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
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides