.xinitrc not running scriptForum: HD Install Topic: .xinitrc not running script started by: vstech Posted by vstech on Oct. 28 2007,02:48
I am almost done.. .but I can't get my .xinitrc script to run my script to start the slide show for my digital picture frame project. The script works, when I run it from a shell window, it works fine... just does not seem to want to run from .xinitrc. Below is the .xinitrc script... I have moved the line that calls the script I want to run,/mnt/hda1/mydsl/scripts/cron_start_frame.sh many different places (before and after the call to start fluxbox), I have put in the full path name, tried running it from the ramdisk home directory, from the hard drive, but the results are the same... no go. the torsmo command seems to be upset that my laptop battery is dysfunctional, as it gave me an error, so I commented it out..... although I am not sure what that line does. Any suggestions? # put X windows programs that you want started here. # Be sure to add at the end of each command the & KEYTABLE="$(getknoppixparam.lua KEYTABLE)" DESKTOP="$(getoption.lua $HOME/.desktop wm)" ICONS="$(getoption.lua $HOME/.desktop icons)" umix -lf .umix 2>/dev/null [ -f .mouse_config ] && sh .mouse_config & /etc/init.d/dsl-functions # For non-US Keyboards if [ ${KEYTABLE:0:2} != "us" ]; then xmodmap -e "clear Mod4" -e "add Mod5 = Mode_switch" & fi if [ "$ICONS" == 1 ]; then for x in `ls -1 .xtdesktop/*.hide 2>/dev/null`; do rm -f ${x%.*}; done iconsnap.lua &>/dev/null & xtdesk.sh fi #if egrep -qv lowram /proc/cmdline 2>/dev/null; then #fi #torsmo 2 & #>/dev/null & # dillo /usr/share/doc/dsl/getting_started.html &>/dev/null /mnt/hda1/mydsl/scripts/cron_start_frame.sh & # xset s off case $DESKTOP in fluxbox ) fluxter &>/dev/null & wmswallow -geometry 70x80 docked docked.lua & exec fluxbox 2 &>/dev/null ;; jwm ) ./.background sleep 2 exec jwm 2>/dev/null ;; * ) # torsmo 2>/dev/null & exec fluxbox 2 & # >/dev/null ;; esac Posted by ^thehatsrule^ on Oct. 28 2007,03:08
I'm guessing it's not launching because /mnt/hda1 could possibly be not mounted yet?
Also, your .xinitrc is a bit messed up. Instead of
Posted by jpeters on Oct. 28 2007,06:58
...same error after 'fluxbox )' It looks like this was edited, so maybe "fluxter -w &>/dev/null &" ? (that's how it is on my copy) Posted by vstech on Oct. 28 2007,12:25
Yes, the script is edited and now messed up a bit.. I had removed the >null parts thinking maybe it would show an error message (if there was one ) so that I could find the problem.hda1 is already mounted by bootlocal.sh Posted by mikshaw on Oct. 28 2007,13:29
Try this:
Posted by vstech on Oct. 28 2007,17:26
Ok, I tried adding the code you show here, but it did not make a difference that I could tell. I replaced my line that calls the cron_start_frame.sh with your code. Posted by jpeters on Oct. 28 2007,17:42
I've never used cron, but assume you've got /etc/crontab correctly edited and working the way you want? edit: might be interesting to see if other cron scripts work from .xinitrc Posted by ^thehatsrule^ on Oct. 28 2007,18:45
vstech: if you want to see errors from your script, you could either check the console VT (i.e. ctrl+alt+f1) or use a log, such as
It also may be helpful to show the contents of that script, as well as a `ls -l` of it. Posted by vstech on Oct. 28 2007,19:24
ok, thehatsrule, I added the line to make a log script, but no script is ever made... I am thinking the line is never executed to run the cron_start_frame.sh, but I have moved that line all around the .xinitrc script and NEVER get a log file. Here is the contents of the cron_start_frame.sh: #!/bin/sh # #Script to run Digital Picture Frame using FEH #hide the cursor after 15 seconds /usr/X11R6/bin/unclutter -idle 5 & /etc/init.d/dsl-functions #start slide show /usr/bin/feh -qxzrZF -D 10 /mnt/hda6/pictures/*.* & exit 0 as for the ls -l of the cron_start_frame.sh, the owner is dsl, the group staff, and I did a chmod of 777 on it to be sure it was executable. It does run when executed from a shell window... runs great in fact, just does not run from the .xinitrc script. Posted by curaga on Oct. 28 2007,20:29
/etc/init.d/dsl-functionsis not needed, but if you want it, it should be . /etc/init.d/dsl-functions Posted by mikshaw on Oct. 28 2007,20:49
After starting X, press Ctrl+Alt+F1 (Alt+ one of the other F keys depending on your setup to return to X) and look to see if there are any error messages listed from the xinit script. You can use Alt+PageUp if you need to scroll up.I think it's very strange that you can run cron_start_frame.sh from a terminal window, but the very same command doesn't work from .xinitrc Posted by vstech on Oct. 29 2007,00:53
I tried the alt-ctr-f1 and all I see is a bright blue screen???alt-ctrl-f2 brings me back to my desktop, all the other combinatoins (f3,f4...) are blue screens. I am thinking maybe I need to reinstall DSL, but I am so close to being done, I hate to start over again, but then, I too don't understand why the script runs from a shell but not from .xinitrc Posted by jpeters on Oct. 29 2007,04:14
Any other way to scroll up? (page up, arrows, etc., don't work) I'm still curious whether it's the particular script or something about cron that doesn't work from .xinitrc (if nobody else has cron loaded, I could experiment when I have time). Edit: oh....just saw the script; I thought this was related to cron...guess not.. The problem is probably that your app, FEH (or components), isn't loaded correctly prior to running the script; so just run the script after the desktop is fully loaded...no problem. Posted by vstech on Oct. 29 2007,12:11
I thought of that also... I did put a & at the end of the fluxbox and put flid=$! on the next line I put a wait $flid then put the lines in to run the script. No change. Posted by mikshaw on Oct. 29 2007,15:00
Personally I redirect output to a file and tail it, so any error messages appear in aterm after X has started (if successful, otherwise I look in the log file). I still don't have a good idea, but I stress the importance of finding specific error messages. Until you know the source of the problem, you won't be able to find a solution. Posted by jpeters on Oct. 29 2007,16:27
I experimented around with .xinitrc. There's just no way NOT to get a log file, even if you put in garbage. So if I write at the top, say before KEYTABLE, "garbage>/tmp/garbage.log", it will produce an empty file in /tmp called garbage.log. Not to get a log file means ./.xinitrc isn't running. Posted by robc on Oct. 29 2007,16:38
Before you try a reinstall you may want to try a clean .xinit. Just restart with liveCD with the norestore cheatcode and copy the .xinit file over. Then put
You also may want to tell dsl which screen to use before starting feh. I know I had problems getting X apps to run from scripts because of this. Just add:
P.S.: Just curious, have you tried adding sudo to the beginning of the line in th .xinit file? Sometimes if the mounted directory permissions are not set properly then you can run into problems. Posted by vstech on Oct. 29 2007,19:43
Ok... recreating the .xinitrc file worked... the script now runs the display program from .xinitrc.Thanks to all for your hlep. Posted by jpeters on Oct. 29 2007,23:00
I'm wondering how the old one even managed to boot the desktop, given it wasn't reading anything.
|