Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-16-2008, 04:27 AM   #1
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Rep: Reputation: 17
acpid and xosd

Hi all,
I managed to bind fn-keys to acpid events and make osd printing messages on display. Yet I noticed that in order to make osd_cat working properly and show the messages I had to restart acpid once logged on X.
Googling around I've found a solution to this. I added (rather cut and paste) the following lines to the event handling script:


USER="pier" # Main user of this PC
export XAUTHORITY="/home/pier/.Xauthority" # X authority file
export DISPLAY="auto" # Default display


Now osd works without the need for acpid of being restarted.

Could someone please explain what these lines exactly do?

Old 08-17-2008, 12:33 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
The "problem" is that by default (on most distros, anyway), X11
restricts who (which user from which machine) is allowed to display
stuff on your desktop. Since the event-handler is a system process
rather than an application you're running as yourself it isn't
permitted to display anything on screen.

With those few lines you tell it to a) run as yourself, b) which file
to use to make sure there's permission to write, and c) to which display
to actually display xosd to.

This is a bit over-simplified, but you hopefully get enough info
to understand what's going on?


Last edited by Tinkster; 08-17-2008 at 12:35 AM.
Old 08-17-2008, 02:13 AM   #3
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Original Poster
Rep: Reputation: 17
Thank you very much,
this put some light on.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ACPID scripts only work when restart acpid from terminal jasonkhonlaw Linux - Laptop and Netbook 4 01-22-2020 11:06 AM
xosd font size mrclisdue Linux - Desktop 2 03-22-2010 09:44 PM
xosd strycnine Slackware 1 12-21-2006 01:00 AM
lineak + FC3 + xosd krunchyfrog Linux - Hardware 0 03-11-2005 11:10 PM
XOSD doesn't find any font jazzesnee Linux - Software 1 01-17-2005 02:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration