You are Here:
Linux Lite 7.0 Final Released - See Release Announcement Section



Lite Tweaks - Suggestions welcomed

Author (Read 159540 times)

0 Members and 3 Guests are viewing this topic.

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

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8833
    Posts
  • Reputation: 806
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 6.x
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 »
 

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

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Reputation: 405
  • Linux Lite "Advocate"
    • View Profile

  • 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 #9 on: September 05, 2014, 02:19:53 PM »
 

Coastie

  • PayPal Supporter
  • Gold Level Poster
  • *****
  • 656
    Posts
  • Reputation: 53
  • Linux Lite User
    • View Profile

  • 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 #8 on: September 05, 2014, 10:03:56 AM »
 

anon222

  • Muted
  • Gold Level Poster
  • *
  • 688
    Posts
  • Reputation: 192
  • Linux Lite Member
    • View Profile

  • 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 #7 on: September 05, 2014, 06:16:17 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8833
    Posts
  • Reputation: 806
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 6.x
So far ...

« Last Edit: September 05, 2014, 06:42:16 AM by Valtam »
 

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

anon222

  • Muted
  • Gold Level Poster
  • *
  • 688
    Posts
  • Reputation: 192
  • Linux Lite Member
    • View Profile

  • 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 #5 on: September 04, 2014, 06:34:26 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8833
    Posts
  • Reputation: 806
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 6.x
Thanks folks, keep'm coming, some good ones there already :)
 

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

anon222

  • Muted
  • Gold Level Poster
  • *
  • 688
    Posts
  • Reputation: 192
  • Linux Lite Member
    • View Profile

  • 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 #3 on: September 04, 2014, 06:17:50 PM »
 

Alex

  • Forum Regular
  • ***
  • 143
    Posts
  • Reputation: 9
  • Linux Lite Member
    • View Profile
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 #2 on: September 04, 2014, 05:53:47 PM »
 

rokytnji

  • Friganeer
  • Platinum Level Poster
  • **********
  • 1255
    Posts
  • Reputation: 139
    • View Profile

  • 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.
 

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

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8833
    Posts
  • Reputation: 806
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 6.x
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 »
 

 

-->
X Close Ad

Linux Lite 7.0 Final Released - See Release Announcement Section