I have a problem that after every update, because of my Ralink Wifi-Board, the WLAN is not activated and I have to run these commands to make it work again:
cd /home/makkekkazzo/2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO/
sudo make
sudo make install
sudo modprobe rt5390sta
sudo ifconfig enp2s0 up
sudo service network-manager restart
For this reason I want to know if it is possible to make a script with only these commands that will run after every update automatically by clicking on it.
Thanks a lot
Best Answer
The most convenient (and flexible) is to create a script for it:
First install gksu:
Then create the script:
make it executable, and subsequently
Create a launcher:
Save it as
update.desktop
. Also make this file executable and place it somewhere to double click.Now when you double click the icon, you will be prompted for your password, and the script will be executed in your terminal.
OR
save the
.desktop
file in~/.local/share/applications
to make it available in Dash (no need to make it executable then). Log out and back in to show it in Dash.Notes
gksu
does not notify you in case of occuring errors, hence thewhich will make the script execute in a terminal window.
sudo
in front of each command, since we run the script withsudo
.You can "pimp" your
.desktop
file with an icon, by adding a line:more on
.desktop
files and their options here.