From abb85e339326b955e1ac784e39ac4a3edc3a85ce Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sun, 22 Jun 2014 11:17:48 +0300 Subject: [PATCH] bashrc & zshrc: add function fix-autostart. * Creates and chmods autostart directories as 755. * ~/.config/autostart * /etc/xdg/autostart * Only if we are root. --- bashrc | 13 +++++++++++++ zshrc | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/bashrc b/bashrc index 3862e32e..03e22863 100644 --- a/bashrc +++ b/bashrc @@ -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 diff --git a/zshrc b/zshrc index 6843217a..2071763b 100644 --- a/zshrc +++ b/zshrc @@ -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