Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
added support for ubuntu 17.10
Browse files Browse the repository at this point in the history
  • Loading branch information
gaining committed Nov 1, 2017
1 parent ed8f09a commit f36924b
Show file tree
Hide file tree
Showing 11 changed files with 1,698 additions and 47 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# If you wish to contribute:
Please check the issues list, there are some things to work on. If I like you work, I'll gladly merge them into my project. If I don't like it, don't take it personal, it just means that we have different views on the topic and I'd prefer to go my way.

# When creating pull/merge requests
I'd prefer there to be a message to go with your commit as a comment preferably with some sort of intro detailing what your pull request is about in a courteous manner with good etiquette. If you're being rude, I'll just close it on the spot.

# Would like to contribute but don't know where to start?
Check the code and read it. I have written it so that it is easy for anyone to understand what goes on under the hood. Although there aren't many comments, the function names should give you the hint of what their jobs are. See the flow of my work and if you think your contribution is within my flow, don't hesitate to contact me and talk to me about it. I'm working on a different project, resetter-cli that runs terminally and is due to be released sometime this early November, it is built with python3 ncurses. I'm sure there will be many ways one could help once the initial alpha version is released.
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# Resetter v1.1.1-stable
# Resetter v1.1.2-stable
![alt tag](https://github.com/gaining/Resetter/blob/master/Resetter/resetter-screenshot.png)

It is an application built with python and pyqt that will help to reset an Ubuntu, Linux-Mint, and some other distros to stock, without having to manually re-install by using a live usb/cd/dvd image. For the list of supported distros, please see the *Officially supported distros* section.

# How to install
Download the deb file found [here](https://github.com/gaining/Resetter/releases/tag/v1.1.1-stable) then on the terminal, run the following commands:
Download the deb files found [here](https://github.com/gaining/Resetter/releases/latest) then on the terminal, run the following commands:

1. `sudo apt install gdebi`
2. `sudo gdebi resetter_1.1.1-stable_all.deb`
It is easier to install any deb files with gdebi, especially on elementary os with no graphical way of installing a deb file.
On the terminal, run `sudo apt install gdebi`.
- Linux deepin isn't based on Ubuntu but on Debian so some modules are not available in their repos by default.
**For Debian and Linux Deepin Users**
Before installing Resetter, fetch the add-apt-key package using
`wget -c http://mirrors.kernel.org/ubuntu/pool/universe/a/add-apt-key/add-apt-key_1.0-0.5_all.deb`
and install it with
`sudo gdebi add-apt-key_1.0-0.5_all.deb`
2. `sudo gdebi add-apt-key_1.0-0.5_all.deb`
3. `sudo gdebi resetter_1.1.2-stable_all.deb`

# How does it work?
- Typical case of auto apps reset <br/>
Expand All @@ -25,16 +18,16 @@ reset = (Installed programs list - non-default programs) + MPIAs <br/>
There are other reset features, see features list.

# Status
- version 1.1.2 adds support for Ubuntu 17.10. I'm not sure if it's because ubuntu 17.10 is filled with bugs or it's a "Feature" by design but many QT apps that worked on earlier version were broken in this release.
- The software is stable. Feedback will be greatly appreciated.
- Current version is 1.1.1-stable has some huge improvements and is more intelligent overall.
- Future Project: Resetter-cli, a version of resetter that runs terminally.
- Working Project: Resetter-cli, a version of resetter that runs terminally due to be released this early November.
- Please check the [changelog](https://github.com/gaining/Resetter/blob/master/changelog) for more details.

# To Do
- Official video tutorial on YouTube
- Debian Jessie support
- Debian Jessie, Sketh support
- Make Resetter multilingual. (Will need help of volunteer translators)
- Make an app-image as there are many reasons why Resetter needs to be portable.
- Make an app-image or flatpack as there are many reasons why Resetter needs to be portable.

# Bug reports
- If you find a bug or problem please create an issue on github.
Expand Down
4 changes: 2 additions & 2 deletions Resetter/control/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: resetter
Version: 1.1.1-stable
Installed-Size: 1388
Version: 1.1.2-stable
Installed-Size: 1420
Maintainer: gaining <gaining7@outlook.com>
Section: python
Homepage: https://github.com/gaining/resetter
Expand Down
10 changes: 6 additions & 4 deletions Resetter/control/md5sums
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
0c10d88cb2fdbe080a4d363b75bba7d7 usr/share/doc/resetter/changelog.gz
5cfc8c1fe2e4b885126e7374074b9a23 usr/share/doc/resetter/changelog.gz
ff8b2c5b3b785bdccba43c0d5c4d7ad4 usr/share/doc/resetter/copyright
343ad895e19fc427e6838d58c0929e49 usr/share/applications/Resetter.desktop
2d4e80f6eff50c865f45d5f0fa9a73fd usr/share/icons/hicolor/48x48/apps/resetter.png
2d4e80f6eff50c865f45d5f0fa9a73fd usr/share/icons/hicolor/48x48/actions/resetter.png
3ae12c8bfbe97b9d23a1ebbc5d25aa85 usr/share/polkit-1/actions/org.freedesktop.pkexec.resetter.policy
1c10d1af87689b242e07da65d715cfdf usr/bin/resetter
5e2a9549687bef9c7df6611831823e37 usr/bin/resetter
b4965813b973b7965f92a3ac8ad44954 usr/lib/resetter/Resetter.py
309fe700f0a266e8b0d7819133bda3fd usr/lib/resetter/InstallMissingDialog.py
c123316b8baff2e0f94c59850db392af usr/lib/resetter/EasyRepo.py
af74f0fada73e8f76808d693e41eb2ce usr/lib/resetter/AptProgress.py
90e7adb81cecea907b9bb43ed397b6c3 usr/lib/resetter/EasyInstall.py
74745ad1f2abc29f37e482e5dab8a0f1 usr/lib/resetter/LicenceDialog.py
6e499250e0f068ee393414e088992aa7 usr/lib/resetter/SetEnvironment.py
80a16ae313ba83aa361caedd7bf62896 usr/lib/resetter/SetEnvironment.py
c63abd6b7e36cb91da1ed2d8178f106c usr/lib/resetter/PackageView.py
8c26408d8124bd5df1171816272e8879 usr/lib/resetter/AboutPage.py
25b964a5c4287cac660f7c962ee0f177 usr/lib/resetter/AboutPage.py
aeddcec6822875c5b10a8941cd8c2a9e usr/lib/resetter/Singleton.py
f52bc82b8b00a8093079494716780498 usr/lib/resetter/CustomApplyDialog.py
727f7601b544022e8efc6a4749f4bc87 usr/lib/resetter/ApplyDialog.py
b3bd08bcc6a55e593c2d7ef6964f63ab usr/lib/resetter/Sources.py
5a8eff781c49e97f733303a8c984b92f usr/lib/resetter/Account.py
bfbb4e48360e8d332826e716ddb3b374 usr/lib/resetter/CustomReset.py
fe78570a148ea7935b85d74432761601 usr/lib/resetter/data/userlists/ubuntu-17.10-default-userlist
408b5fc1b309d6a25121688278990419 usr/lib/resetter/data/userlists/ubuntu-14.04-default-userlist
6771c68692f0fdeb1531fdfa1757913c usr/lib/resetter/data/userlists/mint-17.3-default-userlist
e44dcded2dd72d48113d5f98df922c70 usr/lib/resetter/data/userlists/ubuntu-16.10-default-userlist
Expand All @@ -38,6 +39,7 @@ b32137d2a839c07c089bb8882736a084 usr/lib/resetter/data/manifests/mint-18-cinnam
0044572eb3a412c906b5c82f744d5101 usr/lib/resetter/data/manifests/ubuntu-14.04-unity.manifest
d7bc1afe32841aed1ebbc23f10fec7be usr/lib/resetter/data/manifests/mint-18.1-cinnamon.manifest
e13f3e27dfd5284501a08c9549786b1c usr/lib/resetter/data/manifests/ubuntu-17.04-unity.manifest
4587fa22cdac9fb515578895d32f4a5f usr/lib/resetter/data/manifests/ubuntu-17.10.manifest
a9c13fa149c6aeb8358d458af980fb91 usr/lib/resetter/data/manifests/ubuntu-16.04-unity.manifest
e632d4ce15b7c91ee652439135d0619f usr/lib/resetter/data/manifests/mint-18.2-cinnamon.manifest
1d95dc9211e91e5c6ba0e78b5f6ebef9 usr/lib/resetter/data/manifests/eos-0.4.1.manifest
Expand Down
8 changes: 3 additions & 5 deletions Resetter/usr/bin/resetter
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash
LANG=en_US.UTF-8
xhost +si:localuser:root > /dev/null
export QT_X11_NO_MITSHM=1
python /usr/lib/resetter/Resetter.py

if [[ $EUID -ne 0 ]]; then
pkexec /usr/lib/resetter/Resetter.py
else
/usr/lib/resetter/Resetter.py
fi


2 changes: 1 addition & 1 deletion Resetter/usr/lib/resetter/AboutPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, parent=None):
desc_text = "Built With PyQt\n\n " \
"This is a great utility software that will help you reset your linux installation its stock state" \
"among other things."
self.version = '1.1.1'
self.version = '1.1.2'
version_text = "Version: {}-stable".format(self.version)
donate_text = 'If you liked my project, please ' \
'<a href="https://github.com/gaining/Resetter/blob/master/DONATE.md">Donate </a>'
Expand Down
33 changes: 17 additions & 16 deletions Resetter/usr/lib/resetter/CustomReset.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def __init__(self, parent=None):
try:
pkg = self.cache[line.strip()]
text = pkg.versions[0].description
item = QtGui.QStandardItem(line.strip())
item.setCheckable(True)
item.setCheckState(QtCore.Qt.Unchecked)
self.model.appendRow(item)
item.row()
item.setToolTip((textwrap.fill(text, 70)))
self.item = QtGui.QStandardItem(line.strip())
self.item.setCheckable(True)
self.item.setCheckState(QtCore.Qt.Unchecked)
self.model.appendRow(self.item)
self.item.row()
self.item.setToolTip((textwrap.fill(text, 70)))
except KeyError:
continue
self.uninstall_view.setModel(self.model)
Expand Down Expand Up @@ -217,12 +217,12 @@ def __init__(self, parent=None):
try:
pkg = self.cache[line.strip()]
text = (pkg.versions[0].description)
item = QtGui.QStandardItem(line)
item.setCheckable(True)
item.setCheckState(QtCore.Qt.Unchecked)
self.model.appendRow(item)
item.row()
item.setToolTip((textwrap.fill(text, 70)))
self.item = QtGui.QStandardItem(line.strip())
self.item.setCheckable(True)
self.item.setCheckState(QtCore.Qt.Unchecked)
self.model.appendRow(self.item)
self.item.row()
self.item.setToolTip((textwrap.fill(text, 70)))
except KeyError:
continue
self.uninstall_view.setModel(self.model)
Expand Down Expand Up @@ -324,10 +324,11 @@ def configureTable(self, table):
for column in range(3):
for row in range(table.rowCount()):
if column % 3:
item = QtGui.QTableWidgetItem(column)
item.setFlags(QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled)
item.setCheckState(QtCore.Qt.Unchecked)
table.setItem(row, column, item)
self.item = QtGui.QTableWidgetItem(column)
self.item.setFlags(QtCore.Qt.ItemIsUserCheckable |
QtCore.Qt.ItemIsEnabled)
self.item.setCheckState(QtCore.Qt.Unchecked)
table.setItem(row, column, self.item)

def setChoice(self, item):
if item.checkState() == QtCore.Qt.Checked:
Expand Down
13 changes: 9 additions & 4 deletions Resetter/usr/lib/resetter/SetEnvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self):
self.directory = '.resetter/data'
self.os_info = lsb_release.get_lsb_information()
self.euid = os.geteuid()
os.environ['QT_X11_NO_MITSHM'] = "1"
self.error_msg = QtGui.QMessageBox()
self.error_msg.setIcon(QtGui.QMessageBox.Critical)
self.error_msg.setWindowTitle("Error")
Expand Down Expand Up @@ -59,7 +60,7 @@ def detectRoot(self): # root detection function
if self.euid != 0:
print "Need to be root to run this program"
self.error_msg.setText("You need to be root to run this program")
self.error_msg.setDetailedText("You won't be able to run this program unless you're root")
self.error_msg.setDetailedText("You won't be able to run this program unless you're root, try running 'sudo resetter' from the terminal")
self.error_msg.exec_()
exit(1)

Expand Down Expand Up @@ -93,7 +94,7 @@ def copy(self, source, destination):

def detectOS(self):
compat_os = (['LinuxMint', 'Ubuntu', 'elementary', 'Deepin'])
compat_releases = (['17.3', '17.04', '18.1', '18', '14.04','16.04',
compat_releases = (['17.3', '17.04', '18.1', '18', '14.04','16.04', '17.10',
'16.10', '0.4', '15.4', '15.4.1', '18.2','0.4.1'])
if self.os_info['ID'] in compat_os and self.os_info['RELEASE'] in compat_releases:
if self.os_info['ID'] == 'LinuxMint':
Expand Down Expand Up @@ -121,7 +122,6 @@ def detectOS(self):
userlist = 'userlists/mint-18.2-default-userlist'
return manifest, userlist, windowTitle


elif self.os_info['ID'] == 'Ubuntu':
if self.os_info['RELEASE'] == '14.04':
windowTitle = self.os_info['ID'] + " Resetter"
Expand All @@ -146,6 +146,11 @@ def detectOS(self):
manifest = 'manifests/ubuntu-17.04-unity.manifest'
userlist = 'userlists/ubuntu-17.04-default-userlist'
return manifest, userlist, windowTitle
elif self.os_info['RELEASE'] == '17.10':
windowTitle = self.os_info['ID'] + " Resetter"
manifest = 'manifests/ubuntu-17.10.manifest'
userlist = 'userlists/ubuntu-17.10-default-userlist'
return manifest, userlist, windowTitle

elif self.os_info['ID'] == 'elementary':
if self.os_info['RELEASE'] == '0.4':
Expand Down Expand Up @@ -211,4 +216,4 @@ def filesExist(self, manifest, userlist):
self.error_msg.setText(
"userlist could not be found, features requiring this file will not work.")
self.error_msg.setDetailedText("This is not a big issue")
self.error_msg.exec_()
self.error_msg.exec_()
Loading

0 comments on commit f36924b

Please sign in to comment.