Are you crazy to change default system icons?

Post here those questions, bug reports and suggestions for SoftMaker FreeOffice 2018 for Linux that do not fit in any of the application-specific subforums.

Moderator: SoftMaker Team

Post Reply
simwin
Posts: 15
Joined: Wed Dec 12, 2012 11:58 am

Are you crazy to change default system icons?

Post by simwin » Wed Nov 27, 2019 1:01 pm

Are you crazy to change default system icons? Who asked you to do this during the installation process? It's just disrespectful to all linux users!

less DEBIAN/postinst

Code: Select all

copy_icons()
{   
	VERSION=$1
	if [ $VERSION = "free" ] ; then
		SHORTVERSION="free"
	else
		if [ $VERSION = "beta" ] ; then
			SHORTVERSION=18
		else
			SHORTVERSION=$(($VERSION-2000))
		fi
	fi
	SCRIPT=1
	if [ -z $2 ] ; then
		SCRIPT=0
	else
		if [ $2 = "0" ] ; then
			SCRIPT=0
		fi
	fi

	if [ $SCRIPT -eq 1 ] ; then
#       if global folders for icons exist, create local folders for non-root users
		if [ "$LOCALINSTALL" = "1" -a -d "/usr/share/icons/$THEME" ] ; then
			mkdir -p "$THEMEDIR/48x48/mimetypes"
			mkdir -p "$THEMEDIR/32x32/mimetypes"
			mkdir -p "$THEMEDIR/16x16/mimetypes"
		fi
    fi  

	set_output

	if [ -d "$THEMEDIR" ] ; then        
    	if [ $SCRIPT -eq 1 ] ; then

			if [ "$LOCALINSTALL" = "1" ] ; then
				XDG_MODE=" user "
				
			else
				XDG_MODE=" system "
			fi
		else
			XDG_MODE=" system "
		fi

		FREENAME=""
		if [ $VERSION = "free" ] ; then
			FREENAME="free"
		fi
		if [ $VERSION = "beta" ] ; then
			FREENAME="beta"
		fi

		#if [ "$LOCALINSTALL" != "1" ] ; then
			for SIZE in 16 24 32 48 64 72 128 256 512 1024 ; do
				for APP in prl tml pml ; do
					echo sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $SIZE --theme $THEME --context apps $SRCPATH/icons/"$APP"_"$SIZE".png application-x-"$APP"18"$FREENAME" >>$ERROROUTPUT 
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $SIZE --theme $THEME --context apps $SRCPATH/icons/"$APP"_"$SIZE".png application-x-"$APP"18"$FREENAME" >>$ERROROUTPUT 2>&1	
					echo sh $XDGPATH/xdg-icon-resource uninstall --novendor --mode $XDG_MODE --size $SIZE application-x-"$APP"18"$FREENAME" >> $UNINSTALLSCRIPT
				done
			done		
		#fi

		echo "LOOP start"  >>$ERROROUTPUT
		
		cd /usr/share/icons
		# ALLTHEMES=`echo *`
		#lh 12.10.2017 FS#37057
		ALLTHEMES=`find * | grep 'msword\|excel\|powerpoint\|hicolor' | xargs dirname | xargs dirname | xargs dirname | grep -v '\.' | sort | uniq`

		cd $SRCPATH/icons/

		ICONCACHECMD=`which update-icon-caches 2>/dev/null` 
		ALLMIMES=""
		for THEME in $ALLTHEMES ; do
			if [ -d /usr/share/icons/$THEME ] ; then
				echo "Updating theme $THEME"
				echo "Updating theme $THEME">>$ERROROUTPUT 
				echo "echo Removing icons from theme $THEME" >> $UNINSTALLSCRIPT
				echo "echo Removing icons from theme $THEME" >> $REMOVEICONSSCRIPT
				
				[b]for ICON in 16 32 48 64 128 ; do
					for VAR in application-x-tmd application-x-tmv ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-rtf text-rtf application-msword application-msword-template application-vnd.ms-word application-x-doc application-x-pocket-word application-vnd.openxmlformats-officedocument.wordprocessingml.document application-vnd.openxmlformats-officedocument.wordprocessingml.template application-vnd.ms-word.document.macroenabled.12 application-vnd.ms-word.template.macroenabled.12 application-vnd.oasis.opendocument.text application-vnd.oasis.opendocument.text-template application-vnd.sun.xml.writer application-vnd.sun.xml.writer.template ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-pmd application-x-pmv application-x-pmdx ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-sylk application-excel application-x-excel application-x-ms-excel application-x-msexcel application-x-xls application-xls application-vnd.ms-excel application-vnd.openxmlformats-officedocument.spreadsheetml.sheet application-vnd.openxmlformats-officedocument.spreadsheetml.template application-vnd.ms-excel.sheet.macroenabled.12 application-vnd.ms-excel.template.macroenabled.12 ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-prd application-x-prs application-x-prv ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-ppt application-mspowerpoint application-vnd.ms-powerpoint application-vnd.ms-powerpoint.presentation.macroenabled.12 application-vnd.ms-powerpoint.slideshow.macroEnabled.12 application-vnd.openxmlformats-officedocument.presentationml.presentation application-vnd.openxmlformats-officedocument.presentationml.template application-vnd.openxmlformats-officedocument.presentationml.slideshow ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
					done
				done[/b]

				UPDDIR=/usr/share/icons/$THEME/mimes/
				if [ -d $UPDDIR ] ; then
					echo "$THEME modification start"
					echo "$THEME modification start ($UPDDIR)"  >>$ERROROUTPUT
				else
					UPDDIR=/usr/share/icons/$THEME/mimetypes/
				fi

				ALLMIMES="application-x-tmd\|application-x-tmv"
				for VAR in application-rtf text-rtf application-msword application-msword-template application-vnd.ms-word application-x-doc application-x-pocket-word application-vnd.openxmlformats-officedocument.wordprocessingml.document application-vnd.openxmlformats-officedocument.wordprocessingml.template application-vnd.ms-word.document.macroenabled.12 application-vnd.ms-word.template.macroenabled.12 ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done
				for VAR in application-x-pocket-word application-vnd.oasis.opendocument.text text-rtf application-vnd.sun.xml.writer application-vnd.sun.xml.writer.template application-vnd.wordperfect application-vnd.oasis.opendocument.text-template application-vnd.oasis.opendocument.text application-vnd.sun.xml.writer application-vnd.sun.xml.writer.template application-x-dbf ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done
				for VAR in application-x-pmd application-x-pmv application-x-pmdx application/x-pagemaker ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done
				for VAR in application-x-sylk application-excel application-x-excel application-x-ms-excel application-x-msexcel application-x-xls application-xls application-vnd.ms-excel application-vnd.openxmlformats-officedocument.spreadsheetml.sheet application-vnd.openxmlformats-officedocument.spreadsheetml.template application-vnd.ms-excel.sheet.macroenabled.12 application-vnd.ms-excel.template.macroenabled.12 text-spreadsheet ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done
				for VAR in text-csv application-x-dif application-x-prn application-vnd.stardivision.calc ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done
				for VAR in application-x-prd application-x-prs application-x-prv ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done
				for VAR in application-ppt application-mspowerpoint application-vnd.ms-powerpoint application-vnd.ms-powerpoint.presentation.macroenabled.12 application-vnd.ms-powerpoint.slideshow.macroEnabled.12 application-vnd.openxmlformats-officedocument.presentationml.presentation application-vnd.openxmlformats-officedocument.presentationml.template application-vnd.openxmlformats-officedocument.presentationml.slideshow ; do
					ALLMIMES="$ALLMIMES\|$VAR"
				done

#				for UPDDIR in /usr/share/icons/$THEME/mimes/ /usr/share/icons/$THEME/mimetypes/ ; do
				UPDDIR="/usr/share/icons/$THEME/"

				if [ -d $UPDDIR ] ; then
# now there should not be any .old files. Let's check and remove them if they exist
					find $UPDDIR* -name *.old > /tmp/1.txt
					cat /tmp/1.txt | sed 's/.old//g' > /tmp/2.txt
					OLDFILES=`cat /tmp/2.txt | sort | uniq`
					for i in $OLDFILES ; do
						for j in `grep "$i" /tmp/1.txt | sort` ; do
#							echo "moving $j -> $i"
							mv $j $i
						done
					done
					rm /tmp/1.txt
					rm /tmp/2.txt
					
					if [ "$LOCALINSTALL" != "1" ] ; then
						ALLMIMES="$ALLMIMES\|x-office-document\|x-office-spreadsheet\|wordprocessing"
						echo "ALLMIMES = ($ALLMIMES)" >> $ERROROUTPUT
						for i in `find $UPDDIR*| grep "$ALLMIMES"` ; do
							echo $i >> $ERROROUTPUT
							mv $i $i.old
							echo "mv $i.old $i" >> $UNINSTALLSCRIPT
							echo "mv $i.old $i" >> $REMOVEICONSSCRIPT
						done
					else
					for ICON in 16 32 48 64 128 ; do
						if [ "$LOCALINSTALL" != "1" ] ; then
							if [ -d $UPDDIR/$ICON ] ; then
								if [ -d /usr/share/icons/$THEME/"$ICON"x"$ICON"/mimetypes ] ; then
									cd $UPDDIR/$ICON
									for i in pmd pmdx pmv prd prs prv tmd tmv; do
										if [ -f $UPDDIR/$ICON/$i ] ; then
											rm $UPDDIR/$ICON/$i
										fi
									done
									cd /usr/share/icons/$THEME/"$ICON"x"$ICON"/mimetypes
									for i in `echo *` ; do
									  	if [ -f $UPDDIR/$ICON/$i ] ; then
									  		mv $UPDDIR/$ICON/$i $UPDDIR/$ICON/$i.old
									  		echo "mv $UPDDIR/$ICON/$i.old $UPDDIR/$ICON/$i" >> $UNINSTALLSCRIPT
									  		echo "mv $UPDDIR/$ICON/$i.old $UPDDIR/$ICON/$i" >> $REMOVEICONSSCRIPT
									  		cp /usr/share/icons/$THEME/"$ICON"x"$ICON"/mimetypes/$i $UPDDIR/$ICON/
									  	else
									  		echo "rm $UPDDIR/$ICON/$i" >> $UNINSTALLSCRIPT
									  		echo "rm $UPDDIR/$ICON/$i" >> $REMOVEICONSSCRIPT
									  		if [ ! -d $UPDDIR/$ICON ] ; then
										  		mkdir -p $UPDDIR/$ICON
										  		echo "[mimes/$ICON]" >> /usr/share/icons/$THEME/index.theme
										  		echo "Size=$ICON" >> /usr/share/icons/$THEME/index.theme
										  		echo "Context=MimeTypes" >> /usr/share/icons/$THEME/index.theme
										  		echo "Type=Fixed" >> /usr/share/icons/$THEME/index.theme
										  		echo " " >> /usr/share/icons/$THEME/index.theme
										  		DIR0=`grep Directories /usr/share/icons/$THEME/index.theme`
										  		DIR1="$DIR0,mimes/$ICON"
										  		sed -i "s:$DIR0:$DIR1:g" /usr/share/icons/$THEME/index.theme
										  	fi
									  		cp /usr/share/icons/$THEME/"$ICON"x"$ICON"/mimetypes/$i $UPDDIR/$ICON/					  		
									  	fi
									done
								fi
							fi
						else
							cd
							if [ -d .local/share/icons/$THEME ] ; then
								cd .local/share/icons/$THEME
								LDIR=`pwd`
								if [ ! -d $UPDDIR/$ICON ] ; then
									if [ ! -f index.theme ] ; then 
										if [ -f /usr/share/icons/$THEME/index.theme ] ; then 
											cp /usr/share/icons/$THEME/index.theme .
											echo "index.theme copied"
										fi
									fi
							  		echo "[mimes/$ICON]" >> index.theme
							  		echo "Size=$ICON" >> index.theme
							  		echo "Context=MimeTypes" >> index.theme
							  		echo "Type=Fixed" >> index.theme
							  		echo " " >> index.theme
							  		DIR0=`grep Directories index.theme`
							  		if [ "M$DIR0" != "M" ] ; then
								  		DIR1="$DIR0,mimes/$ICON"
								  		sed -i "s:$DIR0:$DIR1:g" index.theme
								  		echo "DIR0=$DIR0" >>$ERROROUTPUT
								  	fi
								fi
								mkdir -p mimes/$ICON
								mkdir -p "$ICON"x"$ICON"/mimetypes
								mkdir -p "$ICON"x"$ICON"/mimetypes
								for i in `ls "$ICON"x"$ICON"/mimetypes` ; do 
									cp "$ICON"x"$ICON"/mimetypes/$i mimes/$ICON/
								done
								echo "rm -fr $LDIR/mimes/$ICON" >> $UNINSTALLSCRIPT
								echo "rm -fr $LDIR/mimes/$ICON" >> $REMOVEICONSSCRIPT
							fi
						fi
					done
					fi
				fi
#				done

				for ICON in 48 16 32 64 128 ; do
				if true; then
					
					for VAR in application-x-tmd application-x-tmv ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/tmd_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-rtf text-rtf application-msword application-msword-template application-vnd.ms-word application-x-doc application-x-pocket-word application-vnd.openxmlformats-officedocument.wordprocessingml.document application-vnd.openxmlformats-officedocument.wordprocessingml.template application-vnd.ms-word.document.macroenabled.12 application-vnd.ms-word.template.macroenabled.12 ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $REMOVEICONSSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/tmd_mso_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-pocket-word application-vnd.oasis.opendocument.text text-rtf application-vnd.sun.xml.writer application-vnd.sun.xml.writer.template application-vnd.wordperfect application-vnd.oasis.opendocument.text-template application-vnd.oasis.opendocument.text application-vnd.sun.xml.writer application-vnd.sun.xml.writer.template application-x-dbf ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $REMOVEICONSSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/tmd_oth_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-pmd application-x-pmv application-x-pmdx application/x-pagemaker ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/pmd_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-sylk application-excel application-x-excel application-x-ms-excel application-x-msexcel application-x-xls application-xls application-vnd.ms-excel application-vnd.openxmlformats-officedocument.spreadsheetml.sheet application-vnd.openxmlformats-officedocument.spreadsheetml.template application-vnd.ms-excel.sheet.macroenabled.12 application-vnd.ms-excel.template.macroenabled.12 text-spreadsheet ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $REMOVEICONSSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/pmd_mso_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in text-csv application-x-dif application-x-prn application-vnd.stardivision.calc ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $REMOVEICONSSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/pmd_oth_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-x-prd application-x-prs application-x-prv ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/prd_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
					for VAR in application-ppt application-mspowerpoint application-vnd.ms-powerpoint application-vnd.ms-powerpoint.presentation.macroenabled.12 application-vnd.ms-powerpoint.slideshow.macroEnabled.12 application-vnd.openxmlformats-officedocument.presentationml.presentation application-vnd.openxmlformats-officedocument.presentationml.template application-vnd.openxmlformats-officedocument.presentationml.slideshow ; do
						sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR >>$ERROROUTPUT 2>&1
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $UNINSTALLSCRIPT
						echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $VAR" >> $REMOVEICONSSCRIPT
						sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/prd_mso_$ICON.png $VAR >>$ERROROUTPUT 2>&1
					done
#				else
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-tmd" >> $UNINSTALLSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/tmd_$ICON.png application-x-tmd >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-tmd-mso" >> $UNINSTALLSCRIPT
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-tmd-mso" >> $REMOVEICONSSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/tmd_mso_$ICON.png application-x-tmd-mso >>$ERROROUTPUT 2>&1
						
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-tmd-oth" >> $UNINSTALLSCRIPT
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-tmd-oth" >> $REMOVEICONSSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/tmd_oth_$ICON.png application-x-tmd-oth >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-pmd" >> $UNINSTALLSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/pmd_$ICON.png application-x-pmd >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-pmd-mso" >> $UNINSTALLSCRIPT
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-pmd-mso" >> $REMOVEICONSSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/pmd_mso_$ICON.png application-x-pmd-mso >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-pmd-oth" >> $UNINSTALLSCRIPT
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-pmd-oth" >> $REMOVEICONSSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/pmd_oth_$ICON.png application-x-pmd-oth >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-prd" >> $UNINSTALLSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/prd_$ICON.png application-x-prd >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-prd-mso" >> $UNINSTALLSCRIPT
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-prd-mso" >> $REMOVEICONSSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/prd_mso_$ICON.png application-x-prd-mso >>$ERROROUTPUT 2>&1

					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-prd-oth" >> $UNINSTALLSCRIPT
					echo "sh $XDGPATH/xdg-icon-resource uninstall --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes application-x-prd-oth" >> $REMOVEICONSSCRIPT
					sh $XDGPATH/xdg-icon-resource install --novendor --noupdate --mode $XDG_MODE --size $ICON --theme $THEME --context mimetypes $SRCPATH/icons/prd_oth_$ICON.png application-x-prd-oth >>$ERROROUTPUT 2>&1
				fi				
				done
				
				sh $XDGPATH/xdg-icon-resource forceupdate --mode $XDG_MODE --theme $THEME >>$ERROROUTPUT 2>&1
				echo "sh $XDGPATH/xdg-icon-resource forceupdate --mode $XDG_MODE --theme $THEME" >> $UNINSTALLSCRIPT
				echo "sh $XDGPATH/xdg-icon-resource forceupdate --mode $XDG_MODE --theme $THEME" >> $REMOVEICONSSCRIPT
				if [ "m$ICONCACHECMD" != "m" -a "$LOCALINSTALL" != "1" ] ; then
					update-icon-caches /usr/share/icons/$THEME
					echo "update-icon-caches /usr/share/icons/$THEME" >> $UNINSTALLSCRIPT
					echo "update-icon-caches /usr/share/icons/$THEME" >> $REMOVEICONSSCRIPT
				fi
			else 
				echo "$THEME skipped">>$ERROROUTPUT
			fi
		done		
	fi
}

miguel-c
SoftMaker Team
SoftMaker Team
Posts: 441
Joined: Wed Jun 05, 2019 12:02 pm

Re: Are you crazy to change default system icons?

Post by miguel-c » Wed Nov 27, 2019 3:00 pm

In the program directory of FreeOffice you will find the script /usr/share/office2018/mime/remove_icons.sh
- If you execute this with sudo, the icon mappings will be removed.

simwin
Posts: 15
Joined: Wed Dec 12, 2012 11:58 am

Re: Are you crazy to change default system icons?

Post by simwin » Thu Nov 28, 2019 7:46 am

This is not a solution to the issue because every time after the update I have to run this script. In addition, changing default system icons takes a long time.

miguel-c
SoftMaker Team
SoftMaker Team
Posts: 441
Joined: Wed Jun 05, 2019 12:02 pm

Re: Are you crazy to change default system icons?

Post by miguel-c » Fri Nov 29, 2019 11:07 am

It's really hard to satisfy everyone.

Previously, customers complained that FreeOffice didn't associate itself with typical document types. Now others complain that it does.

There are no user-defined installations with DEB or RPM, so we needed to make a choice, and we chose to integrate with the system. If you don't like that, we provide the above-mentioned script.

simwin
Posts: 15
Joined: Wed Dec 12, 2012 11:58 am

Re: Are you crazy to change default system icons?

Post by simwin » Fri Nov 29, 2019 2:18 pm

miguel-c wrote:
Fri Nov 29, 2019 11:07 am
Previously, customers complained that FreeOffice didn't associate itself with typical document types. Now others complain that it does.
OK, you can associate it with typical document types but without changing default system icons because this is not correct at all! Please understand it.

Post Reply

Return to “SoftMaker FreeOffice 2018 for Linux (General)”