| Prev |   1     2   3   4     5   | Next | Last
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Odds and ends (https://talk.maemo.org/showthread.php?t=74915)

jstokes 2011-09-14 23:00

Re: Odds and ends
 
Hmm, maybe "su - user -c 'xmmsctrl whatever'" in the script will work

Addison 2011-09-15 09:31

Re: Odds and ends
 
Do you mean writing it exactly like this?


if [ "$1" = "in" ]; then 'su - user -c 'xmmsctrl next''


That gave me nothing as well.

jstokes 2011-09-15 09:41

Re: Odds and ends
 
Try replacing the script with this:

Code:

#!/bin/sh

case $1 in
  in) su - user -c "xmmsctrl next" ;;
  out) su - user -c "xmmsctrl previous" ;;
esac


auouymous 2011-09-15 10:55

Re: Odds and ends
 
Be sure to stop that screenlock program if you try out the new ASUI release. :)

Addison 2011-09-15 13:34

Re: Odds and ends
 
Quote:

Originally Posted by jstokes (Post 1088757)
Try replacing the script with this:

Code:

#!/bin/sh

case $1 in
  in) su - user -c "xmmsctrl next" ;;
  out) su - user -c "xmmsctrl previous" ;;
esac


Sorry boss. Nothing on that either.

What are you using this for stokes?

jstokes 2011-09-15 13:42

Re: Odds and ends
 
TBH, I have no need for this. Does the script have the executable bit set? If you're running screenlock from the Terminal, you should see the output of xmmsctrl as it's running.

Anyway, I'd forget about this and update ASUI :)

Addison 2011-09-15 15:03

Re: Odds and ends
 
This is how I have it set.
/usr/bin/xmmslock
http://img199.imageshack.us/img199/3...1091510524.png

/home/user/xmmskey
http://img828.imageshack.us/img828/8...1091510584.png

lma 2011-09-15 17:04

Re: Odds and ends
 
Just a thought: make it setuid user and omit the "su - user -c" business.

jstokes 2011-09-15 17:13

Re: Odds and ends
 
@Addison

That looks correct... I guess I should buy a new battery so that I can properly test xmmsctrl myself... auouymous seems to be using the same commands for his new ASUI feature.

@lma

I thought about that, but (and I haven't checked so I may be wrong) I need to be root to use the /dev/input interface directly, so I'd have to fork I think and I'm lazy

Addison 2011-09-15 17:13

Re: Odds and ends
 
Is the "setuid user" permissions correct on the way I have it now, lma?

Addison 2011-09-15 17:15

Re: Odds and ends
 
You're not lazy stokes.

I'm actually quite humbled by how much you still do here. :)

jstokes 2011-09-15 17:19

Re: Odds and ends
 
Thanks, Addison. If you're unwilling to try a's (gah, your user name!) ASUI feature, I'll try and directly implement some logic into the program to change XMMS so that we don't need to mess around with this script stuff, tomorrow

Addison 2011-09-15 17:21

Re: Odds and ends
 
Ooooooooh!

I was running xmmslock as user from Xterm, not as root.

With lma's idea, I now get
/home/user/xmmskey: line 6: xmmsctrl next: not found
/home/user/xmmskey: line 6: xmmsctrl previous: not found
/home/user/xmmskey: line 6: xmmsctrl next: not found
/home/user/xmmskey: line 6: xmmsctrl previous: not found
/home/user/xmmskey: line 6: xmmsctrl next: not found

So give me a few to try your previous suggestions stokes.

I've got a good feeling about this now! :D

Addison 2011-09-15 17:40

Re: Odds and ends
 
Squeeeeeeeeeeee! :D


Code:

#!/bin/sh

case $1 in
  in) su - user -c 'xmmsctrl next' ;;
  out)su - user -c 'xmmsctrl previous' ;;
esac


Such happy joy! :D

Addison 2011-09-15 21:37

Re: Odds and ends
 
Okay.

So I'm now at trying to launch both of these together without the need for Xterm

/usr/bin/xmmsstart
Code:

#!/bin/sh

bin/sh -c "LC_MESSAGES=C LANG=C /usr/bin/xmmsctrl launch main 0 equalizer 0 play_list 0 main 1"
sudo xmmslock
killall xmms
killall xmmslock

That's not right though, nothing happens, but the very top line is how it's launched in Personal Launcher.

If I just say
xmms
it won't load the correct graphics and settings for the player.

Also, xmmslock is only half working, screen wakes then shuts off, but no track functions.

I'm running my xmmsstart as root in Personal Launcher.

I'm super confused on all of these permissions.

Any help? :)

auouymous 2011-09-16 00:26

Re: Odds and ends
 
@ addison, Do you not use ASUI? Its new audio lock lets you bind commands to all hardware keys, not just the zoom keys.

Addison 2011-09-16 00:59

Re: Odds and ends
 
ASUI seemed so complicated the few times I've read through and tried to understand your thread.

I'll install it tonight.

But be warned, I tend to ask quite a few questions on most things. :D

auouymous 2011-09-16 02:16

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1089271)
ASUI seemed so complicated the few times I've read through and tried to understand your thread.

Reading a thread with 795 posts would be complicated, so don't read the thread, just watch for new posts so you know when to update. :)

ASUI replaces the SystemUI menu that appears when you press the power button. It also replaces the battery applet, the bluetooth applet, the wifi applet and the load-applet applet. All of its features are explained on the website. Also be sure to run the asui-settings program and explore each section (changes take place immediately).

You will need to run "asui dit; asui dis; asui da" after installing to download and install the test version which has the new audio lock button. And find my latest post in that thread for instructions on adding an xmms profile.

Not complex at all, unless it breaks your system. ;)

Addison 2011-09-17 14:25

Re: Odds and ends
 
Joy!

I found out that as long as modest isn't running and you don't go to Communication --> Email, you can change the duration on how often new emails will scanned for notification. :)

So could some please give me the command line that does the same as this in Configuration Editor?

apps-->modest-->update_interval = 1
and
apps-->modest-->auto_update = true

Like in this format as an example...
gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/turn_off_display 6000000

Cheers everyone!

Addison 2011-09-18 00:58

Re: Odds and ends
 
*facepalm*

Why did I even bother asking? It was right there in front of me.


gconftool-2 --type int --set /apps/modest/update_interval 1
gconftool-2 --type boolean --set /apps/modest/auto_update True


Now any new emails or SMS messages will instantly notify me within the minute.

Awesome. :)

Addison 2011-09-19 16:30

Re: Odds and ends
 
Quote:

gconftool-2 --type int --set /apps/modest/update_interval 1
gconftool-2 --type boolean --set /apps/modest/auto_update True
Okay, so this only works some of the time and I haven't quite figured out the pattern just yet.

Just because I turn on the Auto Update, which it always will do, sometimes it seems like it's not actually running.

Do I need to launch some process to kick start this thing going every time?

I would love to hear back from someone on this. :)

Addison 2011-09-20 19:19

Re: Odds and ends
 
It's running perfectly right now and giving me instant notifications for both email and SMS messages.

Could someone stab a guess as to what process is running this update check and how to kick start it without going to the Application-->Email program?


830 user SW< 9636 339 11.1 7.5 matchbox-window
6584 user RW 3944 6581 5.5 3.1 top
786 root SW< 11836 339 4.6 9.3 Xomap
1025 user SW< 45736 989 3.7 36.0 maemo-launcher
6580 user SW 36276 989 3.7 28.5 maemo-launcher
3699 user SW< 94904 989 0.9 74.7 maemo-launcher
6573 user SW 67364 1319 0.0 53.0 browserd
1390 user SW 51404 1 0.0 40.4 gnome-vfs-daemo
1319 user SW 40568 1 0.0 31.9 browserd
1204 user SW< 33180 989 0.0 26.1 maemo-launcher
989 user SW< 21292 1 0.0 16.7 maemo-launcher
1303 user SWN 17108 339 0.0 13.4 metalayer-crawl
1297 user SW 16640 339 0.0 13.1 mediaplayer-eng
3014 root SW< 14672 339 0.0 11.5 advanced-system
1114 nobody SW< 8080 339 0.0 6.3 dnsmasq
971 root SW< 7888 339 0.0 6.2 ke-recv
1208 user SW< 7444 339 0.0 5.8 osso-media-serv
826 user SW< 7272 339 0.0 5.7 sapwood-server
1258 user SW 5260 339 0.0 4.1 alarmd
1276 root SW< 5112 339 0.0 4.0 hulda
905 root SW 4836 339 0.0 3.8 multimediad
6581 user SW 4784 6580 0.0 3.7 bash

auouymous 2011-09-20 19:58

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1092762)
Could someone stab a guess as to what process is running this update check and how to kick start it without going to the Application-->Email program?

1303 user SWN 17108 339 0.0 13.4 metalayer-crawl

Don't use modest and rarely use claws for email tasks but why are you running metalayer-crawler? Do you use media player? If not, you can use asui-settings : services to uncheck and stop it.

Addison 2011-09-20 23:02

Re: Odds and ends
 
Thanks A.

I just reflashed yesterday and totally forgot about metalayer-crawler.

Addison 2011-09-21 00:25

Re: Odds and ends
 
Yes! I think I definitely got it now. :)

It was just a matter of stopping MCE, changing the notification values, then restarting MCE and restoring the brightness settings along with auouymous' set-backlight script.


Turning on 1 minute notifications:
Code:

blank=`gconftool-2 -g /system/osso/dsm/display/display_blank_timeout`
/etc/init.d/mce stop
gconftool-2 --type int --set /apps/modest/update_interval 1
gconftool-2 --type boolean --set /apps/modest/auto_update True
sudo /etc/init.d/mce start
/usr/bin/set-backlight `gconftool-2 --get /apps/adv-backlight/brightness`
restore_value()
{
  gconftool-2 --type $1 --set $2 `gconftool-2 --get $2`
}
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout 120
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout $blank
restore_value int /system/osso/dsm/display/display_dim_timeout
restore_value bool /system/osso/dsm/locks/touchscreen_keypad_autolock_enabled
restore_value bool /system/osso/dsm/display/display_on_with_charger


Turning it off:
Code:

bank=`gconftool-2 -g /system/osso/dsm/display/display_blank_timeout`
/etc/init.d/mce stop
gconftool-2 --type boolean --set /apps/modest/auto_update False
sudo /etc/init.d/mce start
/usr/bin/set-backlight `gconftool-2 --get /apps/adv-backlight/brightness`
restore_value()
{
  gconftool-2 --type $1 --set $2 `gconftool-2 --get $2`
}
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout 120
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout $blank
restore_value int /system/osso/dsm/display/display_dim_timeout
restore_value bool /system/osso/dsm/locks/touchscreen_keypad_autolock_enabled
restore_value bool /system/osso/dsm/display/display_on_with_charger



Oh, and auouymous, I don't use any of these mail apps either.

I'm only using it for the LED alerts so I no longer have to check my Gmail account anymore. :)

auouymous 2011-09-21 00:27

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1092886)
I just reflashed yesterday and totally forgot about metalayer-crawler.

Did ASUI break your system?

Addison 2011-09-21 00:51

Re: Odds and ends
 
No. Not at all. In fact, I wish that I would have jumped on your incredible app a long time ago! :)

What happened was that I got a little carried away and kept installing junk until I was left with only 1 kb in flash memory.

Oops! :D

By the way, if there's any way to incorporate the above scripts into ASUI, that would be fantastic.

It basically works just like Google Talk on my Windows PC.

If you forward your Google Voice messages to your gmail account, you'll receive instant notifications on all new messages, SMS, Voice Mail, missed calls, and emails.

You could do this before, but now, you no longer have that 5 minute delay, and when texting with someone, this makes a huge difference. :)

auouymous 2011-09-21 01:39

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1092944)
By the way, if there's any way to incorporate the above scripts into ASUI, that would be fantastic.

Starting and stopping MCE in ASUI, not going to happen. Restarting MCE causes more problems than you think, such as bringing up the device lock keypad and might cause alarmd problems.

After 0.6.0 is released I plan on adding 4 (maybe more) half widgets (the clock is a half widget, volume is a full widget) to ASUI that can each hold 2 buttons. I will also be adding 4-6 command buttons that you can set commands to run as root or user and give them a name and maybe an icon. You'll be able to move any button between the button bars and the new button widgets. Then you can put your scripts in files and call them from buttons in ASUI. :)

the number of button half widgets and command buttons can easily be increased if anyone thinks there should be more.

Addison 2011-09-21 02:09

Re: Odds and ends
 
That's a great idea!

Most likely I'll use those slot widgets to change different profiles for Xbindkeys.

I tend to use Quickswitch the most.
http://talk.maemo.org/showthread.php...ht=quickswitch

But the hardware keys sometimes need to go back to default when playing music.

I also have a setup for right clicks to be used with SCUMM and Dosbox.

So yeah, this will definitely come in handy for me. :)

Addison 2011-09-25 04:57

Re: Odds and ends
 
This one should be easy. :)

In my script I'm doing a bunch of junk and then at the end of it I'm launching

/opt/adom/adom

The thing is, this adom file reports not being able to find qemu-i386.

http://img37.imageshack.us/img37/887...1092500493.png

If I do this in Xterm

cd /opt/adom
./adom

this works just fine.

How can I get this same result in my script?

auouymous 2011-09-25 05:28

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1095620)
If I do this in Xterm

cd /opt/adom
./adom

this works just fine.

How can I get this same result in my script?

Well, you could start by putting what you typed in the terminal into your script. :)

The program is looking in present working directory for its files, so you must run the program from within that directory. Shell scripts use the same commands you type on the command line, the first line spawns a shell and pretty much dumps the contents of the file into it.

Addison 2011-09-25 05:44

Re: Odds and ends
 
I am too stupid to live! *lol*

Addison 2011-09-25 20:02

Re: Odds and ends
 
Hey auouymous.

Could you take a look at this thread here?
http://talk.maemo.org/showthread.php?t=67737

If there's anyone who can figure out how to get qemu working on the older tablet, it would be you. :)

I don't get it. Linuxeventually has it running on his end.

The poop?

I don't understand why it won't work for me.

Anyway, if we do get this installed correctly, what all doors will this open up for us being able to use i386 binaries?

maacruz 2011-09-25 20:43

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1096176)
Anyway, if we do get this installed correctly, what all doors will this open up for us being able to use i386 binaries?

Well, I'm not sure our lifespan is long enough for us to see it booting windows from start to finish :D

Addison 2011-09-25 20:45

Re: Odds and ends
 
^ Cute. *lol*

auouymous 2011-09-25 21:08

Re: Odds and ends
 
Quote:

Originally Posted by Addison (Post 1096176)
Hey auouymous.
If there's anyone who can figure out how to get qemu working on the older tablet, it would be you.

I'm more of a Bochs (BFE) or fprem guy, no qemu. :D

Addison 2011-09-25 21:11

Re: Odds and ends
 
^ I never liked you. :)

Addison 2011-09-27 22:50

Re: Odds and ends
 
So I'm trying to do a really fast zoom feature when using Tear.
Mostly for sites such as google.com/voice/m

In Personal Menu I have two icons I can launch

Zoom in:
xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7' & xte 'keydown F7' 'keyup F7'

Zoom out:
xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8' & xte 'keydown F8' 'keyup F8'

It works great.

What I have to do is put Tear in window mode, click Personal Menu, then the icon.

Is there a way to do this with the zoom in and out keys?

Binding a key to launch such a script and then using xte to send out these signals is an endless loop error I believe.

Any suggestions?

Johnnie Price 2011-09-28 00:10

Re: Odds and ends
 
I have a question. How can I get xbindkeys to start on boot rather than having to open xterm?

Addison 2011-09-28 00:16

Re: Odds and ends
 
Yeah, there are two things I would like to start at boot:

This is needed every time on boot for Xkbd to be stable:
gconftool-2 --set -t bool /system/osso/af/keyboard-attached true && sleep 2 && gconftool-2 --set -t bool /system/osso/af/keyboard-attached false
&
xbindkeys

I never figured out how to do this so I usually try to never reboot. :)


| Prev |   1     2   3   4     5   | Next | Last
All times are GMT. The time now is 21:02.

vBulletin® Version 3.8.8