Does QubesOs does not source ~/.profile on purpose?

58 views
Skip to first unread message

ma...@lamarciana.com

unread,
Sep 18, 2016, 10:23:36 AM9/18/16
to qubes-users
Hi,

I recently noticed that neither fedora nor debian virtual machines load `~/.profile` file.

In debian this file exists but it is ignored, while in fedora it doesn't exist. In fedora does exist a file `~/.bash_profile`, which usually means that this one will be loaded by bash instead of `~/.profile`. However, renaming the former does not change anything and the later is not loaded anyway.

I doubt that this behavior is inherited from debian and fedora themselves, so I'm asking if this is expected QubesOs behavior.

Thanks for your help.

Connor Page

unread,
Sep 18, 2016, 2:26:37 PM9/18/16
to qubes-users
technically the user "user" is not logged in so the profile files are not sourced. use .bashrc if you want to modify terminal sessions.

ma...@lamarciana.com

unread,
Sep 18, 2016, 3:07:06 PM9/18/16
to qubes-users
> technically the user "user" is not logged in so the profile files are not sourced. use .bashrc if you want to modify terminal sessions.

Ok! Thanks for your answer!

Dave Ewart

unread,
Sep 19, 2016, 4:18:42 AM9/19/16
to qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Sunday, 18.09.2016 at 11:26 -0700, Connor Page wrote:

> technically the user "user" is not logged in so the profile files are
> not sourced. use .bashrc if you want to modify terminal sessions.

If you want something common to all your terminals, regardless of VM,
you can add a file to /etc/profile.d which includes all your common
content (e.g. aliases)

I use

/etc/profile.d/mystuff.sh

alias h=history ...

[I suppose that, by modifying the template in this manner, you might be
making your system more unique and therefore more identifiable if
there's a compromise. Not an issue for me, but may be a concern for
some.]

Dave.

- --
Dave Ewart da...@sungate.co.uk, http://twitter.com/DaveEwart
All email from me is digitally signed, http://www.sungate.co.uk/
GPG key updated Jan 2013 see http://www.sungate.co.uk/gpg
Fingerprint: CF3A 93EF 01E6 16C5 AE7A 1D27 45E1 E473 378B B197
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQQcBAEBCgAGBQJX359fAAoJEEXh5HM3i7GX5zUf/011o9WGYzxRgw6xX+hf26ds
r10DXjR2yGk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fffGfSN/KM
oybkKH5FoPNk8kOYqVXevgMjPNUbckGFeRNQi9FCn9xBDDlKt8RWylSJD50Kr531
g+V/m0Zce/6Ums2hg7JQ05JuMcevi//NsFeAn5S2kYJWumtYHLQngVHRDRBcCSC8
qV94+UgzidWG94QANrwaZpCWadZQHlidOOooCqZOhC83Q6uKSiDEMfv94eIw+R47
kTCbzvcSlTuLNQj1bflrbWI93auhSIea7iTk/uAW40z61yUJTomOw7/W/eHgg6E=
=N1ZM
-----END PGP SIGNATURE-----

ma...@lamarciana.com

unread,
Sep 19, 2016, 9:54:15 AM9/19/16
to qubes-users
El lunes, 19 de septiembre de 2016, 10:18:42 (UTC+2), Dave Ewart escribió:

> If you want something common to all your terminals, regardless of VM,
> you can add a file to /etc/profile.d which includes all your common
> content (e.g. aliases)
>
> I use
>
> /etc/profile.d/mystuff.sh
>
> alias h=history ...

Thanks Dave. For me is ok to add what I need in `~/.bashrc`, I was asking just out of curiosity. Anyway, I think not loading home profile files breaks with the principle of least surprise, but surely supporting it would add some ugly hacks in qubes source code.

By the way, can I read somewhere an extension about how `user` user login technically happens (or, better said, not happens)?

Thanks

Connor Page

unread,
Sep 20, 2016, 10:00:40 AM9/20/16
to qubes-users
the source code of qvm-run is your best documentation of how applications are run without logging in :)
here is the session that is started in vms. I like the hangman :)
https://github.com/QubesOS/qubes-gui-agent-linux/blob/master/appvm-scripts/usrbin/qubes-session

ma...@lamarciana.com

unread,
Sep 20, 2016, 10:37:40 AM9/20/16
to qubes-users
> the source code of qvm-run is your best documentation of how applications are run without logging in :)
> here is the session that is started in vms. I like the hangman :)
> https://github.com/QubesOS/qubes-gui-agent-linux/blob/master/appvm-scripts/usrbin/qubes-session

Thanks for the link, Connor! Yes, a lot of effort has been put in that hangman :D

Looking at it and seeing how beautifully simply it is kept, wouldn't it make sense to load from there `/etc/profile` file? (I think usually this file is the main responsible of triggering cascade loading of profile files, but correct me if I am wrong)

Thanks

Reply all
Reply to author
Forward
0 new messages