Bash tips and tricks

All things Linux related

Re: Bash tips and tricks

Postby widget on Sat Jan 16, 2010 12:56 pm

Where the hell is the file that holds the hot keys for the terminal?

I can't get anything I want done through gconf-editor in this case, for that matter I have not found it real helpful for much of anything except getting icons off the desktop for things already in the menus.

It is just a lot easier to use nautilus and get the damned file and screw it up my self.
Dell 480 XPS 3G ram Quad Core 2.40GHz 3x320G HDD, 320G External, Hardy. Intrepid-64, Mandriva2009 KDE, Mandriva2009-gnome, Debian (Lenny)-64, Stoner Edition1.0-32+64 and Sidux2009, Jaunty-32+64. The external carries Mandriva2009-Kde + Gnome,Kubuntu-LTS-32+64,Xubuntu-LTS-32+64,Ubuntu-LTS-32+64,Ubuntu 8.10-32+64 to loan to people. Is this FUN or what?
User avatar
widget
Site Admin
 
Posts: 1315
Joined: Thu Apr 16, 2009 11:21 am
Location: S.E. Montana

Re: Bash tips and tricks

Postby Cell on Sat Jan 16, 2010 1:59 pm

*I think...

In ect search for terminal,and its in the emulator script...could be wrong tho.
User avatar
Cell
Site Admin
 
Posts: 854
Joined: Sat Apr 04, 2009 4:13 pm

Re: Bash tips and tricks

Postby paracelsus on Sat Jan 16, 2010 7:14 pm

For xfce-terminal the configuration file is ~/.config/Terminal/terminalrc

I don't use gnome-terminal or metacity but I think gterm's rc might be kicking around the .config directory in home.
Why are some people terrified of "black helicopters" and don't even notice that they are being monitored almost constantly by the whole network of obvious surveilance cameras, credit cards, ATMs, EZpass, company ID/access cards, magazine subscriptions, SSNs, taxes, fees, video rentals, Internet firewall recording, 'cookies', ... ?
User avatar
paracelsus
Site Admin
 
Posts: 463
Joined: Mon Aug 10, 2009 5:56 pm

Re: Bash tips and tricks

Postby widget on Sun Jan 17, 2010 9:49 am

I know the damned thing is supposed to be in there somewhere but I can't find it.

There is no file like yours in xfce for gnome.
Dell 480 XPS 3G ram Quad Core 2.40GHz 3x320G HDD, 320G External, Hardy. Intrepid-64, Mandriva2009 KDE, Mandriva2009-gnome, Debian (Lenny)-64, Stoner Edition1.0-32+64 and Sidux2009, Jaunty-32+64. The external carries Mandriva2009-Kde + Gnome,Kubuntu-LTS-32+64,Xubuntu-LTS-32+64,Ubuntu-LTS-32+64,Ubuntu 8.10-32+64 to loan to people. Is this FUN or what?
User avatar
widget
Site Admin
 
Posts: 1315
Joined: Thu Apr 16, 2009 11:21 am
Location: S.E. Montana

Re: Bash tips and tricks

Postby paracelsus on Sat Feb 13, 2010 11:57 pm

Well I've given up on the hotkey in terminal thing. I have no doubt it can be done but fucked if I can figure it out.

Best I can come up with is write a script to do it, give it a really short name, and dump it in /usr/bin . Not a true hotkey but it's as close as I can get.

Moving on

Test Day
The most basic and important concept in any programing language is the test. Learning about the test program is essential to getting anywhere with bash.

A simple example of what you can do with test
Code: Select all
#!/bin/bash
if test $USER != root
    then
    printf "Must be run as root \n"
    exit 1
fi
printf "\n Got root! \n\n"


Let's take a closer look at the if
if test $USER != root

test is comparing the value of $USER to the string root. != means the if will be true if the comparison is false. Variables are called with a $ and $USER is a global variable that denotes the user running the script.

So if the user is not root then it will print "Must be root" and exit.
Otherwise the script will print "Got root!" and exit normally.
Oh and \n prints a newline

That is just a tiny taste of what test can do and how to use it. To really learn about test check out this guide.
http://tldp.org/LDP/Bash-Beginners-Guid ... 07_01.html
Why are some people terrified of "black helicopters" and don't even notice that they are being monitored almost constantly by the whole network of obvious surveilance cameras, credit cards, ATMs, EZpass, company ID/access cards, magazine subscriptions, SSNs, taxes, fees, video rentals, Internet firewall recording, 'cookies', ... ?
User avatar
paracelsus
Site Admin
 
Posts: 463
Joined: Mon Aug 10, 2009 5:56 pm

Re: Bash tips and tricks

Postby widget on Sun Feb 14, 2010 10:04 am

I am trying to read that link in the evenings on the stable install. Haven't ever gotten the the bookmark on here in weird OS land until now, just too busy.

Thanks, you just gave me something to do on bad days (days when nothing breaks is a bad day). Have a lot of that in this test cycle. We just wait for the last problem to be fixed. Hell we can, most of us anyway, actually boot in and use the bugger.

The plymouth problem seems to be getting some folks real well though. Everything, including the HDD, stops dead. I am not having that much FUN. Doesn't bother me, I like being up and running.
Dell 480 XPS 3G ram Quad Core 2.40GHz 3x320G HDD, 320G External, Hardy. Intrepid-64, Mandriva2009 KDE, Mandriva2009-gnome, Debian (Lenny)-64, Stoner Edition1.0-32+64 and Sidux2009, Jaunty-32+64. The external carries Mandriva2009-Kde + Gnome,Kubuntu-LTS-32+64,Xubuntu-LTS-32+64,Ubuntu-LTS-32+64,Ubuntu 8.10-32+64 to loan to people. Is this FUN or what?
User avatar
widget
Site Admin
 
Posts: 1315
Joined: Thu Apr 16, 2009 11:21 am
Location: S.E. Montana

Re: Bash tips and tricks

Postby widget on Sun Feb 14, 2010 2:31 pm

I decided to start that Bash guide over and have been reading the intro. I do not know what version you are using but the latest from the GNU site is 4.1.

An easy way to get that is from the lucid repo (I just checked the version that I have).
Dell 480 XPS 3G ram Quad Core 2.40GHz 3x320G HDD, 320G External, Hardy. Intrepid-64, Mandriva2009 KDE, Mandriva2009-gnome, Debian (Lenny)-64, Stoner Edition1.0-32+64 and Sidux2009, Jaunty-32+64. The external carries Mandriva2009-Kde + Gnome,Kubuntu-LTS-32+64,Xubuntu-LTS-32+64,Ubuntu-LTS-32+64,Ubuntu 8.10-32+64 to loan to people. Is this FUN or what?
User avatar
widget
Site Admin
 
Posts: 1315
Joined: Thu Apr 16, 2009 11:21 am
Location: S.E. Montana

Previous

Return to Linux Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron