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

uninstall #15

Open
E-daw opened this issue Oct 7, 2023 · 4 comments
Open

uninstall #15

E-daw opened this issue Oct 7, 2023 · 4 comments

Comments

@E-daw
Copy link

E-daw commented Oct 7, 2023

Are there any directions for uninstalling?

@Nerya1
Copy link

Nerya1 commented Oct 7, 2023

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

@E-daw
Copy link
Author

E-daw commented Oct 7, 2023

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.

@Nerya1
Copy link

Nerya1 commented Oct 7, 2023

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.

@AAAtroush
Copy link

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?

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

No branches or pull requests

3 participants