Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 4056

Programming • Re: [Bash] How to get apt (or apt-get) progressbar in kdialog?

$
0
0

So I suggest solving first which nvidia versions your friends have, to avoid dissapointment.

Don't worry, my script is designed to return an error message if you don't have a Maxwell to Lovelace GPU :D

Code:

gpu_info="$(lspci | grep -i nvidia)"if echo "$gpu_info" | grep -iE "GTX 745|GTX 750|GTX 9|GT 9|GTX 1|GT 1|RTX 20|RTX 30|RTX 40|Titan X|Titan V|Quadro M|Quadro GV|T400|T600|T1000"; thenkdialog --title "$APP_NAME" \--error "No compatible NVIDIA GPU detected."exit 1fi

As a matter of fact, I've set up a different script to run on login, so that the .desktop file won't even show up on your desktop if your GPU is incompatible. I've placed the .desktop file for this somewhere in /opt, and what the login script does is create a symlink to the driver installer on the user's desktop if a compatible GPU is detected.

Statistics: Posted by KdialogKun — 2026-02-04 14:40



Viewing all articles
Browse latest Browse all 4056

Trending Articles