• We did not send an email asking for donations - please read this post.

[Solved] how launch a interactive terminal for an user from .profile

SpongeB0B

New Member
Joined
Feb 11, 2022
Messages
28
Reaction score
7
Credits
258
Hi everyone,

I was looking how to Launch command once at login per user. This is now working thanks to @NorthWest

But I would like to launch for the user a terminal to change his password like this ->

Bash:
xfce4-terminal -e 'passwd'

from a script that is being called from ~/.profile see: Launch command once at login per user.

For the moment I believe it execute the code but in the background... any idea to make it appear (aka interactive ) ?

Thanks
 


N

NorthWest

Guest
The idea which occurred to me on this issue to achieve having the user change their password on each login is to add: /usr/bin/passwd, to the end of the /etc/profile file, and have the computer configured to boot up to a text prompt. If this is done, each login will require the password change a the text prompt, and then the user can start the GUI session if they wish with a command like: startx. None of the users files are amended with this approach. I don't know if this satisfies your needs, but it occurred to me as a relatively straight forward approach to the issue as I understand it. Note that a change such as this will also require root to change passwords too on root logins.
 
N

NorthWest

Guest
Great solution, and one that I wouldn't have come to not being a user of those desktop facilities. Thanks for the journey.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top