Re: Playing audio CDs

2009-02-10 Thread Polytropon
On Tue, 10 Feb 2009 02:39:17 -0600, Joshua Isom jri...@gmail.com wrote:
 One thing that I don't think I've read but personally encountered.  
 When using cdcontrol, it seems to tell the cd-rom drive to play the 
 disc so it's not really done in software.  If the audio cable from the 
 cd-rom drive is not connected to the motherboard you won't get sound.  
 For the vast majority of users this is a non-issue, but it be confusing 
 to figure out.

Well, interesting you mentioned this. I have this audio cable installed
and after cdcontrol told the drive to play the audio CD, it is on the
CD audio channel of the sound card (and the mixer channel CD, of course).
I'm not sure how this is handled via the ATA cable where the CD drive
usually is connected, or the SATA calbe, if it's a newer drive. Or, to
make it more complicated, when the drive is a SCSI cable; I don't think
SCSI transmits audio data via the SCSI cable...

At least the drive should show the typical playing activity which can
be checked using a headphone on the drive's front connector (if it has
one).



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: hald makes cdrom fail

2009-02-11 Thread Polytropon
On Wed, 11 Feb 2009 10:43:22 +, Anton Shterenlikht me...@bristol.ac.uk 
wrote:
 On FBSD 7.1-stable i386 if I start hald from rc.conf with hald_enable=YES
 the cdrom fails with
 
 acd0: FAILURE - unknown CMD (0x03) ILLEGAL REQUEST asc=0x24 ascq=0x00 
 sks=0x40 0x00 0x00

Maybe this is a stupid and non-backed up idea, but what about using
the ATAPICAM facility (and /dev/cd instead of /dev/acd) for accessing
the CD-ROM drive?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Determining process preventing umount of busy partition

2009-02-11 Thread Polytropon
I'd like to ask how to determine which process (or program) keeps a partition
in state busy so that umount will refuse to unmount this partition. I found
this when going into SUM for checking and maintenance, so I think it would be
good to check which program still accesses files on a specific partition
allthough it should already be terminated due to the different stop mechanisms
run for the services in /etc/rc.d and /usr/local/etc/rc.d respectively, which
is performed by init, if I understood this correctly.

Example:

% shutdown now

... going SUM, starting sh ...

# umount /home
# umount /tmp
# umount /var
# umount /usr
umount: unmount of /usr failed: Device busy
# umount -f /usr
# mount -o ro /
# fsck ... blah blah ...

It would be good to be able to check why the partition is in state busy and
possible terminate / kill processes that cause this. Using the force (-f) seems
to be unneccessarily unfriendly. =^_^=

Thanks for suggestions!


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining process preventing umount of busy partition

2009-02-11 Thread Polytropon
On Thu, 12 Feb 2009 00:44:19 -0500, Robert Huff roberth...@rcn.com wrote:
 
 Polytropon writes:
 
   I'd like to ask how to determine which process (or program) keeps
   a partition in state busy so that umount will refuse to unmount
   this partition. 
 
   The traditional tool for doing this is sysutils/lsof.
   (Please let me know if it compiles.)

Sadly not, but my Ports tree is not up to date, so I tried to compile
it in PORTVERSION=4.82A, with this error:

===  Building for lsof-4.82A,3
(cd lib; make DEBUG=-O2 CFGF=-fno-strict-aliasing -pipe -march=pentium4 
-march=pentium4 -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASCPUMASK_T 
-DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_SI_UDEV -DHAS_SI_PRIV 
-DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DFREEBSDV=7000 
-DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHAS_STRFTIME 
-DLSOF_VSTR=\7.0-STABLE\)
cc  -fno-strict-aliasing -pipe -march=pentium4 -march=pentium4 
-DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASCPUMASK_T -DHASSBSTATE 
-DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_SI_UDEV -DHAS_SI_PRIV -DHAS_SYS_SX_H 
-DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DFREEBSDV=7000 -DHASFDESCFS=2 
-DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHAS_STRFTIME -DLSOF_VSTR=7.0-STABLE 
-I/usr/src/sys -O2 -c ckkv.c
In file included from ckkv.c:33:
../machine.h:62: error: redefinition of typedef 'cpumask_t'
/usr/src/sys/sys/types.h:146: error: previous declaration of 'cpumask_t' was 
here
*** Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.82A.freebsd/lib.
*** Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.82A.freebsd.
*** Error code 1

Stop in /usr/ports/sysutils/lsof.




After I updated my Ports (just right now) I saw that lsof didn't change,
still same version number.




Installation via pkg_add -r worked without problems.

# pkg_add -r lsof
Fetching 
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/lsof.tbz...
 Done.

I've got lsof-4.82A,3 now. The manpage reveals that this seems to be
exactly what I've been searching for, so lsof | grep usr should to
the trick. Thanks!


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining process preventing umount of busy partition

2009-02-11 Thread Polytropon
Replying to my own message... I'm so stupid: How do I *use* lsof which
is /usr/local/sbin/lsof when actually trying to umount /usr? Can I
put a copy of it into, let's say, /root/bin? I've checked library
dependencies:

# which lsof | xargs ldd
/usr/local/sbin/lsof:
libkvm.so.4 = /lib/libkvm.so.4 (0x280a2000)
libc.so.7 = /lib/libc.so.7 (0x280aa000)

So this is on the / partition. This should work, am I right?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining process preventing umount of busy partition

2009-02-11 Thread Polytropon
On Thu, 12 Feb 2009 06:26:53 +, Matthew Seaman 
m.sea...@infracaninophile.co.uk wrote:
 Don't use lsof for that then.  Use fstat(1) which is part of the base
 system:
 
   # fstat -f /usr

Cool! I didn't know about how to use fstat for *this* purpose.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining process preventing umount of busy partition

2009-02-11 Thread Polytropon
First of all, I checked both lsof's and fstat's output: NOTHING seems to
have a file open in the /usr partition. Very strange. Of course, I've tried
the copies of both tools in /root/bin so they don't cause any access on /usr
theirselves.



On Thu, 12 Feb 2009 00:08:58 -0700, Tim Judd taj...@gmail.com wrote:
 Most commonly for me is because my $PWD (or CWD) is in the filesystem i 
 intend to umount

I've checked this: In SUM, $CWD was /, and root's $HOME is /root on
the / partition. Users' home directories are on /home which is separated
from /usr (and can be unmounted without problems). At no time, a $CWD
was on /usr partition.



 so as a habit now, i move myself to the root partition (when logged in 
 as root) via the following, and assuming I want to umount /usr
 
 
 # umount /usr
 umount: unmount of /usr failed: Device busy
 # cd
 # umount /usr
 
 
 cd, with no arguments, move you to ~ (aka $HOME)

Which would be /root in case of SUM.



As I said, very strange...




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How-to erase a DVD-RW

2009-02-12 Thread Polytropon
On Thu, 12 Feb 2009 10:16:26 +0100 (CET), Wojciech Puchar 
woj...@wojtek.tensor.gdynia.pl wrote:
 recording 0 bytes DVD will do the trick, i don't see explicit cleaning 
 option in growisofs now.

The manpage of growisofs suggests this:

   Note that DVD+RW re-formatting procedure does not substitute for blank-
   ing.  If you want to nullify the media, e.g. for privacy reasons, do it
   explicitly with 'growisofs -Z /dev/dvd=/dev/zero'.



 dvd+rw-format will clear DVD+RW disk.

Definitely much easier.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: recovering from a power outage

2009-02-13 Thread Polytropon
On Thu, 12 Feb 2009 23:00:16 -0500, Robert Huff roberth...@rcn.com wrote:
   1) It was my understanding one has to force-mount a dirty
 filesuystem.  IF this sounds like a practice best left to senior
 Jedi Masters ... it porbably is.

Mounting possibly defective file systems is not a good idea. If it's
possible, boot into SUM via boot -s first, check partitions (unmounted!)
and then mount -a. Use exit to bring up MUM afterwards.

Setting background_fsck=NO in /etc/rc.conf may increase boot time
if problems occur, but can be useful to first check for errors, and
then bring up the system, instead of bringing up the system with maybe
problems on the partitions. I think this delay is something you can
affort.

It's not good to fsck a mounted partition anyway, because fsck can
repair minor defects on its own.



   2) I would _never_ let background fsck take care of things
 after a crash,  While hovering over the keyboard is a pain, I will
 find out how badly things are damaged, rather than have boatloads of
 files mysteriously vanish.

That's a good concept which I do follow myself, too. I spend some minutes
seeing fsck checking partitions after unclean shutdown, but when everything's
okay, there's no problem running into MUM *afterwards*.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: recovering from a power outage

2009-02-13 Thread Polytropon
On Fri, 13 Feb 2009 08:11:56 -0500, Robert Huff roberth...@rcn.com wrote:
   One of my machines has a pair of 50gb SCSI disks; running two
 full passes takes about 7 minutes.
   I have no idea how long it might take to check a multi-terabyte
 RAID-mumble set-up.

It's not *that* hard to wait for an fsck. I have 2 x 500 GB here at home,
you're right, it takes several minutes for fsck to check both disks, but
in the end, you're happy that either everything turns out to be okay or,
if problems occured, you see these problems and can decide how to handle
them.



   Still worth waiting ... in my opinion.

I'd rather wait than lose data.

But as you said, it's very individual how you think about this. If backups
are done properly, sometimes it might even be easier *not* to repair data,
but to put back the backups on the newly initialized disks...



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: recovering from a power outage

2009-02-13 Thread Polytropon
On Fri, 13 Feb 2009 10:22:55 -0500, Robert Huff roberth...@rcn.com wrote:
   Power outages are not the only thing which can cause (directly
 or indirectly) file system corruption.

Oh yes, that's so true - I experienced it in July 2008, and I still
think it was a software problem...


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Xorg - Resolution issues

2009-02-13 Thread Polytropon
Maybe you can try

Option PreferredMode 1366x768

in section Monitor?

If it doesn't work, there's always an option to use xrandr via
~/.xinitrc:

xrandr --size 1366x768 
xrandr --fb 1366x768 

I have a similar issue with the ati driver, using an ATI Radeon 9200
(RV250) which I need to force to 1400x1050 (worked with old XFree86
and the setting in the config file, as you mentioned it). The
autodetection of the screen (21 CRT) leads to stupid values that
are completely unusable.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: confontation

2009-02-13 Thread Polytropon
On Fri, 13 Feb 2009 13:07:00 -0800, prad p...@towardsfreedom.com wrote:
 i need greek letters for math work.
 
 [...]
 
 any suggestions?

I'm not sure if this helps you, but I've seen a font on an
ancient Windows 3.11 installation that included all greek
letters (uppercase and lowercase), but without special
punctuation (which is not needed for math purposes, I think).
Was the font named Symbol? I can't remember, it's long time
ago.

But maybe you can check and find a TTF file that can be
imported to X and / or the application you use?

I think using sprites of the letters instead of a font is
not a good idea...


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: OT console based editor that can do php syntax highlighting

2009-02-14 Thread Polytropon
On Sat, 14 Feb 2009 12:27:02 -, Simon Griffiths 
simon.griffi...@tenenbaum.co.uk wrote:
 So can anyone recommend an editor that can do this ?  I did try vim some
 time ago but being a novice in these areas I couldn't get the syntax file to
 load and help on the web confusing or indecipherable. 

Joe's own editor (joe) now supports syntax highlightin,
as well as VI improved (vim). The editor of the Midnight
Commander (mcedit) is my individual program of choice,
allthough I needed to modify the syntax files to fit
my imaginations, just as I created new ones. :-)




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: getty on /dev/ttypN

2009-02-14 Thread Polytropon
On Sat, 14 Feb 2009 15:33:20 -0500, Michael P. Soulier 
msoul...@digitaltorque.ca wrote:
 I think I ran mergemaster correctly on the upgrade. I'm not sure why init is
 trying to talk to these ports, which are obviously pseudo terminals...

Do you have X running? Usually, the ttypN pseudo terminals
are employed by xterms (or other terminal emulators on X).
Maybe this is a result of a non-starting X?

Do you have automated screen sessions running? Does the
command w show something strange?

The configuration files you showed seem to look completely
normal.

I don't see why init tries to getty for the ttypN...

init: can't exec getty 'none' for port /dev/ttyp[01]:
No such file or directory

The ttypN files in /dev are, if I see this correctly, only
generated when needed.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mixer resets

2009-02-16 Thread Polytropon
On Sun, 15 Feb 2009 16:41:46 -0800, Rem P Roberti remeg...@comcast.net wrote:
   line via mixer.  After a while I installed gmixer because having a
   graphical interface made things go a lot quicker.  But I discovered that
   every time I invoked gmixer it reset the vol to 0:0.  It continues to do
   that, and I'm wondering if anyone else has that experience with gmixer. 
   Could that be a bug?  Are there other graphical mixer alternatives?
  
  You could install the gkrellm and gkrellmvolume2 ports; then you'll always
  have a slider for each mixer channel available.
 
 I may give that a try.  It does help, in this case, to have a graphical
 interface.  It's pretty difficult to get things adjusted properly while
 switching back and forth between fldigi and the command line.

An old fashioned alternative is xmixer (or xmix?) which may
have less dependencies than other programs.

An idea for gmixer: Eventually there's an option for preset
values, or a kind of configuration file which is read right
after program startup, and if such a file doesn't exists,
zero values are assumed.

Another mixer GUI worth mentioning is aumix / xaumix (Gtk)
which features both a graphical and a text mode GUI for
adjusting levels. Because I've used this program in the past,
I can tell you that it's not resetting all the values.

Good luck es vy 73 de D. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: freebsd 7.1 clean install with mouse completely hang

2009-02-16 Thread Polytropon
On Mon, 16 Feb 2009 09:16:48 +0700, Vu The Cuong vuthecu...@luvina.net 
wrote:
 Hi all
 
 Yeassterday I performed clean installation of freebsd 7.1, gnome showed
 up fined, but mouse and keyboard 
 
 completely not functioned, hang all the time, the only way to restart is
 press the button reset of PC.
 
 How can I solved that?

Did you install X and Gnome from the installation CD or from
(updated) ports? Maybe it's one of the improvements after
major changes in X that require certain modifications (xorg.conf,
HAL, DBUS). Check out ports/UPDATING, if this is the issue.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: tab-delimited to csv

2009-02-16 Thread Polytropon
On Mon, 16 Feb 2009 11:55:50 -0500, John Almberg jalmb...@identry.com wrote:
 Can anyone suggest a way to convert a tab-delimited file to csv using  
 standard unix utilities? I could whip up a Ruby script to do it, but  
 I hate to reinvent the wheel.

I think it's more simple with sed. Use the global substitution
function, such as

% sed s/\t/:/g

See that \t or maybe [ \t]* may be the appropriate field delimiter.
Instead of :, take , or . as separator, just as you need.

Another solution could be awk.

% awk '{ gsub([\t]*, :, $0); print $0; }'

If you need additional re-ordering, use -F or FS to specify
the field separator, and then printf %s:%s:%s\n, $2, $1, $3;.

These would be the easiest (I think) substitution approaches.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining process preventing umount of busy partition

2009-02-17 Thread Polytropon
On Mon, 16 Feb 2009 10:44:02 -0900, Mel fbsd.questi...@rachie.is-a-geek.net 
wrote:
 Is this a one-time event or 100% reproducable?

I've tried it several times, it can always be reproduced.



 A likely scenario is:
 - You have squid running
 - You have rc_shutdowntimeout at default (30 seconds)

I'm not sure if this setting (?) will have an effect after trying
the umount operation in SUM. Even if umount is retried after a
several time, /usr is still busy.



 - rc hits the watchdog while squid is being shutdown

No, nothing running. All applications have terminated.



 - you unmount
 - get busy
 - call fstat at which point squid has been shutdown.

I've used fstat and lsof to check for open files on /usr, nix,
nada, nitshewo.



 Replace squid with anything that takes 30+ seconds to shutdown. Allthough, 
 they would probably already fail at umount /var. Squid with defaults is fully 
 contained in /usr/local.

I can't imagine which application should still be running when nothing
on /usr is accessed (lsof, fstat); I'll check on running applications
using ps.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: World doesn't build correctly

2009-02-17 Thread Polytropon
On Tue, 17 Feb 2009 20:14:58 +0100, Frank Wißmann frank.wissman...@web.de 
wrote:
 What is going wrong here? Why isn't ther build a 7_STABLE as I desire? 
 What do I need to change to get my wanted results?

Are you sure you have the correct sources? How did you update them?

I'm using the following settings (as an example):

In /etc/make.conf:

SUP_UPDATE= yes
SUP=/usr/bin/csup
SUPFLAGS=   -g -L 2
SUPHOST=cvsup.freebsd.org
SUPFILE=/etc/sup/stable.sup

And in /etc/sup/stable.sup:

*default host=cvsup.freebsd.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7
*default delete use-rel-suffix
*default compress
src-all

For csup, the tag is RELENG_7. You used 7_STABLE, maybe this is
the reason why you checked out the sources of 7.0-RELEASE?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining process preventing umount of busy partition

2009-02-18 Thread Polytropon
On Tue, 17 Feb 2009 13:30:55 -0900, Mel fbsd.questi...@rachie.is-a-geek.net 
wrote:
 This is weird, though. New theories (where are Chase, Cameron and Foreman 
 when 
 you need them!):

Spying around in someone else's house. :-)



 fstat is lying, instead use:
 fstat -f /usr -m -v

Well, I've taken that pill. This is the result:

# /root/bin/fstat -m -v -f /usr
USER CMD  PID   FD MOUNT  INUM MODE SZ|DV R/W
# _

It shows NOTHING. I have made a copy of fstat binary in /root/bin,
which is possible because all needed libs are in /.

Furthermore, I've carefully studied the output of ps ax and even
of top -t, but as well, nothing that indicates some activity on
/usr...



 You have a mount on top of /usr, ie.: /usr/local or /usr/ports.

No. From /etc/fstab:

# DeviceMountpoint  FStype  Options Dump
Pass#
# ---   -   --  -   -   
-
/dev/ad0s1b noneswapsw  0   0
/dev/ad0s1a /   ufs rw  1   
1
/dev/ad0s1d /tmpufs rw  2   
2
/dev/ad0s1e /varufs rw  2   
2
/dev/ad0s1f /usrufs rw  2   
2
/dev/ad0s1g /export/homeufs rw  2   
2

These are the only partitions on ad0. /usr has its own partition,
nothing mounted on top of it. (You mentioned a valid point: I
sometimes have another disk mounted inside /export/home, and I
cannot umount /export/home while this partition is mounted. But
that's not the case here.)



This is REALLY strange, I should get a whiteboard, some pens and
start making a drawing of the symptoms, until Dr. Cuddy tells me
not to do so. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: World doesn't build correctly

2009-02-19 Thread Polytropon
On Wed, 18 Feb 2009 21:50:25 +0100, Frank Wißmann frank.wissman...@web.de 
wrote:
 Well, I used your settings of default release=cvs tag=RELENG_7, but 
 the answer is still this:
 FreeBSD grissom.einundvierzig.org 7.0-RELEASE FreeBSD 7.0-RELEASE #0: 
 Wed Feb 18 21:36:57 CET 2009 
 r...@grissom.einundvierzig.org:/usr/obj/usr/src/sys/GRISSOM  amd64
 
 Any ideas, folks? Or should I post something more?

may I ask how exactly you did the update? As it has mentioned
before, the handbook (even the german version) gives a good
routeplan for this.

In general:

# cd /usr/src
# make update
# make buildworld buildkernel KERNCONF=GRISSOM
# make installkernel KERNCONF=GRISSOM
# reboot
boot -s
fsck and mount -a
# cd /usr/src
# mergemaster -p
# make installworld
# mergemaster
# reboot

(Hope that's correct from my mind, check handbook anyway.)

Note that the configuration files mentioned above usually employ
the make update command from within /usr/src. Kernel and world
have to be the same version.

Oh yes, and check your /boot/loader.conf if eventually a previous
kernel is loaded, maybe you stored a spare kernel in /boot and
the loader loads this, instead of /boot/kernel/kernel? Just to be
sure... I mention this because I had a spare 6.0-GENERIC kernel
saved in /boot, a setting in /boot/loader.conf for some testing,
then updated the system (which affected /boot/kernel/kernel,
but not /boot/kernel/kernel.GENERIC which was instead loaded). :-)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


SOLVED: Re: Determining process preventing umount of busy partition

2009-02-19 Thread Polytropon
On Wed, 18 Feb 2009 10:44:31 -0900, Mel fbsd.questi...@rachie.is-a-geek.net 
wrote:
 Can you show mount -p before trying to unmount /usr? On the off-chance 
 /export 
 or /export/home is really a symlink to /usr/home (mount -p shows realpath(3) 
 for mounts).

Hm, I keep /home out of /usr, so there's only a symlink (for the
obvious compatibility reasons) /home@ - export/home.

BUT, and now the big surprise, maybe a possibility:

% mount -p
/dev/ad0s1a /   ufs rw  1 1
devfs   /devdevfs   rw  0 0
/dev/ad0s1d /tmpufs rw  2 2
/dev/ad0s1e /varufs rw  2 2
/dev/ad0s1f /usrufs rw  2 2
/dev/ad0s1g /export/homeufs rw  2 2
devfs   /var/named/dev  devfs   rw  0 0
linprocfs   /usr/compat/linux/proc  linprocfs   rw 
0 0
 Haha!!!

It seems that the linprocfs prevents umounting of /usr because its
mountpoint /usr/compat/linux/proc is de facto INSIDE /usr.

I've checked this while in SUM: When umounting linprocfs prior to
/usr, no problems occur.

I'll speak to Mr. Tritter so he can stop his investigations. Seems
that we found the reason.

Thanks for your help.

Seems that I'm too stupid to own a computer. :-)





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: World doesn't build correctly

2009-02-19 Thread Polytropon
On Thu, 19 Feb 2009 18:14:01 +0100, Frank Wißmann frank.wissman...@web.de 
wrote:
 I did it now the way you told me but it still shows 7.0-Release at 
 uname -a. I attach my make.conf and cvs-supfile' maybe there is 
 something wrong?

I've found something strange in the CVSup files:

Your file   My file
-
*default base=/usr/src  *default base=/var/db
*default prefix=/usr/src*default prefix=/usr
*default release=cvs*default release=cvs tag=RELENG_7

You see these differences: base and prefix are set incorrectly and
release / tag is incomplete. You should follow Mel's advice and
take the file /usr/share/examples/cvsup/stable-supfile as a starting
point. Of course, you can cut the many comments, but be sure that
the settings are valid (as shown above).




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: video editor

2009-02-20 Thread Polytropon
On Fri, 20 Feb 2009 02:32:43 -0800, prad p...@towardsfreedom.com wrote:
 any recommendations for software that can join or split wmv, mpg, avi
 etc etc?

I think it can be done with mplayer / (g)mencoder and avidemux2.
The advantage of them is having a GUI (if this is an advantage
to you).



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where is my STRFILE?

2009-02-20 Thread Polytropon
On Fri, 20 Feb 2009 20:03:24 +0100, herbert langhans herbert.raim...@gmx.net 
wrote:
 Even tried that.
 In /usr/ports/games/freebsd-games are the classical games, but not the 
 fortunes and the strfile. Have it installed now, still no strfile.

The strfile binary should be built by the system's build
command (make buildworld from /usr/src). Check if a setting
in /etc/make.conf disables the build of the games stuff.



 Do you daemons have the binary 'strfile' on your system? Could you please 
 check and tell me! Maybe somebody can send me this single binary file offlist 
 by email?

% which strfile
/usr/games/strfile

This is from a 7-STABLE system from Aug 2008.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


strfile
Description: Binary data
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Rsync | Push script

2009-02-21 Thread Polytropon
Just a small note which has nothing to do with the
actual rsync problem:

On Sat, 21 Feb 2009 14:40:21 +0100, Jos Chrispijn j...@webrz.net wrote:
 DATE=`date +%d%m%y`

In order to be able to sourt your backups by date,
you could use the form 

DATE=`date +%y%m%d`

or

DATE=`date +%Y%m%d`

to get a date signature that can be sorted.



Just a suggestion - I've had the best experiences
with the form

DATE=`date +%Y-%m-%d`

attached to the backup's subject.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Alternative to sysinstall?

2009-02-23 Thread Polytropon
A possibility would be to develop the different target systems
first on a builder system, maybe using jails. This system is
completely installed as it is intended to be on the target system
later on. Then the partitions are dumped (using dump, of course)
as data files onto the USB thumb. Furthermore, the thumb holds
a bootable system with a hand-craftet installer that first
slices, partitions and formats the hard drive and then just
resores (using restore) the content from the dump files onto
the (empty) hard disk.

After another reboot the system should boot up fine as it has
been preconfigured on the builder machine.

Other members of this mailing list will soon tell you some
much better ways to achieve your goal. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: understanding freebsd development logic

2009-02-23 Thread Polytropon
On Mon, 23 Feb 2009 14:25:59 -0800, prad p...@towardsfreedom.com wrote:
 is the idea to make each version 'as good as possible' because it
 would still be useful for older machines? or is it that later
 versions can utilize code from the earlier versions? or is it
 something else?

I hope it doesn't sound impolite, but FreeBSD's development
process isn't tied to hardware evolution (such as it is with
nearly any Linux and of course with Windows). You can use
7.1 on the same hardware that ran 4.6 before, and you get a
gain of speed!

When development in 8-CURRENT is considered to be important
to the 7.x-branch, it will surely be backportet. Another reason
is that there are FreeBSD installations where the maintainer
isn't interested in updating to the bleeding edge point of
development, or simply can't afford this because of security
considerations. So it's important to clean bugs from systems
that are still in use, these are 6.x and 7.x at the moment,
while releases prior to these numbers have already been EOLed,
as far as I know. Of course, nothing stops you from *not*
updating an existing 5.x installation, especially when it runs
sufficiently to your needs.

With the ++ of the major release number, often new concepts
are introduced which are held back during the ++ of the minor
version number of the respective predecessor release, such
as, for example, the use of devfs for /dev, or the inclusion
of ZFS in the base system.

I'm not a developer so I'm not competent enough to go into
detail regarding your question.





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD multiboot question.

2009-02-23 Thread Polytropon
On Mon, 23 Feb 2009 17:35:00 -0800, Overdorf, Sam sam.overd...@intel.com 
wrote:
 Is there a way that I can change the description from FreeBSD to something 
 like:
 
 F1 FreeBSD 7.1
 F2 FreeBSD 7.0
 F3 FreeBSD 6.4

As far as I understood, the names displayed are generic ones. In
order to change them or even made to fit them to a particular OS
version on a different slice / disk, modifying the bootloader's
source is neccessary (followed by recompilation and reinstall).

Other bootloaders may have an easier option to change the displayed
names.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Determining scancodes for obscure keyboard to modify keymap

2009-02-24 Thread Polytropon
On Tue, 24 Feb 2009 14:28:54 -0700, carnage carnagewash...@gmail.com wrote:
 I am looking to remap an apple usb keyboard (a1048).  It has F13-16, 3
 volume control keys and an eject key but no scroll lock, num lock,
 pause/break, etc.  I'm wondering how I would go about changing some of these
 not so useful keys into useful keys.

I have the same keyboard on a secondary system and would know the
answert to your question, too. :-)

As I knew from configuring my Sun USB Type 6 keyboard, xev is a good
tool to check the keyboard output. It works for the Apple keys next
to the space bar, but not for PF13 -- PR16, the volume keys and the
eject key - xev doesn't show anything when they're pressed.

Maybe you can use my ~/.xmodmaprc for the Sun keyboard, at least for
educational purposes. :-)

(I'll add the english key names; because I have the german version,
I've initially named *them* within the comments.)


! 
! $XFree86: xc/programs/Xserver/hw/xfree86/etc/xmodmap.std,v 3.5 1996/12/23 
06:47:28 dawes Exp $
! $XConsortium: xmodmap.std /main/7 1996/02/21 17:48:55 kaleb $

!clear mod3
!clear mod4

add mod4 = Multi_key

! Hilfe / Help
keycode 144 = F13
! Stop / Stop
keycode 145 = F14
! Wiederholen / Again
keycode 146 = F15
! Eigenschaften / Props
keycode 147 = F16
! Zurücknehmen / Undo
keycode 148 = F17
! Vordergrund / Front
keycode 149 = F18
! Kopieren / Copy
keycode 150 = F19
! Öffnen / Open
keycode 151 = F20
! Einsetzen / Insert
keycode 152 = F21
! Suchen / Find
keycode 153 = F22
! Ausschneiden / Cut
keycode 154 = F23


! Ton aus / Entmagnetisieren / Mute / Degauss
keycode 141 = F24
! Leiser / Mehr Kontrast / Lower volume / contrast
keycode 142 = F25
! Lauter / Weniger Kontrast / Raise volume / contrast
keycode 143 = F26
! Ausschalten (Mond) / Switch off (Moon)
keycode 140 = F27


! Meta links / Meta left
keycode 115 = Meta_L
! Meta rechts / Meta right
keycode 116 = Meta_R
! Compose
keycode 117 = Multi_key
! 

It's easy to find out what the keys send using xev. Then, you can
easily assign any key name to them that is present in the symbol
file for xkb stuff. Note that this worked with XFree86 and X.org
so far, but due to the newest improvements, it may be possible
that settings have to be done very differently now... (I've not
taken the update yet.)



If you got the keys working, please report back to the list. I'd
be very interested in using them. They work fine when the keyboard
is attached to an iBook.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: X to not blank screen or switch off monitor

2009-02-25 Thread Polytropon
On Wed, 25 Feb 2009 18:48:23 +0200, Brent Clark brentgclarkl...@gmail.com 
wrote:
 The problem I seem to face is that I cant get X and / or freebsd to not 
 blank the screen and / or switch off the monitor.

Sounds like you need to add

Section Monitor
Option  DPMS  false
EndSection

respectively.



 Ive run
 
 xset s noblank  vbetool dpms on

In my ~/.xinitrc, I have these

xset s off 
xset -dpms 

to prevent blank / monitor off (suspend DPMS).



 I even set blanktime=NO in /etc/rc.conf.

This is for the text mode consoles only. You can add

saver=NO

do your /etc/rc.conf, but I think it's already a default
value (check /etc/defaults/rc.conf).





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ALT key kills window/application

2009-02-26 Thread Polytropon
On Thu, 26 Feb 2009 18:01:54 -0800 (PST), devindg dgarcia.t...@gmail.com 
wrote:
 I don't know if this is a WM issue or an X issue, but whatever it is, it's
 hard to diagnose. This nuisance started to occur after an upgrade of all my
 ports.
 
 I ran Xev and pressed ALT to see what it would return. Here it is:
 
 ClientMessage event, serial 33, synthetic YES, window 0x181,
 message_type 0xdd (WM_PROTOCOLS), format 32, message 0xdb (WM_DELETE_WINDOW)

This looks strange. Pressing the (left) Alt key sould give
something like this:

KeyPress event, serial 24, synthetic NO, window 0x121,
root 0x73, subw 0x0, time 3045197954, (505,110), root:(1018,180),
state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x121,
root 0x73, subw 0x0, time 3045198051, (505,110), root:(1018,180),
state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

The xev output you presented doesn't indicate that an Alt key has
been pressed.

It indicates that when pressing the Alt key issues a command to
the window manager (or from it?) - WM_PROTOCOLS - to close the
window focussed at the moment - WM_DELETE_WINDOW. This isn't an
action the Alt key should be mapped to.



 (4)  http://www.nabble.com/file/p22238102/xorg.conf xorg.conf 

Section InputDevice
Identifier Keyboard0
Driver kbd
EndSection

Didn't you define a keyboard layout in xorg.conf? I'm not sure
about how this is to be done after the massive X update (I read
somethink like DBUS is needed now to select keyboard layout).

Maybe you can try something like this:

Section InputDevice
Identifier  Keyboard0
Driver  kbd
Option  XkbModel  pc105
Option  XkbLayout de
Option  AutoRepeat250 30
EndSection

Insert the layout you need (e. g. US).


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ALT key kills window/application

2009-02-27 Thread Polytropon
On Thu, 26 Feb 2009 22:53:01 -0800 (PST), devindg dgarcia.t...@gmail.com 
wrote:
I went ahead and tried your
 suggestion, but the problem persists. However -- and I should have given
 this more thought earlier -- I looked at the Xorg log, and it may provide
 more useful information.

This is obvious:

(II) config/hal: Adding input device Logitech USB Keyboard
(II) LoadModule: kbd
(II) Loading /usr/local/lib/xorg/modules/input//kbd_drv.so
(II) Module kbd: vendor=X.Org Foundation
compiled for 1.5.3, module version = 1.3.2
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.1
(**) Logitech USB Keyboard: always reports core events
(**) Option Protocol standard
(**) Logitech USB Keyboard: Protocol: standard
(**) Option Device /dev/ukbd0
(EE) Logitech USB Keyboard: cannot open /dev/ukbd0
(EE) PreInit failed for input device Logitech USB Keyboard
(II) UnloadModule: kbd
(EE) config/hal: NewInputDeviceRequest failed

It seems to indicate a major problem with the keyboard, which
is an USB Logitech one.

Do you have the (testing) option to attach a standard keyboard,
a PS/2 102 key keyboard or at least a normal USB keyboard (Sun,
Apple)?

Because of the message

(EE) Logitech USB Keyboard: cannot open /dev/ukbd0

it seems that X (or at least HAL) cannot open the keyboard's
device file /dev/ukbd0. Can you ll this file to check the existance
and correct permission?

% ll /dev/ukbd0 
crw---  1 root  wheel0, 121 Feb 28 02:34 /dev/ukbd

Is the USB keyboard detected correctly by the system for outside
X operations?

% dmesg | grep ^ukbd
ukbd0: vendor 0x0430 product 0x0005, class 0/0, rev 1.00/1.02, addr 3 
on uhub1

For my keyboard ONLY: Reporting defective since FreeBSD 7; should be:

% dmesg | grep ^ukbd
ukbd0: Sun Microsystems Type 6 USB keyboard, rev 1.00/1.02, addr 3, 
iclass 3/1

Check usbdevs -v as well.

My idea would be now that X (or HAL) misdetects your keyboard and
starts to do strange stuff when the Alt key is pressed because it
thinks that it isn't the Alt key, but something else.

Again, try to check with a standard keyboard, just to be sure.

Final idea: Maybe the keyboard is so non-standard that it is to
be considered crap (as it is for most modern stuff, especially
from today's Logitech) and should be exchanged in favour of a
regular and standard-compliant keyboard.

Since the happy X upgrades, consider the HAL and DBUS stuff to
be crap, too, especially when the keyboard worked as intended
before the upgrade. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: kernel #4

2009-02-28 Thread Polytropon
On Sat, 28 Feb 2009 14:47:27 -0500, Steve Bertrand st...@ibctech.ca wrote:
 Tim Judd wrote:
  Actually this is the 5th time --- computers start counting at zero.
 
 Wow, what a nice technicality you have found!
 
 If computers start counting at zero, and if the system-installed
 kernel starts at zero, how many times has the user taken the bus?

And how does the computer count more than 1 (which is 2) when
he does only understand 0 and 1? :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: where is gtk+-2?

2009-02-28 Thread Polytropon
On Sat, 28 Feb 2009 11:10:01 -0800 (PST), gahn ipfr...@yahoo.com wrote:
 Hi all:
 
 Which is the package gtk+-2 located under /usr/ports?

Are you searching for /usr/ports/x11-toolkits/gtk20?

From the pkg-descr file: GTK+ essentially provides the building
blocks from which GUIs can be built. [...] GTK+-2 is a very stable
release, similar only in design to GTK+-1. GTK+-2 can coexist happily
alongside GTK+-1, but applications are written for one version or
the other.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Ports on Macbook

2009-02-28 Thread Polytropon
I don#t want to interrupt. I just like to say that this kind of
discussion already took place.

On Sat, 28 Feb 2009 17:45:45 -0800, per...@pluto.rain.com wrote:
 Does someone who simply clicks
 yes, without actually reading the license first, have knowledge
 of the relationship?

Can Your Cat Agree to an EULA?
http://www.osnews.com/comments/21010



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Root shell

2009-03-01 Thread Polytropon
On Sun, 1 Mar 2009 17:43:55 +0100, Daniel Lannstrom o...@trekdanne.se wrote:
 On Sun, Mar 01, 2009 at 11:11:56AM -0500, Glen Barber wrote:
  This explains one of the reasons not to change root's shell:
  
  http://www.freebsd.org/doc/en/books/faq/security.html#TOOR-ACCOUNT
 
 Yes that's exactly what I meant. Is there any other reason except for
 that? As I see it that problem can easily be solved by copying bash to
 the root file system. Also many systems today have the root and /usr 
 on the same file system. 

I wouldn't rely on the many systems today assumption.

As an addition, I'd like to mention that there are two root shells:
First is the system's standard scripting shell /bin/sh which is
usually invoked first when entering maintenance mode (single user
mode). As well as FreeBSD's standard dialog shell /bin/csh it resides
on the / partition.

Maybe it can be seen as an unwritten law, or at least as a kind
of well intended suggestion to use /bin/csh for root's dialog shell
as well as /bin/sh for scripting. It may be considered old fashion,
but it has served well to follow this suggestion over the years.

Just as a very individual example, I haven't found any need to
install BASH on any system I've done so far. But it's completely
okay to have BASH as a user's dialog shell when the system is up
and running well.

Furthermore, I don't think copying the bash* binary is sufficient
to have BASH in SUM in a problem situation (which is: / is mounted
ro, nothing else mounted). Reason:

% which bash | xargs ldd
/usr/local/bin/bash:
libncurses.so.7 = /lib/libncurses.so.7 (0x280ff000)
libintl.so.8 = /usr/local/lib/libintl.so.8 (0x2813d000)
libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28146000)
libc.so.7 = /lib/libc.so.7 (0x2823b000)

There are library dependencies on /usr partition.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Root shell

2009-03-01 Thread Polytropon
On Sun, 1 Mar 2009 11:21:54 -0800, prad p...@towardsfreedom.com wrote:
 besides, you don't really need to, do you?
 i just log in with su -m and get to use my own account's aliases etc,
 but as root.

Furthermore, since the introduction of the sudo command (which
is installabe by ports / package) prefixing commands with sudo
seems to be okay for most tasks.

And as you said, Prad, using FreeBSD's su command (su -m) will
usually do just fine.

Another wisdom about this topic: If you see that you're spending
so much time as 'root' that you feel you need to change the root
shell to BASH, you're obviously doing something wrong. :-)




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: rc.conf and starting scripts

2009-03-01 Thread Polytropon
Allow me an addition:

On Mon, 2 Mar 2009 03:53:24 +, RW rwmailli...@googlemail.com wrote:
 /usr/local/etc/rc.d is the default for local scripts, that's where
 package put their scripts, but there are some rules.
 
 - they should either be proper RCNG scripts or they should end in a .sh
   extension

I'm not sure if this is valid anymore, but I think it's also
neccessary that a *.sh script is chmod +x, or it won't be
executed at startup. These scripts are located in /usr/local/etc.

The rc-style scripts (foo { start | stop | restart | status })
are located in the rc.d/ subdirectory, just like in /etc. They
usually have a corresponging enable setting (foo_enable) in
/etc/rc.conf or /etc/rc.conf.local (see man rc.conf), as well
as means to set parameters (foo_flags or something specific).


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Kernel Compile issue

2009-03-02 Thread Polytropon
On Mon, 2 Mar 2009 01:28:59 -0800, Paige Thompson erra...@devel.ws wrote:
 Mike,
 
 I think you misread what I sent, however I noticed that you used
 'KERNELCONF' instead of 'config' (as I noted) but I still get the same
 error.

Correct is KERNCONF=name of config file as parameter for buildkernel
and installkernel targets.

Allthough the old way using config kernel  make depend  make
is still supported. Don't miss the make depend.



 I want to say the issue must have something to do with the fact that
 there's no environment variables that specify the include directories.

As far as I know, there are system defaults that apply.

When building from updated sources, the files within the source tree
are used (in /usr/src).

There's nothing that should be in the env output.

I'd suggest to follow the already given advice to work exactly
by manual, at least for the first time. Have a look at the
comments /usr/src/Makefile, they're explaining the most obvious
mistakes one could make.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Kernel Compile issue

2009-03-02 Thread Polytropon
On Mon, 2 Mar 2009 02:43:01 -0800, Paige Thompson erra...@devel.ws wrote:
 You're right, my source tree is incomplete:
 
 # pwd
 /usr/src/sys
 # cd sys
 sys: No such file or directory.
 #

I had a similar problem some years ago and couldn't find out what
the reason was - the magic of this mailing list didn't open up to
me that time yet. :-)



 Thank you that helps a lot actually, it probably has something to do
 with the source archives that I downloaded not being extracted
 properly.

This should be followed by an error message, either by ftp for
an incomplete archive or by tar for a defective (and also incomplete)
one.



 I'm not a big fan of sysinstall, I prefer to work without
 it.

From my experience, it's quite handy at install time. This usually
is the time when I get the sources from the CD. After that, I don't
use sysinstall anymore. FreeBSD brings excellent tools for the
system administration as well as for installing software. When
sources and ports tree are in place, I usually update them using
cvsup (old fashioned, I know). Then everything should be up to
date, ready for a make run in /usr/src.



 You know the whole thing seems like its setup to try and force me
 to use sysinstall.

In any case, you should get proper results without using sysinstall.
All the tools are there.



 Even the ftp client gives me a lot of flack about
 how I use mget (IE: mget ssys.* not being a valid way to just fetch
 all of the files) so of course i'm left to go through and fetch each
 of them individually :((
+
On Mon, 2 Mar 2009 02:44:27 -0800, Paige Thompson erra...@devel.ws wrote:
 PS: it seems just straight up mget * works x.x
 k! satisfactory enough...

Don't forget to unset prompt. :-)

But as I said, I prefer getting the sources from the CD (is much
faster).



 and for whatever reason, Im not having any luck with ncftp which I'm
 sure I could figure it out but I really don't think that I should have
 to install an additional FTP client just so I can fetch the kernel
 source ._. 

It's FreeBSD, you don't have to do such stupid things. :-) You
even don't need to install cvsup in order to update the sources,
FreeBSD brings its own csup today.



 it kind of negates the whole minimalist aspect of having
 multiple archive files in the first place.
 
 Am I right?

I'm not sure why the archive is split into multiple volumes...
maybe historical reasons?




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: read BSD format disk from Mac OSX

2009-03-02 Thread Polytropon
I don't want to be impolite, but your solution suggestion is
unneccessarily complicated, involving something that isn't
needed at all.

Let me explain:

On Mon, 2 Mar 2009 08:41:10 -0600, David Kelly dke...@hiwaay.net wrote:
 On Mon, Mar 02, 2009 at 09:16:02AM -0500, Tsu-Fan Cheng wrote:
  Hi all,
  I format a ext disk (UFS) and transfer some files into it, hand it
  over to my friend who has a macbook. He complained the macbook can't
  read it. I don't have a mac on hand, I wonder if there is any utility
  that will help a mac to read a BSD, thanks!!
 
 The easiest way to do what you are attempting is to format the disk FAT.
 Then to preserve file attributes write your files in a tar archive.

Hey hey, not so complicated. :-)

The easiest way is to follow this advice WITHOUT the FAT part.
The tar filesystem has been serving as the best data exchange
format among UNIXes and Linusi over the years. The only thing
needed on the Macbook is the tar utility.

So, on the FreeBSD machine, you first put the files onto the 
external HDD using tar - note that you're using it DIRECTLY,
you're NOT creating any files on a file system:

% tar cvf /dev/da0 files

Then, on the Macbook, you simply extract from the external disk,
using MacOSX's tar command:

$ tar xvf /dev/da0

Done!

Usually, tar will preserve your file names and file attributes.
No need to look for character translation tables, no need for
chmod -x for the files, no need for the uppercase / lowercase
trouble.

Of course, you cannot read such a hard disk with Windows, but
this wasn't part of the question anyway.

There is no need to pollute a hard disk with MICROS~1 FAT when
you're using UNIXens only. And yes, it is that simple. :-)

Simple. Useful. UNIX.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backup msdos slice

2009-03-02 Thread Polytropon
On Mon, 2 Mar 2009 14:10:42 -0500, Jerry jerr...@msu.edu wrote:
 So, what I would like is something that would dump the MS slice
 to a FreeBSD file or media written in the FreeBSD world and that
 I could then pick out files and directories somewhat like I do
 using restore on a dump file. 

There should be a simple way: Just dd the FAT partition into a file.
You can then backup this file in FreeBSD (by any way you want).
In order to access files inside the dd image you can simply mount
it using the md (memory disk) facility.

An example (not verified, I don't have any MICROS~1 around); I'll
assume that /dev/ads2c is the FAT file system in question (again,
I do admit that I don't know how FAT partitions occur as device
files in FreeBSD).

% dd if=/dev/ads2c of=fat.dd bs=1m
12345678+1 records in
12345678+1 records out

Now you've got fat.dd. You can backup this file or just backup
content parts of it.

% sudo mdconfig -a -t vnode -u 10 -f fat.dd
% mount -t msdosfs -o ro /dev/md10 /mnt

You now can access the files in fat.dd from the /mnt subtree. Be
sure to check

% man mount_msdosfs

for additional options you might need (character conversion, large,
longnames, mask, ... - I don't exactly know what to use).

Now you can partwise plusgood backup files from within /mnt, using
your favourite backup method (tar to tape, rsync to remote machine
or what you prefer).



 Basically, I want to back up the MSDOS slice (I know MS calls it
 a primary partition) from the FreeBSD side of things.   I can read
 and write the slice nicely from FreeBSD, but not dump/restore.

Now you can. :-)




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Ports on Macbook

2009-03-02 Thread Polytropon
On Mon, 02 Mar 2009 20:22:50 +0100, Bernt Hansson be...@bah.homeip.net wrote:
 FBSD UG skrev:
  
  You're not buying the software, you buy a license to use it on one  
  Apple computer.
 
 Mostly semantics,  if I name my computer APPLE Then it's legal to
 install. Crap, if I buy it I can install it on ANY computer. Does not
 have to be a computer named APPLE it could be IBM, HP or any other
 brand or non brand.

I think an important point is that you loose support from Apple
if you're not installing Mac OS X on Apple brand hardware.

As for the license agreement, if you buy Mac OS X from the shelf
(for example), you've not confirmed any contract-like agreement
with Apple yet, but you've purchased some rights already, for
example the right to burn the whole package (not a nice example
but I'm sure you get the idea); the EULA mentions nothing about
this (legally possible) behavior.

The Mac OS X versions sold along with the Hackintosh are no
illegally pirated copies, they're boxes from the shelf. It's
up to the customer what to do with it.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: /bin/sh does not read profile

2009-03-05 Thread Polytropon
Good evening Betram et al.

I've read the discussion thread as far as it went and would like
to share my own solution to a similar problem, mapped onto the
sh topic. Maybe it works.

A little background:

First of all, because my standard dialog shell is the system's
C shell, the files important are /etc/cshrc with the settings,
such as setenv, alias and path, furthermore /etc/csh.login to
be executed after login, and /etc/csh.logout, executed after
logout. Local to the user exist ~/.cshrc, ~/.login and ~/.logout
which are used if present.

In order to make X work properly with these settings, I have
a kind of two stages mechanism which consists of the files
~/.xinitrc and ~/.xsession. The first one is used by X (xdm)
to determine what to do after successful user login, e. g.
start some programs and then exec the window manager / desktop
environment.

Note that both files are chmodded executable:

% ll .xsession .xinitrc
-rwxr-xr-x  1 poly  pgm  807 Mar  3 02:46 .xinitrc*
-rwxr-xr-x  1 poly  pgm   43 Apr 27  2006 .xsession*

The ~/.xsession doesn't do anything besides first incorporate
settings from ~/.cshrc and then execute ~/.xinitrc.

#!/bin/csh
source ~/.cshrc
exec ~/.xinitrc

It is shebanged with the shell I want to use, which is the C shell.

If ~/.xsession is called, it's last action is to execute ~/.xinitrc.
If ~/.xsession is NOT called, ~/.xinitrc will be executed anyway.
It does the following:

#!/bin/sh
[ -f ~/.xmodmaprc ]  xmodmap ~/.xmodmaprc
xrandr --size 1400x1050 
xrandr --fb 1400x1050 
xsetroot -solid rgb:3b/4c/7a

# ... your initializations 'n stuff here ...

exec wmaker

Note that this script is shebanged for sh again. Any X terminals
started now (with csh inside) have the settings from ~/.cshrc.



Mapped onto the initial sh problem, I'd suggest to create the
two files mentioned as follows:

~/.xsession:

#!/bin/sh
[ -f ~/.shrc ]  . ~/.shrc
[ -f ~/.profile ]  . ~/.profile
exec ~/.xinitrc

~/.xinitrc:

#!/bin/sh
[ -f ~/.shrc ]  . ~/.shrc
[ -f ~/.profile ]  . ~/.profile
my_init_stuff_1
my_init_stuff_2
my_init_stuff_3
exec my_wm_startup

Now any instance of sh started should be aware of the settings.



Finally, please note that I'm not a guru for sh (or bash) because
I do use sh only for scripting, and bash never. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 7.1-release and KDE4

2009-03-05 Thread Polytropon
On Thu, 5 Mar 2009 18:43:42 -0600, Andrew Gould andrewlylego...@gmail.com 
wrote:
 I thought lame was one of the packages that couldn't be distributed in
 binary form due to license restrictions.

In the past, it really was. But I think it was possible to add it
via pkg_add. It's some time ago, but memory serves me right, I
did pkg_add -r lame because it was possible... if there was a way
to find out if some software has been installed via port OR package,
I could find this out. :-)

Because of the few dependencies, it's no problem to use the port
to install it first, then pkg_add -r the KDE 4 packages. Maybe
install nasm prior to make.

The Makefile of lame still states:

RESTRICTED= patent issues, see http://www.mp3licensing.com/

If licensing problems are still present, there may be no way to
put a precompiled package onto the FTP server.





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: /bin/sh does not read profile

2009-03-05 Thread Polytropon
On Thu, 5 Mar 2009 18:11:18 -0800 (PST), Peter Steele pste...@maxiscale.com 
wrote:
 I have a similar problem, but with bash. I have both my personal
 account and root set to use bash instead of sh and when I login
 the .bashrc file is not read. My system does not have an X
 environment, it's plain old BSD. How can I get it to load .bashrc
 when I login? I'm using a 7.0 binary release. 

I read from the manpage bash-3.2.25 according to the FILES section:

   /etc/profile
  The systemwide initialization file, executed for login shells
   ~/.bash_profile
  The personal initialization file, executed for login shells
   ~/.bashrc
  The individual per-interactive-shell startup file

When the shell is the login shell (prefixed with - in the process
list), it seems that it needs to read ~/.bash_profile (and not
the ~/.bashrc file). So you could put

. ~/.bashrc

into ~/.bash_profile to get a workaround.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Status field STATE in top(1) interactive mode

2009-03-06 Thread Polytropon
Hi list,

in order to find out why Opera often keeps hanging (doing nothing),
often for several minutes, I checked its top(1) output.

Reading man top, I found the following explaination:

[...] STATE is the current state (one of START, RUN
(shown as CPUn on SMP systems), SLEEP, STOP, ZOMB,
WAIT, LOCK  or  the  event  on  which  the  process
waits) [...]

When Opera just hangs(TM) :-), it is in one of the states ucond
or umtxn - and sucking up to 100% WCPU.

Here is my question: Is there an explainative list that gives a
clue about what this state indicates? Where are these event[s]
on which the process waits documented?

When I could guess, then I'd say that ucond means unconditioned,
in no condition (which would be a very strage state - the absense
of any state), and umtxn... um... USB mass storage transmit number?
No idea.

Other states that I see have a more descriptive name, such as pause,
select or getblk and even kqread.

Setting: I have opera-9.63.20081215_1 on OS 7-STABE from August 2008.



Thank you!



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How do I determine the FreeBSD world revision/version?

2009-03-06 Thread Polytropon
Just an addition:

On Fri, 6 Mar 2009 21:54:02 +0100, Erik Trulsson ertr1...@student.uu.se wrote:
 No, there is no such information.  The version stored in the kernel applies
 to both kernel and userland.

This is correct for the sources which usually are updated both
(running make update in /usr/src).



 If you do 'mix-and-match' where different parts of your system come from
 different versions of FreeBSD you will have to keep track of this yourself.

Such differences can occur if you
1st - make update
2nd - build and install world and kernel
3rd - make update again
4th - build and install kernel only

It can as well happen if you make install for a certain part of
the OS (from the /usr/src tree) only.



An indication of the current version of any part of the OS or the
kernel can be obtained from the $FreeBSD$ CVS tag on a per-file
basis. But note that these don't refer to a RELEASE or STABLE
notation.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Status field STATE in top(1) interactive mode

2009-03-06 Thread Polytropon
On Sat, 07 Mar 2009 09:10:08 +0200, Giorgos Keramidas 
keram...@ceid.upatras.gr wrote:
 umtx lock, umtx, umtxn, umtxpi and umtxpp are internal kernel
 strings that are used to identify particular locks and wait conditions
 where a process may block while running inside the kernel. 

Okay, this makes things more clear to me.



 A recent FreeBSD 8.0-CURRENT kernel shows: [...]

Having a look at various source files makes me believe that the
problem described has something to do with memory access of Opera
through the kernel (mutex - mtx). It furthermore explains the
hanging - a sleep command in the kernel.

For the uncond state, I found nothing as informative as the
above. Maybe it's a don't know placeholder. :-)

 PID USERNAMETHR PRI NICE   SIZERES STATETIME   WCPU COMMAND
9774 poly  3 1010   145M   115M ucond0:00 11.08% opera

Furthermore, I think top(1) gets the text for the locks from
somewhere else, they're not part of the top(1) sources. At
least, /usr/src/usr.bin/top is very dry and doesn't contain
much more when in /usr/obj. :-) 



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Health Monitoring on Dell 600SC

2009-03-07 Thread Polytropon
On Sat, 7 Mar 2009 23:04:45 -0500 (EST), Dan Mahoney, System Admin 
d...@prime.gushi.org wrote:
 Hey all,
 
 I've got a dell 600SC in a remote location, and it's started freezing up 
 (I'm thinking I've got a dying fan).

I'm not familiar with this special Dell system, but maybe the
tools mbmon and healthd (from ports) can help you to monitor
at least fan speeds and temperatures (as well as voltages).
They're using the kernel's SMB facility.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: hardware list in a machine

2009-03-10 Thread Polytropon
On Tue, 10 Mar 2009 10:07:51 +, Ricardo Jesus ricardo.meb.je...@gmail.com 
wrote:
 % pciconf -lv
 man pciconf for further details.

Additionally: usbconf to list USB devices, and camcontrol
to list SCSI devices, as well as atacontrol for ATA devices.

And finally, dmesg. :-)



Note that these are *system tools*. In order to obtain more
information, it may be required to install some tools from
the Ports Collection.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: hardware list in a machine

2009-03-11 Thread Polytropon
On Tue, 10 Mar 2009 10:24:24 +, Ricardo Jesus ricardo.meb.je...@gmail.com 
wrote:
 Polytropon I can't seem to find usbconf.
 
 % usbconf
 usbconf: Command not found.
 % whereis usbconf
 usbconf:
 
 Is it a third party application?

My mistake, sorry. Of course it's usbdevs, a tool that comes
with the OS.

% which usbdevs
/usr/sbin/usbdevs

Its manpage offers various options how to show the attached
USB devices, as well as the USB controller's / hub' capabilities.
The most common use is usbdevs -vd to obtain the most
important informations.

-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bsd vs gpl

2009-03-11 Thread Polytropon
On Wed, 11 Mar 2009 09:02:47 -0500, David Kelly dke...@hiwaay.net wrote:
 The source code is always free under BSD, contrary to what GPL
 proponents claim.

Terms like enslavement of code come into mind, BSD thieves
and others...

But this isn't only the case with BSDL. The MIT uses a similar
license for X, as far as I know, and Apache does it as well.



 Just that under BSD you are free to keep ownership of
 your own work.

The BSDL doesn't change anything related to copyright (which is
on the side of the coders).



 GPL states that if you make changes those changes must be made available
 under the same terms as the original source code. Yet somehow darlings
 of the GPL world such as Red Hat, MySQL, and others, skirt around that
 onerous requirement.

That's why the GPL is often called a viral license. As
far as I know, not only using GPL code, also linking against
a GPL library would require to put the initial work under GPL.



I'd like to make an addition:

The freedom of the BSDL intentionally allows to close sources.
This can be considered theft, if one would like to use this
interpretation. When taking some BSDL code, there's no need
to contribute anything back.

One argument could be that the money or hardware given to the
FreeBSD developers is abused by those who silently take
advantage of their work.

But finally, it's always the developer who decides what to do
with his own work. If he intends to allow others to make money
from his code without giving anything back, it's his choice to
do so. If a supporter doesn't like this decision, he should
think about his support.

Closing code doesn't make the code disappear which it is based
upon, so code doesn't get unfree.



I know, this can lead into an endless discussion. It has already
taken place on other platforms, such as here:

http://www.osnews.com/comments/20740

Forgive me my comment. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to auto-detect a USB drive?

2009-03-11 Thread Polytropon
On Wed, 11 Mar 2009 07:42:04 -0700 (PDT), Peter Steele pste...@maxiscale.com 
wrote:
 I want to have a process running on my FreeBSD box that
 automatically detects when a USB drive is inserted. What's
 the easiest way to accomplish this? I know I could simply
 monitor /var/log/messages and look for the appropriate
 events to appear, but is there a more elegant way? 

The system will monitor it itself. :-)

My question to you would be: What exactly do you mean by
automatically detect? The drive *is* automatically detected.
Should it be mounted afterwards?

The creation of the device files (after system startup) is
controlled by the file /etc/devfs.rules.

You can use automounters to automatically mount devices when
they appear. In order how to determine file systems, slices
and partitions on such an USB device, you could, for example,
have a look at how FreeSBIE does it.

Additionally, there are already tools integrated in KDE and
Gnome that automount USB devices.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


SanDisk USB stick with FreeBSD 7

2009-03-13 Thread Polytropon
Hi,

I've gotten an USB stick with 8 GB which doesn not
work with FreeBSD 7-STABLE-20080811. I've googled
and found that this particular product might be
defective by factory.

Anyone has an idea how to make it accessible with
FreeBSD?

In order to have maximal abilities for data transfer,
this stick is msdosfs formatted. But no proper
device will occur if plugged in.

Some data here:

umass0: SanDisk Cruzer Micro, class 0/0, rev 2.00/2.00, addr 2 on uhub3
da0 at umass-sim0 bus 0 target 0 lun 0
da0: SanDisk Cruzer Micro 8.02 Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: UNIT ATTENTION, Medium not present
umass0: at uhub3 port 1 (addr 2) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
umass0: detached

There is only /dev/da0.

% fdisk da0
*** Working on device /dev/da0 ***
parameters extracted from in-core disklabel are:
cylinders=977 heads=255 sectors/track=63 (16065 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=977 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
start 44, size 15679396 (7655 Meg), flag 0
beg: cyl 0/ head 0/ sector 45;
end: cyl 975/ head 254/ sector 63
The data for partition 2 is:
UNUSED
The data for partition 3 is:
UNUSED
The data for partition 4 is:
UNUSED

Sothe partition data can be read, why is there no
device file to access the partition? because of the
line da0: Attempt to query device size failed:
UNIT ATTENTION, Medium not present I think it's not
possible to get rid of this problem by reformatting
the stick.

I think about returning it to the vendor with a
hardcopy of dmesg which reveals that the stick is
defect. :-)


Thanks for any recommendations.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: SanDisk USB stick with FreeBSD 7

2009-03-13 Thread Polytropon
Oops, hit the wrong reply button...

On Fri, 13 Mar 2009 16:49:53 +0300, \Remorque\ odhia...@gmail.com wrote:
 On Fri, Mar 13, 2009 at 4:42 PM, Polytropon free...@edvax.de wrote:
 
  On Fri, 13 Mar 2009 16:33:23 +0300, \Remorque\ odhia...@gmail.com
  wrote:
   Sorry for top-posting!
 
  No problem.
 
 
 
   I used to have one of these and it worked with Windows, FreeBSD 6.x and
  even
   7.x until one day I broke it with my carelessness.
 
  When I got you correctly, this means that it *should* work with
  FreeBSD 7 without any magic done to the system? Please get me
  right: If I need some modification on my 7.x system to make it
  work, I still can't use the stick on my 6.x and 5.x systems, so
  it would be useless.
 
 
 It should (have) work(ed), yes, like this:
 
 mount_msdosfs /dev/da0s1 /mnt

Exactly, this is what I expected, and which worked with other
Windows formatted USB sticks in the past. But due to not
having /dev/da0s1... allthough fdisk da0 showed the partition...
no luck.



 But as you can see, yours has problems.. as appears in dmesg.

Okay, now I am sure to have something defective. I'll return it
with a dmesg hardcopy.





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: SanDisk USB stick with FreeBSD 7

2009-03-13 Thread Polytropon
On Fri, 13 Mar 2009 15:35:10 +0100 (CET), Wojciech Puchar 
woj...@wojtek.tensor.gdynia.pl wrote:
  da0: SanDisk Cruzer Micro 8.02 Removable Direct Access SCSI-0 device
  da0: 1.000MB/s transfers
  da0: Attempt to query device size failed: UNIT ATTENTION, Medium not present
 
 
 this suggest defective device or USB controller/driver problems.

I think so, too. FreeBSD relies on correctly working devices,
and it checks for this. The strange thing was that I could
read the partition table via fdisk da0.

To be sure, I've tried the stick on the USB 1.0 controller
(message above) and on the USB 2.0 controller of the mainboard,
with similar result:

umass0: SanDisk Cruzer Micro, class 0/0, rev 2.00/2.00, addr 2 on 
uhub2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: SanDisk Cruzer Micro 8.02 Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: UNIT ATTENTION, Medium not 
present



 if you can - check it on another computer running other OS (linux, 
 windoze)

On Windows PC, the stick has been accessible, but Properties
showed a minimum disk space occupation (circa 300 kB) allthough
there was nothing on the stick.

Linux: Not invented here. :-)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Keyboard adaptor PS/2 - USB to use with FreeBSD

2009-03-13 Thread Polytropon
Dear list,

in the future I'm going to use a device which doesn't have any
PS/2 sockets anymore to attach keyboard and / or mouse. This
device is equipped with USB ports only. (Yes, you guessed it,
it will be some kind of Netbook that needs some ordinary
physical user interface - CRT, keyboard, mouse - to be used
properly when placed in the office.)

I'm aware of the fact that there are adaptors (adapters?) do
plug a standard PS/2 keyboard (and mouse) into an USB port.
Do I have to pay attention to get a specific device or are
they that simple (wired) that any will do?

Additionally, I'm aware that there are some vice versa
adaptors to plug an USB mouse into a PS/2 port. I already
know that this will only work if the PS/2 mouse does also
support USB protocoll (or something similar), or do I confuse
this with the older PS/2 to serial (9 pin) adaptors where
only few mice could be used?

Reason: I *insist* on using my IBM model M keyboard on that
device. =^_^=


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Execute and lock a user into a program upon login

2009-03-13 Thread Polytropon
On Fri, 13 Mar 2009 21:12:07 -0400, Steve Bertrand st...@ibctech.ca wrote:
 Steve Bertrand wrote:
  Hi everyone,
  
  Although the application of my question focuses on network operation, I
  believe that the objective fits this list.
  
  Mostly irrelevant, I have been working on securing my network perimeter.
  I have a FreeBSD box that acts as a host-based BGP peer to all edge
  connected routers.
  
  I use this host-based Quagga FBSD router to distribute routes that are
  to be blackholed by the edge devices.
  
  What I want is to set up an environment so that when a specific user
  logs in to the box via SSH, a command is run, and they immediately get
  dropped into the environment that the command produces.
  
  When they exit this 'command', the login session is dropped.
  
  Essentially, I want to 'lock' a user into a program upon SSH login, and
  drop them from the SSH session when the program terminates.
  
  In essence:
  
  - user 'router' connects via SSH
  - user is dropped into the application 'vtysh'
  - user performs operations
  - user exits from program
  - shell drops (ie. user does not have to exit the csh shell to drop the
  SSH connection)
 
 I probably should have explicitly stated that I'd like help as to how I
 would go about doing what I want to do, instead of simply stating my
 goals ;)

If the user's shell is csh (FreeBSD's standard dialog shell), you
could achieve the goal:

~/.login
vtysh
logout

Only problem: I don't know how the shell will act when the user
terminates the vtysh application (^C)...

Idea: When the application vtysh is terminated, the next command
in the .login file will be executed, which is the logout command
that will cause the login shell to exit. This will close the SSH
connection as well.

(I haven't checked this, sorry.)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: issues in XFCE 4.6

2009-03-14 Thread Polytropon
On Sat, 14 Mar 2009 15:43:53 -0600 (MDT), Keith Seyffarth w...@weif.net wrote:
 Anyone have another suggestion? At this point, I need to get X
 installed so I can even consider a window manager.

What about using pkg_add for X and the other ports it depends
on? Check if the binary packages are new enough because they
may be dated some time behind the freshly updated ports tree.
Usually, pkg_add -r will install all dependencies.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: GELI full disk, booting from thumb drive - can't get to /usr?

2009-03-15 Thread Polytropon
On Sat, 14 Mar 2009 21:03:36 -0700 (PDT), b...@vesterman.com wrote:
 I've been trying to set up a system (7.0 Release) with full-disk
 encryption, using GELI, and booting from a thumb drive.  When booting, it
 gets as far as asking me for the passphrases of the various encrypted
 disks; when I give them, GELI indicates that it successfully attached to
 each, but after I've entered the last of them, the system puts out a bunch
 of messages (most of which quickly scroll off my screen) looking like it's
 trying to continue booting, but having problems.
 
 Those that are left when it finally stops scrolling seem to indicate that
 it can't get to /usr.  Here is what remains on my screen when it stops
 scrolling:
 
 eval: /usr/sbin/sendmail: not found
 /etc/rc: WARNING: run_rc_command: cannot run /usr/sbin/cron
 Local package initialization:
 dirname: not found
 Starting background file system checks in 60 seconds.
 logger: not found

This indicates that your assumption is right, access to /usr is
not possible. But what comes into my mind is that *if* /usr
could not be mounted, the system is usually put into single user
mode instead of continuing to boot.

My suggestion: have you tried scolling up and looking for the
first message that looks strange, maybe a message that says
something about /usr? (Press the Scroll Lock key and use the
arrow keys / page scrolling keys to access previous screen
content.)



 If I start up Fixit from a LiveFS CD, geli attach and mount what should be
 /usr as something like /myusr, I can see that all of the things I expect
 to be there really are there (including, for example, libexec/getty).

Does your thumb drive (for booting) something generally different
than you do when starting with the LFS CD?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: installing packages

2009-03-17 Thread Polytropon
On Mon, 16 Mar 2009 20:22:02 +0100 (CET), marco.borsat...@libero.it 
marco.borsat...@libero.it wrote:
 
 Hi, this are my questions.
 
 1) I've installed many packages using pkg_add -rK [package] because
 I had the idea to use the same packages on a different PC. Packages
 are present in the directory i used as a repository, but only the
 requested packages, not the dependecies.
 
 When I tried on another PC pkg_add [package] (I've copied all the
 requested packages on a USB HD) the program tells me that it cannot
 find dependencies. What is my mistake?

As it has already been suggested, it may be that you missed some
dependencies. I'll equip you with my (dirtily hacked) pkg_download
script so you can be sure to have all the dependencies. You can
delete the -n option if you wish to download AND install the
packages. The default behaviour is to fetch them only. (Original
intention: Download package and dependencies on system A with
Internet access, copy the result to system B without Internet
access, and then install them there.)




#!/bin/sh
#
# pkg_download.sh
# ===
#
# fetch a precompiled package as well as its dependencies
# for further installation
# 
# Written 2008-08-19

if [ $1 =  ]; then
echo $0 package
exit 1
fi

echo -n fetching $1 ... 
if [ -f $1.tbz ]; then
echo $1.tbz already there
exit 1
fi

pkg_add -fKnrv $1  $1.txt 21
# -f = force, -K = keep, -n = no install, -r = remote, -v = verbose

echo done

for DEP in `cat $1.txt | grep $1 | grep depends on | cut -d ' -f 6 | cut -d 
/ -f 2`; do
echo dependency for $1 is ${DEP}
$0 ${DEP}
done

rm $1.txt

exit 0





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: renaming user account?

2009-03-18 Thread Polytropon
On Wed, 18 Mar 2009 12:25:06 -0400, Bill Moran wmo...@potentialtech.com wrote:
 However, the canonical way to do this is using the pw command.  pw will
 sanity check all your changes to ensure you don't end up with a groups
 file that doesn't match your master.password, etc.

There *may* be one additional thing you would have to take
care of manually: If you change the user's name, and still
some of his files contain the old name (e. g. in paths where
/home/oldname is used instead of ~ or $HOME), you still have
to change this manually.

You can use tools like the Midnight Commander, function Meta-?,
to search files for the old user name (or use find + grep).

Eventually, check system's mail aliases file, if you had this
user setup to receive mail (e. g. from night jobs).



 It's somewhat better suited for use in scripts than use by humans.

:-)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: RAID 1 failure

2009-03-18 Thread Polytropon
Maybe it's a typo in the mail, but two things look stange
to me:

On Thu, 19 Mar 2009 09:21:17 +0800, Ruel Luchavez ruel.free...@gmail.com 
wrote:
 BUT when i type a command
 #mount /dev/mirror/gm0s1a/mt
 ^  ^^
 mount:dev/mirror/gm0s1a/mnt:unknown special file or file system
^ ^^^

Is this intended? Or just a typo in the reproduction?



 I get this error:
 
 fstab:/etc/fstab:0: No such file or directory
 fstab:/etc/fstab:0 No such file or directory

[...]

 when I go to the directory /dev/mirror then issue ls, heres the filename
 inside the directory
 
 gmo
 gmos1
 gmos1a
 gmos1b
 gmos1c
 gmos1d
 gmos1e
 gmss1f
 
 I think there is a miss type (typo) in my part during I followed the HOW
 TO,in which incase of writing 0 i wrote letter o..am I write?

Yes, looks like...



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Text mode dialog library like TSO

2009-03-19 Thread Polytropon
Dear list,

I'm searching for something really strange, maybe some reader will
be able to tell me what I'm searching for. :-)

For a special application, I need a programmable dialog library that
has... well, how to describe it... anyone know SIOS? Or at least TSO?
A bit like this. A kind of form-driven screen layout.

A silly example:

 E n t e r   s o m e   d a t a
---
Name:    Address: 
 Foo:   Pups: ___Furz: ___
 Bar: /__/__   Logon: 

F1F2F3F9 F10
Help  Done  Reset Print  Cancel
---
250/813

Where I used underscores, an input line should occur. Positions
and length as well as colour of text and input should be specified,
customization of function keys would be great, skipping from input
field to input field, too. Default values would eventually appear
in the input lines.

The whole library should be accessible via C, or at least for a
shell script. You know, a bit like Tcl/Tk, but in text mode.

Any suggestions? Ideas?

If not, I will need to write this myself, but I considered asking
the list for being able to avoid reinventing the wheel. I know
it's not such a big deal, but if it alredy exists...?




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Text mode dialog library like TSO

2009-03-19 Thread Polytropon
On Thu, 19 Mar 2009 19:23:58 -0400, michael michael.copel...@gmail.com wrote:
 ok, i'm a bit drunk but from what i gather is that you want a purely 
 text mode form program?

Yes. For X, I would have used Tcl/Tk for this quite simple purpose,
or would have used Gtk with C.



 ala, ncurses, or just text mode, as in the old 
 monochrome days? if so, i might be able to supply you with such.

No no, ncurses is okay. In case I need to create this kind of
dialog library myself, I would use ncurses because it seems to
be the best sub library to create this kind of dialog means.

You did already create such kind of functionality? Seems that
I'm not the only insane programmer on earth. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Text mode dialog library like TSO

2009-03-19 Thread Polytropon
On Thu, 19 Mar 2009 16:22:01 -0700, Chuck Swiger cswi...@mac.com wrote:
 Consider looking at dialog(3), which rides on top of ncurses.
 There's also a CLI utility by the same name handy for shell-scripting  
 purposes.

Allthough dialog does come with the basic means I did describe,
it looks a bit... bulky? I don't want to sound impolite, but
consider the width of

  ++
Name: ||
  ++

to

Name: 

which would be more... elegant. But man dialog is very interesting.
It even offers functionalities (lists, yes/no buttons etc.) that
I haven't thought of.

Thank you, I'll take this into mind.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Text mode dialog library like TSO

2009-03-19 Thread Polytropon
On Fri, 20 Mar 2009 00:58:54 +0100, Erik Trulsson ertr1...@student.uu.se 
wrote:
 Another alternative might be the form(3) library which also is built on top
 of ncurses.  It seems to be a bit more cumbersome to use than dialog(3) but
 is probably somewhat closer to what you were looking for.
 
 If you look around a bit on the web you can probably find several tutorials
 and references for both curses as well as the form, menu. and panel
 libraries that are usually included with most curses implementations
 (including ncurses.) See for example
 http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

Wow, I'm impressed: forms at least gives a good toolkit for what
I need, and CDK (curses development kit) is even in the ports.
It's examples are very interesting, it seems to be what I need.

The world is safe, I won't reinvent the wheel. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: recover data from damaged msdos fat32 partition

2009-03-19 Thread Polytropon
On Fri, 20 Mar 2009 10:05:57 +0800, Fbsd1 fb...@a1poweruser.com wrote:
 I have installed these ports
 
 autopsy
 dd_rescue
 ddrescue
 fatback
 formost
 sleuthkit
 
 If my understanding of reading their documentation is correct, they all 
 need a empty disk to copy the bad disk sectors to in sequence.
 Is this a correct understanding?

It is. These tools work in a non-destructive way, this means
their (eventually failing) attempts to recover data do not do
any damage to the original (defective) disk. The defective
disk isn't repaired, that would be too dangerous to try.

I would even mention to first make a 1:1 dd copy of the defective
FAT partition and using those tools with the copy, not with the
original.



 msdos fat32 file system has a backup fat table as stated in the docs. Do 
 any of the sectors rescue programs read the backup fat table?

dd_rescue - No, does simply copy the partition 1:1.
ddrescue - The same.
sleuthkit - Usually work on a lower level.
formost - Works on a lower level and extracts data files by magic.
autopsy - Offers a server for forensic browsing.
fatback - Kind of undelete tool, no.

The TSK's tools dls, fls and ils don't seem to offer the option
in question.

I read about using alternate superblocks, but that refers to the
UFS file system and not the 2nd FAT. Maybe it's possible to
exactly locate and extract this backup FAT first and then replace
the defective FAT with this copy, using tools like dd?



 Not interested in the XP system or programs directors. Just want user 
 data files created by adobe pagemaker. Dont know what the file extension 
 is for sure or if there are any way to ID the file from internal 
 content. Best guess I have on file extension is .cv5  Do not have a file 
 to examen.

The recovery utilities that act by magic aren't interested in the
file name extension. From the manuals of the programs listed above
that mention such a functionality, there's no word about Adobe
Pagemaker. Would it have been generic files (such as JPG files
for images, TeX / text files for text), or some kind of ODF archive,
it would be much easier.



 What are the general steps I need to do to recover data from this msdos 
 FAT32 disk with corrupted fat table and maybe corrupted data?

First, copy the partition:

% ddrescue /dev/ad0s2 fat.dd

I'm not sure how the msdosfs formatted disk / the FAT partition
will show up as device file in FreeBSD. In the result, you can
unplug the disk / remove it and only work with the copy.

Then, you can start extracting data from it, for example with

% mkdir retrieve
% foremost -i fat.dd -v -o retrieve -t all

The manpage of foremost has some examples, too.

The manpage of fatback isn't great, info fatback has more
details.

For TSK, use something like this:

% dls -t raw -f fat -v fat.dd

I've got no FAT partitions (defective or intact) at hand so I
cannot check if this really works as I think it should. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Old slow computers can still crank away (Formerly RE: Portsnap vs CSup)

2009-03-20 Thread Polytropon
On Fri, 20 Mar 2009 13:12:12 -0400, Sean Cavanaugh millenia2...@hotmail.com 
wrote:
  Date: Fri, 20 Mar 2009 16:48:26 +0100
  for sure not KDE, but X and FreeBSD itself with good software running on 
  it works FAST on 100Mhz machine with 48MB RAM.
  
  Yes compiling is slow, but normal usage is FAST.
 
 
 I never used gnome or KDE on it, ran Blackbox insted. 

I can ensure that it is still fast. My slowest FreeBSD system,
a 150 MHz P1 with 64 (now 128 MB) EDO RAM, is completely usable
with WindowMaker and applications that do not try to be an all
in one solution, such as mplayer for videos, xmms for MP3 and OGG,
gv, xzgv, StarOffice, LaTeX, Opera and other specialized software.
In terms of server usage these old systems run quite well, don't
consume much power (important when they run 24/7/365).

To add this, my 300 MHz P2 with 128 MB RAM runs SLOWER (!) with
FreeBSD 5 than my 2 GHz P4 with 768 MB (SDR-SD) RAM with FreeBSD
7. This is mostly due to the software running on top of it. While
FreeBSD itself gave a speed boost (in booting and performance),
this advantage was eaten up by the new applications completely,
due to improved libraries. X starts slower, windows render
slower, browser runs slower, nearly everything.

I'm not lying, it's the truth.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Text mode dialog library like TSO

2009-03-20 Thread Polytropon
On Fri, 20 Mar 2009 19:34:52 +0100, cpghost cpgh...@cordula.ws wrote:
 Besides dialog(3), there's also a C++ class library that emulates
 Borland's Turbo Vision's SAA interface. Two implementations are
 in ports:
 
   devel/rhtvision
   devel/tvision

Ugh! :-) The day I got a TurboPascal 7.0 box and manuals I
stopped using this language. I hope nobody gives me a similar
box for C. :-)

After some testing, I think I'm completely happy with CDK and
forms (which is even usable for scripting).

I try to avoid C++ whenever possible, even for X interactive
applications I prefer Gtk with C.

The SAA interface is much too complicated for the things I'd
have to use it. It really needs to be as simple as possible,
with a very narrow set of functionalities. SAA/TV is really
too much (too good) for this.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compression with *.zip output

2009-03-21 Thread Polytropon
On Sat, 21 Mar 2009 08:47:06 +0100 (CET), Zbigniew Szalbot 
z.szal...@lcwords.com wrote:
 Hello,
 
 Is there a command utility to help me compress files with *.zip extenstion
 so that windows users can download and unpack it without using any special
 software?

Maybe this is a stupid follow-up question, but... since WHEN is
Windows able to handle any kind of archive file (except its
own CAB format) without installing any third party software?

Windows users NEED to install additional software for every
little piece that a proper OS should be able to do on its own...





-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compression with *.zip output

2009-03-21 Thread Polytropon
First of all, thanks for enlightening me. I don't use any
MICROS~1 products so it was a really honest question. Whenever
I needed interoperability with a Windows PC, there was the
big problem: For any additional functionality foo you needed
to install WinFoo. There was nothing from the OS's side.

On Sat, 21 Mar 2009 12:27:20 +0200, Manolis Kiagias sonic200...@gmail.com 
wrote:
 Wildly off-topic as we are discussing Windows, but all recent versions
 (XP, Vista, etc) can handle zip files. They call them compressed
 folders (don't confuse with NTFS compression though) and even have a
 silly wizard-like interface for extracting files from them.  If you
 don't like it you can always install WinZip to take over this function.

I've seen WinZip and my stomache reported to me. :-) Much
better is the FAR Manager which handles zip archives (and
many others) just like directories, like the Midnight Commander
does.

It's typical for MICROS~1 to make things more complicated than
they need to be, and invent new names for already known stuff.
The next time someone mentions compressed folders I will know
what he's talking about, and show him some (real) folders I have
compressed to 10cm x 10cm x 10cm handy sized cubes. :-)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Creating a 10km wireless bridge...pointers?

2009-03-21 Thread Polytropon
On Sat, 21 Mar 2009 06:43:01 -0600, Modulok modu...@gmail.com wrote:
 Something
 like:
 
 LAN-BSDrouter-modem-Antenna~~air~~Antenna-modem-DSL

Your BSD router would act as a gateway, eventually using
functions like IPDIVERT and DHCPd via RF. It would then
serve as an AP, put in simple words. This should be achievable
mostly by means of the base OS.

For the RF transmission part, you will need antennas (yagí
type ideally) with a good signal gain and narrow radiation.
It's possible to build them, but I'm sure they're sold, too.
Optionally, a power amplifier (PA) may be added on both
ends to strengthen the signal if it's too low.

In case you have something in the way that hinders a direct
view from your desired AP to the client (e. g. a mountain),
things get a bit more complicated, a repeater would be needed.
But as long as you can see it, you can connect it. :-)

Coming back to your suggestion, I'd express it as follows:

~  ~ 
 V   V
  +--+   |   ~  ~  |
  | wireless NIC |---+   |
DSL in+--- ^ -- v ---+   |   +--+
the wall--*--| ethernet NIC |   +---| wireless NIC |
at your   +--+   +--+
siteyour FreeBSD AP box  client's box

* insert modem if needed

I'm not sure why wou want to employ a modem on the client's
site. If it's only about Internet access, it's usable via the
WLAN component already. If you want to handle IP telephony and
multiple clients... well, more complicated, the client's all in
one modem / spliiter / router / DHCP server / firewall / whatnot
would need to connect to the RF bridge, I'm not sure if this
is possible even if the modem offers WLAN antennas.



 Tips? References? Advice?

Sorry, no. :-) Just some basic thoughts from a radio amateur and
FreeBSD user.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: utility that scans lan for client?

2009-03-23 Thread Polytropon
On Mon, 23 Mar 2009 14:59:36 -0400, John Almberg jalmb...@identry.com wrote:
 What I'm looking for is a utility that can scan a LAN for attached  
 clients... i.e., computers that are attached to the LAN.

As it has been suggested, nmap is a good tool.

Another simple variation would be:

% arp -a

And for a more detailed analysis, the successor of Ethereal
called Wireshark can be very handy (requires X). It makes
you be able to see anything that's going on on the LAN
(read: everything that reaches your NIC).



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxml-2-7-3 (php5 pkg_add)

2009-03-23 Thread Polytropon
On Mon, 23 Mar 2009 17:59:35 +0100, Christoph Kukulies k...@kukulies.org 
wrote:
 I wanted to do a
 
 pkg_add -r php5
 
 under 7.1 Beta1 and got a warning:
 
 pkg_add: warning: package 'php5-5.2.8' requires 'libxml2-2.7.3', but 
 'libxml2-2.6.32' is installed
 
 
 Should I care [...]

Run your PHP and see if it refuses to work, or if you encounter
any problems while running. 2.6.32 and 2.7.3 may be a version gap
that leads to nonfunctionality.



 [...] and if, how do I repair this?

You could update your libxms2 port to get it to a newer version.
If you're using portupgrade (portinstall), use

# pkgdb -aF

to fix package dependencies.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: networked audio

2009-03-23 Thread Polytropon
On Mon, 23 Mar 2009 14:54:06 -0700, Gary Kline kl...@thought.org wrote:
 Be great to have some
   utimate setup (*sigh...*). 

You'll never have. At the moment you've setup something, just
after bringing it home from the shop, it will be considered
outdated, and there's already something new on the way that's
completely incompatible with everything you have. :-)



 For now, what Wojciech suggested
   works, but since most of my ~/Music files are ogg format, mpg123
   may not be sufficient.

How about ogg123 then? Same use.

% cat oggfiles | rsh -l username remote.computer.name ogg123 -



   ``locate xmms2'' found audio/gxmms2; under construction!

Check /usr/ports/audio/xmms2, found out by

% cd /usr/ports
% make search name=xmms2




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: unix admin incident levels

2009-03-23 Thread Polytropon
On Tue, 24 Mar 2009 00:00:56 +0200, Vasadi I. Claudiu Florin 
claudiu.vas...@gmail.com wrote:
 lol, will do that if I can get to an interview :)

Prepare for other important questions, like

If you were a hot dog, would you eat yourself?

or even

Him: Describe yourself in two words.
Me: Innovative and Creative.
Him: Can you explain what you mean by that?
Me: But you said two words...

From SA's Dumb Interview Questions, page 3, via
http://www.somethingawful.com/d/comedy-goldmine/dumb-interview-questions.php

:-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: networked audio

2009-03-23 Thread Polytropon
On Mon, 23 Mar 2009 16:29:36 -0700, Gary Kline kl...@thought.org wrote:
   I thought you were kidding about the ogg123, but no! Is there a 
   wav123, an au123, c? :_)  wait, I just checked and there *is* a
   flac123.    i'll be [bleeped].  

:-)


   ANyway, re xmms2, it's built (I had it but since there was no
   front end and since i really didn't want to spejnt days messing
   with it, I never used it.  I've got gxmms2 working on my linux
   desktopk, but it only works locally.  How do I use [gx]mms2 
   to go over the wire to the audio-server I'm building, show me the
   playlist here and play thru my better speakers?
 
   I had imagined something like:
 
   %  xmms2 -r zen:/home/kline/Music/ 
 
   where the -r would indicate remote ... 

Re xmms2 Miniprod malquoted operations. :-)

Because I haven't installed xmms2 on my system, I'm not 100 percent
sure, but according to http://wiki.xmms2.xmms.se/wiki/Main_Page
it seems that you have to run xmms2 on the box that holds your files
(server) and control the program's operations via the computer with
the better speakers (client) by means of an xmms2 client application.

http://wiki.xmms2.xmms.se/wiki/Using_the_application

A daemonic concept. =^_^=



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: installing freebsd on windows

2009-03-24 Thread Polytropon
On Tue, 24 Mar 2009 21:12:39 -0400, Harold Hartley wheelie...@gwi.net wrote:
 I am wondering if the freebsd team has ever thought of making freebsd to 
 install on windows like ubuntu does.

I'm not sure I do understand install FreeBSD on 'Windows' - what
does on refer to?

a) Start an installer from within Windows that installs
   FreeBSD on the system

b) Run FreeBSD within Windows by means of an emulator

c) Run FreeBSD as an application in Windows

In DOS times, there was a tool that booted Linux from within
DOS. Because things are more complicated in Windows, I don't
think such a tool does exist - it would have to kick Windows
out of memory, and we know that it doesn't like that. :-)

But it's still possible to use FreeBSD without leaving Windows.
You need an emulator. I don't know how they are called in Windows,
but they do exist in FreeBSD as well, for example qemu. In
Windows, there's VMWare that you can buy.

Using such a means of emulation, you can install FreeBSD on a
virtual PC and then use it as it would run on bare metal.



 I'm just a person that can't afford more than one computer cause I live 
 in a nursing home and I would like to be able to use one computer to 
 choose what I want to boot into, such as windows or unbuntu and maybe a 
 freebsd choice.

Then you would need to install FreeBSD on this box. This is
easily be done by downloading the proper ISO from the FTP
server or FreeBSD's web page. See the excellent documentation
in the handbook (on the web page, too) to learn how this is
done.



 I do boot into ubuntu 90% of the time and enjoy it so much, but I have 
 read about freebsd and researched it fully and I wish I could be able to 
   run freebsd as with all the apps freebsd has to offer. I would love to 
 be able to install freebsd under windows so I could choose freebsd to 
 boot into when I want.

There's no need to think so complicated. You start the computer
using the bootable CD or DVD, then install the OS (just as you
installed Ubuntu) and then instruct your boot manager to add a
new entry for FreeBSD. That's all.

I hope I'm not saying anything incorrect, but to answer your main
question: No, it's not possible to install FreeBSD in Windows.

What you want to achieve has nothing to do with Windows, just
ignore it.



 I hope to hear from freebsd about my request, and by the way, I'm not a 
 linux expert so I don't know everything about linux, but I'm always 
 learning.

FreeBSD's documentation (the handbook and the FAQ, to be found
on FreeBSD's web site) will help you to do so.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: xorg-server-1.5.3_7, /usr/ports/UPDATING, mouse

2009-03-24 Thread Polytropon
On Tue, 24 Mar 2009 20:29:35 -0600, Tim Judd taj...@gmail.com wrote:
 So I don't think the hal has the concept of joining the keyboard and
 mouse together to a single usb device.  The pair works beautifully in
 the console... so I'm not sure if this is a bug worthy of reporting, or
 if I should research it more and try to discover the solution with a
 logitech pair that is known to work in the console to work in hal.

Does the combination result in two devices (ukbd0, ums0)? Maybe
it's possible to instruct HAL to use the devices explicitely, by
hard coding them into some configuration file?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: installing freebsd on windows

2009-03-24 Thread Polytropon
On Tue, 24 Mar 2009 22:59:40 -0400, Harold Hartley wheelie...@gwi.net wrote:
 Ubuntu uses wubi 
 installer like an application and can be uninstalled if anyone didn't 
 like it. And it sets it up at the boot up time a list to choose from.
 
 That is about what I was talking about.

Okay, I do understand. I haven't used any MICROS~1 products yet,
and I've installed Ubuntu just from its CD or DVD for testing
purposes, but I'm not a Linux user, so I definitely don't have
much experience in this sector.



 I'm not sure how they did that using the wubi installer But if freebsd 
 could do something like that, it would be great.

Hmmm... I may still ask: What should it be good for, exactly?

Those who want to use FreeBSD usually install it by one of the
standard means. They usually don't have Windows or do already
want to use a two-or-more-OS system, but they don't run the
installer from within Windows.

(Side note: I think there's already a tool that lets you install
FreeBSD from within Linux, useful if you want to replace an
already pre-loaded OS on a server where you don't have physical
access to simply put in the FreeBSD installation CD.)

Those who want to try FreeBSD don't install it, they run it from
a live system CD (e. g. FreeSBIE) or use it in an emulator (and
install it there).

Furthermore, there's VirtualBSD: http://www.virtualbsd.info/ for
maximum Windows compatibility. :-)



 But will it over write the bootup list or the windows or ubuntu 
 software.

No. At installation time, you can instruct it to leave the boot
area of your hard disk untouched. The only thing you may need is
to put a setting into the boot manager you're using at the moment
to boot between Ubuntu and Windows so it can also boot into
FreeBSD. Maybe your boot manager automatically detects the new
OS and adds a choice by itself.

You can, however, use FreeBSD's boot manager to make the boot
selection at system startup.

Everything you need is some disk space on your hard disk (not
occupied by any slice, partition how it's called by Windows).
The installer allows you to delete anything existing (what you
don't need anymore) and create a slice to install FreeBSD in.
You can also install it on another (physical) hard disk.



 Or does freebsd offer a choice to install without messing 
 anything up.

It's a professional operating system, of course it does. :-)
(FreeBSD exactly does what you tell it to do, nothing more and
nothing less.)




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: installing freebsd on windows

2009-03-24 Thread Polytropon
On Tue, 24 Mar 2009 23:30:58 -0400, Harold Hartley wheelie...@gwi.net wrote:
 Some may be running windows and may want to try freebsd and doesn't want 
 to rid windows.



 But if something could be done to make it easy enough for those that 
 doesn't know how to install freebsd or something of that sort.

I think the FreeBSD documentation makes it easy enough. :-)

NBo, honestly: It's so easy, simply put in the CD and follow
the instructions on the screen. There's no black magic involved.



 I know how to install linux to a drive without other OS's on it and I 
 know how to use the command line to install or setup other apps like 
 flash or java and other apps that need other commands.
 



 But I'm sure others are not familiar with using the command line and 
 such for installing a OS.

But then, FreeBSD surely isn't for them.

For those users, PC-BSD and DesktopBSD are much better ways to go.
They do still have a functional FreeBSD OS, but the installer is
with nice graphics and guides them through a next, next, next,
next, next, reboot procedure as they know it from Windows.

If you want to have a look at it, these are the homepages:

PC-BSD  ===http://www.pcbsd.org/
DesktopBSD  ===http://www.desktopbsd.net/

And PC-BSD even provides an installer (PBI) that makes Windows
users feel at home: Download something from the web manually,
then click next, next, next, finish and have an application
installed. :-)



 I really am interested in freebsd, but I don't want to mess up my OS's 
 on my drive either.

You don't need to be frightened of that. In order to wipe off
something you still need, you will have to be VERY stupid. :-)

FreeBSD provides means that warn you if you're accidentally doing
something wrong. But please keep in mind that FreeBSD relies on
the circumstance that IF you instruct it to do something, you're
SURE that you want to do so.

Everything you need is some free space on the disk. Anything
else keeps unmodified.



 My main interest is wanting to learn how to develop code on linux and/or 
 freebsd.

Then you won't encounter any problems. As a Linux user, you're
already equipped with basic UNIX knowledge that will help you
to understand FreeBSD.



 If I had a second drive on my computer, could I install freebsd on the 
 2nd drive and still select it from the boot list

Of course. As I mentioned, your boot manager will have to know
about the new OS, either by you (putting the correct information
into it) or by itself (autodetection of a second hard disk with
a valid boot block).



 Maybe I should take this to the other topic of the mailing list.
 I noticed you CC to the freebsd-questions list. Is that the list I need 
 to continue my questions on.

Yes. I think it's okay to CC the list because our conversation
may be helpful to others. I'm not intending something evil. :-)




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to configure xbiff

2009-03-25 Thread Polytropon
On Wed, 25 Mar 2009 16:21:48 +0100 (CET), Pieter Donche 
pieter.don...@ua.ac.be wrote:
 What precise command do I have to write in what startup file, 
 so that this does the same thing on FreeBSD/KDE3.5 ?

I have the following line in my ~/.xinitrc:

xbiff -geometry 50x50+0+998 

This is for the lower left corner of a 1400x1050 21 CRT.

If you think you need further options, consult man xbiff. :-)


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Rebuild of Kernel to burn DVD failed

2009-03-25 Thread Polytropon
On Wed, 25 Mar 2009 11:35:54 -0700, Kayven Riese kay...@gmail.com wrote:
 I was trying to burn a DVD
 
 KV_BSD# growisofs -dvd-compat -Z /dev/acd0 -J -R disk1
 :-( unable to CAMGETPASSTHRU for /dev/acd0: Inappropriate ioctl for device

You cannot use growiso with the acd driver, you need the cd
driver which is provided by atapicam facility.

You can simply load it via the kldload command if you don't 
want to rebuild your kernel.



 here is the dmesg for the DVD burner
 
 KV_BSD# dmesg | grep DVD
 acd0: DVDR TSSTcorpCD/DVDW TS-L532A/TC51 at ata1-master UDMA33
 cd0: TSSTcorp CD/DVDW TS-L532A TC51 Removable CD-ROM SCSI-0 device

Oh, it seems that you already have the atapicam / cd setting in
your kernel running. Fine! Just change the command:

# growisofs -dvd-compat -Z /dev/cd0 -J -R disk1

This should work.

I have a symlink set via /etc/devfs.conf as /dev/dvd@ - cd0
so I can use the command

% growisofs -dvd-compat -Z /dev/dvd=foo.iso

as presented in growisofs's manpage. :-)




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Repairing a defective UFS 2 partition with another BSD's fsck

2009-03-25 Thread Polytropon
Dear -fs list,

last night I had an idea how I could have a chance to repair my
defective UFS partition. To remember, this is the whole story:
http://kerneltrap.org/mailarchive/freebsd-fs/2008/11/2/3894714
Repairing a defective UFS 2 partition with fsck_ffs (or other means)

I thought about the following:

As far as I know, UFS isn't only used by FreeBSD, but also by
OpenBSD and NetBSD. Variations should be less than, let's say,
with Solaris UFS. So it may be that I can use the fsck utility
of OpenBSD or NetBSD to check and repair the UFS dd duplicate
where FreeBSD's fsck fails with

fsck_ffs: bad inode number 306176 to nextinode

To use with NetBSD, I've got a NetBSD Live! 2007 live system
CD here. For OpenBSD... well, I don't know if they offer any
live file system?

The only commands I'd need are mount and fsck (both for UFS
only). The system should be bootable via CD. Then I would need
a shell to do something like this:

# mkdir /temp
# mount -t ufs -o rw /dev/wd1s1c /temp
# cd /temp/rescue
# fsck -t ufs -yf ad1s1f.dd

In case NetBSD's or OpenBSD's fsck can't operate on the bare file,
I'd think about something like:

# mkdir /temp
# mount -t ufs -o rw /dev/wd1s1c /temp
# cd /temp/rescue
# mdconfig -a -t vnode -u 10 -f ad1s1f.dd
# fsck -t ufs -yf /dev/md10

What do you think, is this even possible? Should I try it?




Please keep me CC because I'm on the questions@ list only. Thanks!

I'll cross-post it to questions@ in case someone there as an idea
for this really strange problem - remember, I'm the second (!)
being on this planet having encountered this particular problem.

I hope that's an acceptable behaviour. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Desktop environments

2009-03-25 Thread Polytropon
On Wed, 25 Mar 2009 23:17:51 -0400, Jesse Feinman jesse.fein...@gmail.com 
wrote:
 I am planning on using FreeBSD on a new computer i am building but i would
 like to know if there is a way that i can install multiple desktop
 environments and easily switch between them, preferably without restarting.

That's no problem. First of all, install the desktop environments and
window managers that you want. As far as I know, the big two, KDE and
Gnome, come with a means to select what DE / WM to use at login time
through their kdm and gdm.

Additionally, wdm offers you to choose the DE / WM at login time.

This simply requires a login / logout procedure, no restarting of the
computer.

You can even have it more simple: Don't start X along with the system,
login at the console. Modify the exec DE or WM statement in your
~/.xinitrc and type startx to perform the DE / WM startup you have
in this file (you can put comment signs infront of those you don't
like, enabling the one you want to run). Or you could have several
aliases / commands to start X with the DE / WM you want, each with
a specific ~/.xinitrc file to fit your needs.



 The primary purpose for this is to gain complete functionality over the
 system utilizing all possible tools [...]

In principle it's not required to run a specific DE in order to run
a program that comes with this DE. For example, you can perfectly run
K3B within WindowMaker, as long as all the dependencies of K3B are
installed on your system. You can run Gmplayer without Gnome, you can
run Koffice in XFCE and so forth...



 [...] and also to evaluate the different
 environments to determine which one works best for me.

Then, if you won't change the DE / WM every five minutes, you can go
with the ~/.xinitrc approach. Short example:

#!/bin/sh
[ -f ~/.xmodmaprc ]  xmodmap ~/.xmodmaprc
xsetroot -solid rgb:3b/4c/7a
xset b 100 1000 15 
xset r rate 250 30 
xset s off 
xset -dpms 
#exec gnome-ession
#exec fvwm
#exec startkde
#exec xfwm
exec wmaker

This will start WindowMaker.



 Lastly, i am wondering how Compiz-fusion would interact in this case because
 to my knowledge Compiz is essentially an add on to the KDE and Gnome
 environments and i am wondering as to how it would function if i were to
 switch desktops constantly.

It would be no problem, as far as I know. I'm not very familiar with
Compiz because I'm already tired of eye-candy. :-)

You can even use Compiz with XFCE, or use its own compositing
functionalities.

As far as I understood, Compiz is an addition to the respective
DE / WM, and while the DE / WM will run happily without Compiz,
those that don't utilize it won't have problems.

If Compiz needs specific settings in ~/.xinitrc, you can put some
kind of conditional into this file, loading Compiz only with the
DE / WM you want.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to configure xbiff

2009-03-26 Thread Polytropon
On Thu, 26 Mar 2009 08:39:38 +0100 (CET), Pieter Donche 
pieter.don...@ua.ac.be wrote:
 From a terminal window command line xbiff -geometry 50x50-5+5  puts
 it in my upper right corner, [...]

Do you use -5 to get rid of a window border added by KDE's window
manager?

 but if I put that in my .xinitrc 
 (and chmod 755 ~/.xinitrc) nothing happens.

It needs to be loaded before the startkde exec (I think it was
called this way). And your .xinitrc is +x, then it should look
a bit like this:

#!/bin/sh
[ -f ~/.xmodmaprc ]  xmodmap ~/.xmodmaprc
xrandr --size 1400x1050 
xrandr --fb 1400x1050 
xclock -geometry 50x50+50+998 
xbiff -geometry 50x50+0+998 
xlogo -geometry 50x50+100+998 -render 
exec startkde

All the initial stuff has to end with , and the window manager is
the last command, prefixed by exec (so it replaces the shell).



 Are you using kdm window 
 manager or xdm ? (I have in my /etc/ttys: 
 ttyv8 /usr/local/bin/kdm -nodeamon xterm on secure)

Neither. In the past, I've used xdm (as your example above, just with
xdm instead of kdm), and this worked fine.

A note towards your shell: If you're using the standard dialog shell
(i. e. the C Shell), it might be neccessary to have a ~/.xsession
which is +x and does contain:

#!/bin/csh
source ~/.cshrc
exec ~/.xinitrc



 Would .xinitrc not be processed by kdm window manager?

This is completely possible. Maybe kdm defaults to a builtin xinitrc
that launches KDE after successful login.

I'm no KDE user so I can't tell.

Just as a side question, doesn't KDE offer something with the same
functionality like xbiff, so you can use KDE's builtin tool?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: init panic in freebsd 7.1

2009-03-29 Thread Polytropon
On Sun, 29 Mar 2009 14:23:13 -0400, Tsu-Fan Cheng tfch...@gmail.com wrote:
 init: not found in path /sbin/ (a lot of paths)
 panic: no init
 
 what is that??

The init process is the root of the FreeBSD startup, and the last
part of the OS loader cannot find it, so the OS cannot start.

http://www.freebsd.org/cgi/man.cgi?query=initapropos=0sektion=8manpath=FreeBSD+7.1-RELEASEformat=ascii

You can use a live system CD of FreeBSD (6, 7) or FreeSBIE to boot
the system with this CD, it should work. Then you can mount your
/ partition and check the existance of init which usually is
/sbin/init. Don't forget to fsck the hard disk, maybe due to the
failing power supply you had some damages on the hard disk (file-wise),
or even worse...




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: init panic in freebsd 7.1

2009-03-30 Thread Polytropon
On Mon, 30 Mar 2009 08:20:46 -0400, Tsu-Fan Cheng tfch...@gmail.com wrote:
 But while I was testing an
 exact same mborad I got from ebay, I noticed that the replacing board
 name my SATA differently from the old board, its designated as ad10
 and ad12 instead of ad4 and ad6. What is the mechanism that underlie
 this?? thank you!!

The numbering sceme depends on the controller and the amount of
possible disks it allows to be attached, to be describable as
free controller slots, no matter if a disk is attached or not.
Maybe your first mboard had ad0 - ad4 ATA, ad6 - ad8 SATA, and
the new board has (a) more ATA connectors or (b) uses a different
numbering for the internal and external SATA ports. If the hardware
seems to look exactly the same, there can even be a difference in
the BIOS configuration that causes different numbering.

Note that this change of the device name usually requires changes
in /etc/fstab, e. g. ad4 - ad10 to make the system start on this
hardware.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why?? (prog question)

2009-03-31 Thread Polytropon
I don't want to start a style debate, but forgive me the
following annotations:

1. Use the tab character for indentation. You can set its
   length with your favourite editor (e. g. mcedit: F9,
   Options, General; joe: ^TD). Don't waste with spaces.

2. The main() function should be declared as
int main(int argc, char *argv[])
   or
int main(int argc, char **argv)
   Note that it's returning (int). Use this functionality.

3. In case of errors (e. g. incorrect number of parameters)
   use fprintf() to stderr, or perror() with the builtin
   error handling (e. g. for file not found by fopen()).

4. Use the predefined return codes, don't hardcode them.
   FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
   maximum compatibility (such as with Linux). There are
   more exit codes for differentiation, but they're specific
   to FreeBSD, as far as I know.

5. This is highly debatable: Use a good style for { and }.

6. Use delimiters around operators, e. g. buf[strlen(buf) - 1]
   instead of buf[strlen(buf)-1]; increases readability.

Here is the program again, with some stylistic modifications
and the correct (read: recommended, usual) exit code handling:




/*
 * simple prog to join all | very nearly all lines of a text file
 * that make up one paragraph into one LONG line.  
 *
 * paragraphs are delimiated by a single \n break.
 */

#include stdio.h
#include string.h
#include stdlib.h

int main(int argc, char *argv[])
{
char buf[65536];


if(argc == 1) {
fprintf(stderr, Usage: %s  file  newfile\n, argv[0]);
exit(EXIT_FAILURE);
}

while (fgets(buf, sizeof buf, stdin)) {
if(*buf == '\n') {
fprintf(stdout, \n\n);
} else {
buf[strlen(buf) - 1] = ' ';
fputs(buf, stdout);
}
}

return EXIT_SUCCESS;
}





Note that compiling with -Wall (always a good option) doesn't
show any warning.



I read my advices again... makes me sound so old! :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale 
will.rutherd...@utoronto.ca wrote:
 Tabbing is the worst form of indentation.  It is *much* better to use 
 spaces consistently.

may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up one indentation level,
beginning from 1, over 4, up to 10. Where's the consistency, or is
it defined on a per-programmer basis?

And why is this much better?

When I would compare both indentation forms, I'd say that tabbing
is the better form because
 + you can set your individually preferred tab with using the
   settings of your editor, be it 1, 4 or 8,
 + you can change the indentation while you're coding, e. g. when
   the indentation level makes the code exceed the right margin
   of your editor's window,
 + per indentation level only 1 byte is needed (tab = ASCII 9), while
   spacing requires more bytes, one per space (space = ASCII 32),
 + while you can convert tabs into spaces, you cannot easily convert
   spaces back into tabs, and finally
 + even FreeBSD uses the tabbing style.

I'm aware that one can argue about where { is to be placed, but
I don't see any valid reason to use spaces for indentation instead
of tabs (which I would even call standard).

It's a honest question: What are your arguments for using tabs?
Hint: it is *much* better doesn't count. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale 
will.rutherd...@utoronto.ca wrote:
 Tabbing is the worst form of indentation.  It is *much* better to use 
 spaces consistently.

may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up one indentation level,
beginning from 1, over 4, up to 10. Where's the consistency, or is
it defined on a per-programmer basis?

And why is this much better?

When I would compare both indentation forms, I'd say that tabbing
is the better form because
 + you can set your individually preferred tab with using the
   settings of your editor, be it 1, 4 or 8,
 + you can change the indentation while you're coding, e. g. when
   the indentation level makes the code exceed the right margin
   of your editor's window,
 + you need more keypressing to get through the indentation with
   the spaces, one keypress per space, while you only need one
   keypress per tab (which equals one indentation level),
 + per indentation level only 1 byte is needed (tab = ASCII 9), while
   spacing requires more bytes, one per space (space = ASCII 32),
 + while you can convert tabs into spaces, you cannot easily convert
   spaces back into tabs, and finally
 + even FreeBSD uses the tabbing style.

I'm aware that one can argue about where { is to be placed, but
I don't see any valid reason to use spaces for indentation instead
of tabs (which I would even call standard).

It's a honest question: What are your arguments for using tabs?
Hint: it is *much* better doesn't count. :-)



// EDIT: added one further argument pro tab
/*


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Question about forcing fsck at boottime

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 18:57:21 +0200 (CEST), Oliver Fromme 
o...@lurza.secnetix.de wrote:
 Google background fsck damage.
 
 I was bitten by it myself, and I also recommend to turn
 background fsck off.  If your disks are large and you
 can't afford the fsck time, consider using ZFS, which
 has a lot of benefits besides not requiring fsck.

You can always ask yourself: What is more important, the
boot-up time or my data? In any case, I'd recommend to
emphasize the importance of the data, so even with larger
UFS disks, it's okay to wait a bit, but then be sure that
nothing is damaged.

Furthermore, I agree with the recommendation of ZFS. If your
hardware is good enough (which shouldn't be a problem today),
ZFS handles possible data damages much better and faster.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 19:20:17 +0100, Bruce Cran br...@cran.org.uk wrote:
 Linux seems to have adopted sysexits.h too, which provides error codes
 such as EX_USAGE and EX_CANTCREAT.

Good to know this, thanks. I'm not a big Linux user and a much
smaller Linux programmer (read: I don't program for Linux), so
I wasn't aware that they use it, too.



 However, in FreeBSD at least the most
 common programming style is to use 1 for error and 0 for success - e.g.
 from style(9):
 
 errx(1, number overflowed);

This matches the definition of the two EXIT_* variables in
the standard library header file:

% grep EXIT /usr/include/stdlib.h 
#define EXIT_FAILURE1
#define EXIT_SUCCESS0

It's no problem to use 0 and 1, but personally, I think the
verbose reason is better to read. :-)



And thanks for the pointer to man 9 style, I see that I've
practiced a quite good style over the years without even
knowing it. :-)

-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 08:54:17 -0700, Gary Kline kl...@thought.org wrote:
  1. Use the tab character for indentation. You can set its
 length with your favourite editor (e. g. mcedit: F9,
 Options, General; joe: ^TD). Don't waste with spaces.
 
   Ja, been doing this since 1978.  Does anybody hit space-key 
   8 times!?

I've seen corporate guideline for indentation = 10 spaces.
Used ^TD8 and then finally replace tab - '  '. :-)



  2. The main() function should be declared as
  int main(int argc, char *argv[])
 or
  int main(int argc, char **argv)
 Note that it's returning (int). Use this functionality.
 
   I've come to prefer the *char argv[] ...  I didn't use the formal int
   return because this was supposed throwaway code.  (Going on years now
   tho, so ... my-bad.)

The standard assumption of the return code is (int), so if
it's not declared, it's (int) anyway.



  4. Use the predefined return codes, don't hardcode them.
 FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
 maximum compatibility (such as with Linux). There are
 more exit codes for differentiation, but they're specific
 to FreeBSD, as far as I know.
 
   This I did not know.  I have a prefab include file with a bunch 
   of my own similar #defines.  Wow, great!

FreeBSD defines additional exit codes to specify the reason for
exiting more precisely in /usr/include/sysexits.h - for your
example, exit(EX_USAGE); would be a good exit code.

I don't know how far this is adopted in Linux, but I think you
can only use the C99 two standard return codes.

From man 3 exit:
 The C Standard (ISO/IEC 9899:1999 (``ISO C99'')) defines the values 0,
 EXIT_SUCCESS, and EXIT_FAILURE as possible values of status. 



  5. This is highly debatable: Use a good style for { and }.
  
 
   Well, you're using the KR { }; but for me, the Ingres
   style [[ yes, it was invented by someone else ]] gets my vote.
   I scan
   {
 and
   }
 
   more easily.  6 of one, half-dozen of another... .

In fact, I'm sticking to the concept that only the highest level
of code groupers deserve a new line {: these are functions in
C and class methods in C++. Everything else has the { appended
(after a space) to the construct that causes the {. So if you find
a }, you only need to look up. It's obvious that a } is caused
by a {, but you want to know the construct that made it appear,
for example if(), while(), a struct definition or something similar.
With this concept at hand, looking up will make you find this
construct in question at the first glance.

You could see this in the example.

But as we'll all agree, this is a thing of individual preference.


  Here is the program again, with some stylistic modifications
  and the correct (read: recommended, usual) exit code handling:
 
   I'll swipe this.  I use this code with openoffice and abiword
   because I compose with vi;  but I almost always forget to run 
   my text thru joinlines and have to quit the word processor, run
   jlines foo bar; mv bar foo; then restart the word processor.
   I figure that I've spend several centuries of my lifetime messing 
   with jlines, so i'm overdue for doing it right

I think OpenOffice has the function Input - from file (at least
the german version has: Alt-E D = Einfügen Datei). This makes it
easier to incorporate text from an external file.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why?? (prog question)

2009-04-01 Thread Polytropon
 of arguments and just run all the code they receive through
 a code formatter like astyle.  It lets you set all kinds of options such
 as brace placement, spacing between parameters, indentation method, and
 so on.  If asking people to change their editor settings doesn't work,
 this thing fixes it up.

On e you setup your reformatter correctly (as according to the
corporate guidelines), this is a valid solution, yes.



   + even FreeBSD uses the tabbing style.
 

 And therefore if I submit code for FreeBSD then I will use that format.
 However I wouldn't recommend it for other projects where that decision
 has not been established.

According to your above argumentation, summarized as it doesn't really
matter how you indent, or even if you indent, this is an acceptable
standpoint.

Personally, I have the (maybe outdated) opinion that a programmer should
not only care for his programs to be valid, correct, efficient, well
structured, intended and documented, but also tidy and styled. What's
to understand from these words can be very individual, I agree.



 There are lots of cases where it's hard to make code line up the way you
 want it with tabs.  Often code that looks good with one tab length
 setting (say 8) doesn't look so good with another (say 4).  It gets
 especially bad when there are a few space characters thrown in, which
 people often do.

Okay, I didn't think of this. Taking this argument into mind, spaces
can be useful for parameter lists that don't fit into one line, but
should line up after the opening (, e. g.

foofunction(data, %d,%d,%d, doodle.x, doodle.y, doodle,z,
foo, bar, pups, furz, This is some stupid text.,
doom[dee].quoggle);

This wouldn't be easy to achieve with tabs, especially when their
width may vary.


Thank you for your arguments, I stand partially corrected. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: py24-gobject won't deinstall

2009-04-01 Thread Polytropon
On Wed, 1 Apr 2009 07:41:15 -0500, Richard DeLaurell 
richard.delaur...@gmail.com wrote:
 I tried pkg_delete to see what depends on py24-gobject and it's a hefty
 list; is deinstalling that entire list and then installing py25-gobject the
 only option for me?

No, it would be possible to first

# pkg_delete -f /var/db/pkg/py25-gobject*

and then install the updated version. As long as the update doesn't
break any library version numbering, and the functionalities from the
previous versions are still intact, there won't be a problem.

Finally, if you're using portupgrade, make sure to correct the
dependencies:

# pkgdb -aF

But note that if this procedure fails, you will usually have to deinstall
the depending software and then start allover again, this will lead you
finally to updated programs, as well as an updated py25-gobject (as a
dependency).


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


<    1   2   3   4   5   6   7   8   9   10   >