Sfoglia il codice sorgente

Use cmevoli's solution

http://unix.stackexchange.com/questions/72131/detecting-x-session-in-a-bash-script-bashrc-etc/338862#338862
Alois Mahdal 7 anni fa
parent
commit
840e81a575
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      dotfiles/bash/main.bashrc

+ 1
- 1
dotfiles/bash/main.bashrc Vedi File

@@ -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