Hot answers tagged

3

I found an answer that works for me. I can use the command notify-send More info at: https://wiki.archlinux.org/index.php/Desktop_notifications


1

There are a couple of ways to do this. You can either create a cron job or add your script to /etc/rc.d/rc.local. This site has more information: https://www.tecmint.com/auto-execute-linux-scripts-during-reboot-or-startup/ UPDATE: After talking with Tin jus, it appears there's no rc.d/rc.local directory in elementary OS. According to the tecmint link, the ...


1

Unfortunately I don't know of a real graphical way to achieve that. But because elementary is based on Ubuntu and thus uses systemd, you should be able to do it with a systemd service. Basically create a file /etc/systemd/system/myshutdown.service with something like that: [Unit] Description=Do something on shutdown [Service] Type=oneshot RemainAfterExit=...


1

I found out that it was actually running the script but not showing the terminal. I validated this by launching chrome from inside the bash script -- so that was the issue.


1

In modern Linux kernels, you can use udev to detect removable disks. You can read about udev at: Ubuntu Manpages I'm not a Python expert, but i have find a module about using udev, so you can try with it: Pure Python udev bindings


1

well there is also another way you could do this ... but I am not sure that it is "proper" ... need to think about that create your bash script make it executable by ANYONE sudo chown root:root {you script name} at this point ... you should be able to run your script without a password prompt


1

You have used sudo and the script keep waiting for a password. You must use gksu to open a dialog and enter your password.


Only top voted, non community-wiki answers of a minimum length are eligible