D-Bus: How can root access a user's started session?

D-Bus is really useful for automating a lot of tasks, and I want it to respond to certain ACPI events using a acpid configuration.
However, acpid runs as root, and it seems like root cannot find or access a logged in user's D-Bus session.
Example:
# purple-remote 'setstatus?status=offline'
No existing libpurple instance detected.
(the command works fine from the logged in user's shell)
I've googled around a bit, and there was a hit about changing the euid of the shell, but changing this via zsh's EUID environment variable had no notable effect on the outcome.
Any ideas? I tried with sudo -u <username> but that doesn't help either.
Last edited by Natanji (2014-04-30 12:25:43)

D-Bus is really useful for automating a lot of tasks, and I want it to respond to certain ACPI events using a acpid configuration.
However, acpid runs as root, and it seems like root cannot find or access a logged in user's D-Bus session.
Example:
# purple-remote 'setstatus?status=offline'
No existing libpurple instance detected.
(the command works fine from the logged in user's shell)
I've googled around a bit, and there was a hit about changing the euid of the shell, but changing this via zsh's EUID environment variable had no notable effect on the outcome.
Any ideas? I tried with sudo -u <username> but that doesn't help either.
Last edited by Natanji (2014-04-30 12:25:43)

Similar Messages

  • How can I access the user library of the other users on my iMac?

    I am in the process of changing the HDD on my iMac (Seagate 1 TB - free of charge exchange from Apple). As I have had some problems with my kids' user accounts I want to set it all up as new when I get it back.
    Challenge is ofcourse that they have played some games and they want to keep their levels etc, and this is stored in their users' Library. How can I access this from my own account or from a back-up? I have both a Time Machine back-up and a CarbonCopyCloner.

    Hi Jonie,
    See if these help...
    http://osxdaily.com/2011/08/17/sign-pdf-with-digital-signature-mac-os-x/
    http://scansnapcommunity.com/tips-tricks/1416-digitally-signing-pdf-documents-us ing-adobe-acrobat-9-an-introduction/

  • How can I access my user folder on a second boot partition?

    Hi there. Thank you for reading this. I am at a bit of a loss although I have searched several forums to find someone having the same problem:
    I use my Macbook Pro in the office and at home. To keep things strictly apart and have to separate Time Machine backup procedures, I have divided my harddrive into two boot partitions ('office' and 'private') and installed Mountain Lion on both of them. Now occasionally when I am at the office I would like to access my  user folder on 'private' to retrieve a file from the documents folder there (e.g. a paper I gave in my free time but would like to send to a colleague). Now although I see the 'private' volume, and the other user folder and the Documents folder in it with a red 'No Access' badge, even when I  set read/write permissions via Command-I > Permissions for my current account, I do not see any files in it apart from Microsoft User Data. I have tried enabling the root user but with the sam result.
    Do I really have to shut down the computer and boot with the 'private' boot volume in order to access the files on 'private'>user?
    Looking forward to your suggestions! Thank you in advance!
    Christian

    To solve this issue permanently, is to first disconnect both TimeMachine drives.
    Boot into one partition and consider it history, make a note of everything, apps, export bookmarks, serial keys and files to a regular external drive. (non TimeMachine)
    If on a hard drive, consider the first partition for performance, the second one is going to be slower. (SSD no need)
    Next what you do is boot into the first partition and use Disk Utility to erase (with zero option if a hard drive) the other partition. Then use Carbon Copy Cloner to clone the first partition to the second. (should be about equal sizes or tweak before cloning.)
    Repair permissions on both partitions in Disk Utility.
    Next boot into the second partition and install/uninstall apps and files. etc and set it backup up the way you had it.
    Once your sure, then update TimeMachine for each one.
    Now you will be able to easily access the other bootable partition as long as your logged into the same account name on the first partition., in other words you can access the same named account on both partitions and trade files without rebooting.
    Because it's a clone, you have the same access privileges to the files on the other partition.
    If your a power user, your going to find bootable clones are a much superior option than TimeMachine
    Most commonly used backup methods

  • How can I access locked user account on iMac

    Using Yosemite on Imac 2007 model but have been unable to unlock user accounts other than administrator to retrieve student work

    Ask the user to login to their account so you can retrieve the info you want.

  • How can i access my user password

    I can't download things to my macbook because i don't know my password to the user1 the store where i bought it at set it up and i don't know it is there anyway i can change it without having to go back to the store?

    Boot from your install disc and reset it in there. Use 'Reset Password' from the Utilities drop down window. 
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G + 120G OCZ Vertex 3 SSD Boot HD 

  • How can I access user defined column(in query) inside the trigger?

    Hi
    I have 3 unions and each query displays different records on some criteria. I also have a column hard-coded
    Ex:
    select a.col1, a.col2,
    add as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    change as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    del as update
    from table1 a
    where ...
    And I need to display a column in the report only if update is Add. I was thinking of writing a format trigger for that field. But I do not know how can I access this user defined column named update in the trigger?
    Any help?

    Try ":update" minus the double-quotes. Ex:
        IF :update = 'add' THEN
          RETURN(TRUE);
        ELSE
          RETURN FALSE;
        END IF;
    You'll want to place your hard-coded values in single-quotes. Ex:
        select a.col1, a.col2,
        'add' as update
    - Brian

  • How can I access an iPhoto library from another account?

    We have 2 user accounts on my iMac.  How can I access another user's iPhoto library when I am logged in?

    move the iPhoto library to a shared folder on your Mac.

  • TS1538 I have just purchased an iPhone5 and created a new user instead of using my previous ID. How can I access my previous data?

    I have just purchased an iPhone5 and created a new user instead of using my iPhone3 ID. How can I access my previous data?

    don't just sign out!
    if you simply sign out, the stuff you recently purchased will be an issue in the future when an update comes out for apps or anything else. restore the device as new from itunes then restore from a back if you have one as stated above...or set up as new and use correct apple id. this will ensure you will be using the apple id that you used originally without issues from the new one.

  • How can I have multiple users on iTunes (in order to connect to a shared office iPad)?

    How can I have multiple users on iTunes (in order to connect to a shared office iPad)? Currently each of us has our own iTunes account, so I've made an "all office" Apple ID. However, I can't seem to get two different accounts (my personal and the office) to work on my machine. Even when I login as "the office", my personal library is still showing. Additionally, when I try to setup with a first-time use in iTunes, I get an error that I don't meet the minimum age requirement - no matter what birthdate I enter!

    The library exists regardless of which user is logged in.
    The only way around that is to create different user accounts on the computer.
    There is no way to have 20 unique iTunes users access a shared iTunes under a single login on the computer.

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How can i access dmz server via public ip from inside?

    hi all !
    As shown in Figure,how can i access the server in dmz zone via public?
    i can access it via private ip 192.168.1.1 now,but i can't access it via 101.100.1.2.
    who can help me ?
    thank you !

    Hi,
    You would have to configure Static NAT from DMZ to INSIDE for the server in the same way you have done for DMZ to OUTSIDE.
    Basically in the following way for example
    object network DMZ-WEB
    host 192.168.1.1
    nat (dmz,inside) static 101.100.1.2
    This would enable your users on the "inside" to access the "dmz" server with the public IP address. And naturally only with the public IP address after this NAT.
    Hope this helps
    Please do remember to mark a reply as the correct answer if it answered your question.
    Feel free to ask more if needed
    - Jouni

  • How can I have multiple users on one apple id?

    How can I have multiple users on one apple ID?
    ie: I have my apple ID with my own credit, how can I set up credit for my son under the same apple ID, so that he can still access the same apps I've already downloaded and paid for?

    I've been trying to figure out a clean way to do this too. I think you may need more than one Apple ID – one that is shared and used to purchase "sharable" items and then "individual" Apple IDs for you and your son. That's the idea that I'm pursuing for the moment.
    It seems that there must be a way to do this, App Store purchases for the Mac are licensed across multiple machines. iPhone app purchases have "all your devices" licensing. Makes me think that Apple has a process in mind for sharing an account (or associating a device with multiple accounts).
    Other things I've learned:
    - Apparently you can't merge Apple ID accounts. I asked about this once at an Apple Store and was told that there was no way to do it.
    - If you share an Apple ID the Messages app behaves in a somewhat surprising manner. It must use your Apple ID to decide where messages should be sent because all users get all messages. This can make it very hard to organize a surprise party :-)

  • I have just acquired an iMac desktop. I want to sign on to my airport wireless network, but cannot remember the password. How can I access the password or reset it. I already use a MacBook Pro and an iPad on the network.

    I have just acquired an iMac desktop (about 4 years old). I want to connect to my Apple airport wireless network, but cannot remember the password. How can I access the password or, if necessary, reset it. I already use a MacBook Pro and an iPad on the network and don't want to jeopardize what already works well. I am not all that computer literate.

    How can I access the password or, if necessary, reset it.
    Read the user manual that came w/your Airport router or you can cross-post in one of the  AirPort Forums for instructions. 

  • How can I access Pandora from Apple TV?

    How can I access Pandora on Apple TV?

    appletvs don't support user installed apps
    appletvs dont come with anything not on the list http://www.apple.com/appletv/whats-on/
    to get around that one can airplay from supported macs and ios devices

  • How can  I  restrain the user login portal once, in the same time ???

    Hi
    I need to restrain the user can't repeat to login portal ....
    to reduce portal loading
    How can I restrain the user login portal once, in the same time???
    Which attributs in Identity Manager or amconsole I can do it to restrain the user ??
    tks

    Does your portal support anonymous access? If so, make sure you are using the authlessanonymous mode. This mode only creates one session that is shared for all anonymous users. This is much more efficient than anonymous access, which creates a session for each anonymous user.
    I have no other recommendation for limiting users to a single login. In general, web applications do not behave like this. What if a user closes their browser without logging out? Does the user have to wait until the session times out in order to log back in again?
    The same thing is true for users that are mobile. If a user leaves their office without logging out and then attempts to log in with a laptop in the conference room, then access will be denied in your implementation. Users do not expect this type of limitation being built into the system.
    If you are having problems scaling, then you need to look at your architecture and perhaps add some more resources. Also, make sure you are making efficient use of the authlessanonymous access mode as stated above.
    - Jim

Maybe you are looking for