LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   .xinitrc and fluxbox/startup don't work? (http://www.linuxquestions.org/questions/%2Absd-17/xinitrc-and-fluxbox-startup-dont-work-653864/)

ivanatora 07-06-2008 06:04 AM

.xinitrc and fluxbox/startup don't work?
 
Hello,
I'm trying to execute some commands at X starting time - like 'xset b off', 'xset m 4' and so on. I thought that putting them in ~/.xinitrc would do the job, but it doesn't.
This is my .xinitrc, and I start X with 'startx':
Code:

rexima vol 100
rexima pcm 100
xset b off
xset m 4
exec startfluxbox

Then I went to a fluxbox-specific solution - ~/.fluxbox/startup:
Code:

/usr/local/bin/fbsetroot -solid black
xset -b
xset m 4
rexima vol 100
rexima pcm 100
exec /usr/local/bin/fluxbox

But the situation is the same.
Any ideas?

antegallya 07-06-2008 07:14 AM

Hi,
how do you start X, is it started by your display manager (like xdm or so) or do you use the startx command or other ?
In all cases, are you sure that your fluxbox starting scripts are executing your ~/.xinitrc or your ~/.xsession files ?
Try to add on the first line of your ~/.fluxbox/startup something like :
Code:

echo "Startup file executed" > ~/STARTUP
Restart X and see if the file is created.

Regards,
ante

ivanatora 07-06-2008 08:29 AM

I already wrote that I use 'startx' to start X.
I've done a little debug and it appears that both scripts are being run. Mistery.

antegallya 07-06-2008 09:51 AM

oops sorry for the 'startx' i've didn't see it.

That some commands like 'echo' work (and presuming that fluxbox starts) and that others don't, sounds really strange to me. Maybe that your commands don't work for any reason ?

anomie 07-06-2008 01:28 PM

Quote:

Originally Posted by ivanatora
This is my .xinitrc, and I start X with 'startx':
Code:

rexima vol 100
rexima pcm 100
xset b off
xset m 4
exec startfluxbox


You need to be using:
Code:

rexima vol 100 &
rexima pcm 100 &
xset b off &
xset m 4 &
exec startfluxbox

But there may be better ways to accomplish these goals anyway.

I'm not familiar with rexima, but if all you're after is setting the sound to your liking, read 7.2.4 Setting Default Values for Mixer Channels.

To turn off the bell, use:
# echo 'hw.syscons.bell=0' >> /etc/sysctl.conf

Upon reboot, the bell will be off. (Or you can use sysctl to set the MIB afterwards to avoid a reboot.)

Quote:

Then I went to a fluxbox-specific solution - ~/.fluxbox/startup:
Code:

/usr/local/bin/fbsetroot -solid black
...


That should not be necessary with fluxbox. Once you've set the background within a fluxbox session, IIRC, it should default to ~/.fluxbox/lastwallpaper.

anomie 07-06-2008 01:31 PM

Also, why are you cranking vol and pcm up to 100 each? Let's see the results of the following command:
% mixer

ivanatora 07-06-2008 03:12 PM

Here is the mixer:
Code:

[ivanatora] ~> mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer line    is currently set to 100:100
Mixer mic      is currently set to 100:100
Mixer cd      is currently set to  99:99
Mixer rec      is currently set to 100:100
Recording source: mic

About why I'm cranking with vol and pcm... don't know - that's how I'm used to from linux :)
You are right about sending the processes in background with '&' but I think these are completed within a part of a second so it is not so critical to background these.


All times are GMT -5. The time now is 01:12 AM.