I am using Linux. When i opened gedit program in gnome-terminal by gedit command it has opened the graphical gedit text editor. then the gedit has PPID bash
ashokkrishna@ashokkrishna-Lenovo-B560:~$ ps -eaf | grep gedit
ashokkr+ 1682 820 3 04:09 pts/6 00:00:00 gedit
ashokkr+ 1695 1568 0 04:09 pts/9 00:00:00 grep --color=auto gedit
here 820 is the PID of bash
ashokkr+ 820 32505 0 03:32 pts/6 00:00:00 bash
but when i opened same gedit by double clicking the gedit icon.
ashokkrishna@ashokkrishna-Lenovo-B560:~$ ps -eaf | grep gedit
ashokkr+ 1855 1982 14 04:16 ? 00:00:00 /usr/bin/gedit
I got 1982 PPID which is init
1982 ? 00:00:00 init
Now my question is why the parent process is different in both cases?
what is the exact process initiates user processes?