bashrc & zshrc: add function fix-autostart.

* Creates and chmods autostart directories as 755.
    * ~/.config/autostart
    * /etc/xdg/autostart
        * Only if we are root.
This commit is contained in:
Mikaela Suomalainen 2014-06-22 11:17:48 +03:00
parent 107f78c517
commit abb85e3393
2 changed files with 26 additions and 0 deletions

13
bashrc
View File

@ -739,6 +739,19 @@ fix-node () {
fi
}
# This function fixes automatic startup in graphical sessions.
# I have had issues with auto start not doing anything and this seems to
# fix it.
fix-autostart() {
if [[ $USER = "root" ]]
then
mkdir -p /etc/xdg/autostart
chmod -R 755 /etc/xdg/autostart
fi
mkdir -p ~/.config/autostart
chmod -R 755 ~/.config/autostart
}
# .custom
if [ -f ~/.custom ]; then
source ~/.custom

13
zshrc
View File

@ -708,6 +708,19 @@ fi
}
# This function fixes automatic startup in graphical sessions.
# I have had issues with auto start not doing anything and this seems to
# fix it.
fix-autostart() {
if [[ $USER = "root" ]]
then
mkdir -p /etc/xdg/autostart
chmod -R 755 /etc/xdg/autostart
fi
mkdir -p ~/.config/autostart
chmod -R 755 ~/.config/autostart
}
# Source files for miscannellious modifications.
# .custom