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 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
TwoSlick
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2002
Posts: 114
Location: Rolla, MO

PostPosted: Thu Jun 12, 2003 12:46 am    Post subject: Your all time favorite tips Reply with quote

I think it would be good for us to mention some of our all time favorite tips or useful programs. Mention tips, programs, or links to tips that made you say WOW, I wish I had known about this years ago!

Two things I recently learned (after using linux for five years):

1. Konqueror allows you to browse a remote system's files as if they were local. Just type in the url as -> fish://username@server/path
It uses ssh to connect, and will ask for your password. (I LOVE this feature)

2. Similiar to #1, you can use shfs (secure shell filesystem) to mount a remote directory just like you can with NFS. This program also uses ssh to tunnel the connection, and will allow you to browse the remote filesystem as if it were on your own. I like this because I can effectively get NFS capability, but without all of the hassle, and with more security!

Let me know what tips are your favorite. With so many great features Linux offers, it can be easy to miss some real gems here and there.

- TwoSlick
Back to top
View user's profile Send private message
carambola5
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 214
Location: Madtown, WI

PostPosted: Thu Jun 12, 2003 1:02 am    Post subject: Reply with quote

If you have an ISP that blocks port 80, you have a couple of options:

The most obvious is to have your webserver listen on port 88 (or other non-blocked port) and tell people to append a ":88" to your IP/DNS entry.

The more clever way about this is to use SSL. Instead of a cryptic ":88", you can use "https". It takes a bit of setting up to do, but on the plus side, all of your transactions (read: blog logins, imap-web connections, etc) will be secure, assuming you know your hash to verify the certificate. Other non-technical friends of yours will blindly accept the certificate.


PS: I use the word "cryptic" in terms of most of my friends who happen to be fairly non-computer friendly. In their heads, the fewer numbers, the better.
_________________
Get Firefox!

Proper Web Development

I'm done at 999.
Back to top
View user's profile Send private message
garo
Moderator
Moderator


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Thu Jun 12, 2003 6:38 am    Post subject: Reply with quote

Quote:
If you have an ISP that blocks port 80, you have a couple of options:

a other option is to run the webserver on port 8888,
register a cjb.net adress and direct the cjb.net to http://your_ip:8888,
if you have a dynamic ip you can write a script that searches your ip and updates your cjb.net,
put that script in your /etc/conf.d/local.start
_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
dylix
Apprentice
Apprentice


Joined: 20 Sep 2002
Posts: 261
Location: Atlanta

PostPosted: Sun Jun 15, 2003 1:34 pm    Post subject: Reply with quote

Just incase anyone is looking for a script to do this, I have these two setup. I made these one time because my dyndns.org once got suspended due to some bug in ddclient, but anywho. i made this fail safe method. has been working ever since w/o a problem.

Code:

CheckIP
#!/usr/bin/perl
@res = `lynx -dump http://checkip.dyndns.org`;
foreach $res (@res) {
    if ($res =~ /Current IP Address: (.*)$/) { $up = ; last } else { next }
}
print "$up\n";

UpdateIP
#!/bin/bash
ip=`/home/dylix/scripts/check-ip`;
if [ "$ip" = "`cat /etc/ip.cache`" ]; then
   exit 0
else
   echo "$ip" > /etc/ip.cache
   /usr/bin/ddclient -daemon=0
fi

_________________

Rape is such a strong word, I prefer surprise sex.
http://plutonic.mine.nu/
Back to top
View user's profile Send private message
scap1784
Apprentice
Apprentice


Joined: 25 Dec 2002
Posts: 225

PostPosted: Wed Jun 18, 2003 10:02 am    Post subject: Reply with quote

just tried to emerge that shfs and this is what i got

Code:

root@scaparra scap # emerge  shfs
Calculating dependencies ...done!
>>> emerge (1 of 1) net-fs/shfs-0.31-r1 to /
>>> Downloading http://gentoo.oregonstate.edu/distfiles/shfs-0.31-1.tar.gz
--05:55:51--  http://gentoo.oregonstate.edu/distfiles/shfs-0.31-1.tar.gz
           => `/usr/portage/distfiles/shfs-0.31-1.tar.gz'
Resolving gentoo.oregonstate.edu... done.
Connecting to gentoo.oregonstate.edu[128.193.0.3]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
05:55:51 ERROR 404: Not Found.
 
>>> Downloading http://distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/shfs-0.31-1.tar.gz
--05:55:51--  http://distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/shfs-0.31-1.tar.gz
           => `/usr/portage/distfiles/shfs-0.31-1.tar.gz'
Resolving distro.ibiblio.org... done.
Connecting to distro.ibiblio.org[152.2.210.109]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
05:55:52 ERROR 404: Not Found.
 
>>> Downloading http://aleron.dl.sourceforge.net/sourceforge/shfs/shfs-0.31-1.tar.gz
--05:55:52--  http://aleron.dl.sourceforge.net/sourceforge/shfs/shfs-0.31-1.tar.gz
           => `/usr/portage/distfiles/shfs-0.31-1.tar.gz'
Resolving aleron.dl.sourceforge.net... done.
Connecting to aleron.dl.sourceforge.net[204.157.3.229]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71,010 [application/x-tar]
 
100%[====================================>] 71,010       165.90K/s    ETA 00:00
 
05:55:52 (165.90 KB/s) - `/usr/portage/distfiles/shfs-0.31-1.tar.gz' saved [71010/71010]
 
>>> md5 src_uri ;-) shfs-0.31-1.tar.gz
>>> Unpacking source...
>>> Unpacking shfs-0.31-1.tar.gz to /var/tmp/portage/shfs-0.31-r1/work
>>> Source unpacked.
 * Applying shfs-gentoo-0.31-makefile-root.diff...                        [ ok ]make[1]: Entering directory `/var/tmp/portage/shfs-0.31-r1/work/shfs-0.31-1/shfs'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
gcc -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall -I- -I. -I/var/tmp/portage/shfs-0.31-r1/image//lib/modules/2.4.20-win4lin-r1/build/include -I/usr/src/linux/include/ -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB -D__KERNEL__ -DLINUX -DDEBUG_LEVEL=0 -c dcache.c -o dcache.o
dcache.c:2:31: linux/modversions.h: No such file or directory
make[1]: *** [dcache.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/shfs-0.31-r1/work/shfs-0.31-1/shfs'make: *** [all] Error 2
 
!!! ERROR: net-fs/shfs-0.31-r1 failed.
!!! Function src_compile, Line 21, Exitcode 2
!!! (no error message)
Back to top
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


Joined: 02 Jun 2002
Posts: 1978
Location: Rennes, France

PostPosted: Wed Jun 18, 2003 8:54 pm    Post subject: Re: Your all time favorite tips Reply with quote

TwoSlick wrote:
2. Similiar to #1, you can use shfs (secure shell filesystem) to mount a remote directory just like you can with NFS. This program also uses ssh to tunnel the connection, and will allow you to browse the remote filesystem as if it were on your own. I like this because I can effectively get NFS capability, but without all of the hassle, and with more security!


You can also try lufs, a kernel module which comes with several plugins for virtual file systems (including ssh fs also). http://lufs.sourceforge.net/lufs/
Back to top
View user's profile Send private message
Booyah
n00b
n00b


Joined: 17 May 2003
Posts: 2

PostPosted: Wed Jun 18, 2003 11:47 pm    Post subject: Autofs? Reply with quote

That shfs tip is fantastic! No more NFS overhead.

One question: Has anyone got this to work with autofs? What does your auto.mnt (or whatever) entry looklike?

Booyah!
Back to top
View user's profile Send private message
TwoSlick
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2002
Posts: 114
Location: Rolla, MO

PostPosted: Thu Jun 19, 2003 12:43 pm    Post subject: Reply with quote

Quote:
just tried to emerge that shfs and this is what i got

Code:
gcc -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall -I- -I. -I/var/tmp/portage/shfs-0.31-r1/image//lib/modules/2.4.20-win4lin-r1/build/include -I/usr/src/linux/include/ -DMODULE -DMODVERSIONS -DEXPORT_SYMTAB -D__KERNEL__ -DLINUX -DDEBUG_LEVEL=0 -c dcache.c -o dcache.o
dcache.c:2:31: linux/modversions.h: No such file or directory


It looks like gcc couldn't find a header file in your kernal source directory "/usr/src/linux/include/"

Make sure your kernel is correctly located there, and try again.

- TwoSlick
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Thu Jun 19, 2003 1:58 pm    Post subject: Reply with quote

things that may be useful for you:

hint #1:
having a backup is always a good idea (ok, i have already had 3 ibm drives that died ;) )
hint #2:
don't delete something to restore it from your backup if you didn't back it up.
hint #3:
most services (sshd, squid) can be configured to listen only at your lan device, which makes it unnecessary to set up iptables to block the open port at your world device (i did that in my early linux times).
Back to top
View user's profile Send private message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Thu Jun 19, 2003 2:16 pm    Post subject: Reply with quote

I had the same problem, could it be that it doesnt like 2.5 kernals?
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
dermot
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2003
Posts: 108
Location: Dublin, Ireland

PostPosted: Thu Jun 19, 2003 2:36 pm    Post subject: Reply with quote

Never sit down with a lightbulb in your back pocket.

Oh, and I've mentioned this before but always always always make sure that you mount /boot when you're tweaking your kernel. Otherwise you'll be pulling your hair out trying to figure out why your new bzImage seems to be the same as the last.
_________________
Dermot

I bought some rock star ashes from the back of Rolling Stone
I don't think he would've minded - he couldn't sell his soul
Back to top
View user's profile Send private message
NitroPye
Apprentice
Apprentice


Joined: 12 May 2003
Posts: 152
Location: Wish I was in England

PostPosted: Thu Jun 19, 2003 4:03 pm    Post subject: Re: Your all time favorite tips Reply with quote

TwoSlick wrote:
2. Similiar to #1, you can use shfs (secure shell filesystem) to mount a remote directory just like you can with NFS. This program also uses ssh to tunnel the connection, and will allow you to browse the remote filesystem as if it were on your own. I like this because I can effectively get NFS capability, but without all of the hassle, and with more security!

Any tips on installing shfs? It is a kernel module (am I right) has one one got this to work on a 2.5 kernel , more specificaly mm-sources maybe?

*edit* nevermind about tips on installing , emerge shfs duh! ?(still not used to gentoo in those regards, redhat for 3 years seems to have hurt me*edit*
_________________
waka waka
me and my fun work
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Thu Jun 19, 2003 4:24 pm    Post subject: Reply with quote

My favorite tip... well, this has been passed on from father to son in my family in generations..

Women have EXTREME longterm memory - so don't tick them off.

But if the tip has to be Computer related.

If you ever have a problem, search the projects bugzilla and mailinglists.. it's EXTREMELY simple but it's a tip that most people over look. Most projects also have a page explaining known issues and a TODO list of important bugfixes and enhancements.
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Thu Jun 19, 2003 8:21 pm    Post subject: Reply with quote

Thats a good call Lovechild, Take heed boys, Lovechild has many pearls of wisdom ;)

MY TIP: If all these text config files just confuse you, there is a program called Webmin that makes system administration so much easier. You can edit the configuration for your crontab, mail damon, Samba shares and many more. Modules are pluggable to enable even more support for configurable programs.

Just:
Code:
# emerge webmin
# /etc/init.d/webmin start
Then point your browser to localhost:10000 and have a look.

REMEMBER, to configure properly, make sure it listens only on your localhost and not your external interface. Then you may
Code:
# rc-update add webmin default
so that it starts at boot time.
Back to top
View user's profile Send private message
Master_Of_Disaster
l33t
l33t


Joined: 28 Feb 2003
Posts: 610
Location: 15.05072° East, 48.13747° North (aka Mauer), Austria

PostPosted: Thu Jun 19, 2003 8:58 pm    Post subject: Reply with quote

Just a friendly reminder to puddpunk's tip:
*Immedeatly* change from port 10000 to something else and activate SSL. It's a rather well-known port...
_________________
post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today!
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Thu Jun 19, 2003 9:11 pm    Post subject: Reply with quote

Well, I'm pretty sure SSL was enabled by default on my installation. And also, If it's only listening on his internal interface, does it really matter what port it's listening on?
Back to top
View user's profile Send private message
Master_Of_Disaster
l33t
l33t


Joined: 28 Feb 2003
Posts: 610
Location: 15.05072° East, 48.13747° North (aka Mauer), Austria

PostPosted: Thu Jun 19, 2003 9:22 pm    Post subject: Reply with quote

I think it's default is to listen everywhere, therefore I suggested this. If I am wrong and it's default is just to listen to localhost, then I think it's ok to leave it.
_________________
post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today!
Back to top
View user's profile Send private message
DrkPlague
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jun 2003
Posts: 107

PostPosted: Fri Jun 20, 2003 6:50 am    Post subject: Reply with quote

if you emerge -vp webmin you will notice gentoo puts in +ssl by default. a nice feature.

The tip i most enjoy is alias lines in /etc/profile. for example, add the following line:
Code:
alias exit="clear && logout"

next time you exit, it will blank the console first. This is a good local security feature, looks clean, and is probably familiar to most Redhat users (weren't we all at some point in time?).

if you want to see more information about FTP transfers, try lftp. Emerge lftp then add the following to /etc/profile:
Code:
alias ftp="lftp"

This will make lftp your "default" ftp client.

just remember to "source /etc/profile" any time you make a change so it gets loaded right away (and it will alert you to most typos/misconfurations).
_________________
DKP

There are 10 kinds of people in the world:
Those who understand binary and those who don't...
Back to top
View user's profile Send private message
NitroPye
Apprentice
Apprentice


Joined: 12 May 2003
Posts: 152
Location: Wish I was in England

PostPosted: Fri Jun 20, 2003 1:28 pm    Post subject: Reply with quote

On the topic of aliases try this one in /etc/profile
Code:
alias ls='ls --color=tty'

Nice pretty color listings. I think this should be in /etc/profile by default
_________________
waka waka
me and my fun work
Back to top
View user's profile Send private message
carambola5
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 214
Location: Madtown, WI

PostPosted: Sat Jun 21, 2003 3:24 pm    Post subject: Reply with quote

dylix wrote:
Just incase anyone is looking for a script to do this, I have these two setup. I made these one time because my dyndns.org once got suspended due to some bug in ddclient, but anywho. i made this fail safe method. has been working ever since w/o a problem.

Code:

CheckIP
#!/usr/bin/perl
@res = `lynx -dump http://checkip.dyndns.org`;
foreach $res (@res) {
    if ($res =~ /Current IP Address: (.*)$/) { $up = ; last } else { next }
}
print "$up\n";

UpdateIP
#!/bin/bash
ip=`/home/dylix/scripts/check-ip`;
if [ "$ip" = "`cat /etc/ip.cache`" ]; then
   exit 0
else
   echo "$ip" > /etc/ip.cache
   /usr/bin/ddclient -daemon=0
fi


Your checkip script is easily replacable with:
Code:
echo $(wget -O - -q http://www.whatismyip.com | grep -i title | awk '{print $4}')

or, if you really like checkip.dyndns.org:
Code:
echo $(wget -O - -q http://checkip.dyndns.org | grep "IP Address:" | awk '{print $4}')

_________________
Get Firefox!

Proper Web Development

I'm done at 999.
Back to top
View user's profile Send private message
Master_Of_Disaster
l33t
l33t


Joined: 28 Feb 2003
Posts: 610
Location: 15.05072° East, 48.13747° North (aka Mauer), Austria

PostPosted: Sat Jun 21, 2003 10:25 pm    Post subject: Reply with quote

I think it's handy to be able to define my own aliases and have bash automatically activate them.
Execute
Quote:
cp /etc/skel/.bashrc ~/
echo -e "[ -e \"$HOME/.bashrc\" ] && . $HOME/.bashrc" >> /etc/profile

and every time you log on, or open a terminal the file ~/.bashrc will be parsed if it exists.

I like the aliases
Quote:
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"
alias su="su -c 'bash -l'"


Another thing I'd recommend is to change the "Session" settings for Konsole to evaluate /etc/profile and .bashrc:
Change in the Session settings 'bash' to 'bash -l', and you got your aliases and correct paths now everywhere!
_________________
post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today!
Back to top
View user's profile Send private message
handsomepete
Guru
Guru


Joined: 21 Apr 2002
Posts: 548
Location: Kansas City, MO

PostPosted: Sat Jun 21, 2003 10:36 pm    Post subject: Reply with quote

Favorite tip: Just typing "cd" takes you to your home directory. Been hooked on it ever since.
Back to top
View user's profile Send private message
Master_Of_Disaster
l33t
l33t


Joined: 28 Feb 2003
Posts: 610
Location: 15.05072° East, 48.13747° North (aka Mauer), Austria

PostPosted: Sat Jun 21, 2003 10:52 pm    Post subject: Reply with quote

to get this working, I had to add a
Quote:
export HOME=$(pwd)
to my /etc/profile....
_________________
post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today!
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Sat Jun 21, 2003 11:01 pm    Post subject: Reply with quote

#1. Rsync is the coolest thing ever. I use it to sync home directories and work directories among multiple computers. I could use NFS / SHFS etc., but I really like the incremental backups and I only have to worry about network traffic once.

One master fileserver. When I start working somewhere, I rsync from it to make sure I have the most recent version:
Code:
$ rsync -Cavz -e ssh --delete remoteserver:~/dev/ ~/dev/

This syncs my work directory, deleting files locally that don't exist on the remote server. It's great for both keeping the same preferences/settings among multiple computers (syncing the full home directory) and keeping the same working directories.
When I'm done working, I sync from my computer to the server:
Code:
$ rsync -Cavz -e ssh --delete ~/dev/ remoteserver:~/dev/


I just made this even cooler. In my ~/.bashrc:
Code:
alias home-up="rsync -Cavz -e ssh ~/ remoteserver:~/"
alias home-down="rsync -Cavz -e ssh --delete --exclude downloads/ --exclude ogg/ --exclude music/ remoteserver:~/ ~/"
alias dev-up="rsync -Cavz -e ssh --delete ~/dev/ remoteserver:~/dev/"
alias dev-down="rsync -Cavz -e ssh --delete remoteserver:~/dev/ ~/dev/"

Now all I do is home-down or home-up to sync homes, dev-down or dev-up to sync working directories. The excludes are files I don't want cluttering up all of my computers, just the fileserver. I love it!

#2. grep -Hirn PATTERN. It doesn't look like much, but it's awesome. It recursively searches for a pattern (-r), non-case specifically (-i), printing the file (-H) and the line number (-n) it came from.

#3. colordiff for etc-update. It makes things a thousand times easier, even if it doesn't work for the merging. Simply emerge colordiff, and in /etc/etc-update.conf, change diff_command:
Code:
# vim-users: you CAN use vimdiff for diff_command. (see NOTE_1)
diff_command="colordiff -uN %file1 %file2"
using_editor=0
#diff_command="vim -d %file1 %file2"
#using_editor=1

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


Last edited by dberkholz on Sun Jun 22, 2003 7:01 am; edited 2 times in total
Back to top
View user's profile Send private message
Master_Of_Disaster
l33t
l33t


Joined: 28 Feb 2003
Posts: 610
Location: 15.05072° East, 48.13747° North (aka Mauer), Austria

PostPosted: Sat Jun 21, 2003 11:06 pm    Post subject: Reply with quote

and best of all:
It's easy to memorize :D
_________________
post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today!
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 1, 2, 3 ... 15, 16, 17  Next
Page 1 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