Linux Lite Forums
Super Lite Mode for Lite Tweaks - Printable Version

+- Linux Lite Forums (https://www.linuxliteos.com/forums)
+-- Forum: Development (https://www.linuxliteos.com/forums/forumdisplay.php?fid=7)
+--- Forum: Linux Lite Software Development (https://www.linuxliteos.com/forums/forumdisplay.php?fid=30)
+--- Thread: Super Lite Mode for Lite Tweaks (/showthread.php?tid=4164)

Pages: 1 2


Super Lite Mode for Lite Tweaks - Valtam - 06-11-2017

I'm thinking of introducing a new feature to Lite Tweaks called Super Lite Mode.

What this effectively does is kill all but the necessary process on Linux Lite, including:

- All open windows and applications
- All unnecessary processes
- Copy & paste functions

What stays running:

- The desktop
- Sound services
- Graphics services
- Firewall (if enabled)
- Menu, Taskbar etc

This will be useful especially for older computers and gamers who want as few processes interfering with game performance as possible.

Before starting, please note how much ram is currently being used via Menu, System, Resource Usage, and please report back with the information next to 'Mem' eg. 259/1.95G

If you'd like to test this, please do the following:

Open a terminal, do:

Code:
sudo apt-get install wmctrl

Code:
touch superlitemode

Code:
leafpad superlitemode

Copy the following into the file and save it:

Code:
#!/bin/bash

# Linux Lite - Super Lite Mode Script
# Developer - Jerry Bezencon
# Website - http://www.linuxliteos.com

ps aux | grep -ie VBox | awk '{print $2}' | xargs kill -9
ps aux | grep -ie Thunar | awk '{print $2}' | xargs kill -9
ps aux | grep -ie blueman | awk '{print $2}' | xargs kill -9
ps aux | grep -ie applet.py | awk '{print $2}' | xargs kill -9
ps aux | grep -ie tumblerd | awk '{print $2}' | xargs kill -9
ps aux | grep -ie light-locker | awk '{print $2}' | xargs kill -9
ps aux | grep -ie xfce4-power-manager | awk '{print $2}' | xargs kill -9
ps aux | grep -ie obexd | awk '{print $2}' | xargs kill -9

# Close all open windows gracefully without closing the Desktop environment
# Credit - Guido van Steen: https://unix.stackexchange.com/questions/145752/how-to-kill-all-open-windows

WIN_IDs=$(wmctrl -l | grep -vwE "Desktop$|xfce4-panel$" | cut -f1 -d' ')
for i in $WIN_IDs; do wmctrl -ic "$i"; done

# Keep checking and waiting until all windows are closed (you probably don't need this section)

while test $WIN_IDs; do
    sleep 0.1;
    WIN_IDs=$(wmctrl -l | grep -vwE "Desktop$|xfce4-panel$" | cut -f1 -d' ')
done

Code:
chmod +x superlitemode

To run it in LL 3.4, just double click on the superlitemode file.

Then please ONLY open Menu, System, Resource Usage, and please report back with the information next to 'Mem' eg. 259/1.95G

WARNING: This will close all open windows including your web browser.

So, a typical reply to this thread would include:

Before superlitemode: 345/1.95G

After superlitemode: 259/1.95G (+ windows that remained open, if any)

Looking forward to all your feedback.

Many thanks Smile


Re: Super Lite Mode for Lite Tweaks - newtusmaximus - 06-12-2017

I tried this on my HP desktop LL64 bit v3.4.  4GB RAM double channel.
Before installing, on fresh boot, 987 mb used ( green + red) of 3856mb
After installing  and double clicking superlitemode file - browser shuts down as does home folder  as expected etc - just desktop viewed..  Resource relatively unchanged 979 used  ( green+red) of 3850.
However I am running Sophos AV in the background so  this might explain things??

Will try on Fuji3405 32bit LL3.4


Re: Super Lite Mode for Lite Tweaks - Valtam - 06-12-2017

Yes Sophos will be running in the background using a lot of memory. It wouldn't be smart of me to shut down any security services on people's machines Smile

Sent from my Mobile phone using Tapatalk




Re: Super Lite Mode for Lite Tweaks - newtusmaximus - 06-12-2017

Can I put in a temporary line into the file to "neutralise" sophos fo them period of the test?
BTW, what is the significance of the green and red  parts of the RAM use display in resource report??


Re: Super Lite Mode for Lite Tweaks - Valtam - 06-12-2017

Temp. line, yes, if you know what the service is. I wouldn't know sorry. Green - used memory, Red - cache.

Sent from my Mobile phone using Tapatalk




Re: Super Lite Mode for Lite Tweaks - newtusmaximus - 06-12-2017

working my way through Sophos linux manual as a wide eyed newbie Smile  Trying to find a way to disable on boot up, then will check resource clear mem ( Lite Tweaks) , check resource again, then trigger "superlitemode".  Will report back when I have tested etc..  Unfortunately (for this test) all our family pcs laptops  are Sophos live protected.

For the record the idea of superlitemode  option ( preferably default on start up) for older  cpus/models I think would be ideal and then user can initiate what is needed at the time;  ideal to run off a usb say for internet banking etc. with "lightweight" browser for example ( Min    http://www.omgubuntu.co.uk/2016/05/minimal-web-browser-linux


Re: Super Lite Mode for Lite Tweaks - thoughtinstinct - 06-12-2017


Hi Jerry


May i suggest the following changes:


1. Open Menu, System, Resource Usage and note down the values next to 'Mem' eg. 259/1.95G
2. Navigate to "location of superlitemode file", ( found mine after awhile at /home/USERNAME )
3. WARNING: This will close all open windows including your web browser. To run it in LL 3.4, just double click on the superlitemode file.


Then please ONLY open Menu, System, Resource Usage, and note down again the values next to 'Mem' eg. 259/1.95G


So, a typical reply to this thread would include:


Before superlitemode: 345/1.95G


After superlitemode: 259/1.95G (+ windows that remained open, if any)


________________________________________________


My results:


Before superlitemode: 876m/5.72G


After superlitemode: 335m/5.72G (no windows remained open)


Will try again later immediately after restart and let you know.


Re: Super Lite Mode for Lite Tweaks - Valtam - 06-13-2017

Thank you Smile

Sent from my Mobile phone using Tapatalk




Re: Super Lite Mode for Lite Tweaks - torreydale - 06-13-2017

These results are impressive.


Re: Super Lite Mode for Lite Tweaks - Valtam - 06-14-2017

Thanks @torreydale. Hoping to get many more people to participate in the test.

Sent from my Mobile phone using Tapatalk