Skip to content

Why is /etc/profile.d only used at SSH login?

The use of /etc/profile.d is confusing to me. I can put a file in there for example with contents and when I logon the the machine using SSH MYVAR has a value. This machine is a Ubuntu desktop, when I logon using ordinary login and start a terminal MYVAR has no value. I don’t understand why this should …

Get disk type in QT

I want to get disk type (SSD or HDD) in QT. I’ve checked QStorageInfo but I could not find anything useful for my purpose. By the way I need a solution that’s work on both Windows and Linux. Answer For linux, you can tell whether the kernel has detected a SSD disk by reading special file For insta…

Modify config files with sed in bash

I am trying to set net.ipv4.ip_forward to 1 in /etc/sysctl.conf.The following works fine but it sure missing some edge cases For e.g if the sysctl.conf contain any one of the following it won’t match #net.ipv4.ip_forward=1 ##net.ipv4.ip_forward=1. Is there a more reliable way to modify settings in confi…

Helpp for install cstore_fdw

I’m actually trying to install sctore_fdw but I just have a little question for the installation. I follow a tutorial and it is asking to do this : you need to include the pg_config directory path in your make command This is my pg_config path: I have some difficulty with Linux and specifically with the…