Go to advanced search

by k den
Tue Dec 29, 2015 1:28 pm
Forum: General discussion
Topic: How to grab last login?
Replies: 5
Views: 2189

Re: How to grab last login?

rpdom@oz:~$ last | sed -n "2p" rpdom pts/1 :0.0 Tue Dec 29 05:53 still logged in This is what I needed; sorry if I didn't clarify earlier. As shown in the above code, I wanted to grab the second line (in other words, previous login) of the 'last' command (not the previous command.) So since I'll on...
by k den
Tue Dec 29, 2015 5:04 am
Forum: General discussion
Topic: How to grab last login?
Replies: 5
Views: 2189

How to grab last login?

Hi,

Upon login to a terminal, I've been trying to get the previous login time and whereabouts to show using last, but I'm stumped. Is there any way that I can grab the second line of the last command and echo it? Thanks.
by k den
Mon Dec 28, 2015 2:56 pm
Forum: General discussion
Topic: ~/.bash_profile runs only thru SSH (not GUI)
Replies: 5
Views: 1874

Re: ~/.bash_profile runs only thru SSH (not GUI)

So I put an echo in ~/.bash_profile, ~/.bashrc, and ~/.profile that tells me which code is running upon startup. I found that through SSH both ~/.bash_profile and ~/.bashrc run. However, when running a non-interactive terminal, only ~/.bashrc runs. Would it work to just call a source of ~/.bash_prof...
by k den
Mon Dec 28, 2015 3:30 am
Forum: General discussion
Topic: ~/.bash_profile runs only thru SSH (not GUI)
Replies: 5
Views: 1874

Re: ~/.bash_profile runs only thru SSH (not GUI)

Alright, I'll be sure to check that out and see if it works. I'll post back with my result. Thanks for the help!
by k den
Sun Dec 27, 2015 11:32 pm
Forum: General discussion
Topic: ~/.bash_profile runs only thru SSH (not GUI)
Replies: 5
Views: 1874

~/.bash_profile runs only thru SSH (not GUI)

Hey guys, I've been trying to run some code automatically at the beginning of every terminal session using the file ~/.bash_profile , but for some reason the code only runs when I access the terminal interactively (in other words, through SSH.) The code goes something like this: echo " " echo "Welco...
by k den
Sun Dec 27, 2015 11:22 pm
Forum: General discussion
Topic: Terminal not opening b/c edit to ~/.bashrc
Replies: 5
Views: 1421

Re: Terminal not opening b/c edit to ~/.bashrc

It works! Thanks so much guys! :D
by k den
Sun Dec 27, 2015 3:27 pm
Forum: General discussion
Topic: Terminal not opening b/c edit to ~/.bashrc
Replies: 5
Views: 1421

Re: Terminal not opening b/c edit to ~/.bashrc

Found it! Thanks so much! :mrgreen: So once I save the file with leafpad (without exit 0) and reboot, the terminal should open, correct?
by k den
Sun Dec 27, 2015 3:16 pm
Forum: General discussion
Topic: Terminal not opening b/c edit to ~/.bashrc
Replies: 5
Views: 1421

Terminal not opening b/c edit to ~/.bashrc

Hey Guys, So I wasn't thinking straight and added an 'exit 0' to the end of my ~/.bashrc :oops: . Now my terminal only opens for a split second before killing itself. Can I edit the ~/.bashrc file without using terminal? I wasn't able to find it in the file manager (since it is a dot file.) Thanks! :D

Go to advanced search