Wednesday, 05 Mar 2008NFS on FreeBSD/etc/exports will have who is allowed to access NFS server. Tuesday, 11 Dec 2007MySQL on FreeBSDproblems compiling line: c++ -DDBUG_OFF -O2 -fno-strict-aliasing -pipe -O2 -fno-strict-aliasing -pipe -felide-constructors -fno-rtti -fno-exceptions -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -o mysqld sql_lex.o sql_handler.o item.o item_sum.o item_buff.o item_func.o item_cmpfunc.o item_strfunc.o item_timefunc.o thr_malloc.o item_create.o item_subselect.o item_row.o item_geofunc.o field.o strfunc.o key.o sql_class.o sql_list.o net_serv.o protocol.o sql_state.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o set_var.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o sql_prepare.o sql_error.o sql_locale.o sql_profile.o sql_update.o sql_delete.o uniques.o sql_do.o procedure.o item_uniq.o sql_test.o log.o log_event.o init.o derror.o sql_acl.o unireg.o des_key_file.o discover.o time.o opt_range.o opt_sum.o records.o filesort.o handler.o ha_heap.o ha_myisam.o ha_myisammrg.o ha_berkeley.o ha_innodb.o ha_ndbcluster.o ha_ndbcluster_cond.o sql_db.o sql_table.o sql_rename.o sql_crypt.o sql_load.o mf_iocache.o field_conv.o sql_show.o sql_udf.o sql_analyse.o sql_cache.o slave.o sql_repl.o sql_union.o sql_derived.o client.o sql_client.o mini_client_errors.o pack.o stacktrace.o repl_failsafe.o sql_olap.o sql_view.o gstream.o spatial.o sql_help.o sql_cursor.o tztime.o my_time.o my_user.o my_decimal.o sp_head.o sp_pcontext.o sp_rcontext.o sp.o sp_cache.o parse_file.o sql_trigger.o ha_example.o ha_archive.o ha_tina.o ha_blackhole.o ha_federated.o -pthread -pthread -L/usr/ports/databases/mysql50-client/work/mysql-5.0.45/bdb/build_unix -ldb ../innobase/usr/libusr.a ../innobase/srv/libsrv.a ../innobase/dict/libdict.a ../innobase/que/libque.a ../innobase/srv/libsrv.a ../innobase/ibuf/libibuf.a ../innobase/row/librow.a ../innobase/pars/libpars.a ../innobase/btr/libbtr.a ../innobase/trx/libtrx.a ../innobase/read/libread.a ../innobase/usr/libusr.a ../innobase/buf/libbuf.a ../innobase/ibuf/libibuf.a ../innobase/eval/libeval.a ../innobase/log/liblog.a ../innobase/fsp/libfsp.a ../innobase/fut/libfut.a ../innobase/fil/libfil.a ../innobase/lock/liblock.a ../innobase/mtr/libmtr.a ../innobase/page/libpage.a ../innobase/rem/librem.a ../innobase/thr/libthr.a ../innobase/sync/libsync.a ../innobase/data/libdata.a ../innobase/mach/libmach.a ../innobase/ha/libha.a ../innobase/dyn/libdyn.a ../innobase/mem/libmem.a ../innobase/sync/libsync.a ../innobase/ut/libut.a ../innobase/os/libos.a ../innobase/ut/libut.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -lwrap -pthread -pthread -lcrypt -lm -pthread -pthread /usr/bin/ld: cannot find -ldb A recommendation on http://www.irbs.net/internet/postfix/0407/0427.html∞ to use -ldb3 instead. don't know what to do yet.... Tuesday, 13 Nov 2007more on VMWare on FreeBSDI'm just learning that maybe I don't need VMWare server, but just VMWare could be good enough. So I 'm trying to get VMWare 3.0 to work from the ports. It almost worked, but at the end there was a conflict between two 'linux bases'. ===> Installing for linux_base-fc-4_10 ===> linux_base-fc-4_10 conflicts with installed package(s): linux_base-8-8.0_14
They install files into the same place.
*** Error code 1Please remove them first with pkg_delete(1). I don't know how linux_base-8-8.0_14 got there anyway; actually I think this installation probably put it there and is confusing itself. I'll do what it says and try again. Of course, there are more dependencies: $ sudo pkg_delete linux_base-8-8.0_14 pkg_delete: package 'linux_base-8-8.0_14' is required by these other packages and may not be deinstalled: linux-expat-1.95.7 linux-fontconfig-2.2.3_2 linux-XFree86-libs-4.3.99.902_7 linux-sun-jdk-1.4.2.10 I installed java before, but I have no idea why it would depend on some linux package. Other packages involved: javavmwrapper-2.0_6. This came up during installation: +++ Some programs may need linprocfs, please add it to /etc/fstab! +++ And here are the use instructions ... ""************************************************************"" I don't know how to mount linprocfs, but mount_linprocfs is a special kind of mount. I completely guessed and tried to mount one of the files in the tar of the UCSB CTF 2006 image. $ sudo mkdir /vmwroot $ sudo mount_linprocfs CTF.vmsd /vmwroot/ I have linux.ko module, looking with kldstat. Actually I don't know if I had it before. Doing kldload aio got me the aio.ko module. Friday, 9 Nov 2007getting VMWare Server to run on FreeBSDOkay, I've read up and found the Server is not supported right now, though I did see VMWare 3.0 for non server Guest Hosts is available in the ports tree. Basically, I'll try to get some Linux on the machine side by side with FreeBSD and put VMWare Server there. Now what's the best Linux to do this and how can I get it there? do I have GRUB? what bootloader does FreeBSD use? I never looked This guy∞ seems to have had some fun getting lots of OS's on one machine. He got 9 on one disk, but I only need two.
I didn't realize that if you have multiple systems, your boot loader's conf file can be located in any of the systems' boot directories. Does that mean that when you start your machine, that particular partition holding the booting information has to get mounted first or does everything get mounted before any booting happens? What's the correct order of everything? Christopher Caldwell ( this guy ) says GRUB keeps track of the physical location of the partition that has the boot information and does a read before anything actually gets mounted. I'll trust him for now. My first step was to make GRUB 0.97. As I understand from the pkg-description, installing it is strange since this involves editting the master boot record. I really hope my floppy drive works if I need it. This is what I get after the initial not-an-install install phase: To install GRUB on the master boot record of your hard drive use 'grub-install <drive-to-install>' command. NOTE: Don't forget to run 'sysctl kern.geom.debugflags=16' on 5.x and -CURRENT to enable writing in hard disk
system areas. For details read the GRUB info page using 'info grub'. I know I need to get grub to work for FreeBSD and Linux. So that means covering BSD used UFS or UF2 Linux journaling fs's EXT2 or EXT3 or JFS ( notes from ibm on FreeBSD∞. More on GRUB on FreeBSD at freebsd.org∞. reading about it with info grub copying stage* files for grub install to a spare floppy First I had to go dumpster diving for a floppy. I formatted it and gave it a new fs: $ sudo fdformat /dev/fd0 Password: Format 1440K floppy `/dev/fd0'? (y/n): y Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done. $ sudo disklabel -w -r /dev/fd fd/ fd0 $ sudo disklabel -w -r /dev/fd0 grub1440 disklabel: grub1440: unknown disk type $ sudo newfs /dev/fd fd/ fd0 $ sudo newfs /dev/fd0 /dev/fd0: 1.4MB (2880 sectors) block size 16384, fragment size 2048 using 3 cylinder groups of 0.50MB, 32 blks, 64 inodes.
super-block backups (for fsck -b #) at:160, 1184, 2208 Reading about this from here∞. get those staeg*files onto the disk I'm still following along from the freebsd.org site∞. They describe using dd to copy the files to the disk. I find it just slightly strange that no mounting is necessary to copy over bytes to the floppy disk block device. It seems that it's not necessary, purely because the author here wishes to copy files at specific offsets on the disk that would not be available by cping to a mounted floppy. $ sudo dd if=stage1 of=/dev/fd0 bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.157955 secs (3241 bytes/sec) $ sudo dd if=stage2 of=/dev/fd0 bs=512 seek=1 dd: /dev/fd0: Invalid argument 227+1 records in 227+0 records out 116224 bytes transferred in 47.862369 secs (2428 bytes/sec) I still have to get those other file systems' files on there. Which of "ufs2_stage1_5", "ffs_stage1_5", "e2fs_stage1_5" ? Or jfs_stage1_5 too. I put the rest in with dd just adding the offsets like so: $ sudo dd if=ufs2_stage1_5 of=/dev/fd0 bs=512 seek=228 Password: dd: /dev/fd0: Invalid argument 15+1 records in 15+0 records out 7680 bytes transferred in 4.098047 secs (1874 bytes/sec) $ sudo dd if=e2fs_stage1_5 of=/dev/fd0 bs=512 seek=243 dd: /dev/fd0: Invalid argument 16+1 records in 16+0 records out 8192 bytes transferred in 4.350135 secs (1883 bytes/sec) $ sudo dd if=iso9660_stage1_5 of=/dev/fd0 bs=512 seek=259 dd: /dev/fd0: Invalid argument 14+1 records in 14+0 records out 7168 bytes transferred in 3.921787 secs (1828 bytes/sec) $ sudo dd if=jfs_stage1_5 of=/dev/fd0 bs=512 seek=273 dd: /dev/fd0: Invalid argument 17+1 records in 17+0 records out 8704 bytes transferred in 4.562088 secs (1908 bytes/sec) $ sudo dd if=xfs_stage1_5 of=/dev/fd0 bs=512 seek=290 dd: /dev/fd0: Invalid argument 19+1 records in 19+0 records out 9728 bytes transferred in 4.980848 secs (1953 bytes/sec) I hope I didn't make a mistake, but I only hope they don't have to be in any special order. I think everything transferred successfully, because I checked on the files from grub using find /boot/grub/stage1, looking for everything that I transfered over including menu.lst and it was all reported there. Well, I tried to use root (fd0) to do what looks like install all the stage files again!? but grub didn't recognize my file system. I don't know why, but maybe the other instructions I followed used a bad fs? Before I didn't use the option -O1 withi newfs. The next time I tried this by copying without using dd. This time grub recognized my file system as ffs ( maybe that's what it had expected before and not default FAT ? ) and the installation worked. The first time, I had my menu.lst file all wrong. I had to make a lot of changes because I only want to try grub out with one OS, FreeBSD itself. I don't have Ubuntu on here (and I don't quite know how to get it there either). I hope this works. The next step would be to just boot from the floppy. The Grub manual is also at the GNU website∞. Stage 2 possible errors listed at gnu.org∞. Well I messed something up and now I can't boot... So I'm looking around in different places to try to figure out what I can do now. I think I can try to make a rescue floppy using someone else's computer, hope the problem is isolated to the menu.lst file I created and try to fix it or actually use an Ubuntu cd, boot from it and try to fdisk the last partition so I actually get Ubuntu on like I wanted. If the third option doesn't work, I can also start this system from scratch since I backed what I really needed ( I hope, probably not! Well, files yes, all of my configurations, no, so it would be nice not to start all that over.) If I try to get Ubuntu on a second partition, that means I probably need to split up the only one that's there so make a second one. This is what I had to do anyway so let's go for it. But first, let me see why the #$!@#% grub can't find FreeBSD's /boot/loader file. Maybe I have to specify in /boot/loader.conf what slice to boot from ? ( looking here∞ ) echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf well I got myself out of there I tried to make root a different slice other than the first one, with root (hd0,0,d), where d was the last slice/partition I tried that worked. For each different root, I tried to load the kernel with kernel /boot/loader. Then I booted up with boot. [UPDATE 111307] *I don't know why, but when I start GRUB at different times, I have to specify a different slice as a location of my boot loader. This time I couldn't find /boot/loader anywhere other than using (hd0,0,a), different from last time. Next I want to get Ubuntu up Some of my system stats with disklabel and df... # /dev/ad0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 1048576 0 4.2BSD 2048 16384 8 b: 995344 1048576 swap c: 78236487 0 unused 0 0 # "raw" part, don't edit d: 2594816 2043920 4.2BSD 2048 16384 28552 e: 1048576 4638736 4.2BSD 2048 16384 8 f: 72549175 5687312 4.2BSD 2048 16384 28552 $ df -h Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 496M 58M 398M 13% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad0s1e 496M 2.2M 454M 0% /tmp /dev/ad0s1f 34G 8.6G 22G 28% /usr /dev/ad0s1d 1.2G 59M 1.0G 5% /var so I have a lot of space in ad0s1f but how do I split it neatly? I'm looking above and something doesn't quite add up. My disk looks to be 40GB large, but the total of what df shows me adds up to just short of 36G. Did I leave an unused part of the disk somewhere unallocated? How do I find out? Anyway, I have 2/3 rds of the f partition free and I don't think I need more than 8GB for it. Anyway, I think my situation is good, because the offset of the last partition, f, is around 3.2G if I'm reading correctly, so the rest of the disk should be clean and partitionable. The question is, how can I make sure that the disk is not messy with fragments? I would like to see a Windows-style disk usage to know I won't delete something. Well I backed up, so I should probably feel safe. Anyway, that last partition is for /usr ( includes sysinstall interestingly ). I also used fsck on that last partition and there's 0.3% fragmentation so I'll assume I can shrink it w/ Ubuntu installation cd. Tuesday, 23 Oct 2007making your own ports on FreeBSDDon't want to lose track of this site∞ for later on. For now, I just want to know basic semantics of a Makefile. Looking here∞, but it's not enough. Also not too helpful: http://www.hsrl.rutgers.edu/ug/make_help.html∞ maybe this: http://www.eng.hawaii.edu/Tutor/Make/1-2.html∞ some separate compilation notes - only one of several separate .c files should define global variables if there are any and, they should be declaread in a common .h as extern int globalvar;. - An interesting note: "When you define a variable, it looks like this: int globalvar;. When you declare a variable, it looks like this: extern int globalvar;. The main difference is that a variable definition creates the variable, while a declaration indicates that the variable is defined elsewhere. A definition implies a declaration." This is almost clear, except that I thought a definition should actually attach a value too. Shouldn't a definition imply an initialization? - so make checks whether dependencies are newer when it's called and compiles and links only those parts that depend on those dependencies. Q: But, what if a previous make removed some of the up-to-date object files? Do you end up having to recompile anyway, because they have been lost? - a good dependency graph example: http://www.eng.hawaii.edu/Tutor/Make/2-3.html∞ - Each non leaf node of a dependency graph needs a target and source(s) statement: target : source file(s) command (must be preceded by a tab)
Sunday, 21 Oct 2007really basic problems getting Apache 1.3 running for the first timeMy /var/log/httpd-error.log says mod_unique_id: unable to gethostbyname("tobe"). I realize this means I have some naming conflict with /usr/local/etc/apache/httpd.conf, /etc/hosts or /etc/rc.conf. There's a list where someone says∞ they changed the name in rc.conf to something valid, but what does that mean? I just want apache to run locally so my httpd.conf only has ServerName 127.0.0.1. I was looking at one site∞ that had more than one ip in a /etc/hosts file. I was wondering if they actually had multiple network cards, but that didn't make any sense either. I don't know what to put in mine either, if I don't have a domain for local testing and that I won't have one even if I just try to run apache using my computer's local ip. I don't know why no one talks about this sort of scenario anywhere. I thought it would be very common. In another post∞, someone said they added a name and ip address to hosts also, but the main problem here is, can your computer's hostname conflict with httpd's perception of your machine's hostname or what it will try to ask the DNS for? Is my httpd.conf okay? this one∞ has a fake name for ServerName too. What's going on there? Maybe they∞ know? Ok I got it. Here's the change I tried that I didn't plainly see anywhere else: I added my machine's hostname tobe as an alias to localhost in /etc/hosts, so the line read 127.0.0.1 localhost tobe. That simply worked. Tuesday, 10 Apr 2007LaTeX2e on FreeBSDgetting from latex to pdf crunch .tex file into a .dvi binary latex project.tex & preview the final look with xdvi xdvi project.dvi & convert a dvi to a pdf dvipdf project.dvi & http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html∞ Saturday, 4 Feb 2007using make differently than I saw before Building info-zip's UnZip to depackage zipped files. The install procedure suggests to use make with a system target, make -f Makefile list, using any of several targets including generic generic2 generic3 generic_zlib generic_shlib. (http://www.info-zip.org/UnZip.html∞) getting Java on FreeBSD http://www.freebsd.org/java/install.html∞ needed 1.5 Java SE (JDK) certain source and binary files, as well as a patchkit. The binaries and source files were from http://www.sun.com/software/communitysource/j2se/java2/download.xml∞ : jdk-1_5_0-bin-scsl.zip, jdk-1_5_0-src-scsl.zip . The patchkit is at http://www.eyesbeyond.com/freebsddom/java/jdk15.html∞ , bsd-jdk15-patches-2.tar.bz2. I also got the main binary j2sdk-1_4_2_10-linux-i586.bin from the download center∞ itself.
All of these are used when in /usr/ports/distfiles, while running make install clean, out of /usr/ports/java/jdk15 . After a long way through the installation, I got a message saying that there's yet another file I need to get manually
. . .= = => Verifying install for /usr/local/linux-sun-jdk1.4.2/bin/javac in /usr/ports/java/linux-sun-jdk14 = = => linux-sun-jdk-1.4.2.10 You must manually fetch the J2SE SDK self-extracting file for the Linux platform (j2sdk-1_4_2_10-linux-i586.bin) from http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.4.2_10-oth-JPR&SiteId=JSC&TransactionId=noreg∞, place it in /usr/ports/distfiles and then run make again.
* * * Error code 1 Stop in /usr/ports/java/linux-sun-jdk14. * * * Error code 1 Stop in /usr/ports/java/jdk15. I'm wondering if I was using the wrong version of one component or another, because it seems like I need parts for 1.5, but that main binary is 1.4. However, I really couldn't find a way to download JDK 1.5. I was reading that there are J2SE 1.42, Java SE 5, and Java SE 6, but I haven't found 1.5. Okay now I figured out that 5.0 is 1.5 and I don't know why they made the naming convention so twisted. I'm a bit surprised, because I tried java -version for the heck of it and even though it did not seem to install properly, Java answers back, with Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode) I also tried to run the java-based Weka machine learning software and it worked too. But initially, when running java -jar weka.jar, Weka started up, but I got this output too: Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location
Trying to add JDBC driver: RmiJdbc.RJDriver - Error, not in CLASSPATH? Trying to add JDBC driver: jdbc.idbDriver - Error, not in CLASSPATH? Trying to add JDBC driver: org.gjt.mm.mysql.Driver - Error, not in CLASSPATH? Trying to add JDBC driver: com.mckoi.JDBCDriver - Error, not in CLASSPATH? Trying to add JDBC driver: org.hsqldb.jdbcDriver - Error, not in CLASSPATH? overall conclusion: since it works, I won't try to redo the installation with Java D SE 1.5 until it stops working well. Monday, 11 Dec 2006some more FreeBSD options labeled as for linux users http://www.onlamp.com/pub/a/bsd/2005/01/13/FreeBSD_Basics.html∞ aliases can go here: ~/.bashrc , such as the colorizing option for 'ls' alias ls='ls -G' And 'chpass' can be used to modify /etc/master.password . # chpass -s /usr/local/bin/bash somuser will change the shell to bash. . ~/.bashrc tells bash to look at its configuration file for updates more advanced X usage here http://www.onlamp.com/pub/a/bsd/2006/12/07/freebsd_basicsg.html∞ about device names can also use dmesg to look up ethernet cards; dmesg | grep Ethernet And 'whatis' will identify details about anything, including the eth interface; stuff with partitions use df to get mounted file system stats Wednesday, 5 Dec 2006was reading http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html∞and http://www.irssi.org/documentation/startup∞ for 'irssi' help and was trying to get 'sudo' to work here looking at http://www.courtesan.com/sudo/man/sudoers.html#examples∞ couldn't add myself yet now using xscreensaver ; but how do you manually lock? in general, i still want to find out how I can create a script that will run whenever I boot up. This doesn't sound like periodic type activity that a cron job would take care of though. Wednesday, 22 Nov 2006exploring audio players, yes it came up One of the most basic players I found looking in /usr/ports/audio and http://www.freebsdsoftware.org/audio/∞ is amp. I tried it out and I find the output is slightly trippy in that there are some discontinuities. The volume is also very low even at max. Both the these may be the fault of the file I tried, since I only tried amp with one so far. Of course for it to work, I had to use kldload snd_driver as with audacity before, and kldstat verifies whether audio drivers are installed. I don't know why I have to load these drivers after having rebooted each time. I want to put that command into .profile or .xinitrc, maybe that will load them automatically. But I don't really get why I would ahve to load them each time from sctach.. check this out later I want to explore the music player daemon, reading about it shortly here http://lists.freebsd.org/pipermail/freebsd-multimedia/2005-October/002826.html∞ . You can stream music and manage requests to stream said music. Monday, 20 Nov 2006small side detail getting a free bsd screensaver to work http://www.freebsddiary.org/screensaver.php∞ datasheet site http://alldatasheet.com/view.jsp∞ more perl one liner http://www-128.ibm.com/developerworks/linux/library/l-p101/∞ Wedhttp://sial.org/howto/perl/one-liner/#s3.3∞ Tuesday, 14 Nov 2006I was looking in /etc/inetd.conf and I found that nntpd was commented out. I was trying to get ntpd to work a few weeks ago, I wonder if this is related and if it was holding me back before. Friday, 10 Nov 2006installing pdfLaTeX i started reading here http://www.eecs.harvard.edu/~mdw/proj/texslides/∞ and i read that the source is here http://www.tug.org/applications/pdftex/∞ i missed the line that read to upgrade the installation of TeX before installing pdfLaTeX, so i hope that this will still work. the INSTALL file also said that I should regenerate my TeX installations. i'm not quite sure how to do that yet, but i'll put that away for now can't make , becuase the main texmf tree was not found. I need to use --datadir to specify the parent directory. this shouldnt be sor hard i need to just find where TeX is already installed. looking for pdf viewers http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-viewers.html∞ don't like xpdf nor gv, since i can't select / copy text out of the pdf easily (or i cant see how yet). Sunday, 5 Nov 2006The use of secure copy This is file transmission done over ssh. But I'm not sure why the colon at the end is necessary even when not specifying a port to use scp filename usr@utopia.poly.edu: Another syntax is to get a file from the remote server and copy it locally, scp usr@utopia.poly.edu:/somedirectory/filename . And, to copy several files at a time... scp remotebox:\{a,b,c\} ~/my/secret/dir I also tried to copy from one server user account to another, but writing the command from my machine here, scp mpieka02@utopia.poly.edu:homepage/file1 mikep@ctf.poly.edu: , but that didn't quite work. I got an authentication error, by ssh2 even. (why ssh2 and not ssh? I think scp tried with both ssh and ssh2, but neither worked). I found these tips here: http://www.freebsddiary.org/scp.php∞ 1 Novsome more vi comms http://tnerual.eriogerg.free.fr/vimqrc.pdf∞ http://staff.washington.edu/rells/R110/#tips1∞ Monday, 23 Oct 2006perl one linersThese are fast, but I'm not quite used to them yet. I saw some replacement type code here∞, but in general a one liner has the format perl -ne 'perl statement; another statement;' I'm not too sure about the -n , but the -e option applies the perl interpreter to what you write afterwards. getting audacity to work audacity was a current port and fetching it also took zip-2.31 and gmake, make-3.80.tar.bz2 . After getting a correct time on my system ( the package would not install with a bad system date), I was able to get it to compile, but it was taking 15+ minutes, so the advice I got was to just add an audacity binary. That was much faster. To load sound drivers, kldstat checks if they're there, and kldload snd_driver gets them there. A new kldstat query showed the new drivers were up. Also installed mhwaveedit from /usr/ports/audio/mhwaveedit/ about setting up that time with NTP the Network Time Protocol There's a cheap way, to use ntpdate pool.ntp.org to do a one-time time update. I also started to check out freebsddiary∞ and the standard freebsd notes∞ on getting the machine to regularly talk to ntp serverse for time updates. They recommend adding a /etc/ntp.conf file with server ntplocal.example.com prefer to tell NTP how to get updated. The north america ntp server is at north-america.pool.ntp.org. Theres a stats page on it here∞. some mouse functionality copy /paste from a command line http://elibrary.fultus.com/technical/index.jsp?topic=/com.fultus.freebsd.nonfdp/books/FBSDinstall_guide60/04.10-enabling_clear_tmp.htm∞ added to /etc/rc.conf moused_flags="-m 2=3" # config for 2 button mouse allscreens_flags="-m on -c blink" I had to get rid of an annoying looped beep can use xset b off some new process commands look at parent-child trees pstree look for specific make file within /usr/ports/ make search more jobs stuff w how to check out my disk space df will do it got VIM But, I'm wondering about this one line in the installation notes, to use set nomodeline in ~/.vimrc in the case that someone makes me run their trojan. I'm just making a note of that because I don't know how to do that. And some good editor command pages here∞ and here∞. Killing processes in FreeBSD is more tricky than in Linux, I think, since there's this concept of treating daemons with signals, and a kill command becomes special because of that. Some lingo on that at the free bsd pages∞. To kill process 213, use kill -s KILL 213. generating packets, injecting them on the network pcap.h is a low-level way to create packets and through them out of any connected network card. reading about it locally, file:///usr/local/share/doc/libnet/globals.html want to check out this intro page to FreeBSD land http://andrsn.stanford.edu/FreeBSD/newuser.html∞ Friday, 20 Oct 2006base machineI got a base system running on my lab desktop w Boris and Kurts help, on 10/18/06. But now I want to get something working on that base system. how do I get stuff? /usr/ports has lots of package descriptions with MAKE files grab the fresh source from net locations I was looking at /usr/ports/www/ today, and tried to install links, or lynx, as a browser, but I got a strange graphical type error. I think I can't because there's no desktop environment and no X Windows for any browser to sit on. As far as I understand, X Windows has the libraries which any browser or roughly any graphical program would depend on for it to run properly. I read at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-browsers.html∞ that installing KDE and GNOME would help. I don't know whether KDE comes with X WIndows, or whether I need to get that package first or whether the base Free BSD already has X . I bet the base doesn't have X and that KDE doesn't come with it and I need to get it somwhere first. I tried to get firefox I got a dozen screenfulls of 'could not find package ...' lines. I used pkg_add -r firefox. I wish I could dump some of the errors here, but I don' t have a browser to access this wiki from the BSD machine yet smiley faces. Here are some of the ones at the end: jpeg-6b_4, libiconv-1.9.2_2, gettext-0.14.5_2, libxml2-2.6.23_1, shared-mime-info-0.16_2, gtk-2.8.12_1. I read on the page I referenced above that firefox depends on gtk very heavily. I don't know if it expects that gtk is there when I try to install firefox, however. firefox works now because becuase I tried to run it without having root priveleges. It turns out that a user cannot even change to root unless they are listed as a wheel in a file in /etc I also learned that to change my user name from an uppercase first character to a lowercase (i don't know why i choseuppper case in the first place), i had to edit master passwords file, /etc/master.passwd and change my name there for one. I also changed my home directory name, originally it had been /home/Avian/ . It's interesting to note that when I looked at the passwords file just now as a regular user, I saw that my username was still not changed back to lowercase, but it was, viewing it as a root. I'm not sure why the user process has not yet inheritted that information. I'm not sure how to logout as a regular user yet, since none of logout, quit, exit work to accomplish this. The file that needed to be changed for my user to have the ability to gain root permissions was /etc/group. Here, I added my username to the wheeler group. I also found that a command such as ps > temp will only output standard output to temp and ps 2 > temp will output the other type of output, standard error. That is the difference between cout and printf and cerr and PrintError , perhaps. moving around in freebsd and using X Windows changing console windows can be done with Alt + F1 , or F2 or F3. Of course Alt + F4 when using X Windows willl close any open windows ! It turns out that my base freebsd install did have X. It can be initiated with startx . Apparently, according to Kurt, X takes over root access to the video card and furthermore when I tried killing X 's main process, I no longer had access to any process that controlled output to the screen. One solution to get out of such a mess was to blindly login one more time from another, yet unused console window, in my case the fifth one. X performs a setuid 0 and roughly changes over into root. I don't quite know though, how much more dangerous it is to then be using X as opposed to a console, given that there can be random programs running that could run as root? < imagination. The command fg or foreground, will allow one to retreat back to escaped jobs. Another funny thing, killing the icewm process, where ice is, somewhat like KDM and GNOME, is a wrapper to X, or rather they use X for its ability to spit stuff out through video card at humans. WEll, killing icewm doesn't stop the ability to write to the screen, but it does prevent actual window boundaries from being redrawn. thecontents of those windows can still be changed by whatever is running within them, or by whatever other part of X controls them. I don't quote remember whre it is, but xinit rc has a list of commands which are run when startx runs. Roughly, they help to get ICE or whatever this wrapper is officially called, to run, instead of the bare X base.
Comments [Hide comments/form]
Xpdf allows text copying with the mouse if the PDF file does not have the "DON'T ALLOW TEXT COPYING" DRM attribute set. To whom is your Xpdf executable loyal? If it is loyal to you, it will copy the text even if the DRM says the it is "not allowed." For more information, do a web search for "xpdf remove DRM bullshit." Typically the X11 server runs setuid root so joe user can start X. There are alternatives. X can be started by init, with UID=0, and a graphical login module can spawn the X session with dropped privs. There is a tradeoff between security and performance that can be seen here. Very cautious designers will not want a big interactive thing like X running with UID 0. They will want to take away random I/O privs from the process and give it a narrow interface (choke point) for I/O at which checking is done, so an X exploit can't take over the whole box. But this extra choke point would kill performance. This type of thing is why OpenBSD is so much slower than FreeBSD or Linux. And there are still lots of nasty things an privileged but malicious X server can do. Just put on your black hat for a minute and imagine the possibilities... |