Linux File Sharing

I’m backing up the desktop to put a new OS on there. It doesn’t have much on it, word docs, our photos, the entire collection of things worth saving comes to a measly 14 gig. I am however, temporarily stuck trying to work out how to get those files offa there. For some reason, a USB hard drive does not register with this computer. Whether it’s a Linux thing, or a condition of ancient USB ports, I am not sure, hey I just realised there is no spell checking going on. Hmmm… What up, LibreOffice? Anyway, apparently some kind of flash drive is in order. As all my USB sticks are 4 gig and under, and my biggest SD card is 8, I don’t really have anything suitable. Note to self, it’s time to get a decent USB stick.

As I’ve got up to 5 computers here on the network at any one time, simply transferring the files could be an option. I’ve tried before to get Windows 7 Homegroup to work with non-Windows 7 computers (and never had any luck…) but perhaps I can get the Linux computers to talk to each other. I am trying at the moment to allow my backup folder on the desktop to be sharable. Mandriva told me that it would need to install Samba Server in order to do that. I doubt it will work. Right now it’s trying to download a package called drakxtools-curses (sounds fun) but the progress bar isn’t moving. My internet is pretty crap, but it’s not that bad, somethings clearly not happening there. I’m going to try create a share folder on the Mint machine, and see if Mandriva can talk to that. Mint didn’t ask me to download anything, it just put a share icon on the folder. Let’s see who can access it?Azalea – Laptop – Windows 7, can see Daphne and Jonquil and access the share folder
Jonquil – Netbook – Windows XP, can see Azalea and Daphne and access the share folder
Daphne – Laptop – Linux Mint, can see Azalea and Jonquil but can’t get into any share folders
Pansy – Desktop – Mandriva Linux, can see all the others, and was able to get a file out of the share folder.
Why can none of the others see Pansy? I don’t know, and I don’t really care. Can I put the backup files into Daphne’s share folder? I do care. Let’s find out.

No. Damnit. That’s the one thing I needed to be able to do. I don’t have permissions to create files at the destination it tells me. I’ll look into that.

Aside from that, getting 4 different operating systems to talk to Samba on Mint was surprisingly simple (there is a Vista laptop kicking around as well, but I don’t feel like I need to get that involved.) Pretty much the only thing the Windows machine will share with is the PS3. I might look into trying to get it to share it’s files with the linux machines at some point, because it has most of the video stored on there.

I had another look at the share folder settings, and changed so everyone can do everything and voila! Mandriva can send files to Mint. Brilliant. Let the backing up begin. Once I get this desktop reformatted I must look into turning it into a media server. Samba seems much better suited to the task that Homegroup.

P.S.  14 gig across my wireless is going to take 1 hour 45 mins apparently.  I’m actually impressed with that.

Advertisements
Posted in Uncategorized | Tagged , , , , | Leave a comment

Adventures in Linux

My version of Mandriva is out of date, as the auto-updater reminds me every day, but it fails to update itself. This may be due to the fact that no updates were done for about a year and now it’s too far behind, or possibly because Mandriva is no longer free. I have the 2010 version, and in 2011 (I believe) the company decided to go commercial and start selling their products. Too bad, I have really enjoyed using Mandriva’s Gnome desktop since I first installed it in early 2009.

So, I guess I need a replacement.

I have Mint running on one of my laptops. From memory, I installed Mandriva on there first, but failed to get the wireless drivers working. Wireless drivers seem to be the one thing that Linux cannot do out of the box (at least not back in 2011), and although I once got it working on my friends laptop with a lot of messing about, this time I just couldn’t do it. Anyone with a subscription to APC will have every flavour of Linux on hand, so I went about selecting another one. A previous housemate had had Mint on her laptop and didn’t seem to have any issues with the wireless, so I decided to give that one a whirl. Mint Helena was installed, I connected to the network and off I went. So far, so good.

What does this have to do with my current desktop in 2013? Not that much actually. A mere couple of weeks after installing Mint I purchased a new laptop with Windows 7 and moved overseas, leaving both the old one and the desktop behind to slowly outdate.

Then I returned and the desktop was so out of date that web sites are giving me warnings, ect. Time to choose a new Linux.

I figured I’d give Mint a proper test before comiting to putting that on the desktop, as it seems pretty different and I really like the Mandriva I am used to. I got the new version, Nadia and chose the KDE desktop purely because in the screenshots of each the Gnome version looked pretty different to what I am used to, and I got the impression that KDE was the default, so I should stick with it.

Again the wireless drivers work with no dramas, but I’m not 100% sold on the inferface. I don’t know if it’s a KDE thing, or a Mint thing, but I’m not liking using it as much. Apparently Mint is a type of Ubuntu, which I tried before Mandriva and disliked, mostly because it didn’t work with my graphics card, but also partially because I just didn’t really like it, for no good reason. Maybe it was the brown. Blue is much nicer.

I installed some software that I like, LMMS, Blender, everything was installed automatically through the software manager and works perfectly. These are both programms that I tried to install on the Mandriva machine also and failed. Yep, Mandriva’s gotta go.

Instead of OpenOffice, Mint came with LibraOffice. I’m using it right now to type this, and it’s pretty spiffy! If I can get a word count button to appear on the toolbar, I’ll be sold forever.

I went to Youtube and it works. Flash had to be installed seperately in Mandriva and it was an ordeal.

There are a few things I don’t like for stupid reasons but those are probably things that I just have to learn to customise. I want more folders to appear in the Computer section of the Start menu. I want there to be a tab for development tools. Apparently GCC is in here somewhere, it’s not on the menu I have to search for it.

Speaking of development, I figured I should check is cmake was included (it wasn’t in Mandriva) and install it if not. After all, the software installer is nice but there are plenty of programs you have to build yourself. The terminal in Mint is white instead of black. I like the black. Call me old-school. Anyway, cmake wasn’t installed, and it advised me to do a sudo apt-get install cmake in order to install it. It failed the first time, probably due to my woeful internet connection, but the second time managed to get all the packages. I just checked, and it’s still not installed. Hmmm. I still don’t underand 100% what it is even for, so I guess it’s ok for now. At least sudo worked, that had to be activated in Mandriva. Again I don’t understand 100% why. RPM?

Opera offered me an update file and is ended in .deb, which I was pleased to find opens but it wouldn’t install because AMD64 is the wrong architechture. I’m not sure if I should try install the i386 one instead because I don’t know if it just gave me the best one by default, or if it knew that was the one I was supposed to have. I’ll run a system update tonight and see what happens?

Posted in Uncategorized | Tagged , , , , | Leave a comment

Moving blog

Can  I back date this stuff?  Ok, yes I can!

Moving from Blogger to WordPress.  Partly because I have never tried it, and I don’t like the way Google has moved with Blogspot.  Partly because I have no idea what my old password was.

Posted in Uncategorized | Leave a comment

VB6 Annoyances

I’m back working on good old VB6 this week, and after using nothing but VB.NET for several months, going backwards is really frustrating!

Over the last 4 days I have continued to discover more and more reasons to hate using VB6, not because of the actual syntax of the language, but because of flaws in the development environment itself.

Here is the list of my top personal VB6 annoyances

1. No mouse scrolling. It works in Visual Studio 6’s C, but not in VB. Why? I have no idea, but it is bloody annoying! The scroll wheel on a mouse was very easy to get used to when it first became available, but once you get used to it, it is very difficult to go back to life without it! I’m sure everyone who has used a scroll mouse knows how sucky it is to go back to a mouse without a scroll wheel, you keep running your finger over the empty spot where it should be and it’s terribly frustrating. The problem with VB6 is that the scroll is still there (providing you have a scroll mouse, and why wouldn’t you?) but when you wheel it nothing happens. After a week of using nothing but VB6 I still keep trying to scroll, it’s too hard a habit to break. A few times I actually thought my computer had frozen up because I was wheeling and nothing was happening. The amount of useless wheeling I have done this week probably accumulates to about half an hour of wasted time. Seriously. All I know is, everyone agrees that this is the single most annoying thing about using VB6.

2. No collapsible region thingies. Now my buddy programmer doesn’t use this feature in .NET, but I love it. Every function or sub I am not using gets clicked shut, and groups of subs are separated into regions and kept shut as well. I can get a 3000 line program condensed down into a page and a half, and I love it. In fact I’m a bit obsessive about keeping everything shut, I do a lot of clicking on those + and – symbols, like I always keep all the programs I have opened minimised unless I am using them, I’m picky about that too. Actually .NET bothers me in the way that when you open a project all the subs will be visible again. The first thing I do after loading a project is click everything shut. However I am complaining about VB6 today, so I’ll get back to the subject. I like being able to make stuff smaller and VB6 doesn’t let me, end of story.

3. You can’t comment out a huge block of code at once. .NET has a lovely feature where you can highlight an area, then comment or uncomment it with one click of an icon. VB6 forces you to comment out each line one at a time, and I hate it! The amount of ‘ key, down key, home key, pushing I had had to do it ridiculous. At least in C you can start a comment area with a nice */ and not have to mark every line, hell even HTML can do it! Commenting out large sections sucks so much that I usually cut them, paste them into notepad, then put them back in later, rather than just commenting them out.

4. It’s not that smart. Ok, sometimes .NET drives me nuts cause it’s too smart, I comment a line out and a bunch of warnings appear to let me know, but I already know cause I did it on purpose and if it would just wait a few more clicks then everything will be alright again… But at least it will tell you if you have called a function that doesn’t exist so you can find out before you crash your program trying to access it. It also would be nice if it could indent stuff for me, and put ‘end if’ in there automatically, and all the other stuff I have become to lazy to do myself because .NET does it all for you.

5. I like the tab thing .NET has going where you can see every item you have opened at the top of the work area. It’s nice to be able to click on the tabs to switch between them instead of having to ctrl-tab, and I like being able to see what I have opened. This going back to my obsession with having everything closed again, after debugging in VB6 I go through all my open pages twice to make sure there are none opened that I will not be using and need to shut.

6. I like to have the line numbers down the side of the page, I don’t think Visual Studio 6 can do that. At least I have never figured out how to make them appear.

7. Every time I open a project it opens at visual studios default save location. I don’t save my stuff there; I have never opened anything from there, why can’t it remember where I opened my last workspace from and take me straight there? I know it knows where I have been cause it can make a recent list. It’s insistence that I open things from it’s stupid default location makes me angry.

That’s all I can think of for now… but I’m sure I have a few more!

A few of these things might be solvable by changing so settings, but as I am only going to be working in VB6 for another week or so (hopefully) I don’t think it is worth my time to try and work it out. Ah well, enough complaining and back to my VB forms.

Posted in Uncategorized | Leave a comment

I just want to capture a double click!

Today has been a bit of a waste of time.

What I am trying to do is simple enough, yet it seems that I can’t do it.

I have a Datagrid in an ASP.NET form, I want users to be able to click on it and then I want stuff to happen.

Should be pretty easy I thought, until I discovered that there is no DoubleClick event in ASP.

Ok so you can add one in, but not if you let the program build your datagrid for you, only if you specify the column names in HTML. So I added in some crap like:

{Columns}

{asp:TemplateColumn HeaderText=”JobName”}

{ItemTemplate}

{asp:Label ID=”lblJobName” Text='{%# DataBinder.Eval(Container.DataItem, “JobName”) %}’ Runat=server /}

{/ItemTemplate}

{/asp:TemplateColumn}

And the datagrid was able to bind itself like it used to except for one thing… My ability to sort by clicking on the column header was gone! I have no idea why, sorting was still enabled and I had an onSortCommand thing in there, but they became unclickable. I could put a separate sort command field in each template column, but then it wouldn’t use my custom sort. Infuriating, but not what this post is actually about.

So anyway, I managed to put some code in the ItemDataBound declaration of the datagrid that looked for my column labels that I created as explained above and added an OnDblClick event to each {TR} in the datagrid.

The datagrid now knows when I double click on it!

The problem in, I can’t get it to do anything once I do, unless I write the function in Javascript and stick it on the page with the HTML, which I REALLY don’t want to do. I can’t get it to see a function in the code behind, even though the datagrid sort command lives there and that can be found just fine. It won’t recognise anything I put in there, it just says Unknown Object.

It would be alright if all I wanted to do was a little Javascript function, like a pop-up box with the name of the row that was clicked on or something, but I need to write to a file and already have a function for that sitting in the VB part.

So the good news is I am able to handle a double-click event. The bad news is that I can’t also have a bi-directional sort and whatever function I want the double click to call has to be in Javascript. Ggaaahh!

So I spent half the day trying to find a good solution to my double clicking problem and I haven’t found one. I guess I’ll have to put a checkbox column in or something, which I don’t want to do cause it’s a wide grid already and being any wider will make its layout look lousy.

Ok, I have worked out what I am going to do. I’ll put in a textbox and a button and the user will have to put the name of the item in the textbox then click to perform the action. I don’t know how I’m going to squish it in, but that is another problem. I probably would have done something like this in the first place if I had have designed the stuff myself, instead of adapting an already existing application and converting it into a web page.

Posted in Uncategorized | Leave a comment

ASP.NET’s “I format your HTML however I feel like” bug

I have been adding controls to a multipage today and for some reason you can’t just drag them onto it in design mode (as far as I can tell), you have to edit the html so that the items are between the move the pageview tags and then you have to set there coordinates manually. Not hard, just tedious, but having to do it reminded me again of it’s stupid HTML formatting issues.

One of the first things I noticed I disliked about ASP.NET is this problem.

My first complaint it about the way it formats the HTML code as you insert components in design view. It doesn’t seem to have any logic to it at all! Things appear in strange orders, the line breaks are in bizarre places and it blocks odd pieces of code together.

My first thought after seeing this was, ‘No problem, I’ll just move it around myself,’ which I did, then went back into design view.

That brings us to the second problem; on switching back to HTML view you find that it has rearranged everything again!

The third problem is that there seems to be no way to fix either of the first two problems.

Oh! It also removes extra things you might have added, like a field that lets Firefox read an items height or width, thanks for that Microsoft!

I’m not even going to think about what normal paste does and how you have to use ‘paste as html’ all the time.

I did a search on the web after discovering this little quirk and discovered that while I was not the only one who found it annoying, no one really had a good solution for it.

Microsoft themselves recommend these two half-arsed half-fixes, which are:

1. Click undo after you switch to HTML view, this may or may not fix the reformatting and may not also undo whatever change you just made.

2. Click save before switching back to design view, then when you switch back to HTML view it might not have reformatted everything. Most of the time.

They also stated that there is no way to turn this ‘feature’ off, despite the development team considering it to be a bug. Oh well.

If you turn off Word Wrap in Tools / Options / Text Editor / HTML/XML / General – Settings it helps a little because then at least lines that shouldn’t be broken up might not be. Instead you will often get a long line of code (not always, it seems to be really erratic) but if you put them on their own lines they will sometimes stay there.

Honestly it’s a major pain and some days it just pisses me off… like today!

Posted in Uncategorized | Leave a comment

Browser compatibility woes

IE Webcontrols are awesome, unless you want to use Firefox…

Web page compatibility… So important, yet so difficult at times! When I explained the proglems I was having to my supervisor yesterday he got all angry that after all this time there was no standard for all web browsers to adhere to, though I pointed out that if there was then all the viruses that could get through IE but not others would affect everyone, but still, it would be nice if a website would look the same on every browser.

As we make Windows software with Microsoft products we are not too concerned with stuff like this, but as I am a Firefox user myself, I consider it to be important and try to make everything I make cross compatible.

Now I expected to have a problem, because I am working in Mircosoft Visual Studio, programming in ASP.NET and using Microsofts Internet Explorer Web Control package to make a neat looking tabstrip with multipage affair. I’d be crazy to even think that this could work in anything but IE, so I wasn’t too surprised to see it looking like a jumbled mess.

My problem is this, I have a heap of labels and other components that are all set with left and top values to align them on the page. In IE, it aligns them within the multipage area and everything looks great. In Firefox, it aligns them from the top and edge of the page and as a result everything is in the wrong place. This can be fixed by changing the values, but then it looks wrong in IE. I need a way for it to look right in both. For some reason FF can’t seem to keep a {span} object inside the table.

However, I’d like to try to get it looking better, I’d really hate to have to tell people that this application is IE only.

I have a few things to try in this situation.

Step 1, add browsercaps to my Web.config file.

The standard code I use for this is as follows:

* When I tried to post this I realised that by putting HTML code in here the blogger tried to execute it, so I have replaced the “{” symbols with “{” I’ll have to see if there is a way around that…

{browserCaps}

{!–NETSCAPE 6 and 7 //–}

{case match=”^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+ )?Netscape[6|7]/(?’version'(?’major’\d+)(?’minor’\.\d+)(?’letters’\w*)).*”}

tagwriter=System.Web.UI.HtmlTextWriter

browser=Netscape

version=${version}

majorversion=${major}

minorversion=${minor}

frames=true

tables=true

cookies=true

javascript=true

javaapplets=true

ecmascriptversion=1.5

w3cdomversion=1.0

css1=true

css2=true

xml=true

{/case}

{!– MOZILLA //–}

{case match=”^Mozilla/(?’version'(?’major’\d+)(?’minor’\.\d+)(?’letters’\w*)).*”}

{case match=”^[5-9]\.” with=”${version}”}

tagwriter=System.Web.UI.HtmlTextWriter

{/case}

{/case}

{!–

OPERA 5+

//–}

{case match=”Opera[ /](?’version'(?’major’\d+)(?’minor’\.\d+)(?’letters’\w*))”}

{filter match=”[4-9]” with=”${major}”}

{filter match=”[5-9]” with=”${major}”}

tagwriter=System.Web.UI.HtmlTextWriter

{/filter}

{/filter}

{/case}

{!–

GECKO Based Browsers

//–}

{case match=”Gecko/[-\d]+”}

browser=Netscape

frames=true

tables=true

cookies=true

javascript=true

javaapplets=true

ecmascriptversion=1.5

w3cdomversion=1.0

css1=true

css2=true

xml=true

tagwriter=System.Web.UI.HtmlTextWriter

{case match=”rv:1.0[^\.](?’letters’\w*)”}

version=6.0

majorversion=6

minorversion=0

{case match=”^b” with=”${letters}”}

beta=true

{/case}{/case}{case match=”rv:1(\.\d+)(\.\d)?(?’letters’\w*)”}

version=7.0

majorversion=7

minorversion=0

{case match=”^b” with=”${letters}”}

beta=true

{/case}{/case}{/case}

{/browserCaps}

I only have about a 50% understanding of what this does and what all that stuff means, but adding it in usually solves a few layout problems, such as textboxes not showing up in their set width, ect.

In this case it had no effect, which was what I anticipated.

Step 2, change the page target XML scheme from Internet Explorer 5 to Internet Explorer 3.02 / Netscape Navigator 3.0.

This has never fixed a problem for me but I always try it anyway. In this case it made no difference, so I changed it back. Doesn’t seem like a setting I would want to leave like that without good reason.

I’ve been mucking around with putting {div} stuff around the trouble spots but haven’t really solved the problem and can’t waste too much time on it. I guess for now I’ll have to just detect the browser type and display a message if it is not IE and tell the client that it is IE compatible only. Although it does still work fine in FF, it just looks wrong.

I suggested to my supervisor that I could install Opera and see what it looks like in there and he said it’s probably less stressful not to know. I think I agree!

Posted in Uncategorized | Leave a comment