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: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Handy tip for starting the Debug Console in Linux

Post by Diziet Sma »

It's probably not a big deal for many of the code-jockeys out there, but might be worth posting for some people, all the same.

If you get irritated by needing to keep a terminal open just to use the Debug Console, try this. Open your favourite text editor and copy/paste the following into it:

Code: Select all

alias oodebug='nohup python ~/GNUstep/Applications/DebugConsole/DebugConsole.py & exit'
Now save it in your home folder as '.bash_aliases' (don't forget the . in front of the name) If your Debug Console is installed to somewhere other than ~/GNUstep/Applications you will need to change the path in the command, of course. (If you already have a .bash-aliases file, you probably don't need to be told to just append this command to the end of the file. :wink: )

Now, when you want to launch the Debug Console, open a terminal, type 'oodebug' and hit enter. The Debug Console will open, and the terminal will close itself without killing off the DC.
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: 1132
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

This is cool. I think it's working, although typing 'oodebug' in the terminal isn't launching the console, I can tell mozo (MATE's fork of alacarte) to run it as a regular application and it opens from the menu without the python terminal (actually, it appears that I can run it as a regular application without the .bash_aliases file in the home folder). What distro and desktop are you using?
"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: 6310
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 »

I'm using Super OS (formerly Super Ubuntu) 10.10 with Gnome. It's basically Ubuntu with all the extras, such as Nvidia/ATI drivers, mp3 support, flash support, and all the other proprietary bits that you normally have to download and configure yourself already installed for you. VLC, Chrome, Skype, WINE and a bunch of codecs are preinstalled as well. The basic intent is to give users the kind of experience that they are used to expecting with Windows, right out of the box.

I'm using 10.10 because I loath Unity, and can't get it to work at all on my current hardware anyway. It runs Oolite and lets me surf the net, so that's all I need. (I have a Vista laptop I can use as well, but the ATI drivers suck for Oolite. Even running the latest modded drivers the stars and nebulae just render as fuzzy squares)

Strange that it's not working properly for you. You are using Bash as your terminal, no? Have you checked .bash_aliases for typos?
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: 1132
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:I'm using Super OS (formerly Super Ubuntu) 10.10 with Gnome. It's basically Ubuntu with all the extras, such as Nvidia/ATI drivers, mp3 support, flash support, and all the other proprietary bits that you normally have to download and configure yourself already installed for you. VLC, Chrome, Skype, WINE and a bunch of codecs are preinstalled as well. The basic intent is to give users the kind of experience that they are used to expecting with Windows, right out of the box.
Sounds a bit like Mint, you can download an ISO with codecs and non-free software or one without. Is that Gnome 2.x you got running?
Diziet Sma wrote:I'm using 10.10 because I loath Unity, and can't get it to work at all on my current hardware anyway. It runs Oolite and lets me surf the net, so that's all I need. (I have a Vista laptop I can use as well, but the ATI drivers suck for Oolite. Even running the latest modded drivers the stars and nebulae just render as fuzzy squares)
I don't like it very much either. I have an extra IDE HD that I put in my old Dell Dimension (a dual core pentium 4) machine and had Ubuntu 12.04 on there which was working and very much usable (with the MATE desktop installed, of course ;)), then I upgraded to 12.10. The OS isn't doing well: the CPU use is through the roof, slugglish performance, and terrible display artifacts (now granted I have an old ATI Rage Ultra Pro with a "whopping" 64 MB, but Mint 13 has no problem with it, and neither did it's "parent" Ubuntu Precise.
Diziet Sma wrote:Strange that it's not working properly for you. You are using Bash as your terminal, no? Have you checked .bash_aliases for typos?
Honestly, I don't know whether I'm using Bash as my terminal or not :shock: :oops: I had to create the .bash_aliases which now looks like:

Code: Select all

alias oodebug='nohup python ~/Gaming/Oolite_Folder/DebugConsole/DebugConsole.py & exit'
.
"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
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Handy tip for starting the Debug Console in Linux

Post by Tricky »

CommRLock78 wrote:
Diziet Sma wrote:Strange that it's not working properly for you. You are using Bash as your terminal, no? Have you checked .bash_aliases for typos?
Honestly, I don't know whether I'm using Bash as my terminal or not :shock: :oops: I had to create the .bash_aliases which now looks like:

Code: Select all

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

Code: Select all

grep -Fi "<yourusernamehere>" /etc/passwd
Last bit of the result will give you a clue to the shell. It's a pity chsh doesn't do it. I'm sure there is a command, just not leaping out at me atm.

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: Handy tip for starting the Debug Console in Linux

Post by cim »

Tricky wrote:Last bit of the result will give you a clue to the shell. It's a pity chsh doesn't do it. I'm sure there is a command, just not leaping out at me atm.
Running ps in a terminal will tend to just list the terminal and ps itself

Code: Select all

$ ps
  PID TTY          TIME CMD
 4119 pts/3    00:00:00 bash
 4326 pts/3    00:00:00 ps

User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Handy tip for starting the Debug Console in Linux

Post by Tricky »

cim wrote:
Tricky wrote:Last bit of the result will give you a clue to the shell. It's a pity chsh doesn't do it. I'm sure there is a command, just not leaping out at me atm.
Running ps in a terminal will tend to just list the terminal and ps itself

Code: Select all

$ ps
  PID TTY          TIME CMD
 4119 pts/3    00:00:00 bash
 4326 pts/3    00:00:00 ps
Doh!!! :oops:

:walks away in shame with head held low and tail between his legs.

User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1132
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Tricky wrote: Doh!!! :oops:

:walks away in shame with head held low and tail between his legs.
Ahhh, no need to do that - we all have frain barts now and then :mrgreen: .
cim wrote:Running ps in a terminal will tend to just list the terminal and ps itself.
Easy-peezy :!: :D . Here's what I got (exactly as yours, save the PIDs and ports of course ;)):

Code: Select all

~ $ ps
  PID TTY          TIME CMD
 7648 pts/0    00:00:00 bash
 7710 pts/0    00:00:00 ps
"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
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: Handy tip for starting the Debug Console in Linux

Post by cim »

Tricky wrote:Doh!!! :oops:
Of course, if I'd thought about it a bit more, I'd have gone for

Code: Select all

echo $SHELL
instead. Easy to forget the obvious...

User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1132
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

cim wrote:
Tricky wrote:Doh!!! :oops:
Of course, if I'd thought about it a bit more, I'd have gone for

Code: Select all

echo $SHELL
instead. Easy to forget the obvious...
They're both pretty easy to remember ;) :)
"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
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Handy tip for starting the Debug Console in Linux

Post by Tricky »

CommRLock78 wrote:
cim wrote:
Tricky wrote:Doh!!! :oops:
Of course, if I'd thought about it a bit more, I'd have gone for

Code: Select all

echo $SHELL
instead. Easy to forget the obvious...
They're both pretty easy to remember ;) :)
Right, that's it! No longer will I talk in public! I will wear a cowl of shame and have my minder walk in front of me ringing a bell annnoucing, "IDIOT APPROACHING!" :roll:

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
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 had to create the .bash_aliases which now looks like:

Code: Select all

alias oodebug='nohup python ~/Gaming/Oolite_Folder/DebugConsole/DebugConsole.py & exit'
.
Well, since we know you're using bash, the above should be working. What exactly happens when you type oodebug and hit enter?

What should happen is that the terminal will close, and a second or so later the debug console will open.
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: 1132
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Handy tip for starting the Debug Console in Linux

Post by CommRLock78 »

Typing oodebug in the terminal returns:

Code: Select all

$ oodebug
No command 'oodebug' found, did you mean:
 Command 'podebug' from package 'translate-toolkit' (main)
oodebug: command not found
"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: 6310
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 »

Hmm.. most strange.

Does your .bashrc file contain some entries like this towards the bottom?

Particularly the conditional "if" clause referring to .bash_aliases in the final 3 lines?

Code: Select all

# 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
As a test, you could also try putting the oodebug alias from .bash_aliases directly in .bashrc
Just paste it in below the various "ls" aliases. It should be pretty much guaranteed to work if added to .bashrc


CommRLock78 wrote:Is that Gnome 2.x you got running?
Sorry.. I missed this before.. yep Gnome 2.3
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: 1132
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.. most strange.

Does your .bashrc file contain some entries like this towards the bottom?

Particularly the conditional "if" clause referring to .bash_aliases in the final 3 lines?

Code: Select all

# 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
As a test, you could also try putting the oodebug alias from .bash_aliases directly in .bashrc
Just paste it in below the various "ls" aliases. It should be pretty much guaranteed to work if added to .bashrc
Yet again, I'm ignorant :roll: - where do I find this file? It isn't in my home folder.. :oops:


Diziet Sma wrote:
CommRLock78 wrote:Is that Gnome 2.x you got running?
Sorry.. I missed this before.. yep Gnome 2.3
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 ;))
"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