I seem to be having an issue with my applications not obeying the umask. in shell everything seems to be correct, i set my umask to be 002 in a sourced app_env.sh script. this is working correctly as a shell i open will obey this. When i open the file browser and create a new folder, it sets it's permission to be 755.. I also see other applications creating files in this manner, i am unsure of where to set umask so that my applications should follow the rule. I looked around and couldnt find any solutions so far, just unanswered questions on many forums.
Using Gnome 3.18. I share files between other family members, but the default umask on my distro (archlinux) is 0022. So every file/directory created is not writable for our common group.  I tried to put umask 0002 in /etc/profile but the gnome session is still using 0022. It's working for a login bash shell, though.  I also tried to add this line in /etc/pam.d/system-auth:  session   required  pam_umask.so umask=0002  It has the same effect as the one in /etc/profile. I tried  If I change the umask manually in a gnome-terminal shell, then I launch an application from it, say gedit, then the files created by it have the wanted permissions. If I launch gedit from the gnome menus, it doesn't. So my matter is really to set the umask for the gnome session, and I can't find where to do it.  EDIT (to answer Gilles' comment): I'm using gdm 3.18 as the DM. I also tried to add the pam_umask line into /etc/pam.d/gdm-launch-environment. All other gdm-* files contains includes of session from the system-auth file, so they should not need more. It doesn't change anything.  /etc/login.defs contains UMASK 077 but also USERGROUPS_ENAB yes which should set the umask to either 0077 or 0007 for users whose primary group is the username.  The only file that contains 022 for umask in /etc is /etc/profile but that was my first try.  As for /etc/Xsession.d, I don't have this directory. Besides, as wayland is now the default display server, I'm not sure the umask should be set as part of X initialisation, even if I'm still using it myself.
I already know how to do it on Mac OS X (plenty of instructions online).  But is it possible to do it on Ubuntu? If yes, how? Does inverting the "if" improve performance? I am looking for a clean and fast method to force GNOME in Ubuntu 14.04 to switch between active apps only on the current workspace when pressing the shortcut alt + tab. Prove $\chi(G)\chi(\bar{G}) \geq n$ for chromatic number of graph and its complement I'm trying to determine if 1317 and 116 can be written as the sum of three squares?  I have the condition that if it is not of the form $4^{\alpha}(8k+7)$ then it can be written as a sum of three squares, but how do I use this condition to work it out?  Thank you Is there a direct, elementary proof of $n = \sum_{k|n} \phi(k)$? This is maybe a duplicate like , but the error still appears.    When I try to click "mark as duplicate" a HTTP 404 error occur.  I'm using Firefox 16.0.2 with Firebug on Mac OS X 10.5.8 Summer in Saint Helena The Winter Bash site is located at http://winterba.sh/.  Only one problem:   . Saint Helena is in the Southern Hemisphere. It's Summer in Saint Helena.   So shouldn't it be the Summer Bash? Don't forget our Aussie/Kiwi/South African/Southern Brazilian/Argentine/Uruguayan/Zimbabwean/Swazi/Tokelauan/Tuvaluan/Pitcairn Islander/ friends! On SO, when I'm scrolling through "questions" some have a yellow background.  Is this intuitive to everyone but me?  What is the yellow background trying to tell me about this particular question? $ac\equiv bc \pmod{\!m}\!\!\iff\!\! a\equiv b \pmod{\!\!\frac{m}{(c,m)}}$ [Euclid's Lemma, congruence form] I came across this theorem:   For all integers a,b,c and m&gt;0, if d = GCD(c,m) then a*c ≡ b*c (mod m) iff a ≡ b (mod m/d).  The =&gt;proof states this:  a*c ≡ b*c (mod m) =&gt; m|(a-b)*c                    =&gt; m/d | (a-b)*c/d                   =&gt; m/d | (a-b)                   =&gt; a ≡ b (mod m/d)   I don't understand how to go from step 2 to step 3. The proof states that this is possible because m/d and c/d are coprime. To me this means GCD(m/d, c/d) = 1 but how does this cancel out the whole term? Were any of the Elves in Tolkien twins? Thinking about the idea of Elves having low numbers overall, got me to wondering: as far as Tolkien's writing, could elves ever have twins?  As a "yes" answer, I need an example of twins (any of JRRT work). They must be full on Elves, not half-Men. As a "no" answer, has to be an explicit statement in his work stating Elves ALWAYS had one child at a time. Anything else is a "maybe, we don't know". Terminal not opening up after upgrading python to 3.7 I have upgraded python to version 3.7 and now my terminal is not opening up.  I followed this post   Commands I ran are as follows,  sudo apt-get install python3.7 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 sudo update-alternatives --config python3   Entered 2 for python3.7  I can't open terminal and run commands.  My ubuntu version is, Ubuntu 18.04.2 LTS I'm in a numerical analysis course right now and it's pretty rigorous but I'm enjoying it a lot. I took a lower level course before that was more oriented towards implementation of numerical methods, so it's not my first time with the material.  Anyway, my professor wrote his own course notes and they're fantastic but I wanted some reference material since I'm currently outlining my own notes. Just wondering what the big ones out there are  edit: I would say I'm at an advanced undergraduate level I have a file with a number of lines in a file filename.  I want to count how many lines start with character 'a', with 'b' and so on in one go.  What command i should execute.? I want to share my computer screen over LAN, without an internet connection. How can I do it?  There is different software like:   LogMeIn Team Viewer etc.    But these require an internet connection. I wonder is it legal to register a domain name that contains a company name. For example cococola.cc (considering that this domain name is available). Can I buy and use any domain names that contain a name of a trademark? How to find "file-release" in OS X El Capitan 10.11.6? I can not find file-release through command line on OS X El Capitan Version 10.11.6. On my virtual machine in Ubuntu I can do "ls /etc/*release" and it shows me two files with all needed information:  $ cat /etc/redhat-release  Red Hat Enterprise Linux Server release 7.0 (Maipo)  $ cat /etc/os-release  NAME="Red Hat Enterprise Linux Server" VERSION="7.0 (Maipo)" ID="rhel" ID_LIKE="fedora" VERSION_ID="7.0" PRETTY_NAME="Red Hat Enterprise Linux Server 7.0 (Maipo)"   No idea how to find the file with release information on Mac. Please give me a hint or a hint how to search it? How to overwrite an excel application without prompting the users How do I properly clean up Excel interop objects? I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:  while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers();   Although this kind of works, the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed.  What am I doing wrong, or is there an alternative to ensure interop objects are properly disposed of? How to SEO a Single-Page website