LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 04-10-2020, 09:23 AM   #1
drawa54
LQ Newbie
 
Registered: Jul 2010
Posts: 4

Rep: Reputation: 1
how can I fix my .profile file when I login


I cannot login.

The last thing I did was to add a line of code to my .profile file.

On booting up I get the following message when I try to login, "Your session only lasted less than 10 seconds....Try logging in with one of the failsafe sessions to see if you can fix this problem."
I tried this and:

dpkg - Repair packages - none broken
grub - updated bootloader successfully
Then pressed resume but got very dark grey screen...waited for 5 minutes then forced shutdown.
On booting again the same problem. Not able to login.

The issue is with a laptop which is not the one I'm using now.
The laptop I'm asking help for is running Linux Mint 18.x The HD has about 100 GB of free space. There is no other OS installed. All packages are up to date.
 
Old 04-10-2020, 09:29 AM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
So you were able to login prior to adding something to your .profile? Can you login as root and remove the offending line then change file ownership back to your user and login? Not sure if Mint has root login: been years since I used it. Worse case, boot to a live CD/USB and mount your /home then edit the file that way.
 
1 members found this post helpful.
Old 04-10-2020, 09:43 AM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,176

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
If you are using something without a password for root, you can reboot and try the recovery boot option in grub to start a single user session as root. Once you change the file, make sure to set the owner back to yourself since it will get changed to root after you save the edit.

If there is no recovery option, you will need to edit grub to boot single user mode.
 
1 members found this post helpful.
Old 04-11-2020, 04:07 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by drawa54 View Post
The last thing I did was to add a line of code to my .profile file.

On booting up I get the following message when I try to login, "Your session only lasted less than 10 seconds....Try logging in with one of the failsafe sessions to see if you can fix this problem."
It's all very clear to me:
- login with a failsafe session
- fix your ~/.profile
 
1 members found this post helpful.
Old 04-11-2020, 09:56 PM   #5
drawa54
LQ Newbie
 
Registered: Jul 2010
Posts: 4

Original Poster
Rep: Reputation: 1
Thumbs up Solved

sevendogsbsd - Thank you. I tried your suggestion of using live USB first and it worked for me. I was able to delete the line of code in the .profile file. (I had added a path to my python ENV with an error.) Than you again.

And thanks to utech and ondoho for your replies.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ok to copy and rename Chromium profile folder to use as Chrome profile? linustalman Linux - Software 4 01-10-2017 08:54 AM
[SOLVED] How to import Thunderbird Profile backup containng mail archive with Profile Manager? Beukel Linux - Newbie 2 02-16-2014 03:01 AM
Where can I read about the difference between "..profile" and ".profile"? zorrokan Linux - Newbie 4 09-05-2007 01:26 AM
system profile vs user profile bonito SUSE / openSUSE 3 06-28-2006 01:02 PM
non roaming profile on a roaming profile system fieldyweb Linux - Newbie 1 10-03-2005 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 07:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration