I have another problem. I want to keep the default umask 022 global and for root, but want to set umask 077 for unprivileged users. So I set umask 077 in the users' ~/.bashrc. Every console application respects this umask, but not the GUI applications like LibreOffice, Leafpad, etc. Those GUI applications still save new files with umask 022.
So my question is: Where do I have to set umask for those applications or what do I have to change that those applications respect the umask from ~/.bashrc, too?
/etc/profile and /etc/login.defs are out of the question, because they set the global umask, and aren't respected by those GUI applications, too.
[Solved] umask ignored by GUI applications
-
- Posts: 13
- Joined: 26. Dec 2012, 01:27
[Solved] umask ignored by GUI applications
Last edited by cyberpatrol on 2. Feb 2013, 02:32, edited 1 time in total.
Re: umask ignored by GUI applications
I notice that you've solved this over at linux questions.
-
- Posts: 13
- Joined: 26. Dec 2012, 01:27
Re: umask ignored by GUI applications
Right. I just didn't get around to post the solution here and mark this thread as solved, too. 
To get the right umask for GUI applications the line ". $HOME/.bashrc" has to be added to /etc/xdg/xfce4/xinitrc.
Maybe this should be added officially in the appropriate package(s) by default. This can be a security or at least a privacy issue on real multi user systems. At least I found no way to do it in the user's home directory.

To get the right umask for GUI applications the line ". $HOME/.bashrc" has to be added to /etc/xdg/xfce4/xinitrc.
Maybe this should be added officially in the appropriate package(s) by default. This can be a security or at least a privacy issue on real multi user systems. At least I found no way to do it in the user's home directory.
Re: [Solved] umask ignored by GUI applications
Hi,
a little up ....
to get the right umask for GUI applications the line ". $HOME/.bashrc" has to be added to /etc/xdg/xfce4/xinitrc.
Because where in xinitrc ?
a little up ....
to get the right umask for GUI applications the line ". $HOME/.bashrc" has to be added to /etc/xdg/xfce4/xinitrc.
Because where in xinitrc ?
-
- Posts: 13
- Joined: 26. Dec 2012, 01:27
Re: [Solved] umask ignored by GUI applications
Right before the line
You probably can add it at the beginning of the file, after the first line, of course. I haven't tested this.
Code: Select all
# run xfce4-session if installed
Re: [Solved] umask ignored by GUI applications
Hi,
thank .
i put here :
# run xfce4-session if installed
. $HOME/.bashrc
if which xfce4-session >/dev/null 2>&1; then
# check if we start xfce4-session with ck-launch-session. this is only
# required for starting from a console, not a login manager
if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
if which ck-launch-session >/dev/null 2>&1; then
ck-launch-session xfce4-session
else
echo
echo "You have tried to start Xfce with consolekit support, but"
echo "ck-launch-session is not installed."
echo "Aborted startup..."
echo
exit 1
fi
else
# start xfce4-session normally
xfce4-session
fi
exit 0
fi
I think it 's good ?
. $HOME/.bashrc use space in . and $ ?
Voilà .
thank .
i put here :
# run xfce4-session if installed
. $HOME/.bashrc
if which xfce4-session >/dev/null 2>&1; then
# check if we start xfce4-session with ck-launch-session. this is only
# required for starting from a console, not a login manager
if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
if which ck-launch-session >/dev/null 2>&1; then
ck-launch-session xfce4-session
else
echo
echo "You have tried to start Xfce with consolekit support, but"
echo "ck-launch-session is not installed."
echo "Aborted startup..."
echo
exit 1
fi
else
# start xfce4-session normally
xfce4-session
fi
exit 0
fi
I think it 's good ?
. $HOME/.bashrc use space in . and $ ?
Voilà .
-
- Posts: 13
- Joined: 26. Dec 2012, 01:27
Re: [Solved] umask ignored by GUI applications
Looks good. I have it there, too, well, before the comment, but that's technically irrelevant.windowsxp wrote:i put here :
# run xfce4-session if installed
. $HOME/.bashrc
if which xfce4-session >/dev/null 2>&1; then
Right. "." is a substitution for the command "source".windowsxp wrote:. $HOME/.bashrc use space in . and $ ?