Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Application Discovery Thread [formerly: app that does this?]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 15, 16, 17  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
choco
n00b
n00b


Joined: 10 Jun 2003
Posts: 49
Location: Jackson, MI

PostPosted: Sun Jun 22, 2003 12:10 am    Post subject: Reply with quote

My favorite tip for the "I wish I'd known/done this a long time ago" was actually looking at the gcc manual to decide on what stuff to put in CFLAGS (specifically, what is and is not included in -O options).

http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Optimize-Options.html

Sure beats the heck out of reading endless threads and debates on the topic :)
_________________
Who would win in a fight between Sandman and Clayface?
Back to top
View user's profile Send private message
SmegTheLight
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2002
Posts: 97
Location: 3rd Planet

PostPosted: Sun Jun 22, 2003 1:13 am    Post subject: Reply with quote

My all time favorite was this one:
https://forums.gentoo.org/viewtopic.php?t=14562&highlight=screen+script

Using "screen" and "script" to be able to start an emerge of something remotely, detatch from the terminal, and have the emerge continue.

Allowed me to start large ebuilds on my home machine from work via ssh, and not have to worry about keeping the ssh session open..
Back to top
View user's profile Send private message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Mon Jun 23, 2003 12:34 am    Post subject: Reply with quote

emerge -pl shows changelog entries
emerge -pv shows use flags

[shameless plug]
If you go here you can find out how to make it display the size of the files to d/l, a good way to aproximate compile time.
[/shameless plug]
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
clumsyninja
n00b
n00b


Joined: 27 Jun 2003
Posts: 61
Location: North Texas

PostPosted: Sat Jul 05, 2003 4:36 pm    Post subject: Reply with quote

thanks for the tips, this has to be one of the most useful threads on this site!

my tip: add "listen-on" to your /etc/named.conf to create a private network dns lookup
Code:
listen-on {
                192.168.54.0/24;
                127.0.0.0/8;
        };

_________________
katana root # cat /proc/sys/kernel/osrelease
2.4.20-gentoo-r7
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Thu Aug 28, 2003 2:13 am    Post subject: Reply with quote

spyderous wrote:

I've tried xxdiff too, in an attempt to get a GUI etc-update working, but it's been a little weak so far.


tkdiffb is a good graphical diff and merge tool. It's part of tkcvs (which is also a good cvs frontend).

Insert into /etc/etc-update.conf replacing existing entries:
    diff_command="tkdiffb %file1 %file2"
    merge_command="tkdiffb %orig %new -o %merged"
Back to top
View user's profile Send private message
kybber
Apprentice
Apprentice


Joined: 25 Jun 2002
Posts: 228
Location: Trondheim, Norway

PostPosted: Thu Aug 28, 2003 8:47 am    Post subject: Reply with quote

If you keep having to recompile alsa-driver or some other package that depends on the sources after switching kernel, it can get annoying constantly having to relink /usr/src/linux. I've put the following in my /etc/conf.d/local.start to always have the link pointing to my currently running kernel:
Code:
rm /usr/src/linux
ln -sf /usr/src/linux-$(uname -r) /usr/src/linux
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Thu Aug 28, 2003 8:53 am    Post subject: Reply with quote

my favourte tip was (in my very early stages): "Don't use root (or su) unless you really REALLY need to" and "Never blindly believe that your blind typing is 100% accurate when doing something importaint" ...probably not what you'd want to hear, but those are my fav tips ...well alongside the "Don't rm -Rf / unless you really know what you're doing"
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Thu Aug 28, 2003 11:52 pm    Post subject: Reply with quote

One thing I like to do is to install Gentoo to a VMware virtual machine, change its disk type, do something horrific (dd if=/dev/urandom of=/dev/hda bs=1M skip=50 count=50 -- write 50 MB of random data 50 MB into the disk, or wipe the partition table, or...), and see how various things (filesystem, etc.) react. Then, when I'm done experimenting, I reboot the virtual machine, purging changes to its disk, and do it again. :D

Actually, doing this has allowed me to sharpen my worst-case disaster-recovery skills. Quite handy. ;-)
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
caefer
Apprentice
Apprentice


Joined: 14 Jan 2003
Posts: 170
Location: Hamburg, Germany

PostPosted: Fri Aug 29, 2003 5:59 am    Post subject: Reply with quote

I definitely agree with SmegTheLight!
screen is the most important feature if you want to install from an ssh connection.

shh in, type screen and do your work. if you crash or leave, do not mind, since your started processes run along fine without you. ;-)

/christian
Back to top
View user's profile Send private message
UncleTom
Apprentice
Apprentice


Joined: 20 Aug 2003
Posts: 194
Location: Bern, Switzerland

PostPosted: Fri Aug 29, 2003 7:39 am    Post subject: Reply with quote

Since screen has been mentioned already, I had to search my soul for another one. Here it is:

Use
Code:
cd -
to get back to the directory you were in before your last cd command.
_________________
bug, n: A son of a glitch.
Back to top
View user's profile Send private message
neuronal
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 174
Location: Alicante/Spain

PostPosted: Fri Aug 29, 2003 6:15 pm    Post subject: Reply with quote

One of nicest tricks I've ever seen is the possibility to connect to kernel.org finger daemon and get the latest kernel versions :)

You only need a finger client (emerge netkit-fingerd) and do:

Code:
meteora:~$ finger @kernel.org
[kernel.org]
The latest stable version of the Linux kernel is:           2.4.22
The latest prepatch for the stable Linux kernel tree is:    2.4.23-pre1
The latest snapshot for the stable Linux kernel tree is:    2.4.22-bk4
The latest beta version of the Linux kernel is:             2.6.0-test4
The latest snapshot for the beta Linux kernel tree is:      2.6.0-test4-bk2
The latest 2.2 version of the Linux kernel is:              2.2.25
The latest 2.0 version of the Linux kernel is:              2.0.39
The latest prepatch for the 2.0 Linux kernel tree is:       2.0.40-rc6
The latest -ac patch to the stable Linux kernels is:        2.4.22-ac1
The latest -ac patch to the beta Linux kernels is:          2.6.0-test1-ac3


It's an old trick but it's still cool ;)
I've wrote a post about this in my (spanish) blog. Here it is.

Greetings (and sorry for my bad English :\)
_________________
#!/Enrique/Barbeito/García ...
http://enrique.barbeito.org
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Sat Aug 30, 2003 1:31 am    Post subject: Reply with quote

neuronal wrote:
You only need a finger client (emerge netkit-fingerd) and do:

meteora:~$ finger @kernel.org


Strange, I tried this in Debian and just got:

Code:
$ finger @kernel.org
[kernel.org]


...and nothing more.
Back to top
View user's profile Send private message
funeagle
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2003
Posts: 102
Location: London

PostPosted: Sat Aug 30, 2003 2:16 pm    Post subject: Reply with quote

You wrote:
Quote:

alias su="su -c 'bash -l'"


cd takes you to your ~ direcotry
Quote:

to get this working, I had to add a
export HOME=$(pwd)
to my /etc/profile....


I followed your alias tip which caused this secound problem, it will cause that the home directory will not be set!

I backed up my system from my archive because I didnt know what's wrong with my roots home direcotry :(

btw. a small tip, if you have konqueror open and you want to go to your home directory just type ~ there
Back to top
View user's profile Send private message
neuronal
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 174
Location: Alicante/Spain

PostPosted: Sat Aug 30, 2003 3:41 pm    Post subject: Reply with quote

meowsqueak wrote:
Strange, I tried this in Debian and just got:

Code:
$ finger @kernel.org
[kernel.org]


...and nothing more.


May be the finger daemon was unavailable. Try later because it have to work :)

It doesn't matter what distrobution you use, I make this trick in slackware, debian, suse or gentoo and just worked :)

Try later
Cheers!
_________________
#!/Enrique/Barbeito/García ...
http://enrique.barbeito.org
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Sun Aug 31, 2003 5:56 am    Post subject: Reply with quote

Yes, finger @kernel.org is working now (with no changes to anything by me)... strange.
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1317
Location: UK

PostPosted: Sun Aug 31, 2003 6:45 am    Post subject: Reply with quote

Just Found this out by accident (trying to type a speeckmark ' " ')
In Mozilla Firebird 0.6.1 (and maybe other versions) you can press CTRL-1 to take you to tab one. CTRL-2 to take you to Tab 2, and so on. quite usefull. (the numbers on the top row, the numpad will not work)
also CTRL-Page up and CTRL-Pagedown will switch between tabs.
Back to top
View user's profile Send private message
Stu L Tissimus
Veteran
Veteran


Joined: 08 Jun 2003
Posts: 1339
Location: NJ, 5 minutes from NYC

PostPosted: Wed Sep 03, 2003 3:34 am    Post subject: Reply with quote

Everyone probably knows this one, but it's great for multitasking (and doing stuff while emerging a program).

ALT+F1-6
_________________
old outdated sig
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1317
Location: UK

PostPosted: Wed Sep 03, 2003 4:08 am    Post subject: Reply with quote

Stu L Tissimus wrote:
Everyone probably knows this one, but it's great for multitasking (and doing stuff while emerging a program).

ALT+F1-6

thats from the command line (in the command line you can use the windows keys to move left and right through them too)

when in X it's CTRL-ALT-F1 -6 to take you to main commandline
Back to top
View user's profile Send private message
cselkirk
Apprentice
Apprentice


Joined: 09 Jun 2003
Posts: 199
Location: NL

PostPosted: Mon Sep 08, 2003 4:13 am    Post subject: Reply with quote

In terms of screen tips prehaps this is useful (add to your shell rc):

Code:
if [[ $TERM = screen ]]; then
    alias sX=screen -X "$1" `pwd`/"$2"
    alias SX=screen -X "$@"
fi

You can now quickly open new screen terminals within screen, eg:

Code:
sX vim filename
SX lynx http://www.google.com/en

_________________
cn=cselkirk,dc=xs4all,dc=nl
Back to top
View user's profile Send private message
wrex
n00b
n00b


Joined: 01 May 2003
Posts: 26
Location: San Jose, CA

PostPosted: Mon Sep 08, 2003 7:36 pm    Post subject: two more Reply with quote

My two all-time favorite tips for any Unix and X:

1) Put the following in your .Xdefaults

Code:
XTerm*charClass:        33:48,37:48,45-47:48,64:48
XTerm*cutNewline:       False
XTerm*cutToBeginningOfLine:     False


(you can "xrdb -merge ~/.Xdefaults" or simply restart X to have this take effect)

This makes double-clicking and triple-clicking FAR more useful in xterms.

It expands the definition of a "word" to include characters like "~", ".", and "/" so you can just double-click to select an entire filepath.

With these settings, triple-clicking selects from the current word to the end of the line, but DOESN'T put the trailing newline in the selection buffer. This is usually what you want for pasting. To select the entire line you need to put the cursor in the first word before triple clicking, but frequently you don't *want* to select the noise at the beginning of the line (how many times have you been replaying commands from a typescript or email/document that includes the shell prompt at the beginning of each line?).

As always, middle mouse button pastes (or the chorded equivalent for two button mice in a properly configured system).

2) This is arcane but a neat hack. It's not all *that* useful, but it's still a favorite tip of mine.

When piping the output of "ps" to grep to search for a particular process, you can use a character class to avoid matching the grep process itself.

For example, if I was grepping for the "gimp" process, I could type:

Code:
ps auxww | grep '[g]imp'


Since $0 for the grep process doesn't contain the literal sequence "g", "i", "m", "p", the grep process itself won't match the pattern (the square brackets around a single character don't change the interpretation of the pattern, but they do change the literal string).

Maybe I'm easily amused, but I thought this was a neat hack.
Back to top
View user's profile Send private message
chizu
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2003
Posts: 127

PostPosted: Tue Sep 09, 2003 3:37 am    Post subject: Reply with quote

hook wrote:
...well alongside the "Don't rm -Rf / unless you really know what you're doing"


Hook, I did "sudo rm -rf /*" on my own production server thinking I was chrooted. I refused to give my self sudo or wheel on my own computer's for like 3 weeks.
Back to top
View user's profile Send private message
wrex
n00b
n00b


Joined: 01 May 2003
Posts: 26
Location: San Jose, CA

PostPosted: Tue Sep 09, 2003 4:10 am    Post subject: Reply with quote

chizu wrote:
I did "sudo rm -rf /*" on my own production server ...


Ouch. Hard not to accept blame for that one, chroot or no.

The apocryphal story, though, is of the luser asking: Why is this
Code:
rm -rf .*
taking so long?" :wink:

Closest I've personally come to this is typing too fast and accidentally inserting a space before the asterisk ("rm -rf foo *" instead of "rm -rf foo*").

At least sudo tends to give me pause before hitting return -- give me a root shell and it's hard not to immediately bang on the return key after typing a command.

Which sorta makes this a tip: use sudo (but carefully).

Gives you a log of what was done with root privilege when and by whom (lifesaving on a system with multiple admins), follows the principle of "least privilege" (don't run unnecessary commands as root), and prevents "shared" passwords.
Back to top
View user's profile Send private message
wrex
n00b
n00b


Joined: 01 May 2003
Posts: 26
Location: San Jose, CA

PostPosted: Tue Sep 09, 2003 4:27 am    Post subject: Reply with quote

Master_Of_Disaster wrote:

Code:
alias ll="ls --color -l"



I just remembered another tip: I'm EXTREMELY fond of the "-h" option ("human readable") to gnu fileutils like ls, du, and df. I use the following aliases:

Code:
alias ll="ls --color -l -F -h"
alias du="du -h"
alias df="df -h"


Now instead of

Code:
rex@megrims rex $ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/rootvg/rootlv     4008056    213656   3794400   6% /
/dev/raid0vg/oslv     16776700   4120624  12656076  25% /usr
/dev/raid0vg/varlv     4194172    177548   4016624   5% /var
/dev/raid0vg/optlv     2097084    488052   1609032  24% /opt
/dev/raid0vg/homelv    2097084    719852   1377232  35% /home
/dev/raid0vg/tmplv     1048540     33716   1014824   4% /tmp
/dev/raid0vg/ogglv    12582524    253248  12329276   3% /music
none                    257224         0    257224   0% /dev/shm
/dev/hda1               101089      8305     87565   9% /boot


I get

Code:
rex@megrims rex $ df
Filesystem            Size  Used Avail Use% Mounted on
/dev/rootvg/rootlv    3.9G  209M  3.7G   6% /
/dev/raid0vg/oslv      16G  4.0G   13G  25% /usr
/dev/raid0vg/varlv    4.0G  174M  3.9G   5% /var
/dev/raid0vg/optlv    2.0G  477M  1.6G  24% /opt
/dev/raid0vg/homelv   2.0G  703M  1.4G  35% /home
/dev/raid0vg/tmplv    1.0G   33M  992M   4% /tmp
/dev/raid0vg/ogglv     12G  248M   12G   3% /music
none                  252M     0  252M   0% /dev/shm
/dev/hda1              99M  8.2M   86M   9% /boot


Definitely a must for interactive shell use.


Last edited by wrex on Tue Sep 09, 2003 6:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
arand
Apprentice
Apprentice


Joined: 22 Apr 2003
Posts: 215

PostPosted: Tue Sep 09, 2003 4:37 am    Post subject: Reply with quote

Heres mine, found this one after screwing around this morning with a new gentoo install.

Do not but a space in
Code:
noatime,notail

The kernel will boot fine but this gives an error on mount /proc. The only way to fix it is to have a gentoo livecd or something like it around to fix /etc/fstab[/code]
Back to top
View user's profile Send private message
funeagle
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2003
Posts: 102
Location: London

PostPosted: Tue Sep 23, 2003 9:01 pm    Post subject: Reply with quote

If you are emerging KDE or something that takes a lot of time to compile then it's useful to use a script like bellow. I had my Konqueror not working for a few hours because half of the dependencies were old half new...

Code:

#! /bin/bash


date > /tmp/timeofupdate

emerge sync
emerge -f world
emerge -B world
emerge world

date >> /tmp/timeofupdate
cat /tmp/timeofupdate
rm /tmp/timeofupdate
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page Previous  1, 2, 3, ... 15, 16, 17  Next
Page 2 of 17

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum