maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Dbus & phone profile question... (https://talk.maemo.org/showthread.php?t=49904)

digitalvoid 2010-04-13 11:17

Dbus & phone profile question...
 
Hi,

Is there a dbus command (or other methode) to query the current selected phone profile (standard 'general' or 'silent'). I need this for a Python script...

qwerty12 2010-04-13 11:20

Re: Dbus & phone profile question...
 
Hi,

Code:

dbus-send --print-reply --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile

Alan_Peery 2010-04-13 12:20

Re: Dbus & phone profile question...
 
With qwerty12's start, I was also able to list what profiles were defined, and put this into the wiki at http://wiki.maemo.org/Phone_control#Profiles.

I am wondering what happens if I add a profile to the list somehow. The current combination of Tweakr manipulating one menu and a quick press of the power button showing another menu isn't working well for me, and I would love to have all my Tweakr profiles given as a pop-up option when I select the "Silent"/"General" toggle that currently controls the phone rings...

Alan_Peery 2010-04-13 12:39

Re: Dbus & phone profile question...
 
After a bit of poking around, it appears that the profiled is reading the data in /etc/profiled, but the UI aspect around the power button is missing.

I copied /etc/profiled/90.nokia.ini to /etc/profile/91.alan.ini, made an obvious edit, and rebooted. After this, the get_profiles call then listed my "quiet" profile in addition to the standard "General" and "Silent". It seems that a bit of GUI hacking may turn this into appropriate configuration.

Anyone have any idea why Tweakr didn't store the new profiles that you create with it in /etc/profiled? It seems the place...

nicolai 2010-04-13 14:13

Re: Dbus & phone profile question...
 
I am working on that (the GUI).

I made a control-panel and a status-panel plugin to add
and manage multiple proflies.

There are two problems at the moment.

1. It doesnt work.
To add new profiles I need to create and modify a file
in /etc/profiled from within the control-panel plugin.
This works in scratchbox but not on the device.
In scratchbox this directory is writable by the user,
on the device it is a system file and only wirteable by
the superuser. I dont know exactly what to do.

2. sound preview http://talk.maemo.org/showthread.php...611#post608611


regards nicolai

qwerty12 2010-04-13 14:18

Re: Dbus & phone profile question...
 
Quote:

Originally Posted by nicolai (Post 608614)
1. It doesnt work.
To add new profiles I need to create and modify a file
in /etc/profiled from within the control-panel plugin.
This works in scratchbox but not on the device.
In scratchbox this directory is writable by the user,
on the device it is a system file and only wirteable by
the superuser. I dont know exactly what to do.

Generally, a "helper program" is made and an exception added to /etc/sudoers.d. Look at pH5's LED Patterns applet (it's in Vala, though).

That said, would /home/user/.profiled work?

Best Regards,
Faheem

nicolai 2010-04-13 14:39

Re: Dbus & phone profile question...
 
Quote:

Originally Posted by qwerty12 (Post 608622)
Generally, a "helper program" is made and an exception added to /etc/sudoers.d. Look at pH5's LED Patterns applet (it's in Vala, though).

Yes, something like that I had thought of.

Quote:

Originally Posted by qwerty12 (Post 608622)
That said, would /home/user/.profiled work?

No, already tried.

nicolai


All times are GMT. The time now is 10:40.

vBulletin® Version 3.8.8