Closed bilelmoussaoui closed 8 years ago
@wa4557 Do you want to contribute on this? :) The script will add/update StartupWMClass
propoerty in the desktop file of "infected" application, to make the icons look right in a dash(Gnome)/Dock or when using Alt + Tab
. Almost every steam game has this issue, and some of other application like Octave, Arduino IDE...
Sure thing. I guess this might be an issue that is best solved using bash scripts. Python is a bit of an overkill here...
I can provide the bash script (I actually have a bit more time now the next weeks:) But you have to tell me what I should do
I'm going to use bash script
Le 21 nov. 2015 à 10:10, Andreas Angerer notifications@github.com a écrit :
Sure thing. I guess this might be an issue that is best solved using bash scripts. Python is a bit of an overkill here...
— Reply to this email directly or view it on GitHub.
Well, we should read the database file that will contain the application name, the desktop file name , and the startupWMclass value! For each file we should check in every desktop file location, /usr/share/applications
and .local/share/applications
we can get that from Hardcode-fixer i guess; and if the file do exists, we add the startupWMclass if the property does not exists; the script will need root permissions as some files do exists in /usr/..
Ah ok, that should be fairly easy. Right now I'm working on the musseq icon but as soon as I'm finished with that I can work on the script. Do youu want to start or should I build from scratch. I guess it's ok if we just both work on it and upload the changes
I will start working on it and upload the changes
:+1:
@wa4557 I added the script :) We just need to implement restore/backup
Done!
@wa4557 If you have some free time, can you take a look at Readme file if everything is correct,the bash script too as i'm not really used to it :P
Wow that was fast:) we could implement a restore function by saving in the database if and what was previously in startupwmclass and restore that value if someone wants to revert
Bilal Elmoussaoui notifications@github.com schrieb am Sa., 21.11.2015, 12:32:
@wa4557 https://github.com/wa4557 I added the script :) We just need to implement restore/backup
— Reply to this email directly or view it on GitHub https://github.com/bil-elmoussaoui/StartupWMClassFixer/issues/1#issuecomment-158629323 .
I just copied the old file, is that good enough? i just need to add a ignore list for backup as we don't really need to backup desktop file that are in $HOME/desktop/
I guess that's ok. A few things I'm going to fix however:
.sh
extension. https://askubuntu.com/questions/503127/should-i-save-my-scripts-with-the-sh-extension.bak
instead of .backup
database.csv
is not available we could wget
it instead of exiting the scriptOtherwise :+1:
Good!!! :dancer:
I use $(xdg-user-dir DESKTOP)
to get the directory of $HOME/Desktop
(depends on the language the user's using) as we run the script as root we the result is /home/root/Desktop/
, do you have any idea or an other way to do that?
Hmm why do you need that folder?
Steam creates desktop files there too
That's tricky because in German for example the folder is called Schreibtisch
so we cannot hardcode the name... We could replace root
with ${SUDO_USER:-$USER}
?
Good idea!! we will need to replace /root/
with /${SUDO_USER:-$USER}/
to avoid the case that user has a username like rootblabla
! can you do that?
Sure :)
No that doesn't work :( The thing is that if i run sudo xdg-user-dir DESKTOP
i get /root/Desktop
but if I run /home/andreas/Schreibtisch
so the name is also different...
There's no way to run a code as an other user? :(
sudo -u ${SUDO_USER:-$USER} xdg-user-dir DESKTOP
should work
Done :+1:
:+1:
StartupWMClass
exists with a different value, change it instead of adding a new lineExample of database file :
desktop file name, startupwmclass value