Startup Error for a new user

bridged with qdn.public.qnx4.photon
Post Reply
Bill Caroselli (Q-TPS)

Startup Error for a new user

Post by Bill Caroselli (Q-TPS) » Thu Apr 11, 2002 10:32 pm

I never noticed this one before. If a new user runs Photon (ph) for the
first time, when he returns to text mode there is an error on his screen
saying:
"Can't open ~/.photon/pwm/pwm.cfg for read"
where the '~' is his actual home directory.

No matter how many times he re-enters and exits Photon the error will
continue to reappear until he goes into Photon, right clicks on the
background, selects "Options" from the PWM Workspace Menu and clicks on
"Apply & Save". Then that error will not appear again.

If the workspace manager can't find this file perhaps a better message would
be: "~/.photon/pwm/pwm.cfg not found. A default file will be saved. And
then save the default settings. Or better yet, just quietly save them.

HOWEVER, I found that if I:
mkdir ~/.photon
mkdir ~/.photon/pwm
touch ~/.photon/pwm.cfg
even though the pwm.cfg file is not valid, the window manager is silent
about it.

Maybe the 'ph' script should have the lines:
if [ ! -f ~/.photon/pwm.cfg ]; then
if [ ! -d ~/.photon/pwm ]; then
if [ ! -d ~/.photon ]; then
if [ ! -d ~ ]; then
echo "No HOME directory. Your screwed!"
fi
mkdir ~/.photon
fi
mkdir ~/.photon/pwm
fi
touch ~/.photon/pwm.cfg
fi

OK. Maybe you don't need the inner most if []

Just thought you should know.

Ian Zagorskih

Re: Startup Error for a new user

Post by Ian Zagorskih » Fri Apr 12, 2002 5:54 am

"Bill Caroselli (Q-TPS)" <QTPS@EarthLink.net> wrote in message
news:a952ed$a91$1@inn.qnx.com...
I never noticed this one before. If a new user runs Photon (ph) for the
first time, when he returns to text mode there is an error on his screen
saying:
"Can't open ~/.photon/pwm/pwm.cfg for read"
where the '~' is his actual home directory.

No matter how many times he re-enters and exits Photon the error will
continue to reappear until he goes into Photon, right clicks on the
background, selects "Options" from the PWM Workspace Menu and clicks on
"Apply & Save". Then that error will not appear again.

If the workspace manager can't find this file perhaps a better message
would
be: "~/.photon/pwm/pwm.cfg not found. A default file will be saved. And
then save the default settings. Or better yet, just quietly save them.

HOWEVER, I found that if I:
mkdir ~/.photon
mkdir ~/.photon/pwm
touch ~/.photon/pwm.cfg
even though the pwm.cfg file is not valid, the window manager is silent
about it.

Maybe the 'ph' script should have the lines:
if [ ! -f ~/.photon/pwm.cfg ]; then
if [ ! -d ~/.photon/pwm ]; then
if [ ! -d ~/.photon ]; then
if [ ! -d ~ ]; then
echo "No HOME directory. Your screwed!"
fi
mkdir ~/.photon
fi
mkdir ~/.photon/pwm
fi
touch ~/.photon/pwm.cfg
fi

OK. Maybe you don't need the inner most if []

Just thought you should know.
mkdir -p ~/.photon/pwm
touch ~/.photon/pwm/pwm.cfg

// wbr

Bill Caroselli (Q-TPS)

Re: Startup Error for a new user

Post by Bill Caroselli (Q-TPS) » Fri Apr 12, 2002 5:18 pm

"Ian Zagorskih" <ianzag@mail.ru> wrote in message
news:a95s8s$q9o$1@inn.qnx.com...
mkdir -p ~/.photon/pwm
touch ~/.photon/pwm/pwm.cfg

Ok. I forgot about the -p. Also, I don't like 'touch'ing thing unless
necessary.

My real issue is that I have discovered and dealt with it. I know that QNX4
is the preverbal 'dead horse' but it would be nice if one day some of the
known fixes made it into a new/final version.

Post Reply

Return to “qdn.public.qnx4.photon”