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

Local & Version Specific Not Fixed #149

Open
vs0uz4 opened this issue Aug 17, 2015 · 37 comments · Fixed by #162
Open

Local & Version Specific Not Fixed #149

vs0uz4 opened this issue Aug 17, 2015 · 37 comments · Fixed by #162
Labels

Comments

@vs0uz4
Copy link

vs0uz4 commented Aug 17, 2015

after running sudo command ./fix.sh the same fixed several icons, with the exception of PhpStorm icon.

vs0uz4@vs0uz4-NTB:~/Code/hardcode-fixer$ sudo ./fix.sh
G: Fixing HP Printer...
G: Fixing Intel Graphics Installer...
G: Fixing Python (v2.7)...
G: Fixing Python (v3.4)...
G: Fixing Slingscold...
G: Fixing Valentina Studio...
G: Fixing YouTubeDL GUI...

result:
captura de tela de 2015-08-17 10 43 57

how to solve?

@Foggalong
Copy link
Owner

It's possible that we're missing your PHP storm. Can you find the launcher for PHP storm and give us:

  • the file name of the .desktop file
  • the icon line in the .desktop

@Foggalong Foggalong self-assigned this Aug 17, 2015
@Foggalong Foggalong removed their assignment Aug 17, 2015
@vs0uz4
Copy link
Author

vs0uz4 commented Aug 17, 2015

name and location of .desktop file
/usr/share/applications/jetbrains-phpstorm.desktop

jetbrains-phpstorm.desktop content
[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/home/vs0uz4/Downloads/PhpStorm/bin/webide.png
Exec="/home/vs0uz4/Downloads/PhpStorm/bin/phpstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm

@Foggalong
Copy link
Owner

This is now fixed in the latest commit thanks to @bil-elmoussaoui :D

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 24, 2015

thank you, I'll do a "git pull" now!

@bilelmoussaoui
Copy link
Contributor

@vs0uz4 already in the database ;)

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 24, 2015

not solved! I did git pull, and ran sudo ./fix.sh but PhpStorm icon continued in the same way!

@bilelmoussaoui
Copy link
Contributor

Can you share the desktop file content after using the script? :) also if it's possible to check the phpstorm line in the tofix.csv after starting the script please

@Foggalong Foggalong reopened this Aug 25, 2015
@fii34
Copy link

fii34 commented Aug 26, 2015

I certify that the hardcoded not working in PHP Storm

PHP Storm,jetbrains-phpstorm,hardcoded,phpstorm

this does not work

jetbrains-phpstorm.desktop

[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/home/qws/Загрузки/PhpStorm-141.2462/bin/webide.png
Exec="/home/qws/Загрузки/PhpStorm-141.2462/bin/phpstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm

PHPStorm,jetbrains-phpstorm,hardcoded,phpstorm

this does not work

but it works on the script https://github.com/leoheck/hardcode-fixer

PHPStorm,jetbrains-phpstorm,$HOME/Загрузки/PhpStorm-141.2462/bin/webide.png,webide

PHPStorm,jetbrains-phpstorm,/home/${SUDO_USER:-$USER}/Загрузки/PhpStorm-141.2462/bin/webide.png,webide

I even thought that it is possible to register the most frequently used folders:

PHPStorm,jetbrains-phpstorm,/home/${SUDO_USER:-$USER}/Downloads/PhpStorm-141.2462/bin/webide.png,webide

PHPStorm,jetbrains-phpstorm,/home/${SUDO_USER:-$USER}/Desktop/PhpStorm-141.2462/bin/webide.png,webide

PHPStorm,jetbrains-phpstorm,$HOME/PhpStorm-141.2462/bin/webide.png,webide

However, any change in the version PhpStorm-141.2462 make these rules useless.
And in addition to the English language in the world full of others. All the rules are do not prescribe

You can see why hardcoded does not work?


And one more bug. During normal start of your script (sudo fix.sh) in the terminal I see dozens of entries like this:

mkdir: can not create directory «/home/qws/.local/share/icons/hicolor/scalable/apps/»: No such file or directory
mkdir: can not create directory «/home/qws/.local/share/icons/hicolor/scalable/apps/»: No such file or directory
mkdir: can not create directory «/home/qws/.local/share/icons/hicolor/scalable/apps/»: No such file or directory
mkdir: can not create directory «/home/qws/.local/share/icons/hicolor/scalable/apps/»: No such file or directory
mkdir: can not create directory «/home/qws/.local/share/icons/hicolor/scalable/apps/»: No such file or directory
mkdir: can not create directory «/home/qws/.local/share/icons/hicolor/scalable/apps/»: No such file or directory
mkdir: can not create directory

there is /home/qws/.local/share/icons/hicolor/ not scalable/apps

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 26, 2015

My phpstorm desktop content:

[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/home/vs0uz4/Downloads/PhpStorm/bin/webide.png
Exec="/home/vs0uz4/Downloads/PhpStorm/bin/phpstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm

My tofix.csv in script folder
PHP Storm,phpstorm,hardcoded,phpstorm
PHP Storm,jetbrains-phpstorm,hardcoded,phpstorm

my tofix.csv in /tmp folder
PHP Storm,phpstorm,hardcoded,phpstorm
PHP Storm,jetbrains-phpstorm,hardcoded,phpstorm

When you run the script error is generated
mkdir: It is impossible to create the directory "/home/vs0uz4/.local/share/icons/hicolor/scalable/apps/": File or directory not found
mkdir: It is impossible to create the directory "/home/vs0uz4/.local/share/icons/hicolor/scalable/apps/": File or directory not found
mkdir: It is impossible to create the directory "/home/vs0uz4/.local/share/icons/hicolor/scalable/apps/": File or directory not found
mkdir: It is impossible to create the directory "/home/vs0uz4/.local/share/icons/hicolor/scalable/apps/": File or directory not found
mkdir: It is impossible to create the directory "/home/vs0uz4/.local/share/icons/hicolor/scalable/apps/": File or directory not found

@bilelmoussaoui
Copy link
Contributor

@Foggalong i think this is due to the force update of tofix.csv

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 26, 2015

I solved the error by adding the parameter "-p" to the mkdir command.

running the command:
mkdir -p /home/vs0uz4/.local/share/icons/hicolor/scalable/apps/

@bilelmoussaoui
Copy link
Contributor

Well that does not solve the problem is just hide the error message , do you have this folder now? /home/vs0uz4/.local/share/icons/hicolor/scalable/apps/

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 26, 2015

-p, --parents "does not generate error if it already exists, create directories for parents as they are needed"

By using this command, he created the folders and soon after ran the script again when the error did not appear anymore.

@bilelmoussaoui
Copy link
Contributor

I see, you can create a pull request to fix that ;)

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 26, 2015

pull request created!

@fii34
Copy link

fii34 commented Aug 27, 2015

scalable/apps/ work, but the message is received - Sessions still open, not unmounting

PhpStorm not work, hardcoded not work.

@bilelmoussaoui
Copy link
Contributor

I will check that this weekend

Le 27 août 2015 à 08:08, fii34 [email protected] a écrit :

scalable/apps/ work.
PhpStorm not work, hardcoded not work.


Reply to this email directly or view it on GitHub.

@fii34
Copy link

fii34 commented Aug 27, 2015

I understand hardcoded trying to write new rules csv?
If you still work, you may need to give new rights to record?
Or write at all in another file csv (like a log)?

@bilelmoussaoui
Copy link
Contributor

what i ve done is the easiest solution, i will try to understand whats not working ;)

Le 27 août 2015 à 10:16, fii34 [email protected] a écrit :

I understand hardcoded trying to write new rules csv?
If you still work, you may need to give new rights to record?
Or write at all in another file csv (like a log)?


Reply to this email directly or view it on GitHub.

@Foggalong
Copy link
Owner

I'm confused - is this issue now fixed? Is what @fii34 is talking about a new issue?

@bilelmoussaoui
Copy link
Contributor

Not yet, I think that the hardcoded does not change to the icon path in the csv file. I will fix that this weekend ;)

@Foggalong
Copy link
Owner

Thanks :D

@Foggalong
Copy link
Owner

@vs0uz4 use your current version of the script to revert any changes made and then redownload and try again. It might be fixed now :)

@Foggalong Foggalong added the bug label Aug 30, 2015
@vs0uz4
Copy link
Author

vs0uz4 commented Aug 30, 2015

I will test this now!

@vs0uz4
Copy link
Author

vs0uz4 commented Aug 30, 2015

did the reversal, the timing between the github repositories, updating my fork.
Once again I ran sudo ./fix.sh and nothing happened.

my /usr/share/applications/jetbrains-phpstorm.desktop file content

[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/home/vs0uz4/Downloads/PhpStorm/bin/webide.png
Exec="/home/vs0uz4/Downloads/PhpStorm/bin/phpstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm

my ./local/share/applications folder content
captura de tela de 2015-08-30 17 49 33

my ./local/share/icons/hicolor folder content
captura de tela de 2015-08-30 17 49 43

my ./local/share/icons/scalable/apps folder content
captura de tela de 2015-08-30 17 49 48

my desktop with phpstorm icon default
captura de tela de 2015-08-30 17 55 48

@Foggalong
Copy link
Owner

@bil-elmoussaoui ?

@bilelmoussaoui
Copy link
Contributor

@Foggalong Sorry i was a little bit busy those days. I will install Phpstorm and try to fix this right now

@bilelmoussaoui
Copy link
Contributor

The issue is easy to fix ;) it's in the line 155

new_current=$(grep -Gq "Icon=*$" "$app_location$launcher")

the value of new current is always empty string; it's due to the regex; @Foggalong do you have any better regex to use in this case? :)

@vs0uz4
Copy link
Author

vs0uz4 commented Sep 11, 2015

@Foggalong, @bil-elmoussaoui that way would not solve here?

*new_current = $ (grep -G "Icon = " "$ app_location $ launcher")

@vs0uz4
Copy link
Author

vs0uz4 commented Sep 11, 2015

After debugging here, he spent no longer return emptiness. But still does not solve the problem bo fix. Should have more somewhere else in trouble.

@bilelmoussaoui
Copy link
Contributor

Already fixed in my latest pull request

Le 11 sept. 2015 à 16:55, Vitor S Rodrigues [email protected] a écrit :

After debugging here, he spent no longer return emptiness. But still does not solve the problem bo fix. Should have more somewhere else in trouble.


Reply to this email directly or view it on GitHub.

@vs0uz4
Copy link
Author

vs0uz4 commented Sep 13, 2015

OK! @bil-elmoussaoui thank you.
waiting to be done "merge"

@bilelmoussaoui
Copy link
Contributor

@vs0uz4 can you check my latest pull request and test it in your case? i think everything will work fine after that! 💃

@toby-1-kenobi
Copy link

It's not working for RubyMine installed via Jetbrains Toolbox. Is this issue still not fixed?

My desktop entry has this line (even after running fix.sh):
Icon=/home/toby/.local/share/JetBrains/Toolbox/apps/RubyMine/ch-1/181.4203.562/.icon.svg

@super-cooper
Copy link

super-cooper commented Oct 16, 2019

Reopening this thread because it appears to still not be working for me on Debian. All jetbrains software icons have not been fixed.

@pauljsymonds
Copy link

I'm running Debian 10.3 , KDE Plasma and latest Toolbox and this issue still exists.

What is the best workaround?

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

Successfully merging a pull request may close this issue.

7 participants