What is Shule?

Shule is a text editor (for plain text), an email client (for sending only) and a general work station. It has a lot of features.

How to install:

If you have Xubuntu 18.04 64-bit installed, from the command-line just run the INSTALL file (either the one in this directory or the other INSTALL file one directory up) to set stuff up: e.g. ./INSTALL. Other distributions and other Xubuntu versions may require a different process. Currently, it must be installed in a set location. Local installation and the ability to choose where to install it are planned (but not implemented).

How to uninstall:

Just run UNINSTALL (from the command-line): e.g. ./UNINSTALL

How to update:

If you wish to update the program, run UPDATE. If you just want to install current dependencies, run DEPEND. However, it should be noted that some additional care may need to be taken in order to update any user settings that were broken by the update (only if new persistent settings have been created, though); to make those settings available, do one of the following:

• If Shule runs, if anything, you probably just need to open it, go to Tools->System->Reset Other (not the above); this will allow any new other additional saved settings that I’ve created to appear and be used (unless they relate to things not covered by Reset Other, which they probably won’t).
• To delete the local user settings, delete the following folder: /home/yourUserName/.local/share/Shule/
• To delete the global user settings, delete the following folder: /opt/share/shule
• Add a file with the name of the setting (which is able to be unpickled), ending with the extension .pkl. Add this file to the parts folder in your settings. The value of the pickled file should be something like None, {}, [], or 0—it really depends on what it is (check the source code of shule.py in the restock_other method to know for sure what it should be; look for d["name_of_my_setting"]=thisIsWhatYouWant).
• To delete the portable settings, delete the contents of (not the folder itself) the following folder: shule/portable_settings

Or you can just uninstall and reinstall the program; i.e.

./UNINSTALL #This will delete the files created by installing (including user settings for all users; it will not delete portable settings. It doesn’t undo the mime-type changes, yet.)
./INSTALL


--------------------------------------
If you want to install Shule manualy, see the following (and run the other commands in the INSTALL file, modified where needed—such as the apt-get installation command).

https://unix.stackexchange.com/questions/203136/how-do-i-run-gui-applications-as-root-by-using-pkexec

The above link tells you about how to make a program so that you can use pkexec with a specific GUI application. For our program, we need to do that with shule and with python3. In an official release. I have included in this directory two files. After you copy them, their paths should be as follows:
• /usr/share/polkit-1/actions/org.freedesktop.policykit.shule.policy
• /usr/share/polkit-1/actions/org.freedesktop.python3.policy


Setting mime types:

To make Shule the default for plain text files for all users, find the following file:
/usr/share/applications/defaults.list

Then replace all the instances of gedit (or whatever text editor is the default) with shule (and uninstall mousepad, since it remains the default anyway if you don't; maybe reinstalling it might not cause that to re-happen):
application/x-perl=Shule.desktop
text/plain=Shule.desktop
text/x-chdr=Shule.desktop
text/x-csrc=Shule.desktop
text/x-dtd=Shule.desktop
text/x-java=Shule.desktop
text/mathml=Shule.desktop
text/x-python=Shule.desktop
text/x-sql=Shule.desktop
text/xml=Shule.desktop


Setting menu shortcuts for all users:

https://askubuntu.com/questions/28583/how-do-i-add-a-system-wide-menu-item-to-the-applications-menu

Copy the shortcut so its destination filepath is as follows:
/usr/share/applications/Shule.desktop