Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #274067 > unrolled thread
| Started by | Chris Green <cl@isbd.net> |
|---|---|
| First post | 2024-10-26 11:30 +0200 |
| Last post | 2024-10-26 15:10 +0200 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.debian.user
New Debian 12 installation, GUI login doesn't run .profile Chris Green <cl@isbd.net> - 2024-10-26 11:30 +0200
Re: New Debian 12 installation, GUI login doesn't run .profile Michael Kjörling <c9bc136c6063@ewoof.net> - 2024-10-26 11:50 +0200
Re: New Debian 12 installation, GUI login doesn't run .profile Chris Green <cl@isbd.net> - 2024-10-26 13:30 +0200
Re: New Debian 12 installation, GUI login doesn't run .profile Michael Kjörling <c9bc136c6063@ewoof.net> - 2024-10-26 13:40 +0200
Re: New Debian 12 installation, GUI login doesn't run .profile Max Nikulin <manikulin@gmail.com> - 2024-10-26 14:20 +0200
Re: New Debian 12 installation, GUI login doesn't run .profile Chris Green <cl@isbd.net> - 2024-10-26 15:20 +0200
Re: New Debian 12 installation, GUI login doesn't run .profile Greg Wooledge <greg@wooledge.org> - 2024-10-26 15:10 +0200
| From | Chris Green <cl@isbd.net> |
|---|---|
| Date | 2024-10-26 11:30 +0200 |
| Subject | New Debian 12 installation, GUI login doesn't run .profile |
| Message-ID | <JBLhn-4jHf-3@gated-at.bofh.it> |
I have installed Debian 12 on my Lenovo Thinkpad T470. It all went pretty smoothly but for some reason when I do a GUI login my .profile doesn't get run. If I ssh into the laptop then .profile does get run. So what might cause this? -- Chris Green ·
[toc] | [next] | [standalone]
| From | Michael Kjörling <c9bc136c6063@ewoof.net> |
|---|---|
| Date | 2024-10-26 11:50 +0200 |
| Message-ID | <JBLAJ-4jNR-3@gated-at.bofh.it> |
| In reply to | #274067 |
On 26 Oct 2024 10:13 +0100, from cl@isbd.net (Chris Green): > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went > pretty smoothly but for some reason when I do a GUI login my .profile > doesn't get run. Is starting a GUI session (whether X11/Xorg or Wayland) even _supposed_ to execute ~/.profile (or ~/.bash_profile)? My understanding is that it is not. As I understand it, those are meant to be run by a _login shell_. This sets them apart from e.g. ~/.bashrc which is read each time _bash_ is started. And similarly for the corresponding system-wide files in /etc, of course. **What problem are you _actually_ trying to solve?** Presumably executing ~/.profile on GUI session startup isn't your end goal in itself, but merely an attempt at a way to accomplish something else. If you tell us what your end goal is, we might be able to suggest a better way to accomplish that. -- Michael Kjörling 🔗 https://michael.kjorling.se
[toc] | [prev] | [next] | [standalone]
| From | Chris Green <cl@isbd.net> |
|---|---|
| Date | 2024-10-26 13:30 +0200 |
| Message-ID | <JBN9w-4kPd-5@gated-at.bofh.it> |
| In reply to | #274068 |
Michael Kjörling <c9bc136c6063@ewoof.net> wrote: > On 26 Oct 2024 10:13 +0100, from cl@isbd.net (Chris Green): > > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went > > pretty smoothly but for some reason when I do a GUI login my .profile > > doesn't get run. > > Is starting a GUI session (whether X11/Xorg or Wayland) even > _supposed_ to execute ~/.profile (or ~/.bash_profile)? My > understanding is that it is not. > Well on my previous XFCE installation on xubuntu it certainly did run ~/.profile. > As I understand it, those are meant to be run by a _login shell_. This > sets them apart from e.g. ~/.bashrc which is read each time _bash_ is > started. > Yes, and entering one's name and password at GUI start-up **is** logging in. > And similarly for the corresponding system-wide files in /etc, of > course. > > **What problem are you _actually_ trying to solve?** Presumably > executing ~/.profile on GUI session startup isn't your end goal in > itself, but merely an attempt at a way to accomplish something else. > If you tell us what your end goal is, we might be able to suggest a > better way to accomplish that. > Setting things like PATH, it needs to be in .profile rather than .bashrc because otherwise things get added to PATH repeatedly. -- Chris Green ·
[toc] | [prev] | [next] | [standalone]
| From | Michael Kjörling <c9bc136c6063@ewoof.net> |
|---|---|
| Date | 2024-10-26 13:40 +0200 |
| Message-ID | <JBNjb-4kSH-7@gated-at.bofh.it> |
| In reply to | #274070 |
On 26 Oct 2024 12:08 +0100, from cl@isbd.net (Chris Green): >> As I understand it, those are meant to be run by a _login shell_. This >> sets them apart from e.g. ~/.bashrc which is read each time _bash_ is >> started. >> > Yes, and entering one's name and password at GUI start-up **is** > logging in. It is _logging in_, but it's not a _login shell_. In this case the specific difference matters. -- Michael Kjörling 🔗 https://michael.kjorling.se
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2024-10-26 14:20 +0200 |
| Message-ID | <JBNVT-4lml-3@gated-at.bofh.it> |
| In reply to | #274070 |
On 26/10/2024 18:08, Chris Green wrote: > Well on my previous XFCE installation on xubuntu it certainly did run > ~/.profile. LightDM package in Ubuntu contains an additional script that reads ~/.profile (like SDDM in Debian). Some hints: - <https://wiki.debian.org/EnvironmentVariables#Using_graphical_display_manager> - <https://wiki.debian.org/LightDM#User_configuration>
[toc] | [prev] | [next] | [standalone]
| From | Chris Green <cl@isbd.net> |
|---|---|
| Date | 2024-10-26 15:20 +0200 |
| Message-ID | <JBORX-4lVr-3@gated-at.bofh.it> |
| In reply to | #274073 |
Max Nikulin <manikulin@gmail.com> wrote: > On 26/10/2024 18:08, Chris Green wrote: > > Well on my previous XFCE installation on xubuntu it certainly did run > > ~/.profile. > > LightDM package in Ubuntu contains an additional script that reads > ~/.profile (like SDDM in Debian). Some hints: > > - > <https://wiki.debian.org/EnvironmentVariables#Using_graphical_display_manager> > - <https://wiki.debian.org/LightDM#User_configuration> Yes, it does seem that there's some disagreement between distros as to whether a GUI login should run .profile or not. I have just added ~/.xsessionrc which runs .profile, that does what I need. Thanks all. -- Chris Green ·
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2024-10-26 15:10 +0200 |
| Message-ID | <JBOIh-4lSf-1@gated-at.bofh.it> |
| In reply to | #274070 |
On Sat, Oct 26, 2024 at 12:08:31 +0100, Chris Green wrote:
> Michael Kjörling <c9bc136c6063@ewoof.net> wrote:
> > On 26 Oct 2024 10:13 +0100, from cl@isbd.net (Chris Green):
> > > I have installed Debian 12 on my Lenovo Thinkpad T470. It all went
> > > pretty smoothly but for some reason when I do a GUI login my .profile
> > > doesn't get run.
> >
> > Is starting a GUI session (whether X11/Xorg or Wayland) even
> > _supposed_ to execute ~/.profile (or ~/.bash_profile)? My
> > understanding is that it is not.
> >
> Well on my previous XFCE installation on xubuntu it certainly did run
> ~/.profile.
If you want that behavior, the simplest option would be to create
a ~/.xsessionrc file containing:
test -r ~/.profile && . ~/.profile
Make sure there's a space after the "." command.
~/.xsessionrc (not to be confused with ~/.xsession) is a Debian-specific
file that's read by the default Xsession regardless of which display
manager (or startx) was used to login.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web