You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Lite Tweaks - Suggestions welcomed

Author (Read 146023 times)

0 Members and 3 Guests are viewing this topic.

Re: Lite Cleaner - Suggestions welcomed
« Reply #26 on: September 15, 2014, 12:26:24 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
It's not working well when you have multiple users.
When I start it from terminal:
Code: [Select]
du: cannot read directory ‘/home/misko2/.thumbnails/’: Permission deniedThat's because it will try to display cache size from all the users:
Code: [Select]
THUMBCACHESIZE=$(du -sh /home/*/.thumbnails/ | awk '{print $1}')
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #25 on: September 15, 2014, 11:21:53 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • 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: 5.x
Lite Cleaner is now available for download:

Code: [Select]
sudo apt-get update && sudo apt-get install lite-cleaner
Current version: litecleaner_1.0-0030

Installs to: Menu, System, Lite Cleaner or you can run lite-cleaner from the command line.

Once the kernel portion is perfected we will include that is a future for release but for now, there should be enough tools there to clean some peoples systems significantly. A HUGE thank you to those who contributed code and ideas, this couldn't be possible without your input, so I thank you all, and so do the people who use our software :)



« Last Edit: September 15, 2014, 11:56:49 AM by Valtam »
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #24 on: September 10, 2014, 05:52:53 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)
No,when Quit is clicked it will open a message. It should just quit.

Argh O.K... Understould, "Quit" is just not quitting O.K
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 #23 on: September 10, 2014, 05:43:21 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
No,when Quit is clicked it will open a message. It should just quit.
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #22 on: September 10, 2014, 04:58:56 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)

The only thing I can't fix is that message when I click on Quit: 'Nothing was selected.'.
I guess I can always change the message to 'Nothing was selected or you pressed Quit.' :)

If I understand this scenario, which may not be the case...?
It when there is nothing showing to select?
So how about
"No Old Kernels Available To Remove"
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 #21 on: September 10, 2014, 04:05:45 PM »
 

rijnsma

  • Forum Regular
  • ***
  • 212
    Posts
  • Reputation: 16
  • Never give up..
    • 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.

:)
Is it still around... ??? Good program and together with other tools great in cleaning the Windows 'register'. Lot of work, but it cán pay off...
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #20 on: September 09, 2014, 04:21:28 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • 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: 5.x
Absolutely fantastic :)

Sent from my GT-N7000 using Tapatalk

 

Re: Lite Cleaner - Suggestions welcomed
« Reply #19 on: September 08, 2014, 11:14: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
OK so I made a lot of changes.
First the script checks if there are any old kernels/headers...
If there are no old kernels it will just display a message.
This version will purge any output it gets from $checklist.
If no item was selected it will display a message 'Nothing was selected.'.
Cancel button in the progress bar is hidden.
The only thing I can't fix is that message when I click on Quit: 'Nothing was selected.'.
I guess I can always change the message to 'Nothing was selected or you pressed Quit.' :)
Code: [Select]
#! /bin/bash

ic="/usr/share/icons/zenity-llcc.png"

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)

# check if there are old kernels
echo "$OLDKERNELS" | grep linux*
if [  $? = 1 ]; then
zenity --error \
--title="Error" --text="No old Kernels found."
exit 0
fi

# sed command adds all FALSE entries in the column 'Select'
# separator sets the separator in the output of the checklist, could be a new line \n or anything else
selection=$(echo "$OLDKERNELS" | sed -e 's/^/FALSE\n/' | zenity --window-icon="$ic" --list --checklist --separator=" " --width=890 --height=400   --column='Select' --column='Kernel' \
--text=' ' --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" )

#check if any item was selected
echo "$selection" | grep linux*
if [ $? = 1 ]; then
zenity --error \
--title="Error" --text="Nothing was selected."
exit 0
fi

zenity --question --title="Question"  --text="Do you want to proceed?"
 if [ "$?" -eq "0" ]; then
gksudo -g --message 'To run this cleaner your password is required. Enter your password, or press Cancel.' "sudo apt-get purge -y $selection" | zenity --progress --title='removing kernel/header'  --text='Uninstalling...' --no-cancel --pulsate --width=400 --auto-close --auto-kill

    if [ "${PIPESTATUS[0]}" -ne "0" ]; then
    zenity --error \
--title="Error" --text="Uninstall has failed."
exit 0
    fi
else
exit 0
fi
   PROCEED=$(zenity --info --title="Cleaner" --text="The cleaner has finished."; echo $?)
   if [ ${PROCEED} -eq 1 ]; then
   zenity --info --title='Cleaner' --text='Clean Complete.'
exit 0
   fi
exit 0
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #18 on: September 08, 2014, 08:44:59 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
So far it's working with an old  3.15.0 kernel.

So I've used this to uninstall it.
Code: [Select]
#! /bin/bash
#--------------------------------------------------------------------------------------------------------
# Name: Old Kernel Remover GUI
# Description: Prints out old kernels and removes them.
# Authors: Misko_2083, Jerry Bezencon
# Date: September 9th, 2014
# Website: https://www.linuxliteos.com
#--------------------------------------------------------------------------------------------------------
ic="/usr/share/icons/zenity-llcc.png"

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)

# sed command adds all FALSE entries in the column 'Select'
# separator sets the separator in the output of the checklist, could be a new line \n or anything else
selection=$(echo "$OLDKERNELS" | sed -e 's/^/FALSE\n/' | zenity --window-icon="$ic" --list --checklist --separator="" --width=890 --height=400   --column='Select' --column='Kernel' \
--text=' ' --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" )


echo $selection | grep linux-headers-linuxlite-3.15.0
if [ $? = 0 ];then
gksudo -g --message '.' "sudo apt-get purge linux-headers-linuxlite-3.15.0 --force-yes -y" | zenity --progress --title="removing kernel"  --text="Uninstalling headers 3.15.0..." --pulsate --width=400 --auto-close --auto-kill
fi

echo $selection | grep linux-image-linuxlite-3.15.0
if [ $? = 0 ];then
gksudo -g --message '.' "sudo apt-get purge linux-image-linuxlite-3.15.0 --force-yes -y" | zenity --progress --title="removing kernel"  --text="Uninstalling image 3.15.0..." --pulsate --width=400 --auto-close --auto-kill
fi
And it worked. When I start the script again I get this:
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #17 on: September 08, 2014, 02:26:10 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • 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: 5.x
Awesome stuff misko, I really like that and can't wait to test. What sort of results have you had so far?
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #16 on: September 07, 2014, 03:13:08 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
Have started on some of the scripts. Here's what the apt cache cleaner looks like, printing the directory size.
Nice.
I've had some experiments on removing individual old kernels instead of all old kernels.
Code: [Select]
#! /bin/bash

ic="/usr/share/icons/zenity-llcc.png"

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)

# sed command adds all FALSE entries in the column 'Select'
# separator sets the output of the checklist, "\n" can also be used
selection=$(echo "$OLDKERNELS" | sed -e 's/^/FALSE\n/' | zenity --window-icon="$ic" --list --checklist --separator=" " --width=890 --height=400   --column='Select' --column='Kernel' \
--text=' ' --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" )

# Next line just tests the output of a checklist
echo "$selection"
# Next line deletes all of the selected kernels
# gksudo "$(echo "$selection" | sed -e 's/^/sudo apt-get purge -y /')"
 

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

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • 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: 5.x
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
 

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

Alex

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

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • 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: 5.x
Nice misko, we can certainly use that, keep at it. Awesome stuff :)
 

Re: Lite Cleaner - Suggestions welcomed
« Reply #12 on: September 05, 2014, 06:17:43 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
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 »
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section