You are Here:
Linux Lite 4.0 Final has been released. See the Release Announcements Section.




Lite Tweaks - Suggestions welcomed

Author (Read 42754 times)

0 Members and 1 Guest are viewing this topic.

Lite Tweaks - Suggestions welcomed
« on: September 04, 2014, 04:51:45 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 6120
    Posts
  • Country: nz
  • Reputation: 548
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 3.8 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 960
Our next addition to the Lite application family will be Lite Tweaks.

Install:

Code: [Select]
sudo apt-get update && sudo apt-get install lite-cleaner
Source here: https://github.com/linuxlite/litetweaks



Before we embark on this, I'd like to ask the community for the type of tasks they'd like to see in a cleaner.
For example:

  • Clean out package cache
  • Perform autoremove of packages no longer needed
Let the ideas flow. Remember, no idea is a bad idea :)
Last Edit: February 13, 2015, 08:09:00 PM by Jerry
Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

Learn to use your emotions to think, not think with your emotions.



 


Re: Lite Cleaner - Suggestions welcomed
« Reply #1 on: September 04, 2014, 05:53:47 PM »
 

rokytnji

  • Friganeer
  • Platinum Level Poster
  • **********
  • 1257
    Posts
  • Country: us
  • Reputation: 134

  • Linux Lite: 3.6 64bit

  • CPU: Intel Core2 Duo U9600

  • MEMORY: 4Gb

  • VIDEO CARD: Intel Mobile 4
What? Like Bleachbit? Personally. I am too much of a control freak to trust a autocleaner.

Hope you don't mind what I post. If so I will modify and delete

 Remove unwanted junk.

Code: [Select]
apt-get autoremove

Code: [Select]
deborphan | xargs apt-get -y remove
Code: [Select]
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #2 on: September 04, 2014, 06:17:50 PM »
 

Alex

  • Forum Regular
  • ***
  • 143
    Posts
  • Reputation: 9
  • Linux Lite Member
When I was in windows (last week) I used a free program called CCleaner it seemed to do the job quite well and had/has a number of functions from cleaning to registry checking to uninstalling unwanted progs and their components. I don't know how much of that sort of thing would apply to LL. but something similar might be good.

:)

 

Re: Lite Cleaner - Suggestions welcomed
« Reply #3 on: September 04, 2014, 06:32:03 PM »
 

misko_2083

  • Gold Level Poster
  • *******
  • 679
    Posts
  • Reputation: 185
  • Linux Lite Member

  • CPU: Dual core Pentium E5700 3GHz

  • MEMORY: 3Gb

  • VIDEO CARD: GeForce GT 430
There should be an option to remove old kernels.
I guess these are already in the script.
Code: [Select]
sudo apt-get autoclean
Code: [Select]
sudo apt-get clean
Code: [Select]
sudo apt-get autoremove
Maybe clearing thumbnail cache
Code: [Select]
rm -f ~/.cache/thumbnails/normal/*Purging unused configuration files
Code: [Select]
sudo dpkg --purge $(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2)Trash cleanup
Code: [Select]
rm -r -f ~/.local/share/Trash/files/*Browser cache cleanup, would also be usefull.
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #4 on: September 04, 2014, 06:34:26 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 6120
    Posts
  • Country: nz
  • Reputation: 548
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 3.8 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 960
Thanks folks, keep'm coming, some good ones there already :)
Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

Learn to use your emotions to think, not think with your emotions.



 

Re: Lite Cleaner - Suggestions welcomed
« Reply #5 on: September 04, 2014, 08:24:14 PM »
 

misko_2083

  • Gold Level Poster
  • *******
  • 679
    Posts
  • Reputation: 185
  • Linux Lite Member

  • CPU: Dual core Pentium E5700 3GHz

  • MEMORY: 3Gb

  • VIDEO CARD: GeForce GT 430
I've found this 7 year old, yet very interesting script called "Ubucleaner" License: GPL
It might help you.
Code: [Select]
#!/bin/bash

OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"

if [ $USER != root ]; then
  echo -e $RED"Error: must be root"
  echo -e $YELLOW"Exiting..."$ENDCOLOR
  exit 0
fi

echo -e $YELLOW"Cleaning apt cache..."$ENDCOLOR
aptitude clean

echo -e $YELLOW"Removing old config files..."$ENDCOLOR
sudo aptitude purge $OLDCONF

echo -e $YELLOW"Removing old kernels..."$ENDCOLOR
sudo aptitude purge $OLDKERNELS

echo -e $YELLOW"Emptying every trashes..."$ENDCOLOR
rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
rm -rf /root/.local/share/Trash/*/** &> /dev/null

echo -e $YELLOW"Script Finished!"$ENDCOLOR
Last Edit: September 04, 2014, 08:27:46 PM by misko_2083
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #6 on: September 05, 2014, 06:16:17 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 6120
    Posts
  • Country: nz
  • Reputation: 548
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 3.8 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 960
So far ...

Last Edit: September 05, 2014, 06:42:16 AM by Valtam
Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

Learn to use your emotions to think, not think with your emotions.



 

Re: Lite Cleaner - Suggestions welcomed
« Reply #7 on: September 05, 2014, 10:03:56 AM »
 

misko_2083

  • Gold Level Poster
  • *******
  • 679
    Posts
  • Reputation: 185
  • Linux Lite Member

  • CPU: Dual core Pentium E5700 3GHz

  • MEMORY: 3Gb

  • VIDEO CARD: GeForce GT 430
So far ...


I like it.
May I see the code? I have a few ideas.
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #8 on: September 05, 2014, 02:19:53 PM »
 

Coastie

  • PayPal Supporter
  • Gold Level Poster
  • *****
  • 655
    Posts
  • Country: us
  • Reputation: 50
  • Linux Lite User

  • Linux Lite: 3.8 64bit

  • CPU: AMD A10-6700 (ASUS M32)

  • MEMORY: 12Gb

  • VIDEO CARD: ADM Radeon HD (integrated)
This will be great for those of us like me who dread the Terminal.   :-[


Left Mac OS X for Linux in Jan 2014
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #9 on: September 05, 2014, 02:52:18 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1482
    Posts
  • Country: gb
  • Reputation: 404
  • Linux Lite "Advocate"

  • Linux Lite: 2.8 64bit

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
This will be great for those of us like me who dread the Terminal.   :-[

Yes agreed...
I'm waiting for the next tool "Lite Optimise"  ;)
For those little tweaks to make things run smoother & quicker  :D

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks :)

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #10 on: September 05, 2014, 05:28:46 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 6120
    Posts
  • Country: nz
  • Reputation: 548
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 3.8 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 960
May I see the code? I have a few ideas.

Sure, keep in mind I haven't written any of the scripts yet, just this:

Code: [Select]
#! /bin/bash
#--------------------------------------------------------------------------------------------------------
# Name: Linux Lite Cleaner
# Description: A GUI tool to easily clean your Linux Lite system.
# Authors: Misko_2083, Jerry Bezencon
# Date: September 9th, 2014
# Website: https://www.linuxliteos.com
#--------------------------------------------------------------------------------------------------------
ic="/usr/share/icons/zenity-llcc.png"

selection=$(zenity --window-icon="$ic" --list --checklist --width=890 --height=400 --column="Select" --column="Name" --column="Category" --column="Status" \
 --column="Description" --text="Select the task you wish to perform, then click the Clean button. Sort Categories by clicking on the column.\n\nThere are 3 levels of Status:\n<b>Safe</b> - Safe to perform, no harm can be done.\n<b>Caution</b> - Proceed with caution, read the warning on the proceeding step.\n<b>Title</b> - Text go here.\n\nYou can select multiple tasks to perform." --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" \
"1" "Clean package cache" "Packages" "Safe" "Clean downloaded .deb files from your apt cache" \
"2" "Autoremove packages" "Packages" "Safe" "Remove packages automatically installed for programs and that are no longer present" \
"3" "Clear thumbnail cache" "Images" "Safe" "Delete thumbnail files created when viewing images" \
"4" "Empty all Trash Bins" "Home" "Safe" "Empty the Trash Bins for all users" \
"5" "Remove old kernels" "System" "Caution" "Remove kernels you no longer wish to boot from" )

# Exec scripts

echo $selection | grep "Clean package cache" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/aptgetclean 2>/dev/null
fi

echo $selection | grep "Autoremove packages" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/autoremovepkg 2>/dev/null
fi

echo $selection | grep "Clear thumbnail cache" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/thumbnails 2>/dev/null
fi

echo $selection | grep "Empty all Trash Bins" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/emptytrash 2>/dev/null
fi

echo $selection | grep "Remove old kernels" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/remkernels 2>/dev/null
fi

Last Edit: September 05, 2014, 05:30:46 PM by Valtam
Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

Learn to use your emotions to think, not think with your emotions.



 

Re: Lite Cleaner - Suggestions welcomed
« Reply #11 on: September 05, 2014, 06:17:43 PM »
 

misko_2083

  • Gold Level Poster
  • *******
  • 679
    Posts
  • Reputation: 185
  • Linux Lite Member

  • CPU: Dual core Pentium E5700 3GHz

  • MEMORY: 3Gb

  • VIDEO CARD: GeForce GT 430
May I see the code? I have a few ideas.

Sure, keep in mind I haven't written any of the scripts yet, just this:

Code: [Select]
#! /bin/bash
#--------------------------------------------------------------------------------------------------------
# Name: Linux Lite Cleaner
# Description: A GUI tool to easily clean your Linux Lite system.
# Authors: Misko_2083, Jerry Bezencon
# Date: September 9th, 2014
# Website: https://www.linuxliteos.com
#--------------------------------------------------------------------------------------------------------
ic="/usr/share/icons/zenity-llcc.png"

selection=$(zenity --window-icon="$ic" --list --checklist --width=890 --height=400 --column="Select" --column="Name" --column="Category" --column="Status" \
 --column="Description" --text="Select the task you wish to perform, then click the Clean button. Sort Categories by clicking on the column.\n\nThere are 3 levels of Status:\n<b>Safe</b> - Safe to perform, no harm can be done.\n<b>Caution</b> - Proceed with caution, read the warning on the proceeding step.\n<b>Title</b> - Text go here.\n\nYou can select multiple tasks to perform." --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" \
"1" "Clean package cache" "Packages" "Safe" "Clean downloaded .deb files from your apt cache" \
"2" "Autoremove packages" "Packages" "Safe" "Remove packages automatically installed for programs and that are no longer present" \
"3" "Clear thumbnail cache" "Images" "Safe" "Delete thumbnail files created when viewing images" \
"4" "Empty all Trash Bins" "Home" "Safe" "Empty the Trash Bins for all users" \
"5" "Remove old kernels" "System" "Caution" "Remove kernels you no longer wish to boot from" )

# Exec scripts

echo $selection | grep "Clean package cache" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/aptgetclean 2>/dev/null
fi

echo $selection | grep "Autoremove packages" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/autoremovepkg 2>/dev/null
fi

echo $selection | grep "Clear thumbnail cache" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/thumbnails 2>/dev/null
fi

echo $selection | grep "Empty all Trash Bins" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/emptytrash 2>/dev/null
fi

echo $selection | grep "Remove old kernels" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/remkernels 2>/dev/null
fi


Thank you. I made some modifications. Some options are preselected now and I figured out how to change the formating of the text.
More text options are here: https://developer.gnome.org/pygtk/stable/pango-markup-language.html
It looks like it only works if you set text like this
--text='<span foreground="blue"> content </span>'
with '  '  not with " "
Code: [Select]
#! /bin/bash
#--------------------------------------------------------------------------------------------------------
# Name: Linux Lite Cleaner
# Description: A GUI tool to easily clean your Linux Lite system.
# Authors: Misko_2083, Jerry Bezencon
# Date: September 9th, 2014
# Website: https://www.linuxliteos.com
#--------------------------------------------------------------------------------------------------------
ic="/usr/share/icons/zenity-llcc.png"

selection=$(zenity --window-icon="$ic" --list --checklist --width=890 --height=400 --column="Select" --column="Name" --column="Category" --column="Status" \
 --column="Description" --text='Select the task you wish to perform, then click the Clean button. Sort Categories by clicking on the column.\n\nThere are 3 levels of Status:\n <span foreground="green">Safe</span>-Safe to perform, no harm can be done.\n<span foreground="#ec691d">Caution</span> - Proceed with caution, read the warning on the proceeding step.\n<b>Title</b> - Text go here.\n\nYou can select multiple tasks to perform.' --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" \
TRUE "Clean package cache" "Packages" "Safe" "Clean downloaded .deb files from your apt cache" \
TRUE "Autoremove packages" "Packages" "Safe" "Remove packages automatically installed for programs and that are no longer present" \
TRUE "Clear thumbnail cache" "Images" "Safe" "Delete thumbnail files created when viewing images" \
FALSE "Empty all Trash Bins" "Home" "Safe" "Empty the Trash Bins for all users" \
FALSE "Remove old kernels" "System" "Caution" "Remove kernels you no longer wish to boot from" )

# Exec scripts

echo $selection | grep "Clean package cache" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/aptgetclean 2>/dev/null
fi

echo $selection | grep "Autoremove packages" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/autoremovepkg 2>/dev/null
fi

echo $selection | grep "Clear thumbnail cache" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/thumbnails 2>/dev/null
fi

echo $selection | grep "Empty all Trash Bins" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/emptytrash 2>/dev/null
fi

echo $selection | grep "Remove old kernels" > /dev/null
if [ $? = 0 ];then
/usr/scripts/clean/remkernels 2>/dev/null
fi
More suggestions...
flash cookies
rm -rf $HOME/.macromedia/Flash_Player/#SharedObjects/*
rm -rf $HOME/.macromedia/Flash_Player/macromedia.com/support/flashplayer/sys/*
flash cache
rm -rf $HOME/.adobe/Flash_Player/AssetCache/*
firefox cache
rm -rf $HOME/.cache/mozilla/firefox/*.default/cache*/entries/*
firefox thumbnails
rm -rf $HOME/.cache/mozilla/firefox/*.default/thumbnails/*
firefox cookies
rm -f $HOME/.mozilla/firefox/*.default/cookies.sqlite
firefox Autocomplete history
rm -f $HOME/.mozilla/firefox/*.default/formhistory.sqlite
firefox passwords
rm -f $HOME/.mozilla/firefox/*.default/signons.sqlite
firefox site preferences
rm -f $HOME/.mozilla/firefox/*.default/content-prefs.sqlite
firefox DOM storage
rm -f $HOME.mozilla/firefox/*.default/webappsstore.sqlite
firefox session restore
rm -f $HOME/.mozilla/firefox/*.default/sessionstore.js
rm -f $HOME/.mozilla/firefox/*.default/sessionstore.bak
firefox URL history, bookmarks, downloads
rm -f $HOME/.mozilla/firefox/*.default/places.sqlite
Last Edit: September 05, 2014, 06:22:25 PM by misko_2083
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #12 on: September 05, 2014, 06:21:06 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 6120
    Posts
  • Country: nz
  • Reputation: 548
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 3.8 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 960
Nice misko, we can certainly use that, keep at it. Awesome stuff :)
Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

Learn to use your emotions to think, not think with your emotions.



 

Re: Lite Cleaner - Suggestions welcomed
« Reply #13 on: September 06, 2014, 07:17:29 PM »
 

Alex

  • Forum Regular
  • ***
  • 143
    Posts
  • Reputation: 9
  • Linux Lite Member
This maybe a stupid question, but I was just wondering if it is at all possible, to help brand new users like me, to have a drop down on right click on any program/app and have an UnInstall choice which will 'take-out' the whole program and its dependencies.

:)
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #14 on: September 07, 2014, 07:12:19 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 6120
    Posts
  • Country: nz
  • Reputation: 548
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 3.8 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 960
Have started on some of the scripts. Here's what the apt cache cleaner looks like, printing the directory size.



Source here: https://github.com/linuxlite/litecleaner
Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

Learn to use your emotions to think, not think with your emotions.



 


Tags:
 


Linux Lite 4.0 Final has been released. See the Release Announcements Section.