Foggalong / hardcode-fixer

Fixes Hardcoded Icons
GNU General Public License v3.0
288 stars 49 forks source link

Do not run fix.sh #141

Closed fii34 closed 9 years ago

fii34 commented 9 years ago

The usual way fix.sh not start - command not found (root also) I was able to run fix.sh only after this command in Terminal:

bash fix.sh

and once given the right to read your name in the record /tmp/tofix.csv

Foggalong commented 9 years ago

I have no idea what you're saying sorry :( what language do you speak? try reporting in your native country and I'll see if I can work it out

fii34 commented 9 years ago

I do not know English. Translate google. See screenshot.

http://i.imgur.com/durVPqn.png

Foggalong commented 9 years ago

Are you using "zsh", " fish", or some other shell?

fii34 commented 9 years ago

Maybe... I'm not proffesional.

Foggalong commented 9 years ago

What distro do you use?

The launcher is probably just a case of you misspelling the name or mixing up the variables

fii34 commented 9 years ago

XFCE + Lubuntu + MATE (weak computer)

I installed all the programs through lubuntu-software-center It is about 2800 programs. This themes has almost all the icons:

https://yadi.sk/d/fw4aJ_f4gYiXp

I want to register in the rest of the script 320 icons. You have the ability to check the script for errors?

Icons easily search through mate-search-tool apps you need to specify the themes and insert the name of the icon (it is the last in the row for each csv).

To see the icon found it can simply drag and drop to the desktop of the mate-search-tool

It loads a script or not immediately visible in the open folder/ usr/share/applications

If you are interested, I can choose .desktop files do not appear new icons, compress them and put the link here.

The .desktop files have a full path to the icon and it is easy to write instructions for the csv.

Unfortunately, I can not understand why some rules are triggered, while others do not. Again, almost all icons in the themes is. It is necessary to properly prescribe them the way

translate google

fii34 commented 9 years ago

Question to the creator of the script, whether it can correct such .desktop?

BitTorrent Download Client,gnome-btdownload,download,bittorrent-download-client Gallery Uploader,gallery-uploader,gallery.svg,gallery Glurp,glurp,glurp.svg,glurp GNU Paint,gpaint,gpaint.svg,gpaint Composite,composite,composite32x32,composite Brp-pacu,brp-pacu,brp-pacu_32x32,brp-pacu Hexen 2,hexen2,hexen2.png,hexen2 Hexen 2,uhexen2-hexen2,hexen2.png,hexen2 Aliki (with ALSA support),aliki-alsa,aliki_32x32,aliki Aliki (with JACK support),aliki-jack,aliki_32x32,aliki SpringLobby,springlobby,springlobby.svg,springlobby Sweep,sweep,sweep.svg,sweep TalkSoup,TalkSoup,TalkSoup.tiff,TalkSoup WiFi Radar,wifi-radar,wifi-radar.svg,wifi-radar Zipper,Zipper,zipper.tiff,zipper SpringLobby,springlobby,springlobby.svg,springlobby Qemu Launcher,qemu-launcher,qemu-launcher.svg,qemu-launcher

All not work

However, I see that the script can not work with such .desktop files:

aghermann.desktop

[Desktop Entry] Type=Application Version=1.0 Name=Aghermann GenericName=Sleep research experiment manager Comment=Manage EEG recordings, view and score EDF files, and simulate Process S Icon=@PKGDATADIR@/aghermann.png TryExec=aghermann Exec=aghermann Terminal=false Categories=Education;Science;MedicalSoftware;GTK; Keywords=EEG,EDF,simulation

not directory @PKGDATADIR@

In fact, the icon can be found here /usr/share/aghermann/aghermann.png

not work

Aghermann,aghermann,@PKGDATADIR@/aghermann.png,aghermann

how to be?

Can a script to correct such .desktop?

[Desktop Entry] Version=1.0 Type=Application Name=pymissile GenericName=PyMissile Viewer Comment=Control Marks and Spencer USB Missile Launcher Terminal=true Exec=pymissile

Icon=pymissile

Categories=ConsoleOnly;Game;

not work

pymissile,pymissile,#Icon=pymissile,Icon=pymissile

not work

mx44,mx44,#Icon=/usr/share/icons/mx44.png,Icon=mx44 RFDump,rfdump,#Icon=/usr/share/pixmaps/rfdump.png,Icon=rfdump gsharp,gsharp,#Icon=gnome-terminal,gnome-terminal

not work

Tuxfootball,tuxfootball,# Icon=grisbi.png,grisbi - There is a gap between # and Icon!

not work

TimeMon.desktop

[Desktop Entry] Type=Application Version=0.94 Categories=System;Monitor; Name=TimeMon Icon=/usr/lib/GNUstep/Applications/TimeMon.app/Resources/icon.png Exec=TimeMon

not work

TimeMon,TimeMon,/usr/lib/GNUstep/Applications/TimeMon.app/Resources/icon.png,TimeMon

not /usr/lib/GNUstep/Applications/TimeMon.app/Resources/icon.png

icon here - /usr/lib/GNUstep/Applications/TimeMon.app/Resources/TimeMon.gorm/icon.png

Perhaps because of such errors the script does not work in the following cases:

GTimeLog Time Tracker,gtimelog,/usr/share/pyshared/gtimelog/gtimelog.png,gtimelog guiqwt-tests,guiqwt-tests,/usr/share/pyshared/guiqwt/images/guiqwt.png,guiqwt Hexter,hexter,/usr/share/pixmaps/hexter.xpm,hexter Twinkle,twinkle,/usr/share/twinkle/twinkle48.png,twinkle TimeMon,TimeMon,/usr/lib/GNUstep/Applications/TimeMon.app/Resources/icon.png,TimeMon Xabacus,xmabacus,/usr/share/pixmaps/xabacus.m.xpm,xabacus.m Yi (Emacs keymap),yi-emacs,/usr/share/yi-0.6.7.0/art/yi+lambda-fat-32.png,yi+lambda-fat Yi (Vim keymap),yi-vim,/usr/share/yi-0.6.7.0/art/yi+lambda-fat-32.png,yi+lambda-fat XRCed,xrced,/usr/share/pixmaps/xrced,xrced Shisen,Shisen,/usr/lib/GNUstep/Applications/Shisen.app/Resources/GShisen.tiff,gshisen PyCrust,pycrust,/usr/share/pixmaps/pycrust,pycrust NetEmul,netemul,/usr/share/netemul/pixmap/NetEmul.png,netemul Melange,cream-melange,/usr/share/cream/org.cream.Melange/data/melange.png,melange mialmpick Version 0.2.10,mia-lmpick,/usr/share/pixmaps/mialmpick/,mialmpick Maps,maps,/usr/share/maps/media/maps.svg,maps

CLAM Prototyper,Prototyper,/usr/share/pixmaps/clam-prototyper.xpm,clam-prototyper CLAM Network Editor,NetworkEditor,/usr/share/pixmaps/clam-networkeditor.xpm,clam-networkeditor MimeType,vnd.clam.network,/usr/share/networkeditor/NetworkEditor-icon.svg,NetworkEditor-icon CLAM Chordata,Chordata,/usr/share/pixmaps/clam-chordata.xpm,clam-chordata Battery Charge Graph,battery-stats,/usr/share/battery-graph/pixmaps/battery-stats.xpm,battery-stats

Battery Monitor (batmon),batmon,/usr/lib/GNUstep/Applications/batmon.app/Resources/Batmon_icon.tiff,batmon_icon

Katoob,katoob,katoob-icon.pmg,katoob-icon (pmg ! no png )

GWorkspace,GWorkspace,FileManager.tiff,FileManager TalkSoup,TalkSoup,TalkSoup.tiff,TalkSoup Zipper,Zipper,zipper.tiff,zipper

Aghermann,aghermann,@PKGDATADIR@/aghermann.png,aghermann Ubuntu UI Toolkit Gallery,ubuntu-ui-toolkit-gallery,Not important,ubuntu-ui-toolkit-gallery

?

I see that there are some stubborn .desktop in /usr/share/applications/kde4/ possible to add the folder of the court?

Locations

local_apps="/home/${SUDO_USER:-$USER}/.local/share/applications/" local_icon="/home/${SUDO_USER:-$USER}/.local/share/icons/hicolor/48x48/apps/" global_apps="/usr/share/applications/" global_icon="/usr/share/icons/hicolor/48x48/apps/" steam_icon="${global_icon}steam.png

fii34 commented 9 years ago

But there may be a conflict

/usr/share/applications

[Desktop Entry] Exec=mintwelcome Icon=mintInstall Terminal=false Type=Application Encoding=UTF-8 Categories=GNOME;GTK;Settings;DesktopSettings; NotShowIn=KDE; StartupNotify=false Name=Welcome Screen

Welcome Screen,mintWelcome,/usr/lib/linuxmint/mintWelcome/icons/logo.svg,mintInstall

/usr/share/applications/kde4

[Desktop Entry] Exec=mintwelcome Icon=/usr/lib/linuxmint/mintWelcome/icons/logo_kde.svg Terminal=false Type=Application Encoding=UTF-8 OnlyShowIn=KDE; Categories=System; StartupNotify=false Name=Welcome Screen

Welcome Screen,mintWelcome,/usr/lib/linuxmint/mintWelcome/icons/logo_kde.svg,kde

??

Foggalong commented 9 years ago

@fii34 What happens when you run echo $SHELL?

fii34 commented 9 years ago

/bin/bash

bilelmoussaoui commented 9 years ago

I can't confirm that :/ @fii34 are you using sudo ./fix.sh? using sudo fix.sh or sudo sh fix.sh won't work!

fii34 commented 9 years ago

I found the cause of the problem. This security setting. If - fix.sh click on the right mouse button - Properties - Rights - tick in point - allows the execution of the file as a program, it works!

In the terminal there are questions, etc.

If you run

sudo bash fix.sh

the script just works, without question, the selection and confirmation.

Foggalong commented 9 years ago

@fii34 Huh, so this is a permissions problem! I think the script is already marked as executable in the repo so I'm not sure why this is happening. How did you download the script?

fii34 commented 9 years ago

The latest version small bug. the script does not work in /usr/share/applications/data/ and /usr/share/applications/kde4/ I corrected this way:

global_apps=("/usr/share/applications/" "/usr/share/applications/data/" "/usr/share/applications/kde4/" "/usr/local/share/applications/" "/usr/local/share/applications/kde4/")

everything works fine.

you - "/usr/local/share/applications/kde4" !!! I have - "/usr/local/share/applications/kde4/"

Foggalong commented 9 years ago

@fii34 we'll fix that, but how about your permissions issue?

fii34 commented 9 years ago

Script is run normally.

fii34 commented 9 years ago

BIG bug:

Can not create regular file «/home/m/.local/share/icons/hicolor/scalable/apps/lingot-icon»: No such file or directory G: Fixing LinkChecker Commandline ... G: Fixing LinkChecker Gui ... L: Fixing Linphone ... L: Fixing MailNag ... cp: can not create regular file «/home/m/.local/share/icons/hicolor/scalable/apps/mailnag»: No such file or directory L: Fixing Mandelbulber ... G: Fixing Maps ... G: Fixing Melange ... G: Fixing mialmpick Version 0.2.10 ... L: Fixing Netbeans IDE ... G: Fixing NetEmul ... G: Fixing NmapSI4 - Full mode ... G: Fixing NmapSI4 - User mode ... L: Fixing OCRFeeder ... cp: can not create regular file «/home/m/.local/share/icons/hicolor/scalable/apps/ocrfeeder»: No such file or directory

I DO NOT HAVE scalable/apps/

I have only IT

/home/m/.local/share/icons/hicolor/16x16 /home/m/.local/share/icons/hicolor/32x32 /home/m/.local/share/icons/hicolor/48x48 /home/m/.local/share/icons/hicolor/128x128

problem ?

local_scalable_icon="/home/${SUDO_USER:-$USER}/.local/share/icons/hicolor/scalable/apps/"

fii34 commented 9 years ago

I DO NOT HAVE /usr/local/share/applications/ and /usr/local/share/applications/kde4/ These folders NO

Ubuntu 14.04 xfce, mate, kde and LinuxMint 17 xfce, mate, kde

Foggalong commented 9 years ago

If the permissions issue is fixed, then I'll open a new issue for this.