Before You Post, Please Note...
Saturday, February 3, 2007
howto change the desktop icons
to create an icon, drag the script or binary for it (this may be the only needed step...) from /usr/local/bin (or any other folder) right onto the desktop.
to edit an icon image, goto the icons folder from mtpaint and open it, or goto the icons folder in rox and right click... "open with" and open it it mtpaint. (the second method may not always work.)
you can zoom in on your image by pressing "7" on your keyboard, or other numbers, nothing that "4" will go back to regular size.
most icons are xpm or png, you can use the "transparent" color by selecting from the background with [CTRL]+Paint tool, or you can set a new background color by selecting "save as..." from the mtpaint menu, checking "set transparancy index" and selecting the number next to the new color in the palette. you may need to "convert to indexed" from the "image" menu, but you probably won't.
after saving the image to the same file you loaded it from, the icon on the desktop will refresh after you hover the mouse cursor over it, if not sooner.
ktwi: puppy 2.11, *should* work also in 1.07 and most (or all) other versions...
thanks to: amish
Monday, January 22, 2007
howto upgrade pupwin98 to 2.11
*assuming you don't have a puppy 2.11 cd:
you'll have to extract the files from the .iso file. in 2.11 (catch 22, but good for future versions?) this can probably be done in iso editor? in windows, 7zip can extract iso files. in puppy 1.07, .iso files can be mounted with qemu or dosbox. see the forum / wiki posts for details.
*assuming you do have a puppy 2.11 cd:
1. if you don't want the win98 screen on
startup anymore, type ECHO. > \logo.sys
in dos.
2. copy the pup_211.sfs on the cd to \
3. rename \puppy\vmlinuz to vmlinuz.1
copy the vmlinuz on the cd to \puppy
4. copy initrd.gz from the cd to \puppy
5. copy menu.lst to menu.txt
open menu.lst in a text editor:
change "image.gz" to "initrd.gz"
that should do it!
so far, the reasons i am considering upgrading my machine from 1.07 to 2.11:
* puppybasic goes from older version to 2.5 (it's a .pup too though i think)
* better hardware support (i have a usb key that didn't work with 1.07)
* the taskbar now includes icons / for show desktop / console / editor
* the taskbar now shows how much free ram (or is it ramdisk?) you have
* iso editor !!!!
* some of the control panel apps have dramatically improved
* new 2.6.x kernel
the newer version IS slightly slower than 1.07. on old hardware, it's something to consider. however, 2.11 will work on a wider variety of newer *and* older hardware... (the kernel in 1.07 may still be better for some older machines.)
ktwi: puppy 1.07 -> 2.11, probably versions of puppy 2.x prior to 2.11 also, but not 2.12 or later (haven't tried this with zdrv yet.)
thanks to: nevermore, amish
Friday, January 12, 2007
bash howto for dos lovers
attrib
examples:
attrib *.*
# shows attributes of all files a h r s (archive hidden readonly system)
attrib *.txt +a
# set all txt files to have archive attribute (*.* applies only to current folder)
attrib *.* -a -h -r -s
# remove all attributes from all files
# (if you cant change attributes in dos the file is locked, or, remove -a -h -r -s at once)
in linux:
chmod
(and/or)
chattr
(and/or)
chown
examples:
chmod 777 hello.sh
# makes it so everyone can read, write, or run a file (as an executable)
# for executable files (binary and scripts) chmod 755 hello.sh is better
# chattr changes some attributes of files (somehow...)
# chown changes the owner of the file
cls
examples:
cls
# clears the screen
in linux:
#where is it? cls? clear? clr? home? cl?
#here it is:
reset
# does the whole scrolly bit over, like closing rxvt and reopening it (that part applies more to xwin of course)
copy
examples:
copy hello.txt hello.bak
# makes a backup of hello.txt
copy a:\*.txt c:\hello
# copies all files ending in .txt in a:\ to a folder called hello on the c: drive, but does not work unless folder exists
# usually, and used from the console, copy will ask before overwriting an existing file. not usually from a script
in linux:
cp hello.txt hello.bak
# same as dos example
cp /mnt/floppy/*.txt /mnt/home/hello
# assumes floppy and c: drive are at the above mount points. will create folder called hello if it doesn't exist
# cp does not ask before overwriting. using cp -i instead of just cp will force interaction (not overwrite without asking)
cd (or) chdir
examples:
a:
cd \
# changes to a drive and folder \
cd ..
# changes to parent folder
cd \hello\there
# changes to hello\there folder from \
cd there
# changes to there from current folder
cd
# displays current folder
in linux:
# virtually the same. in dos, cd/ and cd.. are okay, in linux the space is required: cd / and cd ..
# you have to use cd (instead of chdir)
# cd (nothing else) does not show the current folder in linux. pwd (print working directory) is used instead.
# to change to the "a:" drive in linux (from the gui)
# run mut from xwin (or click the drives icon) and click [scan] on fd0
# click [mount]
# from the console:
cd /mnt/floppy
# when done: click [unmount]
# click [noscan]
# you could also learn how to use mount from the console (sorry, not included in this howto)
# mut is so great, someone should make a console version that uses keys like a b c d e f g h (buttons, not driveletters!)
# (maybe barry or mu or i will make a console version someday? don't know what it entails)
del (or) delete (or) erase
examples
del *.*
del .
# (either one) deletes all files in a folder
del *.txt
# deletes all files ending in .txt
del hello.txt
# deletes hello.txt
in linux:
# be careful with * wildcards!
# if you are going to use a wildcard, use "ls [wildcards]" instead of "rm [wildcards]" to see what may be deleted...
rm *
# deletes files; if someone randomly tells you to type rm -f * or something like that, kick him. hard...
rm *txt
# deletes files ending in txt
# -r is recursive (recursion in dos and linux are not exactly the same, that's why you don't see more notes on it here)
dir
dir *.txt
# list all txt files
dir *.txt /b /a > list.txt
# list all txt files even if they are hidden. /b says just show filenames... send output to list.txt
dir /w
# show files in a multicolumn layout
dir c:\*at* /a /s
# show all files in all folders in the c drive, if the filename contains "at"
dir /?
# show more info on dir. works on many dos commands
in linux:
ls *.txt
# same as in dos, but if there is a folder called something.txt it will show that folder too, etc.
ls *.txt -1 -a > list.txt
# include "hidden" files that start with . (yeah they are hidden) in one column... send output to list.txt
ls
# this is more like dir /w
ls -l
# that's an l like in "linux" not to be confused with -1 (one) from the other example. this outputs more like dir
ls /*at* -a
# show all files containing "at" in the name, but only in the / folder, and any folders recursed that also include "at"
ls --help
# show more info on ls. works on many linux commands
# here's a really good one, thanks to jcoder24 for it:
find / -depth -name *at*
# this is much closer to dir /s /b in dos, and in xwin try it with: | leafpad &
exit
examples:
exit
# closes the console in windows
in linux:
# it's the same, but will close the apps opened from the console too.
# the way around this is to append any command with & for instance:
leafpad hello.txt &
# now hit enter a couple times (or wait a minute)
exit
# right. also, if you click [X] on the window, the & is moot... it closes apps even if they were run with &
echo
examples:
echo
# display if "echo" is on or off
echo.
# echo a blank line (useful in scripts to look nice)
echo cd \ > hello.bat
echo dir *.txt >> hello.bat
# this creates a script called hello.bat that changes to the \ folder and shows the .txt files there.
# > writes to a file (overwrite / create new)
# >> apppends to a file (append / create if not existing)
# to run the script, enter:
hello
# you can type hello.bat but the suffix is required in the name
in linux:
echo
# blank line, same as echo. in dos
echo cd / > hello.sh
echo ls *.txt >> hello.sh
chmod 755 hello.sh
# creates the same script as above and makes the script executable
# to run the script, enter:
./hello.sh
# you must type .sh at the end if it's part if the name, but you don't have to name it that way
fc
examples:
fc hello.txt hello.bak
# show the differences between the two files, if any
fc /b hello.exe hello2.exe
# do a binary comparison of files (shows differences in hex, if any)
in linux:
diff hello.txt hello.bak
# basically the same idea. for binary files, you can try just using diff
# also, you can try this:
md5sum hello
md5sum hello2
usually when two files are different, the single-line md5sum is different. file integrity checking is often done this way
move
examples:
move *.txt a:\hey
# move all .txt files to a:\hey
move hellofolder hello2folder
# rename a folder
in linux:
mv *.txt /mnt/floppy/hey
# same as above, assumes mountpoint at /mnt/floppy
mv hellofolder hello2folder
# rename a folder
md (or) mkdir
examples:
md hello
# create folder named "hello"
mkdir hello
# same thing
md /mnt/home/hello
# create "hello" folder in /mnt/home
mkdir /mnt/home/hello
# same thing
in linux:
# you have to use mkdir (instead of md)
ren (or) rename
examples:
ren hello.txt hello.bak
#rename the file to...
in linux:
mv hello.txt hello.bak
rd (or) rmdir
examples:
rd thisisafolder
in linux:
rm -r thisisafolder
# dos won't usually let you remove a folder that has files in it
# linux usually will
rem
examples:
rem hey look, this does nothing!
in linux:
# this usually does nothing!
# however, the following is used to identify a bash script:
#!/bin/sh
# the following is used to identify a puppybasic script:
#!/usr/bin/wxbasicscript
# you get the idea. technically, it STILL does nothing... but it does, however, change how a script is interpreted
# (or how a file is identified)
# all bash scripts should really start that way you know:
#!/bin/sh
# but my creation of a script using echo without that header still worked
start
examples:
start notepad
start http://pupweb.org
#this is really a windows thing... but a command preceded by "start" sometimes works when it ohterwise would not
start cmd /c dir | more
# opens a new console, runs dir and pipes to more
in linux:
# exec is somewhat, but not exactly, like start. xwin does not need to be running to use it.
# sometimes preceding a command with exec helps in .rc files when you want to run a command
# to open a website, use defaultbrowser:
defaultbrowser http://pupweb.org
# to open a new console:
rxvt &
# to run a command in a new console:
rxvt -e ls | more
# opens a new console, runs dir and pipes to more
time
examples:
time
# shows/sets current time
time 00:00:00
# sets time to midnight
# to do the same with the date:
date
in linux:
date
# shows the time (it also shows the date)
type
examples:
type hello.txt
# displays a text file
type hello.txt | more
# displays a text file with more
more hello.txt
# same as the previous example
in linux:
more hello.txt
# same as dos
less hello.txt
# "less is more" Razz less lets you scroll... (caveat, i forget how to make it stop)
more hello.txt | leafpad
# that one is fun, try with ls or find (does not work with mp)
# this seems to work:
more hello.txt | less
# the idea being more useful with things like ls and find since leafpad isnt available when xwin isn't
# if you don't love any of those, try using cat for type:
cat hello.txt
questions? other tips? ideas? (corrections?) reply!
notes:
want to wiki? lobster made a wiki page and wants to know how it can be better formatted: http://puppylinux.org/wikka/DosCli
gn2 suggests this alternative bash<->dos page: http://www.yolinux.com/TUTORIALS/unix_for_dos_users.html
also, there is a really amazing page on this subject at the linux doc project: http://tldp.org
KTWI: most of these were tried in puppy 2.11 and most should work in 1.07, nohup is available in puppy 2.12 and later.
thanks to: lobster, dougal, gn2, "chandlerman", amish
howto post to this blog
there are several ways you can post or contribute to this blog:
use the comment feature:
1. suggest a change- this is like a wiki, except you don't have to edit wiki code. all suggestions will be taken seriously, but not all suggestions will be followed. compare to wiki where no suggestions are taken seriously, and many changes are reverted. eh... wiki is good, no- great, but only if you're "in."
unless there is an important reason to remove them, suggestions will be left in place as comments even if they are not used, and they will be removed if they are incorporated into the main post.
2. comment with a url- please note that spam will be treated as spam, and (due to human imperfection and mistakes that are otherwise regretfully made) sometimes even a good url will be treated as spam :) but do feel Quite Free to post a url. if it is yours, say so and the contents will be added to the blog. otherwise, we will consider writing a blog entry ABOUT the url and its contents.
3. write a whole entry! we want to add entries to this blog. at this writing, it's unknown (by the author) how long a comment you can write. don't be bashful.
use murga's forum:
as of this writing, only one post on murga's puppylinux forum contains the string "**docme" - add this to the end of your post on the forum, and your post will be (manually) added here. it's that simple! also, if you add "**docme" to a comment on the forum, about a post you didn't write, it's just like "comment with a url" (above.) PLEASE DO NOT spam murga's forum with a post that says "docme" and contains nothing else, we're not advocating that sort of clutter.
two more things to consider:
thanks to: amish, everyone that participates *
*an example "thanks to" line.
2. ktwi: (known to work in...) if you know the version of puppy 1.07 / puppy 2.11 / grafpup 104 / muppy 006 etc, include it. many things here will work across many versions, but it's great to
note what version you are writing about :)
thanks to: amish, and You!