Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 02-01-2013, 04:30 PM   #1
Registered: Dec 2012
Posts: 75

Rep: Reputation: Disabled
umask ignored by GUI applications

And I've got another question that is likely to be related to Slackware, too.

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.
Old 02-01-2013, 05:02 PM   #2
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Are you exporting umask as an environment variable or are you just setting it? If you are just setting it export it so it is an environment variable. Also, .bashrc does not get sourced when xwindows is started unless a session is opened to the terminal and then a startx is run.

You can use your ~/.XDefaults file and set your defaults or you can play with your /etc/x11/xinit/xinitrc to have it source the .bashrc or .bash_profile when started.
Old 02-01-2013, 06:00 PM   #3
Registered: Dec 2012
Posts: 75

Original Poster
Rep: Reputation: Disabled
I just added the line "umask 077" to my ~/.bashrc. So I don't export it as an environment variable.

But the advice about /etc/x11/xinit/xinitrc helped, even if it was in fact /etc/xdg/xfce4/xinitrc into which I had to add the line ". $HOME/.bashrc". But now it works. Now the files are created with the right permissions by the GUI applications.

1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
want to develop gui applications dinesh.imatrix Linux - Software 1 01-19-2012 06:05 PM
umask and permissions: has umask 007 bad side effects? browny_amiga Linux - General 2 09-09-2011 08:01 AM
GUI for applications the_gripmaster Linux - Software 7 12-13-2010 12:58 PM
gui applications msrihari Linux - Desktop 11 03-27-2010 09:02 AM
X applications ignore UMASK settings thejasondean Ubuntu 0 01-10-2007 05:46 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration