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

Why system-wide fixing? #178

Open
ismaelgv opened this issue Sep 23, 2015 · 23 comments
Open

Why system-wide fixing? #178

ismaelgv opened this issue Sep 23, 2015 · 23 comments
Labels

Comments

@ismaelgv
Copy link
Contributor

ismaelgv commented Sep 23, 2015

Well, It's only a question that came to me analyzing this script. Why use system modification in '/usr/share/' and other system paths?

You can simply override system configuration writing .desktop files in '/home/$USER/.local/share/applications/'. This approach will avoid overwrites on fixed files by upgrading software in package managers. Additionally it offers better tracking of modified .desktop files.

This approach will let you include in Numix Icon theme auto-fixing at installation/upgrading time without messing with system files.

If you still want to fix whole system, you can still write in all users HOME local directory with root permissions or keep the current system.

Related to numixproject/numix-core#2546

@leoheck
Copy link
Contributor

leoheck commented Oct 1, 2015

Good question, I agree with you @ChuckDaniels87 and the undo process can simply remove the user defined launchers.

@palob
Copy link
Contributor

palob commented Oct 10, 2015

Sounds simpler than the current way indeed 👍

@Foggalong
Copy link
Owner

Does the system always use the local launcher over the global one? I was under the impression the preference was the other way around

@palob
Copy link
Contributor

palob commented Oct 10, 2015

Yes, according to this and my experience (I do this a lot) the local launchers override the global ones.

@bilelmoussaoui
Copy link
Contributor

What if the application has only a local desktop application ? We should only modify it?

@ismaelgv
Copy link
Contributor Author

You can do the same as package managers do: rename it as '.desktop.old' and create a new one.

@bilelmoussaoui
Copy link
Contributor

@Foggalong What do you think? Will take less time than #149

@Foggalong
Copy link
Owner

I was a bit skeptical at first, but I actually really like the idea. I'm just struggling to manage things at the moment. Just started at a new University and am simulatenously having to run Numix single handedly because everyone else is busy with other projects. A bit chaotic tbh, but I'll get around to it as soon as I can :)

@bilelmoussaoui
Copy link
Contributor

I'm bit busy too, second year is much harder than the first one! i will see what i can do whenever i have some free time! and good luck with your studies

@bilelmoussaoui
Copy link
Contributor

I will work on this as soon as #190 get merged; but just need a way to manage this :
If the desktop file already exists in $HOME/.local/share/applications/ we modifiy it , and if not we copy the desktop file and change the icon name?

@palob
Copy link
Contributor

palob commented Dec 19, 2015

You mean a backup file in order to make a rollback possible?

@bilelmoussaoui
Copy link
Contributor

Well, we don't really need to backup the file, as the we only change the icon name; and it's stored in the CSV file?

@palob
Copy link
Contributor

palob commented Dec 19, 2015

But in case there are multiple entries for one app you'd have to save which hardcoded path got fixed somewhere.

@bilelmoussaoui
Copy link
Contributor

A backup file will be an easy solution. Saving that in an other file + the file i used for hardcoded icons to fix #190 will make things complicated to debug later.. @Foggalong what do you think?

@bilelmoussaoui
Copy link
Contributor

@Foggalong Just in case you still want to do this, i think it's a bad idea. The way we fix icons right now is the right way. The default icons are copied to hicolor theme, this way we fix the icons for all the users which is better than just fixing them for only one user..

@palob
Copy link
Contributor

palob commented Nov 28, 2016

Currently though the fixing doesn't persist any app update + you need admin privileges (which not every user have access to).
Fiddling about in /usr/share/ "the realm of the package manager" how it's done with the hicolor theme is considered bad style by some.
Couldn't the script optionally copy the fixed launchers over to other users' $HOME directories?

@bilelmoussaoui
Copy link
Contributor

Alright! Will implement that if the user does not the script as root. And we mention that on the README

@ismaelgv
Copy link
Contributor Author

ismaelgv commented Nov 28, 2016

Does apps usually write .desktop files on /usr/local/share/applications?

/usr/local/share has precedence over /usr/share. Could it be possible to store global changes there?

@Foggalong
Copy link
Owner

Just as a heads up to all, I'm planning on doing a complete rewrite of the way this script works fairly soon. Gonna have a play around with different ways of saving changes locally and backing up files

@bilelmoussaoui
Copy link
Contributor

@Foggalong If you're up to rewrite the script, please give python a try! it will make the code less complicated..

@SmartFinn SmartFinn mentioned this issue Nov 13, 2017
7 tasks
@Foggalong
Copy link
Owner

@bilelmoussaoui To answer this nearly 2 years later, any rewrite I do of this script will likely stay in bash. It's not necessarily because I think it's the best tool for the job, but I already do a lot of coding in Python for work so it's nice to have something a bit different. This (in theory) keeps my bash skills sharp while also not being a ridiculous language to use for the task

@ismaelgv
Copy link
Contributor Author

ismaelgv commented Dec 6, 2021

@Foggalong is this issue still relevant or may I close it?

@Foggalong
Copy link
Owner

@ismaelgv Still relevant, it's one of the issues I hoped to tackle in the next version but haven't got around to finishing that off yet

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

No branches or pull requests

5 participants