You are not logged in.

#1 2012-08-21 22:56:05

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

osd_cat don't show text

Hey Guys,

some month ago i set up my laptop with a script to show battery status on screen with the idea from this forum thread. The script looks pretty much de same, I just changed the displayed values. I use osd_cat to get a slider with text on the bottom, which looks like one of those old TV volume bars. I don't have used my laptop for a while now, and after doing updates, the text won't appear any more. I also tried with different fonts and arguments, and even on my desktop system, but i wasn't able to get back the text. osd_cat don't give any error, simply don't show the text. The Slider is working perfectly. Does anyone have any idea, why? I'm running community/xosd 2.2.14-5 with on my Intel-sna-GPU. There was no update to xosd, so another package is probably the cause of this.

Greetz Corubba

Offline

#2 2012-08-22 09:38:37

Thanoulis
Member
From: Lamia, Greece
Registered: 2009-05-03
Posts: 33
Website

Re: osd_cat don't show text

I use something similar, and it works fine here with xosd 2.2.14-5.
Here it is:

#!/bin/bash

case $1 in
up)
    mixer_option='3%+';;
down)
    mixer_option='3%-';;
toggle)
    mixer_option='toggle';;
*)
    exit 1;;
esac
# set new volume status
amixer set Master,0 $mixer_option > /dev/null
# get volume information
volume_percent=$(amixer get Master,0 | awk '/Mono:/ {print $4}' | tr -d '[]')
volume_mute=$(amixer get Master,0 | awk '/Mono:/ {print $6}')
if [[ $volume_mute == '[off]' ]];then
volume_mute='[Mute]'
else
volume_mute=''
fi
# osd_cat configuration
osd_pid='/tmp/osd-volume.pid'
osd_cmd='osd_cat --font=-*-fixed-bold-r-*-*-18-*-*-*-*-*-*-* --shadow=1 --color=#1E90FF \
  --pos=bottom --offset=30 --align=center --lines=2 --delay=5 --barmode=percentage'
# print the osd bar, killing previous if still running
if [[ -f $osd_pid ]]; then kill $(cat $osd_pid) 2> /dev/null; fi
($osd_cmd --percentage=$volume_percent --text="Master Volume:$volume_percent $volume_mute") &
echo $! > $osd_pid

This one sets and displays the volume, but in your case maybe the acpi (or whatever you use to get battery information) isn't working right.

Last edited by Thanoulis (2012-08-22 14:21:00)


-- Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Offline

#3 2012-08-22 21:10:33

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

Re: osd_cat don't show text

It is not a problem of the script but of osd_cat. When running a simple

/usr/bin/osd_cat -b slider --text="test"

in terminal, it only show the slider, but not the text. And there is no error about not finding the font if I use the default or specify one.

I was able to test this on a third Arch system today, and there it was working, so it has something to to with my setup. Can anyone suggest a package that I'm missing?


Greetz Corubba

Offline

#4 2012-09-30 21:59:47

jester
Member
Registered: 2012-09-30
Posts: 1

Re: osd_cat don't show text

Hi,

I can confirm this problem: after a world update (I am from gentoo) my osd_cat does not show any text, but the slider works fine. My first idea was, that the used default font (-f, --font=FONT     Use font (default: -misc-fixed-medium-r-semicondensed--*-*-*-*-c-*-*-*)) might cause the problem. Sadly, I did not find out how these font-specification works, so I am not sure if I just used a wrong parameter while testing - or if the error might be elsewhere.

In gentoo the packages prerequisite to xosd are
`--  x11-libs/xosd-2.2.14-r1  amd64
   `--  x11-libs/libX11-1.5.0  (x11-libs/libX11) amd64
   `--  x11-libs/libXext-1.3.1  (x11-libs/libXext) amd64
   `--  x11-libs/libXt-1.1.3  (x11-libs/libXt) amd64
   `--  media-fonts/font-misc-misc-1.1.2  (media-fonts/font-misc-misc) amd64
   `--  x11-proto/xineramaproto-1.2.1  (x11-proto/xineramaproto) amd64
   `--  x11-proto/xextproto-7.2.1  (x11-proto/xextproto) amd64
   `--  x11-proto/xproto-7.0.23-r1  (x11-proto/xproto) amd64
   `--  virtual/pkgconfig-0  (virtual/pkgconfig) amd64
   `--  sys-devel/automake-1.12.4  (>=sys-devel/automake-1.11.1) ~amd64
   `--  sys-devel/autoconf-2.69  (>=sys-devel/autoconf-2.68) ~amd64
   `--  sys-devel/libtool-2.4.2  (sys-devel/libtool) ~amd64

I reinstalled all these and the problem remains. So it might be a consistent error.

Did you succeed meanwhile?

Offline

#5 2012-10-09 19:20:54

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

Re: osd_cat don't show text

Some Update last week seemed to fix the problem, whatever it was. There was no update for any X related package, and I don't know what upgrade made it work again.

Just a unproven assumption of mine: One package forced a font cache rebuild, maybe this was the needed step.


Greetz Corubba

Offline

Board footer

Powered by FluxBB