Re: [ilugd] auto-startup a script, apps, *after* runlevel5
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 LL == linuxlingam [EMAIL PROTECTED] writes: LL [snip] LL step 1: create a shell script that launches the required LL applications. LL step2: place this script in the /home/whoever/.kde/Autostart/ LL directory. LL note: if the user is using kde. you have to find similar LL places for other environments. In addition to placing the script in the home directories of existing users, you may want to put it into /etc/skel. Then it'll be automatically copied to the home directories of any new users you create. I'm not very happy with the .kde business: who's going to go and search out the various environments that users could be using? A desktop-independent way (like the xinitrc.d method) seems to be a better idea, unless you have a totally controlled environment (e.g. LTSP) - -- Raju - -- Raj Mathur[EMAIL PROTECTED] http://kandalaya.org/ GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F All your domain are belong to us. It is the mind that moves -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard http://www.gnupg.org/ iD8DBQE/ePTpyWjQ78xo0X8RAicTAJ9rMsY8D/K5t48UgIgQ2HhGWKFfnQCfZPGV 8J8rm3fK2Rsn0Ido8SMkrfg= =MCJb -END PGP SIGNATURE- ___ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] auto-startup a script, apps, *after* runlevel5
Hi LL, the .xinitrc file strongHAS/strong to be an executable script. You can't run it if it isn't. It may be in any language, though people use simple shell scripts. It isn't any simple file containing app names. Xsession checks if the +x bit is set before running the script. It doesn't try to guess what language the .xinitrc file is written. You should mention that explicitly ( the shebang line is _MUST_ ). I am sending a sample .xinitrc I picked up from somewhere on the net last year (had modified it to work for me). Adjust accordingly. Googling helps a lot on this topic. -BOF-- #!/bin/sh userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap xclients=$HOME/.Xclients if [ -f $userresources ]; then xrdb -merge $userresources fi if [ -f $usermodmap ]; then xmodmap $usermodmap fi xterm +sb -fg green -bg black -C -geometry 45x6-200+8 -fn 6x13 -name console # other programs add here ARG=$1 DEFAULTWM=startkde if [ ! $ARG ]; then ARG=$DEFAULTWM fi elif [ $ARG = kde ]; then WM=startkde if [ $ARG = gnome ]; then WM=gnome-session elif [ $ARG = after ]; then WM=afterstep elif [ $ARG = wm ]; then WM=wmaker elif [ $ARG = ice ]; then WM=icewm else WM=$DEFAULTWM fi #finally, run the window manager, and redirect the stdout #and stderr to the file wm_out for debugging purposes exec $WM ~/wm_out --EOF--- now, all you have to do is type startx kde at the prompt to launch kde wm. Similarly for others. If you boot to runlevel 5, it will launch your default window manager. Remember that when you exit your window manager, X ends. So basically the last line in .xinitrc has to hang as long as you want your X session. Now there's a catch where certain settings are overridden after you start the window manager. To avoid this, use similar code in .xinitrc:: -shell code starts-- WM pid_wm=$! xterm xmms ... ... wait pid_wm #do clean-up if necessary -shell code ends-- What the code does is that it runs the window manager, saves the pid of the process, then runs your programs. Finally it waits on the wm process. When you kill the wm, your X session ends. Affly, Bhaskar On Sat, 20 Sep 2003 linuxlingam wrote : dear bhaskar, you wrote: Hi LL, Have u chmodded the executable bit of .xinitrc file? The /etc/X11/xdm/Xsession checks this before running the user's xinitrc script. Also, xdm uses the .xsession file instead. So try symlinking the file: ln -s .xinitrc .xsession *** before i get into another twisted spin of checking out various permutations, is the .xinitrc file supposed to be a shell script, with the #!/usr/bin/bash line as the first line and the relevant commands following, with the file chmodded to execute, or is it supposed to be a plain file containing the application names and scriptnames to launch, and the .xinitrc file chmodded to execute. ? LL ___ Television meets Accounts; Jyoti Weds Rajaram. Rediff Matchmaker strikes another interesting match !! Visit http://matchmaker.rediff.com?1 ___ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] auto-startup a script, apps, *after* runlevel5
dear bhaskar, you wrote: Hi LL, Have u chmodded the executable bit of .xinitrc file? The /etc/X11/xdm/Xsession checks this before running the user's xinitrc script. Also, xdm uses the .xsession file instead. So try symlinking the file: ln -s .xinitrc .xsession *** before i get into another twisted spin of checking out various permutations, is the .xinitrc file supposed to be a shell script, with the #!/usr/bin/bash line as the first line and the relevant commands following, with the file chmodded to execute, or is it supposed to be a plain file containing the application names and scriptnames to launch, and the .xinitrc file chmodded to execute. ? LL ___ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] auto-startup a script, apps, *after* runlevel5
then, i google-searched, and discovered i need to have a hidden script file, .xinitrc in the home directory, which would do the trick. the file did not exist, so i created it. i tried this, and it did not work either. finally, i re-googled and discovered a hidden .xsession file needs to be created in the home directory that handles this. well, that does not work either. What do you mean by that does not work? 1. Does the .xsession script not get executed? 2. Does it get executed but your changes to the file not get executed? BTW, did you make the .xsession executable? as a test, i am only asking the script to launch the konsole, so i know the script is being initialised. i have tried both the 'konsole' command, as well as the 'exec konsole' command. Try something simpler, and certainly _non-GUI_ like: /bin/logger -t fromxsession'['$$']' -p daemon.info .xsession executed Then look wherever your syslogd logs daemon.info logs, for the last two words of the logger command. And the title of your message is a bit confusing. Do you want your script to run at system bootup after init reaches run level 5, or do you want it to run _as_a_particular_user_ after that user has logged in through XDM? Have you checked the xdm manpage? Might give you additional hints about where to hack to test what scripts are executed at what time during login/logout. Shuvam ___ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd
Re: [ilugd] auto-startup a script, apps, *after* runlevel5
before i get into another twisted spin of checking out various permutations, is the .xinitrc file supposed to be a shell script, with the #!/usr/bin/bash line as the first line and the relevant commands following, with the file chmodded to execute, or is it supposed to be a plain file containing the application names and scriptnames to launch, and the .xinitrc file chmodded to execute. It is supposed to be an executable. It could be a shellscript or a binary or a Python executable, but it is supposed to be something with its execute permission set, and which can be triggered by a fork() followed by an exec(). It's _certainly_ not a config file or data file with a list of applications. Shuvam ___ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd