Handy tip for starting the Debug Console in Linux

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: another_commander, winston, Getafix

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

CommRLock78 wrote:
Yet again, I'm ignorant :roll: - where do I find this file? It isn't in my home folder.. :oops:
Hmm.. hopefully that means you can't see the .bash_aliases file you made, either.. any filename that begins with a dot(.) in Linux is a hidden file. If you CAN see your .bash_aliases file, it wasn't saved correctly, which may also be the cause of the failure.

Open your file manager, called Caja on MATE, I believe, although it's based on, and sometimes called Nautilus. Click on the "View" menu and you should see an option named "Show Hidden Files" or something like that. Once you've clicked on that, you'll see a whole bunch of files and folders that you had no idea were even there. This is where all the settings and configuration files for your user account are stored.

Amongst the various newly-revealed files, you should see .bashrc and .bash_aliases.


CommRLock78 wrote:
Right on - I'm thinking when you're ready for an OS upgrade, you should consider MATE. I've been using exclusively since May, and I'm lovin' it ! (I wasn't happy with any of the desktops I'd used until MATE, though I think the "fallback" session in Ubuntu I think is what turned me on to what Gnome used to be as I only became a penguin last February with Ubuntu Oneric, which, of course came with Unity - though I used Gnome shell mostly in those first few months of Linux ;))
Thanks! I'll keep it in mind! 8)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Diziet Sma wrote:
Hmm.. hopefully that means you can't see the .bash_aliases file you made, either.. any filename that begins with a dot(.) in Linux is a hidden file. If you CAN see your .bash_aliases file, it wasn't saved correctly, which may also be the cause of the failure.

Open your file manager, called Caja on MATE, I believe, although it's based on, and sometimes called Nautilus. Click on the "View" menu and you should see an option named "Show Hidden Files" or something like that. Once you've clicked on that, you'll see a whole bunch of files and folders that you had no idea were even there. This is where all the settings and configuration files for your user account are stored.

Amongst the various newly-revealed files, you should see .bashrc and .bash_aliases.
I figured out that hidden files begin with in a dot in linux the first day I installed Ubuntu 11.10 8) - I like knowing what is on my computer ;). This being said I did in fact save the .bash_aliases with a dot, but there is no .bashrc file in my home folder, though I don't know if it might be located somewhere else...

Edit: You're correct that the new file browser in MATE is called caja - I like it a lot - it's waayyy better than nautilus :mrgreen:

Edit: By the way - is it supposed to be .bash_aliases or .bash-aliases ? (I have tried both permutations, the only other thing I can think of is logging out and back in again)
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

Definitely .bash_aliases

Code: Select all

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi
Strange that you don't have a .bashrc though.. this calls for some investigation.

What results do you get if you enter 'locate bashrc' (no dot) into a terminal?

For instance, my terminal returns:

Code: Select all

$ locate bashrc
/etc/bash.bashrc
/etc/skel/.bashrc
/home/dizzy/.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
Also, enter just the word 'alias' into a terminal.. it should respond with a list of all the aliases that bash currently recognises.

Again, when I do this, I get:

Code: Select all

$ alias
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
alias oodebug='nohup python ~/GNUstep/Applications/DebugConsole/DebugConsole.py & exit'
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

The plot thickens (although note that there is no .bashrc in the home directory - perhaps the culprit?).

Code: Select all

$ locate bashrc
/etc/bash.bashrc
/opt/QtSDK/Madde/sysroots/harmattan_sysroot_10.2011.34-1_slim/usr/share/base-files/dot.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc

Code: Select all

$ alias
alias grep='grep --colour=auto'
alias ls='ls --color=auto'

Code: Select all

$ locate bash_aliases
/home/robert/GNUstep/.bash_aliases
I have no idea why it is saying the file is in ~/GNUstep, since it is in the home folder (although while testing I had moved it to that folder)
Edit to add additional code:

Code: Select all

$ sudo find ~ -name '.bash_aliases'
/home/robert/.bash_aliases
and

Code: Select all

$ sudo find / -name '.bashrc'
returns nothing
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

CommRLock78 wrote:
The plot thickens (although note that there is no .bashrc in the home directory - perhaps the culprit?).
Yep, absolutely that's the culprit.. but what is even weirder is that you don't have a .bashrc in /etc/skel/ :shock:

/etc/skel/.bashrc is what the OS uses to create a .bashrc file when a user is added to the system. Without it, every user you create will be missing their .bashrc file.

I think it's gonna be a case of creating those files from scratch. Here's what I suggest you do. Copy/paste the code I'm posting below into a new file and save it as .bashrc in your home folder. Then, using a root-mode file manager (should be in your System Tools menu) copy the .bashrc you previously made into /etc/skel/

Permissions for both .bashrc files should be owner: Read and Write, Group & Others: Read-Only, and not executable.

Once you've done all the above, your .bash_aliases should work, and you'll have a few more useful aliases defined as well.


Now, here is my .bashrc file, which you should copy/paste to create your own. (I've commented out the 'fortune' lines I've added to my own copy)

Code: Select all

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

# uncomment the next 2 lines to enable auto-fortune when launching a terminal
#fortune
#echo
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Diziet Sma wrote:
Yep, absolutely.. but what is even weirder is that you don't have a .bashrc in /etc/skel/ :shock:

/etc/skel/.bashrc is what the OS uses to create a .bashrc file when a user is added to the system. Without it, every user you create will be missing their .bashrc file.

I think it's gonna be a case of creating those files from scratch. Here's what I suggest you do. Copy/paste the code I'm posting below into a new file and save it as .bashrc in your home folder. Then, using a root-mode file manager (should be in your System Tools menu) copy the .bashrc you previously made into /etc/skel/
I think Mint does some slightly different things with user management, for example, in Ubuntu, a user can be Guest, Standard, or Administrator, whereas in Mint there are custom user definitions, I wonder if this has anything to do with this. I think I'm going to post a question about the missing /etc/skel/.bashrc on the Mint forums, but that'll have to wait until tomorrow - I'm off to bed :D.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

Ok.. in that case, you may want to not bother with the /etc/skel/.bashrc file, but might want to still make one for your own use.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Diziet Sma wrote:
Ok.. in that case, you may want to not bother with the /etc/skel/.bashrc file, but might want to still make one for your own use.
Exactly. By default, there is no .bashrc file in /etc/skel/ in Mint. I just got this nice reply from one of the Moderators on the Mint forums (click to view the thread):
Vincent Vermeulen wrote:
There is no default .bashrc. So you won't find a .bashrc in /etc/skel (where the default preferences files are kept, to be copied to a new user's home folder when you create said user). You can create a .bashrc in your home folder, and as you can see in your .profile file it will be loaded from there upon login. If you make changes to the .bashrc file or the .bash_aliases, you will have to load those files manually (with the dot command, so ". .bashrc") to load them in your terminal session or just logout and login.

If you want to create the .bashrc, put the following in it at least:

Code: Select all

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
You can of course also put the alias commands directly in your .bashrc file, as the above does nothing else but load the .bash_aliases file and continue loading bash settings from there (not limited to aliases). Perhaps also this post will help: http://stefaanlippens.net/bashrc_and_others. Sheds some lights on what file does what.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

CommRLock78 wrote:
Diziet Sma wrote:
Ok.. in that case, you may want to not bother with the /etc/skel/.bashrc file, but might want to still make one for your own use.
Exactly. By default, there is no .bashrc file in /etc/skel/ in Mint. I just got this nice reply from one of the Moderators on the Mint forums
<snip of quote>
Yes, I saw it at the forum.. :wink:

Yup, thanks to your suggestion, I downloaded Mint, tried it, liked it, installed it this morning. Now all I have to do is re-install Oolite and copy all my files from my old /home directory back again. (especially including my .bashrc and .bash_aliases!) I must admit I don't understand why Mint doesn't set up a default .bashrc for users.. very strange.

I have to admit to being very happy that Mint 13 is a LTS release. I like the idea of support until 2017. :D
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Diziet Sma wrote:
Yup, thanks to your suggestion, I downloaded Mint, tried it, liked it, installed it this morning. Now all I have to do is re-install Oolite and copy all my files from my old /home directory back again. (especially including my .bashrc and .bash_aliases!) I must admit I don't understand why Mint doesn't set up a default .bashrc for users.. very strange.

I have to admit to being very happy that Mint 13 is a LTS release. I like the idea of support until 2017. :D
Sweet - welcome to Mint - you're going to love it, it's so snappy and refined :mrgreen: ! (I'm a fan of the fact that it's LTS, too - I don't have to worry about messing with an OS install for a few years, unless of course it's in a VM ;))
I haven't made the .bashrc file yet, but I'm going to do that shortly here - that was an interesting blog about bash that Vincent linked to.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

To be honest, I always thought the name was.. umm.. a little strange..

Having tried it, I think Mint is quite an apt name.. it's got a very clean, fresh feel about it. :D


Since you're obviously the kind of guy who likes to get under the hood and tinker, you'd probably get a kick out of Linux From Scratch. If you're interested in learning how an Operating System works, from the ground up, it's hard to beat. It walks you through building an entire OS from source-code, one step at a time. Firstly you compile all the tools you'll need, then you compile each and every program that's required, one by one. You set up the directory tree and write every script and configuration file by hand. You'll get to make decisions about what kind of package-management system you want to use, too. At the end of the project, you'll have your very own lightning-fast command-line only, foundational-base Linux computer, suitable for use as a server (with additional packages added), and you will have in-depth knowledge and understanding of what makes Linux tick. If you decide to go on to phase 2 (Beyond Linux From Scratch), you can then build the X Window System and a GUI, followed by any other software you wish to install.

The whole thing can be done in a VM, if you like, and is lots of fun. It's a very flexible kind of project, because you can devote as much or as little time to it as you want. Even a spare 10 minutes here and there can be used to compile one or two programs, or write a new config file. I've done phase 1 a couple of times now, and think I might try going all the way on the next one.

It has practical real-world applications too.. one of the best standalone firewall/router distros available, IPCop, is built using LFS.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Diziet Sma wrote:
To be honest, I always thought the name was.. umm.. a little strange..

Having tried it, I think Mint is quite an apt name.. it's got a very clean, fresh feel about it. :D
Exactly :D - clean, crisp, and refined !

Diziet Sma wrote:
Since you're obviously the kind of guy who likes to get under the hood and tinker, you'd probably get a kick out of Linux From Scratch.
Quite a keen observation, man :mrgreen: . I still have a lot to learn in Linux, but I've come a long ways since February, and I certainly don't mind getting my hands dirty :D.
Diziet Sma wrote:
If you're interested in learning how an Operating System works, from the ground up, it's hard to beat. It walks you through building an entire OS from source-code, one step at a time. Firstly you compile all the tools you'll need, then you compile each and every program that's required, one by one. You set up the directory tree and write every script and configuration file by hand. You'll get to make decisions about what kind of package-management system you want to use, too. At the end of the project, you'll have your very own lightning-fast command-line only, foundational-base Linux computer, suitable for use as a server (with additional packages added), and you will have in-depth knowledge and understanding of what makes Linux tick. If you decide to go on to phase 2 (Beyond Linux From Scratch), you can then build the X Window System and a GUI, followed by any other software you wish to install.

The whole thing can be done in a VM, if you like, and is lots of fun. It's a very flexible kind of project, because you can devote as much or as little time to it as you want. Even a spare 10 minutes here and there can be used to compile one or two programs, or write a new config file. I've done phase 1 a couple of times now, and think I might try going all the way on the next one.

It has practical real-world applications too.. one of the best standalone firewall/router distros available, IPCop, is built using LFS.
Honestly, although I want to learn more programming (staring with C), I think what really interests me at the end of the day in the software/programming realm is operating systems :D. LFS seems a lot like Arch, only you compile everything from scratch. I'm definitely going to try this out - I guess it's time to figure out why the VM's aren't connecting in Mint (that's the biggest problem I've had with Mint, but I think it's more to do with the settings from the Virtualbox in the repositories).

Now, back to topic: I finally was able to sit down and make that .bashrc file, logged out and back in again and - it works! Perfectly, I might add ;). I'm going to have another look at your .bashrc file and see what you've done :mrgreen:. Thanks for the tip Dizzy, sorry about all my ignorance about bash :lol:, but now I have a start on understanding it :D
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

CommRLock78 wrote:
I guess it's time to figure out why the VM's aren't connecting in Mint (that's the biggest problem I've had with Mint, but I think it's more to do with the settings from the Virtualbox in the repositories).
Hint.. dump the repositories version and get the current release version (4.2.4 ATM) from virtualbox.org. You want the one for Pangolin, although I'm sure you know that already. :wink: Be sure to get the matching Extension Pack for it too. (once VB is installed, you just have to open the EP to add it to VB, VB knows what to do with it)
CommRLock78 wrote:
Now, back to topic: I finally was able to sit down and make that .bashrc file, logged out and back in again and - it works! Perfectly, I might add ;). I'm going to have another look at your .bashrc file and see what you've done :mrgreen:. Thanks for the tip Dizzy, sorry about all my ignorance about bash :lol:, but now I have a start on understanding it :D
Hey, I'm very glad it all works as advertised.. :D And the .bashrc as posted above is stock-standard (as of 10.10 anyway, although if memory serves it hasn't changed any in years), apart from those lines at the end to display a fortune on launching.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Diziet Sma wrote:
Hint.. dump the repositories version and get the current release version (4.2.4 ATM) from virtualbox.org. You want the one for Pangolin, although I'm sure you know that already. :wink: Be sure to get the matching Extension Pack for it too. (once VB is installed, you just have to open the EP to add it to VB, VB knows what to do with it)
Hmmmm.... I never thought about doing that - I'll be doing that shortly here :D.
Diziet Sma wrote:
CommRLock78 wrote:
Now, back to topic: I finally was able to sit down and make that .bashrc file, logged out and back in again and - it works! Perfectly, I might add ;). I'm going to have another look at your .bashrc file and see what you've done :mrgreen:. Thanks for the tip Dizzy, sorry about all my ignorance about bash :lol:, but now I have a start on understanding it :D
Hey, I'm very glad it all works as advertised.. :D And the .bashrc as posted above is stock-standard (as of 10.10 anyway, although if memory serves it hasn't changed any in years), apart from those lines at the end to display a fortune on launching.
Definitely works as advertised ;). I still haven't had a thorough look at your .bashrc, but that too I'll be doing here shortly (it's Friday - yay! - I've been doing Laplace Transforms all week :shock: , among other things).
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Okay, I've extended my .bashrc as well as my .bash_aliases:

.bashrc file.

Code: Select all

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
.bash_aliases file (note that I moved some of the aliases to this file):

Code: Select all

alias oodebug='nohup python ~/Gaming/Oolite_Folder/DebugConsole/DebugConsole.py & exit'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
Post Reply