Linux Lite 8.0 RC1 has been released - Click here


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Lite Tweaks - Numlock
#11

Recommendations:

- Any tasks that get canceled (user changes their mind) they get a prompt 'Are you sure you want to cancel job_description? Click Yes to return to Continue, No to return to job_description.' Continue carries on with next task.
- From now on format all words surrounded in 'quotes' to words as bold.
- Any tasks that fail, asks the user if they want to try to run the task again. This worked for me when Clear Memory failed the first time:

[Image: dhxYF3p.png]

Love the new Kernel Cleaner :)

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#12

(12-08-2016, 11:38 AM)Jerry link Wrote:  - Any tasks that get canceled (user changes their mind) they get a prompt 'Are you sure you want to cancel job_description? Click Yes to return to Continue, No to return to job_description.' Continue carries on with next task.

I need at example of such task. As it is right now most tweaks are non interactive and after a failure they alert the user and return, which means the next task is executed.

Quote:- From now on format all words surrounded in 'quotes' to words as bold.

Agreed. I noticed you had changed some, hence I'm trying to follow the same pattern already. You are welcome to point to those I missed if possible so that they can be corrected accordingly.

Quote:- Any tasks that fail, asks the user if they want to try to run the task again. This worked for me when Clear Memory failed the first time:

Clear Memory has never had anything in the code to retry I believe. Maybe it is about time we add the option as you suggested. Will look into it.

Quote:Love the new Kernel Cleaner :)

Thank you :)  I think it's an improvement. Those little touches can make a positive difference.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#13

(12-08-2016, 11:38 AM)Jerry link Wrote:  - Any tasks that fail, asks the user if they want to try to run the task again. This worked for me when Clear Memory failed the first time:
[Image: dhxYF3p.png]

I can't find a way to pipe the response out to run a loop and retry. Irrespective, I just noticed that we are cleaning the cache 3 times in a row which is wrong:

Code:
sh -c 'echo 1 >/proc/sys/vm/drop_caches' && sh -c 'echo 2 >/proc/sys/vm/drop_caches' && sh -c 'echo 3 >/proc/sys/vm/drop_caches'

echo 1 > /proc/sys/vm/drop_caches    <= frees pagecache
echo 2 > /proc/sys/vm/drop_caches    <= frees dentries and inodes
echo 3 > /proc/sys/vm/drop_caches    <= frees pagecache, dentries and inodes

... and that's probably the reason why you received that error. If we want to free pagecache, dentries and inodes:

Code:
sh -c 'echo 3 >/proc/sys/vm/drop_caches'

... is all it's needed. Sorry I didn't pick this up earlier  :-[  I will push an update to master asap.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#14

Nice catch :)

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#15

An important fix for Numlock tweak was committed to master https://github.com/linuxlite/litetweaks/...16d062cdb9

The string search and replacement can actually cause some damage  :-\ :

Quote:sed -i "s/on/off/g" /etc/lightdm/lightdm.conf

That will produce:

/etc/lightdm/lightdm.conf

Quote:[SeatDefaults]
user-sessioff=xfce
allow-guest=false
autologin-user=linux
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-setup-script=/usr/bin/numlockx off

Instead, sed should match the last "on" occurrence only, which can be a little more memory intensive if used and may also break if another option is added at some point. Hence I opted to update it with a more exact match:

Code:
sed -i "s/numlockx on/numlockx off/g"
sed -i "s/numlockx off/numlockx on/g"

Jerry, please consider releasing an update asap.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#16

Done :)

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)