Phoenix CE - Feature Request - Shortcut to Windows Documents

A home for all kinds of Puppy related projects
Message
Author
Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

Re: Windows Works in Mysterious Ways

#31 Post by Everitt »

richard.a wrote: While true I wonder how likely it is that the type of user whose need we are addressing will have anything but a stock standard install.

People who have proliferations of systems on the same machine would likely have to have some nerd/geek understanding and we cannot or should not need to automate stuff like this for them, I would have thought. They would be better helped via the forum, and probably would expect to be, perhaps?
Then again, what's the harm in giving the option, when scanning is so quick and easy? They don't have to use it...

I run Windows98 and WindowsMe on several computers - mainly for several utilities I find useful (isn't that what a utility is, lol?) plus my train driving simulators (TrainMaster and RailSim which is a DOS one I wrote many track files for), and also on on my test machines with plug-in racks, so I may be able to help if you need testing. I actually used my Athlon rack machine to produce those captures on separate plug-in win2000 and win98 installations.

I no longer have NT3 series, and I suspect that it would be unlikely we would need to consider it because it was a dog of a system that few would not have replaced - imho. Likewise with NT4 although I have an HP image CD with NT4 on it but the only computer I can use it on is this one, which doesn't have removable HDDs, means a pull-it-out-and-change-HDDs scenario which I would rather avoid :) Saying that, I have a colleague I gave my NT4 software box to, and he might lend it back to me for the exercise :)

Windows 3.1, yeah I still would be able to do an install to check this out. I have a feeling that there was no such local documents directory. The filenames with gaps came in with the long filenames of NT3 series which Win95 picked up and ran with using a different way of creating/maintaining them.

So 16-bit windows would not be involved in this discussion. Those of us who rejected 95 are those of us, in the main, who would not use the My Documents directory in all probability.

I also have OS/2 Warp 3 and Warp 4 in boxes on my bookshelves. But like Win 3.1/3.11 they would not install to partitions larger than 2Gb. So I suspect they aren't in the equation either.

Just my thoughts. Let me know if you'd like me to do an installation. But OS/2 while a magnificent system, is time consuming to configure once installed.

Richard
Thank's for the offer of testing. I think the code should be pretty the same for almost ever case, so there should be no need to install anything different. I wasn't sure when the 'My documents' idea was introduced, but if you say 9x then that sounds about right to me.
ecomoney wrote:Hi, I realised that windows worked in mysterious ways, but not quite that mysterious!

There is a possibility I may be able to get 3.03ce included on the cover disks of some widely read windows only magazines aimed at the begginer to intermediate user, this is one reason Im very excited about this feature!
Now you're making me nervous. I'm no leetcoder. I'm confident I can get it to work well though. It's actually pretty simple in a lot of ways. :)
May I make some suggestions about how this script should operate now you have the technical details thrashed out. Puppy, although aimed at "linux newbs" does have its own hardcore following, and I dont think we are going to "win" any friends by having a permanent icon on the desktop to remind people of their past follies! Together with this I dont think we should devote too much desktop real estate to, or have it present when there isnt windows present on the system.
Certainly! The idea of not having a permanant icon is fantastic. This thread seems full of brillient ideas. I implemented this bit earlier, it works well.
I've split it into two scripts, on very basic one to do the startup checks, another to be run from the desktop. The startup one is almost there, just needs something done to stop flash disks being detected (sd* I'm afriad, as are sata HDD's, so they can't just be ignored.)
The second script is still very much a work in progess, really just a collection of code snippets. Luckily I should be pretty free over the next couple of days. Stay tuned!
Altogether I think that this system should be aimed at people who are trying linux on their 100% windows p.c. (i.e. just one partition) for the first time.

...and there are a lot of them.
I agree that that should be the target, but I see no real advantage to hard coding the device. It would lead to excess code (hda or sda?), and not really be noticably faster on most machines. I see no reason why the startup scan shouldn't be backgrounded...
Ok, so puppy is aimed at people with computers that are of late windows 95 and windows 98 spec, so we should definetely include them, windows 3.1 is so old I dont think we need to cater for them as their hardware will be too old to run puppy. Windows NT, as I understand it is a operating system for networks and servers in business, rather than a home desktop operating system like puppy. Although it is possible to have multiple versions of windows running in different partitions, from what I have seen this is extremely uncommon. Its true to say the vast majority of computers have one big ntfs/fat32 partition with windows as their primary OS. It is these computers we should target with the first version of this wizard, and mop up the reminder with later versions.
Agreed, but the first thing I wrote was the partition scanning! :D
The script should
1. Check if the hard disk (hda1) partition is formatted to ntfs or fat during bootup of the livecd version. If so it should place a shortcut to the wizard on the desktop. There is a file somewhere that lists all of the icons on the desktop in Rox (or JWM) and a line could be added to this? The Icon needs to be fairly prominent (near the top of the screen?).
Done. It adds the icon if a)it finds a vfat/ntfs partition bigger than 500MB (sould this be lower? I don't remember what win95 could live inside). b)There is no icon called 'My Documents' on the desktop already and c)The icon isn't already there.
The 500MB limit is part of a plan to avoid flash disks being detected. I'm assuming that and HDD modern enough to identify as sd* (sata) is going to have big partitions on it. (haven't included check for sd* yet though)
Any better idea on how to do this greatly appreciated!
2. When the wizard is run (like any wizard) it should start by giving a description of its purpose:-

Code: Select all

"This wizard will seek out your windows 'my documents' folder(s) and make automatically make icons on the puppy linux desktop for them. You can then open your my documents folder and the files in them just like in Windows.

Click on NEXT to continue"

Step 1 of 3  
[Cancel]     [Next] 
"



On clicking "next" the magic is done! The next screen could/should have (X = tick box):-

Code: Select all

Operating system detected : Windows XP/2000 [or windows ME/98/95]

Users account detected:  X John Doe
                                          X Fred Bloggs
                                          X Admin
                                         etc

Please untick any accounts you that you would NOT like to make desktop shortcuts too, and click on OK.

Step 2 of 3
[Cancel]   [OK]
This should place shortcuts on the desktop to the correct directories (edit that file that I cant find or remember the name of, which is really annoying me!!!). The wizard window should not cover where these desktop shortcuts are created, so the user gets feedback straight away.

The last screen...

Code: Select all

Complete!

Your desktop shortcuts to your Windows 'My Documents' folders have now been placed on the desktop. You can open click on them to open your folders and view their contents. Click on the files and they will open in the equivalent linux application.  

[ok]"

This should get new puppies off to a flying start!!!
Once again I'm totally in agreement. Should it include a warning that it includes mounting the drives. I don't really like the idea of probing through drives without permission. All a bit big brother, from the users poiint of view anyway. Kind of thing Windows would do...
The only thing I can think of is, if there is a problem with the ntfs drive being corrupted through windows not being shut down properly (or really heavily fragmented) a message box should come up and say

Code: Select all

"Advisory: There is a small fault how windows has stored your information on the hard disk on this computer. Windows NTFS format becomes corrupt very easily, but this is usually very easy to cure. Likely causes are

1. The last time you ran windows, it crashed or didnt shut down properly.
2. The information on the disk is heavily fragmented.

If windows does still work at all, then its recommended that you run the disk defragmentation utility, and/or shut down the computer properly within windows (Hint: take the cd out and restart your computer!).

If windows wont restart, then your only option is to do a repair in puppy linux. This usually works unless your disk is very heavily corrupted. There is a small risk that you may lose some of your data if this is the case. (for expert users, this uses the "ntfsfix" utility in linux)

As another option, you may be able to open your files in "read-only" mode, which means you will be able to open your files as they already are, but you want be able to save any changes (You could write them to a cd or memory stick though!). 

Please choose an option.

[Cancel] [Restart in Windows] [Attempt Repair] [Read Only] 
Step 2.a/3
Shouldn't be too hard I hope. I assume all the code I'd need to detect something wrong with the drive is in the 'mount' script? (Using windows ATM so I can't look and see) Another thing to consider is hibernation. There should be mention of the fact that hibernating can cause the same problem.
I hope it is clear how I feel this would work best. Quite often users will only try linux when forced into an absolute corner. If puppy can recover their files in an emergency they will be all the more curious to keep on using it!!! I have to deal with a lot of these cases at the drop in centre.

Note: while I was writing this, a funny coincidence happened...

Many thanks to everyone for your hard work!!!
Seems pretty clear too. Very similar to my idea of the project, plus the great idea of only offering the script on the desktop if it might be needed. :D

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#32 Post by richard.a »

Everitt - a magnificent job. Well done. And re my being cagey over the scanning was because I haven't the slightest idea of how easy (or not) it would be. So I was really suggesting where there was no need to complicate it :) I believe in the K-I-S-S concept of working, particularly in logic trees of decision-making. Dates from using relay logic to design process control of factory machinery :)

Wondering what Robert's "[Restart in Windows]" means in that "tick the choices" section.

All in all, it is looking very good mate. :) :D

Richard
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#33 Post by Everitt »

richard.a wrote:Everitt - a magnificent job. Well done. And re my being cagey over the scanning was because I haven't the slightest idea of how easy (or not) it would be. So I was really suggesting where there was no need to complicate it :) I believe in the K-I-S-S concept of working, particularly in logic trees of decision-making. Dates from using relay logic to design process control of factory machinery :)
Thanks. :)
It's a piece of cake to scan thanks to Barry's great 'probepart' script. Without that I'd be totally lost.
Wondering what Robert's "[Restart in Windows]" means in that "tick the choices" section.
I read that as warning the user to save everything, ejecting the CD and issuing a reboot command.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#34 Post by disciple »

You might also want to duplicate this for the "desktop" forlder.
A lot of people keep everything on the windows desktop.

BTW I really don't think there is any need to check out Windows 3.1. Have you met anybody still running it?

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#35 Post by Everitt »

ecomoney, would it be ok to use your wording for the diologs, with a few alterations?
disciple wrote:You might also want to duplicate this for the "desktop" forlder.
A lot of people keep everything on the windows desktop.

BTW I really don't think there is any need to check out Windows 3.1. Have you met anybody still running it?
Well quite simply they shouldn't! lol. Yeah, that might be a good idea. Perhaps as an option rather than default?

I think that given the rarity and lack of infomation on win 3.1 I'll ignore it, for now at least.

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#36 Post by 2byte »

Everitt
The 500MB limit is part of a plan to avoid flash disks being detected. I'm assuming that and HDD modern enough to identify as sd* (sata) is going to have big partitions on it. (haven't included check for sd* yet though)
Any better idea on how to do this greatly appreciated!
I believe this is correct. Check sys/block/var_device/removable, ie sys/block/sda/removable. Of course it could be sdb, sdc, etc.
If the file content = 1 then it's a plug-in device. If it's 0 it's internal. The file exists for all internal drives but it comes and goes with plug-in drives. Cdroms always seem to be marked as removable for some reason.

Vern

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#37 Post by Everitt »

2byte wrote:Everitt
I believe this is correct. Check sys/block/var_device/removable, ie sys/block/sda/removable. Of course it could be sdb, sdc, etc.
If the file content = 1 then it's a plug-in device. If it's 0 it's internal. The file exists for all internal drives but it comes and goes with plug-in drives. Cdroms always seem to be marked as removable for some reason.

Vern
Thank you! That's perfect!
I guess CD's are removable as there isn't always a disk in there...

Sorry this is taking so long, I've got an essay dues soon and a load of other work that's taking up stupid amounts of my time.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#38 Post by Pizzasgood »

I spent eight hours straight doing homework today, and didn't finish. I'm exceedingly grateful that I don't have any classes that involve essays this semester. Then there's Pebble, which I recently hit a snag on, and that custom Puppy I was hired to work on... I miss back in high school, when I thought that having too much homework meant not being able to finish it all over lunch and the time I spent on the bus (60-min each way). :roll:

So there's at least one person here who knows what you're talking about. :)
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#39 Post by disciple »

Dude - I did way more work in high school. Now at uni I usually only work the day (and night) before a test or an assignment is due :)
But I'm only doing environmental engineering - if I was doing structures or software or something it might be different.

About this 500MB check - why not make it say 2.1GB? A lot of people these days have 1 or 2GB flash drives, they're cheap as anything. And if you make it 500, you'll even pick up all the 512MB flash drives. I guess there are quite a few older machines with 2GB hard drives, but I haven't seen a Windows partition smaller than that for a long time, so maybe 1.1GB would be the best compromise?

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#40 Post by Everitt »

Pizzasgood wrote:I spent eight hours straight doing homework today, and didn't finish. I'm exceedingly grateful that I don't have any classes that involve essays this semester. Then there's Pebble, which I recently hit a snag on, and that custom Puppy I was hired to work on... I miss back in high school, when I thought that having too much homework meant not being able to finish it all over lunch and the time I spent on the bus (60-min each way). :roll:

So there's at least one person here who knows what you're talking about. :)
To be totally fair I spend more time pontificating than I do actually working. Still. I'm almost clear now. Of course, the next lot comes out tomorrow...
Hopefully I'll be able to get a fair amount done this evening though. *crosses fingers*
disciple wrote:Dude - I did way more work in high school. Now at uni I usually only work the day (and night) before a test or an assignment is due :)
But I'm only doing environmental engineering - if I was doing structures or software or something it might be different.
I'm doing Physics, they have an irritating habit of asking for assesed questions in once a week, plus a lab report, the odd essay and some scarily hard tutorial questions. The tutorial questions are the wiorst. They're designed to be answered in groups with the help of a professor; my tutor group has to do them indervuidually and submit them...
disciple wrote:About this 500MB check - why not make it say 2.1GB? A lot of people these days have 1 or 2GB flash drives, they're cheap as anything. And if you make it 500, you'll even pick up all the 512MB flash drives. I guess there are quite a few older machines with 2GB hard drives, but I haven't seen a Windows partition smaller than that for a long time, so maybe 1.1GB would be the best compromise?
I'm dropping the size check, the /sys/block/.../removable method is far more reliable. The problem is that win95 could be installed on a small partion...

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#41 Post by cb88 »

y3s physics IS a PAIN.....(have you seen my new avatar?)

basically our calc 1 2 3 and physics classes have been all the same guys (about 10 of us) and we get along pretty good and the teachers are either good or awesome...

so my only complaint is that physics is a PAIN.....takes forever to do those problems somtimes....
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#42 Post by Everitt »

cb88 wrote:y3s physics IS a PAIN.....(have you seen my new avatar?)
Tell me about it! That avatar sums it up perfectly!
so my only complaint is that physics is a PAIN.....takes forever to do those problems somtimes....
Hell yes they do! Still, some of the stuff we talk/learn about! It might be hard work, but there's nothing else I'd rather be doing!

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#43 Post by Everitt »

I'm getting close!
At the moment I can only see one thing that needs fixing. At the moment it works, but has a slight flaw. Once I've fixed that I'll post it here for testing, and point out a few areas of code I'd like help improving.
Still, it works! :D

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

Keep up the good work

#44 Post by ecomoney »

Hi there everyone, sorry Ive been offline for a few days (will post piccies of what Ive been up to once theyre back from the photographers). Im happy to see that everythings going so well on this project, and everyone is having such a big input into Everitt's coding. The "spec I supplied above was only meant as a general idea of a user interface, so if it needs to be re-worded or its logic modified because of something technical Im not aware of (which is very very likely) then please feel free. I will be giving these disks out to all of my windows using friends to show them so if there is anything unclear then I will report back during testing.

Many thanks for all your hard work!!
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#45 Post by Everitt »

Sorry guys, I found a bug with user names containing spaces. Fixed it, but in doing so broke the output. Shouldn't take long to fix but I'm still pretty busy...
So then, I should have a version for testing some time soon (hopefully. :) )

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#46 Post by Everitt »

I can't believe how busy things here have gotten, I haven't had time to do a damned thing lately. Sorry about that. I'll try and find time in the next few days, else I'll just post what I have and no doubt somebody can work out where the bug is.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

Release little and often!!

#47 Post by ecomoney »

Hi Everett

Have you heard the mantra "Release little and often?". Im dying to see and test your work. If you let us have the code with a list of the problems you are having then someone else can at least take a look and may be able to suggest how you could fix it when you have some time again.

Thanks for keeping us posted :-)
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#48 Post by Everitt »

Ok, I think this _should_ work ok. It's got next to no error catching, so don't expect anything very useful to come out of it if it doesn't! That's next on the list of things to add!
Any suggestions greatly appreciated!

A quick breakdown:
scn4win is run at startup, and looks for icons on the desktop. If non are found it looks for possible partitions. If one or more is found then it adds a link to the other script

find_my_documents is run by the user, and does the bulk of the work. I'm afraid it's a bit of a mess at the moment, with some random debuging output that makes no sense, and very poor error handeling. The dialogs probably need rewording too! The whole thing is an evil mess of variables too! :(

Anyway, have a play, and tell me what you think.

UPDATE: Newer version below!
Last edited by Everitt on Fri 09 Nov 2007, 14:46, edited 1 time in total.

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#49 Post by Everitt »

Wow, I just found a _really_ stupid error! (And some really stupid pointless, irritation code!) It ment the majority of windows installations were ignored. I forgot to make the searchg case insensitive, and set it too look for all caps (as my Laptop has it for some reason)
Anyway, should be fixed now... *crosses fingers*
I think I fully deserve this emoticon: :oops:

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#50 Post by Everitt »

Yet more stupid bug fixes! See, this is what happens when I release lilttle and often! :P
Added some error catching too.

To use:
Extract to /usr/bin
add 'scn4win' to rc.local
reboot
Hopefully from here (where TS3.03 will start out) it should be clear

Todo: Stop icons being created on top of other icons
Tidy up dialogs.
No doubt there'll be a load more bugs to fix!
Last edited by Everitt on Sun 13 Jan 2008, 14:51, edited 1 time in total.

Post Reply