The Perfect BASH Linux Prompt

In my never ending search for the perfect bash Linux prompt, I have found this:

if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01m\][ \[\033[01;31m\]\u@$(hostname -d) \[\033[00m\]\[\033[01m\]] \[\033[01;32m\]\w\[\033[00m\]\[\033[01;31m\]$\[\033[00m\]> '
else
PS1='\[\033[01m\][ \[\033[01;34m\]\u@$(hostname -d) \[\033[00m\]\[\033[01m\]] \[\033[01;32m\]\w\[\033[00m\]\[\033[01;34m\]$\[\033[00m\]> '
fi

I wanted to show my domain name instead of my server’s name.

Add this to the bottom of your /etc/bashrc for all logins or your individual .bashrc for a nicely formatted linux prompt showing your domain (instead of your server’s hostname).

 

Viewing Lorex DVR Camera Output

You can use VLC to view your Lorex cameras.

1. Open VLC
2. Click on Media and select Network Stream
3. Type in: rtsp://admin: password>@<your DVR IP Address>/cam/realmonitor?channel=<camera number>&subtype=0
example: rtsp://admin:128967@192.168.1.75/cam/re … &subtype=0
this will stream camera 1 at IP address 192.168.1.75 in VLC assuming the admin password is 128967
4. Click on Play

(Optional Method)
Open Terminal and type:
vlc rtsp://admin: password>@<your DVR IP Address>/cam/realmonitor?channel=<camera number>&subtype=0 -f