You are not logged in.

#1 2014-08-06 05:54:58

gilmoreja
Member
From: Florida
Registered: 2012-05-28
Posts: 74

[solved] xfce4-terminal spam after update to util-linux 2.25-3

I use the setterm command inside a file in /etc/profile.d so that I can prevent the screen from blanking when using a console, along with a couple of other things.

After the latest update to util-linux (2.25-3), whenever I open xfce4-terminal these lines show up:

setterm: terminal xterm does not support --blength
setterm: terminal xterm does not support --bfreq
setterm: terminal xterm does not support --blank
[gilmoreja@JamesPC ~]$ 

Is there a better way to handle making sure setterm runs when a console is used, but not necessarily when a terminal is opened? Or is there some other way to solve this issue? There doesn't seem to be a switch for setterm for any kind of "quiet mode."

Last edited by gilmoreja (2014-08-06 18:36:28)


Time you enjoy wasting isn't wasted time.

Offline

#2 2014-08-06 09:34:09

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [solved] xfce4-terminal spam after update to util-linux 2.25-3

I think that the shell started in a console is a login shell, and it is not the case in a graphical terminal.
A login shell has a '-' at the start of $0; so you can test that and condition the execution of the setterm commands:

if [[ $0 == '-bash' ]]; then
    setterm ...
    setterm ...
    ...
fi

Offline

#3 2014-08-06 15:30:30

mar04
Member
From: Poland
Registered: 2010-02-08
Posts: 117

Re: [solved] xfce4-terminal spam after update to util-linux 2.25-3

Or check $TERM env variable.

Offline

#4 2014-08-06 18:36:15

gilmoreja
Member
From: Florida
Registered: 2012-05-28
Posts: 74

Re: [solved] xfce4-terminal spam after update to util-linux 2.25-3

Thank you for the very simple solutions.

I ended up making the file check the $TERM environment variable because $0 returns "-bash" in both the console and terminal.

if [[ $TERM == "linux" ]]; then
    setterm ...
fi

Time you enjoy wasting isn't wasted time.

Offline

Board footer

Powered by FluxBB