Computers & Tech posts page 13

>console is back

Hey hey, it’s back. For quite some time I would boot OS X into ‘console’ only when not in need of GUI type stuff. At some point in the OS updates, around perhaps 10.4.3, this stopped working, I believe because of a security risk related to it. Once installing that update, I haven’t used that capability, until just recently. I don’t know when it happened, but I currently have 10.4.9, and it works perfectly. I hadn’t noticed before, but doing this leaves all windowserver related processes turned off, so all of that memory is freed. To get back to the GUI, typing exit will bring you to the normal login window. I am quite happy. I am posting this from in >console right now, with lynx. Unfortunately, lynx isn’t very nice for posting in wordpress. I may have to clean up this post later with a GUI.


finder views saving

The list view of the finder is good for looking at information about files. I use the column view for browsing, as it shows the hierarchy better and is faster to use, but for information I list. I find myself frequently changing the view settings of a window in list view depending on the information I am interested in. I might want to calculate folder sizes and sort by folder size to see where all my disk space is used. I might want to look at the comments field to see what I’ve said about the files. I don’t always want the processing power usage to calculate folder sizes or the screen real estate of all these columns viewable at once. It’s a pain to set these list views up each time. The dsStore files will save the settings for a single folder, but in general I’d want these settings the same for all folders. All folders contain files and folders, and I have similar information to view about all of them.

I think one should be able to save a view setup that can be applied to any window. Setting a window to the view should be simple, such as with a submenu off the list view menu item, a small menu icon somewhere on the window, and/or a contextual menu. They’d simply have user designated names preferably describing their function. This all would become much more relevant if the list view could have columns with other metadata, such as author, status, or owner.


automatic 3rd party software update

The OS would have a standard system for developers to implement an auto-update feature for their 3rd party apps, making it easy for them, consistant, and simple to ensure all apps are up to date for the user.

Each installed app would register its name, .app path, current version, url for update information, etc. For all apps released prior to this OS and library feature, much of this info would have to be added manually by the user. New apps could possibly add themselves on first launch, asking the registry on launch if they are registered. This would not allow currently existing software to register, so these apps would have to be registered by some other means. Probably a better solution that would support both new and old apps, as well as not need a specific call to be added in the apps code, would be to have the registry check for the name of the app every time an app is launched. If it is not in the database, it could ask the application for the information. Current apps wouldn’t provide this, so it would have to bring up a dialog alert window in which the user would enter as much of it as known. It could be updated by the user later. Since some people download apps just to try them, then delete them, these apps should be removed from the database. This could be implemented to be done automatically. On each update check, if no .app is at the path specified, then the app was probably deleted and can be removed from the registry. Also, the user could specify an interval after which dormant apps could be removed from the list, something like a month or so. If either of these remove apps that are still desired by the user, they will be re-added to the registry on next launch, and will then be checked on next check anyway.

The developer would use a standard method, perhaps one of several, to post the current version and the files for download on their website. The url would be provided by the app, as stated above. The information at the url would have to be standardized so that the updater could parse it to get the information needed. It might contain just the current version in a tab delimited text file, listing version number, url to file parts or perhaps script to get them, update history (in case the user wants to review the update before doing it), etc. It might also be a list of all versions with this information, each version seperated by a new line appended to the file. Some developers would add the new line to a text file by hand, while others could have a script update it, or a script serve it. The file parts would have to be in a standard format as well, so that the updater app could handle them easily. It could be simply a .pkg, with all modified files stored in their destination paths inside.

The funcionality would probably be added to the software update application already used for the OS vendors software. The third party stuff would be kept somewhat seperate, to ensure things like security updates to the OS were given greater precedence and what not. The user would have seperate preferences to set for handling 3rd party apps, including whether to maintain a database at all, whether to update automatically or ask permission first, seperate update interval (could be ‘same as system updates’ though). The user would be able to view a table of all registered apps with information on them such as current version, if installed version is current, and an editable list of the app name, path, and update url. Clicking on each line item would provide additional information provided from the server, such as a revision history. All information would be stored in a database to save on disk space and be faster than a collection of files for each app.


quicken files and rsync

Backing up quicken files via rsync evidently doesn’t work: the resource forks are destroyed, which the files “need”. Files saved in this way will just give an error message when opened in Quicken, “Unable to open file.” However, the data is not lost at all. The data file is actually a package. If you show package contents, you will get to the actual data file (/Data\ File/Contents/Data\ File). To recover this data, use vim or some other text editor that can handle the data properly. TextEdit or many other similar programs won’t work. You need to get the Contents/Data File from a working data file, perhaps a newly created one. Yank all the data from the file with your data in it: there are a lot of lines, so ‘500dd’ or something like that will get them all, or simply using the graphical version to select all. Then open the working file and replace all with the yanked lines. This worked great for me.

After my recent hard drive crash, I had to use whatever I had backed up. Quicken wise, I had backed up about 15 days before the crash using rsync. I also had an old file from nearly a year ago. Unfortunately, because of my saving methods, the data in both seemed to be from more than a year and a half ago. I soon discovered that the recent data file had been rsynced to the inside of the contents of the data file I had intented it to replace. This was the actual recent data file. Unfortunately it would not work. I searched the web for solutions, but no one seemed to have one. I did get information that the resources were removed by rsync, however. I decided to figure out how to put the new data into a data file that worked. Simply copying via the finder the Contents/Data\ File didn’t work. I tried replacing the contents via TextEdit, but that didn’t work either. I tried modifying a single line in the working data file with vim, and that worked. I then tried replacing the whole file contents, and that worked well.


Boot to console

I’m working on getting my computer to boot to a text console at startup instead of GUI. I had done this with previous versions of OS X, but never got around to it since installing Tiger. I really just want to figure out how to do it, but I could save some memory and a little bit of CPU time, and add to the coolity of startup by getting this to work.

In /etc/ttys, near the top, there are two lines that say console followed by some stuff. I commented out the second and uncommented the first. I have the verbose flag set as well (sudo nvram boot-args=”-v”), twice actually, but this doesn’t work once I change the line in ttys. I get the starting mac os x progress bar, which goes on forever instead. If I hit command-V to boot to verbose at startup, I can get to console. I read someone say that the progress bar screen is simply covering up the console, so I will look into disabling it. I don’t want to have to hold down command-V every time I restart, with penalty of having to hard-restart again if I forget.

For some reason, logging into >console doesn’t work in Tiger. I simply get an error message, then have 30 seconds or so to sit and wait till the login window reappears.

I should update this once I figure more out.

[Update:]I renamed /usr/libexec/WaitingForLoginWindow. Now boot goes through verbose startup direct to a console login prompt, which often has some additional startup messages after it. Thus startup is fine now. I got a startaqua script gathered from macosxhints.com that allows me to start up the regular mac interface. See http://www.macosxhints.com/article.php?story=20030716220410216 for the script and other instructions/discussions relating to this modification. The script must be run by root.


Excel: CSE formulas

I found a strange and for some reason hard to access feature of excel. Functions such as ‘sumif()’ allow you to sum one column based on the content of itself or another. But some very desirable formulas are too complicated for sumif().

One possibility is multiple condition columns. Typing “=sum(if(a1:a100=’Red’,if(b1:b100=’June’,1,0),0)” should be a good formula to count all flowers that are red and bloom in june in the proper table. It should sum the range the results of the first if, which will be 1 if both ifs are true, or 0 otherwise. But excel doesn’t understand this, and can’t normally handle ranges in non-ranged functions.

Another example, which I discovered this by (something like the above is the example I found that allowed me to figure this out, thanks http://www.mrexcel.com/tip011.shtml ), is to sum the totals of only negative numbers in a column. I wanted to do this for a worksheet I have monitoring the amount of gas I have used from my propane tank. One column has use, which is negative if it was filled. I wanted to sum all fills. Sumif() didn’t work at all, so I tried (based on Mr. Excel’s example) to put “=sum(if(a1:a100<0,a1:a100,0))”, but that didn’t work either.

The solution to allowing Excel to handle ranges in regular functions is simply to hit control-shift-enter after entering them. Suddenly, they work properly. The formula then has curly brackets around it in the formula bar. Every time the formula is changed, you must hit control-shift-enter. If you hit regular enter, it will revert back to a non-functioning function. You must click on the formula in the formula bar to get this to work again.

I don’t know why Excel hides this functionality behind a rather unknown and unusual key combination. The functions are worthless otherwise, so there is no reason to have the non-CSE functionality when entering these functions. They add a great amount of power to the analysis of data, allowing many of the possibilities that otherwise only real databases would allow.


audacity: microphone won’t stop monitoring

I recently recorded some music through an external USB device called a Powerwave. It allows me to record one stereo track through a 1/8th inch jack or RCA jacks. I used Apple’s Garageband to do the recording. It does have a strange problem of not allowing one to see or edit anything past 33 minutes into a track: you can only listen, and only by starting it from sometime within the first 33 minutes and then fast forwarding to where you want it. But it is much more stable than Audacity, so I felt more confident in using it. However, I used Audacity for some initial testing of the setup. I had it play through the speakers while recording, since the input wasn’t a mic.

When I finished with Garageband, I disconnected the Powerwave, and the input device was changed back to the internal microphone. For some reason, the mic was continuosly monitoring even with all audio applications closed. I went in to Garageband to try to turn it off, by various means, but was unable to. I left it go for nearly a day, and nearly forgot about it, save for an occasional crackling noise I heard when I got home from work, which I at first thought was a mouse. I finally found the solution to the problem. Audacity had left the audio driver or whatever monitoring the input, and after I removed the Powerwave, it was still monitoring (though I had been able to turn it off for some reason from Garageband while using the Powerwave). Switching this off in Audacity preferences wasn’t enough to turn it off: I had to record a track to make the settings take effect.


apple to use Intel?

I say boo. After all these years of touting the advantages of the PowerPC, I’ve really come to prefer them. Some have pointed out that Intel is doing well with mobile processors, but I think the PowerPC is doing well enough: good computing to power consumtion ratio as compared to Pentiums anyway. Via I am more interested in for mobile devices.

For numerous reasons, this is a very odd change for Apple, and their reasons don’t seem to make much sense. There is speculation that Apple is covertly making this change-over to later announce it has been bought by Intel. I wouldn’t have put any thought into it, except for the extreme oddity of the move on Apple’s part. Still seems a little far fetched, but it would certainly explain Apple’s recent decision.


Finder more useful

in finder: create new file by hitting command-n. type in name with extension, opens editor of that extension set in preferences with new file with that name. also enter in keywords describing new files contents. based on setup, system will know “where” to put file: example – create a new file, type in keywords Lizard Bobson; system knows file is for Bobson account in work ‘folder’.

for every file extension, there is a systemwide set default editor and default viewer. If file opened for viewing, opened in view mode, in which viewing tools are available, editing tools generally disabled. If opened for editing, editing tools are made available and viewing tools are hidden/made less available.

Example: text editor viewing mode – up down left right arrows move view (up, down, page up, page down). character keystrokes do find for typed characters.

text editing mode – up down left right move input/editing cursor. keystrokes type text.


Database/Image App

database/image app that allows one to drag images into it, have it automatically file as regular images (with tags as extra data in file) in file system based on user set fields. defaul fields simply image and image name and image type(jpeg, etc.), but can add any fields, any number of them, and create personal organization system.set what organization system is used for filing files. has folder style interface type deal, allowing images to be grouped togethor in folders, then subfolders, etc., but the folders can be created on the fly based on criteria. related images of the same thing can be grouped togethor.