LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-16-2008, 05:27 AM   #1
Pier
Member
 
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?

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

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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?


Cheers,
Tink

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

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

Pier
 
  


Reply


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 2 07-31-2012 12:37 PM
xosd font size mrclisdue Linux - Desktop 2 03-22-2010 10:44 PM
xosd strycnine Slackware 1 12-21-2006 02:00 AM
lineak + FC3 + xosd krunchyfrog Linux - Hardware 0 03-12-2005 12:10 AM
XOSD doesn't find any font jazzesnee Linux - Software 1 01-17-2005 03:49 PM


All times are GMT -5. The time now is 12:07 PM.

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