Skip to content

Commit e238036

Browse files
committed
feat: add uninstall command and documentation for PairUX release:patch
1 parent 172e92e commit e238036

2 files changed

Lines changed: 104 additions & 5 deletions

File tree

‎apps/installer/scripts/install.sh‎

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,74 @@ install_linux() {
213213
# Create wrapper script that handles sandbox issues
214214
info "Creating launcher script..."
215215
mkdir -p "$BIN_DIR"
216-
cat > "$BIN_DIR/pairux" << 'WRAPPER'
216+
cat > "$BIN_DIR/pairux" << WRAPPER
217217
#!/bin/bash
218218
# PairUX launcher
219219
# ELECTRON_DISABLE_SANDBOX is required for AppImages without SUID chrome-sandbox
220-
APPIMAGE="$HOME/.pairux/PairUX.AppImage"
221-
if [ -x "$APPIMAGE" ]; then
220+
221+
VERSION="$version"
222+
APPIMAGE="\$HOME/.pairux/PairUX.AppImage"
223+
INSTALL_DIR="\$HOME/.pairux"
224+
BIN_DIR="\$HOME/.local/bin"
225+
DESKTOP_FILE="\$HOME/.local/share/applications/pairux.desktop"
226+
ICON_FILE="\$HOME/.local/share/icons/hicolor/256x256/apps/pairux.png"
227+
228+
case "\${1-}" in
229+
-h|--help)
230+
echo "Usage: pairux [options]"
231+
echo ""
232+
echo "PairUX - collaborative screen sharing desktop app"
233+
echo ""
234+
echo "Options:"
235+
echo " -h, --help Show this help message"
236+
echo " -v, --version Show version number"
237+
echo " uninstall Remove PairUX completely"
238+
exit 0
239+
;;
240+
-v|--version)
241+
echo "pairux \$VERSION"
242+
exit 0
243+
;;
244+
uninstall)
245+
echo "Uninstalling PairUX..."
246+
echo ""
247+
248+
# Kill running instances
249+
pkill -f "PairUX.AppImage" 2>/dev/null && echo " Stopped running instance"
250+
251+
# Remove AppImage and install directory
252+
if [ -d "\$INSTALL_DIR" ]; then
253+
rm -rf "\$INSTALL_DIR"
254+
echo " Removed \$INSTALL_DIR"
255+
fi
256+
257+
# Remove desktop entry
258+
if [ -f "\$DESKTOP_FILE" ]; then
259+
rm -f "\$DESKTOP_FILE"
260+
echo " Removed desktop entry"
261+
update-desktop-database "\$HOME/.local/share/applications" 2>/dev/null || true
262+
fi
263+
264+
# Remove icon
265+
if [ -f "\$ICON_FILE" ]; then
266+
rm -f "\$ICON_FILE"
267+
echo " Removed icon"
268+
fi
269+
270+
# Remove this launcher script last
271+
echo " Removed \$BIN_DIR/pairux"
272+
echo ""
273+
echo "PairUX has been uninstalled."
274+
rm -f "\$BIN_DIR/pairux"
275+
exit 0
276+
;;
277+
esac
278+
279+
if [ -x "\$APPIMAGE" ]; then
222280
export ELECTRON_DISABLE_SANDBOX=1
223-
exec "$APPIMAGE" "$@"
281+
exec "\$APPIMAGE" "\$@"
224282
else
225-
echo "Error: PairUX AppImage not found at $APPIMAGE"
283+
echo "Error: PairUX AppImage not found at \$APPIMAGE"
226284
echo "Please reinstall: curl -fsSL https://installer.pairux.com/install.sh | bash"
227285
exit 1
228286
fi

‎apps/web/src/app/docs/page.tsx‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const tableOfContents = [
2525
{ id: 'control', title: 'Remote Control' },
2626
{ id: 'security', title: 'Security' },
2727
{ id: 'troubleshooting', title: 'Troubleshooting' },
28+
{ id: 'uninstalling', title: 'Uninstalling' },
2829
{ id: 'faq', title: 'FAQ' },
2930
];
3031

@@ -69,6 +70,11 @@ const faqs = [
6970
answer:
7071
'Audio sharing is on our roadmap but not yet implemented. Currently, PairUX is focused on visual screen sharing and control.',
7172
},
73+
{
74+
question: 'How do I uninstall PairUX?',
75+
answer:
76+
'Run "pairux uninstall" to completely remove PairUX, including the desktop app, launcher script, desktop entry, and icon. On macOS, you can also drag PairUX from Applications to the Trash.',
77+
},
7278
];
7379

7480
export default function DocsPage() {
@@ -357,6 +363,41 @@ export default function DocsPage() {
357363
</ul>
358364
</section>
359365

366+
{/* Uninstalling */}
367+
<section id="uninstalling" className="mt-12">
368+
<h2>Uninstalling</h2>
369+
370+
<h3>Linux</h3>
371+
<p>Run the built-in uninstall command to remove everything:</p>
372+
<pre>
373+
<code>pairux uninstall</code>
374+
</pre>
375+
<p>This removes the AppImage, launcher script, desktop entry, and icon.</p>
376+
<p>To uninstall manually:</p>
377+
<pre>
378+
<code>{`rm -rf ~/.pairux
379+
rm -f ~/.local/bin/pairux
380+
rm -f ~/.local/share/applications/pairux.desktop
381+
rm -f ~/.local/share/icons/hicolor/256x256/apps/pairux.png`}</code>
382+
</pre>
383+
384+
<h3>macOS</h3>
385+
<p>
386+
Drag <strong>PairUX.app</strong> from your Applications folder to the Trash.
387+
To also remove the CLI launcher:
388+
</p>
389+
<pre>
390+
<code>rm -f ~/.local/bin/pairux</code>
391+
</pre>
392+
393+
<h3>Windows</h3>
394+
<p>
395+
Open <strong>Settings → Apps → Installed apps</strong>, find PairUX, and click{' '}
396+
<strong>Uninstall</strong>. Alternatively, run the uninstaller from the Start
397+
Menu.
398+
</p>
399+
</section>
400+
360401
{/* FAQ */}
361402
<section id="faq" className="mt-12">
362403
<h2>Frequently Asked Questions</h2>

0 commit comments

Comments
 (0)