You are not logged in.

#1 2016-07-31 19:56:47

zencefil
Member
Registered: 2015-10-20
Posts: 27

[SOLVED] "xset b off" - Where to put it so it gets executed?

Hi,

I'm trying to disable the system beep. I've tried putting the command "xset b off" in /etc/X11/xinit/xinitrc and /etx/xprofile (alternatively, not both at the same time). Neither method works.

Additional information:
There is no .xinitrc or .xprofile in my home folder.
I am not using a DM, I do login in the shell, then type "startxfce4".
When I execute the command from the terminal, it does what it's supposed to do.

What am I misunderstanding here?

Last edited by zencefil (2016-07-31 22:32:46)

Offline

#2 2016-07-31 20:24:05

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] "xset b off" - Where to put it so it gets executed?

Write an .xinitrc, so it does everything you want to start (don't forget the & on everything that does not terminate on its own and needs to be run in the background), then "exec" whatever session you want to start (maybe it's even "exec startxfce4"). Then startx, so .xinitrc gets parsed.

Offline

#3 2016-07-31 20:34:35

zencefil
Member
Registered: 2015-10-20
Posts: 27

Re: [SOLVED] "xset b off" - Where to put it so it gets executed?

So xinitrc and xprofile are not parsed if I start xfce directly?

Offline

#4 2016-07-31 20:39:26

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] "xset b off" - Where to put it so it gets executed?

I'll save us the ping pong:

https://wiki.archlinux.org/index.php/Xprofile
https://wiki.archlinux.org/index.php/Xinit

I don't use xfce, so I can't tell what the starter script does. The best way to find out, would be to read /usr/bin/startxfce4, which is in all likelihood a shell script.

Offline

#5 2016-07-31 21:18:01

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] "xset b off" - Where to put it so it gets executed?

Try creating a .desktop file in ~/.config/autostart, as per https://specifications.freedesktop.org/ … atest.html

It would probably be easiest to use the "Session & Startup" (or so) section in xfce4-settings-manager to add the command as an autostart item.

This abstracts the process of creating the .desktop file for the user.

See https://wiki.archlinux.org/index.php/Xf … plications


Jin, Jîyan, Azadî

Offline

#6 2016-07-31 21:44:43

zencefil
Member
Registered: 2015-10-20
Posts: 27

Re: [SOLVED] "xset b off" - Where to put it so it gets executed?

Ok, I was making wrong assumptions about startxfce4's behaviour. I read the script as Awebb suggested and found this part:

 if [ -f $BASEDIR/xinitrc ]; then
  exec $prog $BASEDIR/xinitrc $CLIENTRC $SERVERRC
elif [ -f $HOME/.xfce4/xinitrc ]; then
  mkdir -p $BASEDIR
  cp $HOME/.xfce4/xinitrc $BASEDIR/
  exec $prog $BASEDIR/xinitrc $CLIENTRC $SERVERRC
else
  exec $prog /etc/xdg/xfce4/xinitrc $CLIENTRC $SERVERRC
fi 

As $BASEDIR is not defined on my system, I'm now sourcing xprofile from /etx/xdg/xfce4/xinitrc and it seems to be working. However it looks like bad style to me not to use a dedicated script for this.

@Awebb: if I execute startx, call .xinitrc from it and execute startxfce4 from there, should startx just terminate as something else is being exec'ed now, of will it be stuck or waiting for startxfce4 to end?

@Head_on_a_Stick: I'll have a look at what you're suggesting..

Offline

#7 2016-07-31 21:53:50

zencefil
Member
Registered: 2015-10-20
Posts: 27

Re: [SOLVED] "xset b off" - Where to put it so it gets executed?

@Head_on_a_Stick : I wasn't familiar with .desktop files and what they do until now. Seems like the obvious solution to my problem though.

Thank you both!

Offline

Board footer

Powered by FluxBB