Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script only works on Ubuntu #24

Open
K0K0SHA opened this issue Jul 7, 2023 · 0 comments
Open

install script only works on Ubuntu #24

K0K0SHA opened this issue Jul 7, 2023 · 0 comments

Comments

@K0K0SHA
Copy link

K0K0SHA commented Jul 7, 2023

The install.sh executable is the recommended installation method for this repo. The readme also doesn't provide any other information on what to do in case the install script doesn't work. Unfortunately, this script doesn't work on other distros that I've tested. Specifically, I run on Linux Mint Cinnamon. The install.sh script is a shell script, so it'll run on any distro, but it will only work specifically with Ubuntu Gnome. That's problematic. The reason for the problem is that the install.sh has a hardcoded location to transfer the themes to. This hardcoded location is as follows: $HOME/.gnome2/gedit/styles

The install script has 2 lines, but many problems. Poor coding practices, for one. The first line of the script is this: mkdir -p $HOME/.gnome2/gedit/styles which effectively creates the $HOME/.gnome2/gedit/styles if you don't have it already on your system. One annoying problem is that the -p option forces the creation of the parent directories, so even if you don't have $HOME/.gnome2/gedit/styles on your disk, you will now. This runs the risk of creating a directory that gedit doesn't reference, which clutters up your system and may confuse you later. Gedit has a certain folder for themes in its configuration. If you don't know what it is, you don't just hardcode the filepath and force-create it. A better idea would be to check if the filepath already exists, and exit out if it doesn't.

Here's how I fixed the issue. I knew that gedit looks for themes in a certain folder on your system. If you know that folder, you can just copy-paste the themes right into that folder. By default, ChatGPT says that folder is $HOME/.local/share/gedit/styles. Sadly this isn't an ideal solution. From the limited compatibility research I did online, I found that the themes folder of gedit differ between how gedit was installed, and thus by distro. You can use all sorts of utilities to install gedit, like apt-get, flatpak, or snap. The gedit configurations would differ depending on what tool you have installed. Gedit installed with apt might not have the same themes folder as Gedit installed with snap. If you don't know where gedit looks for the themes, you have several options. The configuration file for gedit will show the directory it uses for themes. Or you could try and just run the install.sh from my repo, which uses the gedit default themes directory: $HOME/.local/share/gedit/styles. An internet search might tell you where the themes directory is installed on your system. That's all for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant