Notices


Reply
Thread Tools
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#761
Originally Posted by D@vIcHoJD View Post
How I can add the widget of the cpu, memory and IP, which is in the screenshot.
The widget in the screenshot is made by this script (put it in /opt/qtlockscreen and call it sysinfo.sh):
Code:
#!/bin/sh
echo `awk '{print $1/1000" MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`

echo `awk '/mT/ {memttl = $2}; /mF/ {memfre = $2}; /Bu/ {membff = $2}; $1 == "Cached:" {memcch = $2} END {printf ("%.1f MB\n",(memttl-memfre-membff-memcch)/1024)}' /proc/meminfo`

CONN=$(/sbin/route | awk '/default/ {print $NF}')
IP="-"
if [ "$CONN" == "wlan0" ]; then
    IP=$(/sbin/ifconfig wlan0 | awk -F "[: ]" '/Bc/ {print $13}')
fi

if [ "$CONN" == "gprs0" ]; then
    IP=$(/sbin/ifconfig gprs0 | awk -F "[: ]" '/P-t-P/ {print $13}')
fi
echo -n $IP
And these widgets in the config file (one for the background, one for the text and one for the values from the script):
Code:
[SystemInfoBackground]
PosL="5;220"
PosP="5;220"
SizeP="150;70"
SizeL="150;70"
Radius=5
Color="0;0;0;150"

[SystemInfoText]
PosL="8;220"
PosP="8;220"
SizeP="150;70"
SizeL="150;70"
Font=";12;normal;0"
Color="50;255;25;255"
Alignment="left;center"
Multiline=1
Text="CPU:\nMem:\nIP:"

[SystemInfo]
PosL="5;220"
PosP="5;220"
SizeP="147;70"
SizeL="147;70"
Font=";12;normal;0"
Alignment="right;center"
Multiline=1
Command="/opt/qtlockscreen/sysinfo.sh"
UpdateIntervalSeconds=1
You need to add the widgets in the widget list (adjust the numbers and don't forget to update the size field):
Code:
Widgets\25\Name="Rect.SystemInfoBackground"
Widgets\26\Name="Text.SystemInfoText"
Widgets\27\Name="TextCommand.SystemInfo"
For info on available widgets and some info refer to the wiki:
http://wiki.maemo.org/QtLockscreen

Last edited by sakya; 2012-05-07 at 21:32.
 

The Following 2 Users Say Thank You to sakya For This Useful Post:
D@vIcHoJD's Avatar
Posts: 236 | Thanked: 95 times | Joined on Jan 2012 @ Ecuador
#762
I have a small problem with the script, I get error 127, I did something wrong, or is an error in the script, thanks for your help.
I followed all the instructions you indicated me.
Attached Images
 
 
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#763
Originally Posted by D@vIcHoJD View Post
I followed all the instructions you indicated me.
Did you set the script's execute permission?
What happens if you launch the script from the terminal?
Code:
/opt/qtlockscreen/sysinfo.sh
 
D@vIcHoJD's Avatar
Posts: 236 | Thanked: 95 times | Joined on Jan 2012 @ Ecuador
#764
Originally Posted by sakya View Post
Did you set the script's execute permission?
What happens if you launch the script from the terminal?
Code:
/opt/qtlockscreen/sysinfo.sh
I went out that did not find the folder, but this way I throw this error:

-sh: /opt/qtlockscreen/sysinfo.sh: not found
~ $ root


BusyBox v1.20.0 (Debian 1.20.0power1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900:~# opt/qtlockscreen/sysinfo.sh
-sh: opt/qtlockscreen/sysinfo.sh: not found
Nokia-N900:~# /opt/qtlockscreen/sysinfo.sh
-sh: /opt/qtlockscreen/sysinfo.sh: not found
Nokia-N900:~# /opt/qtlockscreen/
-sh: /opt/qtlockscreen/: Permission denied
Nokia-N900:~# cd opt/qtlockscreen
-sh: cd: can't cd to opt/qtlockscreen
Nokia-N900:~# cd opt/qtlockscreen/
-sh: cd: can't cd to opt/qtlockscreen/
Nokia-N900:~# cd /opt/qtlockscreen/
Nokia-N900:/opt/qtlockscreen# sysinfo.sh
-sh: sysinfo.sh: not found
Nokia-N900:/opt/qtlockscreen# sysinfo.sh
-sh: sysinfo.sh: not found
Nokia-N900:/opt/qtlockscreen# sh sysinfo.sh
805 MHz
: not found line 3:
162.1 MB
: not found line 5:
sysinfo.sh: line 15: syntax error: unexpected end of file (expecting "then")
Nokia-N900:/opt/qtlockscreen#

Please help me, Am I doing something wrong
 
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#765
Originally Posted by D@vIcHoJD View Post
Please help me, Am I doing something wrong
Use the attached script (rename it sysinfo.sh)
Give the file execute permission:
Code:
root
chmod a+x /opt/qtlockscreen/sysinfo.sh
Attached Files
File Type: txt sysinfo.txt (556 Bytes, 86 views)
 

The Following User Says Thank You to sakya For This Useful Post:
D@vIcHoJD's Avatar
Posts: 236 | Thanked: 95 times | Joined on Jan 2012 @ Ecuador
#766
Originally Posted by sakya View Post
Use the attached script (rename it sysinfo.sh)
Give the file execute permission:
Code:
root
chmod a+x /opt/qtlockscreen/sysinfo.sh
Thank very much sakya. Problem solved and thanks again for the script.
 
D@vIcHoJD's Avatar
Posts: 236 | Thanked: 95 times | Joined on Jan 2012 @ Ecuador
#767
In the last version 0.1.26 is repeated 2 times the widget 26, I corrected it manually.
 

The Following User Says Thank You to D@vIcHoJD For This Useful Post:
Posts: 539 | Thanked: 518 times | Joined on May 2010 @ nanaurbusiness
#768
Sakya I still need your help. Like I wrote a few posts back. Qtlockscreen doesn't load at boot. So I always need to re-apply my theme with Lockscreen-Config...

Can I somehow check if it's properly in startup? And where do I have to look?

Regards,

J4ZZ
__________________

N900 ~ $ make me a sandwich
-bash: no, make it yourself
N900 ~ $ sudo make me a sandwich
-bash: ok then...
 
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#769
Originally Posted by J4ZZ View Post
Like I wrote a few posts back.
Sorry, I didn't notice your message.

The autostart script is /etc/event.d/qtlockscreen
It should be like this:
Code:
start on started hildon-desktop

respawn

script
  exec su - user -c "exec /usr/bin/qtlockscreen"
end script
 

The Following User Says Thank You to sakya For This Useful Post:
Posts: 539 | Thanked: 518 times | Joined on May 2010 @ nanaurbusiness
#770
Originally Posted by sakya View Post
The autostart script is /etc/event.d/qtlockscreen
It should be like this:
Code:
  exec su - user -c "exec /usr/bin/qtlockscreen"
What is expected output/behaviour of this command?

I get something like
Code:
Maemo applications must be run with the run-standalone.sh script" 
qtlockscreen: cannot connect to X server
when executing the line in Terminal. (bash is default shell)

Regards,

J4ZZ
__________________

N900 ~ $ make me a sandwich
-bash: no, make it yourself
N900 ~ $ sudo make me a sandwich
-bash: ok then...
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:54.