Discord-Screenshare-Linux icon indicating copy to clipboard operation
Discord-Screenshare-Linux copied to clipboard

uninstall

Open E-daw opened this issue 10 months ago • 4 comments

Are there any directions for uninstalling?

E-daw avatar Oct 07 '23 07:10 E-daw

scripts/install.sh removes existing installations before installing. I downloaded it and scripts/patch.js and commented out the lines after #Download latest, after running the updated files with bash install.sh discord seems to work as normal.

The new install.sh file looks like this:

#!/bin/sh
username=$(logname)
dirs=(/home/$username/.config/discord*/*/modules/discord_voice /home/$username/.var/app/com.discordapp.*/config/discord/*/modules/discord_voice)
dirs=( $( for i in ${dirs[@]} ; do echo $i ; done | grep -v "*" ) )
len=${#dirs[@]}

if [[ $len -eq 0 ]]; then
    echo "No Discord installation found"
    exit 1
fi

if [[ $len -gt 1 ]]; then
    echo "Multiple Discord installations found"
    echo "Please select one:"
    for i in "${!dirs[@]}"; do
        echo -n "$((i+1)): "
        echo "${dirs[$i]}"
    done

    read -p "Enter selection: " selection
    selectedIndex=$((selection-1))
    selected=${dirs[$selectedIndex]}
    if [[ $selectedIndex -lt 0 || $selectedIndex -ge $len ]]; then
        echo "Invalid selection"
        exit 1
    fi
else
    selected=${dirs[0]}
fi

echo "Installing LinuxFix to $selected..."

chmod 644 $selected/index.js

separator="\/\/ ==Discord Screenshare Linux Fix=="

# Remove any existing installation
sed -i.bak '/^'"$separator"'/,/^'"$separator"'/{/^#/!{/^\$/!d}}' $selected/index.js

#Download latest
# downloadUrl=$(wget -qO- https://api.github.com/repos/fuwwy/Discord-Screenshare-Linux/releases/latest | grep browser_download_url | cut -d '"' -f 4)
# wget -O $selected/linux-fix.node -q --show-progress "$downloadUrl"
# code=$(wget -qO- https://raw.githubusercontent.com/fuwwy/Discord-Screenshare-Linux/main/scripts/patch.js)

#echo -e "\n" >> $selected/index.js
echo "$code" >> $selected/index.js

chmod 444 $selected/index.js

Nerya1 avatar Oct 07 '23 14:10 Nerya1

Thank you and sorry I could've totally have seen that if I looked at the install script but I was lazy. Hope this wasn't redundant or tedious. Thanks again.

E-daw avatar Oct 07 '23 20:10 E-daw

I'm glad I could help. I actually installed it earlier today and checked this issue once I saw that it crashes. Thought I'd leave my solution for other people.

Nerya1 avatar Oct 07 '23 23:10 Nerya1

I am new to linux and when i applied this it maked discord crashes whenever i try to share screen i don't really know how to revert it any help?

AAAtroush avatar Apr 18 '24 02:04 AAAtroush