Pārlūkot izejas kodu

Use cmevoli's solution

http://unix.stackexchange.com/questions/72131/detecting-x-session-in-a-bash-script-bashrc-etc/338862#338862
Alois Mahdal 7 gadus atpakaļ
vecāks
revīzija
840e81a575
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      dotfiles/bash/main.bashrc

+ 1
- 1
dotfiles/bash/main.bashrc Parādīt failu

@@ -271,7 +271,7 @@ export GIT_PAGER='less -S'
271 271
 export GVFS_DISABLE_FUSE=1
272 272
 
273 273
 # disable the terrible beep sound (only for X; for tty?, blacklist pcspkr)
274
-[[ ${!DISPLAY[@]} ]] &&  xset b off
274
+xhost >& /dev/null && xset b off
275 275
 
276 276
 # get rid of those .pyc files once and for all
277 277
 export PYTHONDONTWRITEBYTECODE=1