Configure XDM - a Linux graphic login interface

xiaoxiao2021-04-09  342

Transfer from: http://www.hackhome.com/2005/7-14/00414266097.SHTML

The recent update of this article will be placed in the computer decound: http://www.tcu-inc.com/mark/articles/kickstart.html. Modification: Add the following lines in / etc / x11 / xdm / xservers file, Four XDM sessions can be obtained, thereby allowing four different users to log in. It seems that all the delicate material settings only work on the last session. However, it may be easy to correct this, maybe I will mention it in the next article. : 0 a local / usr / x11r6 / bin / x: 0: 1 b local / usr / x11r6 / bin / x: 1: 2 c local / usr / x11r6 / bin / x: 2: 3 D local / usr / x11r6 / bin / x: 3 -------------------------------------------- ------------------------------------ Resources What is XDM? - A graphical login interface My configuration conclusion ----------------------------------- ------------------------------------------ Resources Chris Carlson in Linux Article. Man XDM I wrote before. These documents were written in December 1996. I was still a HACKER (it's a very wonderful feeling). I think the Hou Linux is also started to start. Time is really fast, I should publish this article at that time. -------------------------------------------------- ------------------------------ What is XDM? In short, XDM is just a graphical login interface. When your computer is started, you can let your boss and friends remember your computer without that a bored character console interface. In fact, it is to let your Linux look "cool" than they think. In theory, although this is configured in the RedHat 6.0 environment, most profiles can work properly for any Linux Distributio N. When the graphic login interface is activated, Redhat 6.0 is used for GDM instead of XDM. Although GDM seems to be much better than XDM, I can't let GDM run in the way I need. Once I solved some problems, I will write a brief article about GDM. There are some matter you need to pay attention to. If you want your XDM (or GDM) to run when your computer is started, you should make sure that this line ID: 3: INitDefault: is ID: 5: INITDEFAULT: Please note that no matter what you want, you must make your XWindows work normally before you set up XDM. If xwindows can't run properly, your XDM will not run normally and will cause many problems. From this line at the bottom of the file / etc / inittab, you can clearly see the Redhat 6.0 uses GDM instead of XDM x: 5: Respawn: / etc / x11 / prefdm -nodaemon, so change this line to X: 5: Respawn: / usr / bin / x11 / xdm -nodaemon I modified all files in the / etc / x11 / xdm directory.

-------------------------------------------------- ------------------------------ My profile I only interested in the following files, / etc / x11 / xdm / Xsetup_0 / etc / x11 / xdm / xresources / etc / x11 / xdm / giveconsole /etc/rc.d/rc.change_graphic /etc/rc.d/rc.local / etc / inittab <- This file is already Explain. In addition, the graphic file is located in / etc / x11 / xdm / graphics / directory. My purpose is to change XDM to have a xeyes, a Santa, a clock, a picture, and select the background colors before login. After logging in, let Santa die die. Cool? Well, let's take a step by step: Copy my graphics perl script to "/etc/rc.d/rc.change_graphic". This file changes the graphic displayed on the screen. Image is stored in the "/ etc / x11 / xdm / graphics directory as the GIF file. Copy My Kill Santa Perl Script to "/ ETC / X11 / XDM / KillxSnow". This file killed Santa, he slowly dropped the desktop. Copy my xsetup script to "/ etc / x11 / xdm / xsetup_0". This program is running together with the graphic login interface. Copy my XResources Script to "/ etc / x11 / xdm / xresources". This file sets the look of XDM. Copy my giveconsole script to "/ etc / x11 / xdm / giveconsole". This file determines some of the programs to be executed before XWindows handed over to the user. Add this command to the "/etc/rc.d/rc.local" file. To ensure that we define images when starting. Copy my GIF file to the "/ etc / x11 / xdm / graphics /" directory, and do TAR-C / -ZXVF xdm.tgz is some of the images I use. -------------------------------------------------- ------------------------------ Here is the rest of the configuration file: ------------ -------------------------------------------------- ------------------ Change Graphics Perl Script is located in "/etc/rc.d/rc.change_graphic". Run "ChMOD 755 /etc/rc.d/rc.change_graphic" after copying.

#! / usr / bin / perl @files = ; #print @files; $ length = @files; $ seconds = `date % s`; kHomp $ SECOND $ FRAC = $ seconds / 60; if (! ($ FRAC> 0)) {$ FRAC = 1} $ random = $ frac * $ length; ($ Random, $ junk) = split (//./, $ Random, 2); IF ($ Random <1) || ($ Random> $ length -1)) {$ random = 1} $ file = $ files [$ random]; $ rand2 = rand $ length; ($ Rand2, $ junk) = split (//.); $ Random = $ Random $ Rand2; IF ($ Random> $ Length - 1) {$ Random = $ Random - $ Length 1; } #Print "$ lTH $ random $ file / n"; if (-e "/etc/x11/xdm/xdm_front.gif") {system "rm /etc/x11/xdm/xdm_front.gif"} f (@ Files <1) {## Some Sort of Error Messege Should Be Here.} Else {system "ln -s $ file /etc/x11/xdm/xdm_front.gif";} ----------- -------------------------------------------------- ------------------- Kill Santa Perl Script is located in "/ etc / x11 / xdm / killxsnow". After copying, execute the command "CHMOD 755 / ETC / X11 / XDM / KILLXSNOW".

#! / usr / bin / perl ### i had to add the --a option betWeen RH 5.2 and 6.0 @temp = `cd / proc; grep -a ^ / usr / x11r6 / bin / xsnow / proc / [0- 9] * / cmdline`; if (@temp> 0) {$ xsnow = shift @temp; ($ JUNK, $ Procjunk, $ NO, $ Restofjunk) = Split (? /?, $ Xsnow); ## i am Really Paranoid That I Want To Kill The Right Pid IF ($ NO> 0) && ($ xsnow = ~? ^ / proc / $ no / cmdline: / usr / x11r6 / bin / xsnow?) {# system "echo / "Killing pid $ no for xsnow./n/"> /TMP/1.txt/N "; System" Kill $ No "}} ----------------- -------------------------------------------------- ------------- xsetup_0 Script is located in "/ etc / x11 / xdm / xsetup_0". After copying, execute the command "CHMOD 755 / ETC / X11 / XDM / XSetup_0". #! / bin / sh # $ xconsortium: xsetup_0, v 1.3 93/09/28 14:30:31 Gildea EXP $ / usr / x11r6 / bin / xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn Fixed -exitonfail # / usr / x11r6 / bin / xbanner ### Santa and snowflakes ### on some installs, I am missing xsnow for some reason. / usr / x11r6 / bin / xsnow -snowflakes 50 -santa 2 -unsmooth & ### loading the random image / usr / bin / x11 / xloadImage -onroot -at 1,210 /etc/x11/xdm/xdm_front.gif -border brown & ### a clock Would Be nice to see / usr / x11r6 / bin / xclock -digital -update 1 -fn -adobe-Times-Medium-i-Normal - 34-240-100-100-P-168-ISO8859-1 -Geometry 410 1 & ### Let us Turn ON Xeyes / usr / x11r6 / bin / xeyes -geometry 410 100 & ---------------------------------- --------------------------------------------- Xrsources File is in " / etc / x11 / xdm / xresources ". After copying, execute the command "CHMOD 755 / ETC / X11 / XDM / XResources".

! $ Xconsortium: xresources / main / 8 1996/11/11 09:24:46 Swick $ xlogin * login.translations: # override / ctrlr: Abort-display () / n / f1: set-session-argument (failsafe) Finish-field () / n / ctrlreturn: set-session-argument (failsafe) finish-field () / n / return: set-session-argument () finish-field () xlogin * Borderwidth: 3 xlogin * Geometry: 400x200 1 1 xlogin * greeting: CLIENTHOST xlogin * namePrompt: login: / 040 xlogin * fail: Login incorrect #ifdef COLOR xlogin * greetColor: CadetBlue xlogin * failColor: red * Foreground: black * Background: # fffff0 #else xlogin * Foreground : black xlogin * Background: white #endif XConsole.text.geometry: 480x130 XConsole.verbose: true XConsole * iconic: true XConsole * font: fixed Chooser * geometry: 700x500 100 100 Chooser * allowShellResize: false Chooser * viewport.forceBars : True Chooser * label.font: * -new century schoolbook-bold-i-normal - * - 240- * chooser * label.label: xdmcp hos T Menu from ClientHost Chooser * List.Font: - * - * - Medium-R-NORMAL - * - * - 230 - * - * - - - * - ISO8859-1 Chooser * Command.Font: * -new Century Schoolbook- Bold-r-normal - * - 180- * --------------------------------------- ---------------------------------------- GiveConsole File is located in "/ etc / x11 / XDM / GiveConsole ". What you have to do is to join the" / etc / x11 / xdm / killxsnow "as the first command.

转载请注明原文地址:https://www.9cbs.com/read-133125.html

New Post(0)