Friday, October 31, 2008

Remote Windows Service control

The command line way of controlling windows services is to use the net start and net stop commands. This will not work for remote servers though.

Instead we use the sc command. If I want to stop a service on GR0409A1, write:

sc \\gr0409a1 stop "Sonic CT_H1_ARN_StartGR0409A1 Service (AtlasProd)"


Also we can configure services with the sc command. To configure a service to autostart:

sc config "Sonic CT_H1_ACN_StartAtlasFileTransfer Service (LocalTest)" start= auto


This will work at least on XP.

Thursday, October 23, 2008

Rename files

I often have to rename files with the additional file extention .reject.
I basically just want to remove the .reject extention and keep the rest of the file.

This is the typical dirctory listing
C:\Apps>dir \\seit1705\D-Share\test\
 Volume in drive \\seit1705\D-Share is SEIT1705
 Volume Serial Number is 78E4-8FB3

 Directory of \\seit1705\D-Share\test

 2008-10-23  13:25  .
 2008-10-23  13:25  ..
 2007-10-03  16:45  1 144 E_DepSub_RME.xml.reject
 2007-10-03  16:45  1 144 E_DepSub_RME1.xml.reject
 2007-10-03  16:45  1 144 E_DepSub_RME2.xml.reject
 2007-10-03  16:45  1 144 E_DepSub_RME3.xml.reject
               4 File(s)          4 576 bytes
               2 Dir(s)  15 828 320 256 bytes free

You would think that this would do it:

ren \\seit1705\D-Share\test\*.reject *

But no... that command does NOTHING.

Ok, what about this:
ren \\seit1705\D-Share\test\*.reject *.xml


Nope, it produces this:
C:\Apps>dir \\seit1705\D-Share\test\
 Volume in drive \\seit1705\D-Share is SEIT1705
 Volume Serial Number is 78E4-8FB3

 Directory of \\seit1705\D-Share\test

2008-10-23  14:47              .
2008-10-23  14:47              ..
2007-10-03  16:45             1 144 E_DepSub_RME.xml.xml
2007-10-03  16:45             1 144 E_DepSub_RME1.xml.xml
2007-10-03  16:45             1 144 E_DepSub_RME2.xml.xml
2007-10-03  16:45             1 144 E_DepSub_RME3.xml.xml


Not what we want.

Solution:

ren \\seit1705\D-Share\test\*reject *xml


Amazingly works!

Saturday, October 4, 2008

Permanently mounting NTFS partition

I have a data partition that is NTFS formatted. I could mount it previously, but it was not automounted.

To fix this, I did the following:
1. got the graphical config program for ntfg-3g with:
sudo apt-get install ntfs-config
2. backed up my current /etc/fstab with:
sudo cp /etc/fstab /etc/fstab.orig
3. checked the mount info with:
sudo blkid
4 ran the config program that does the mounting with:
gksudo ntfs-config
5. I chose the correct partion to mount and the chose to make it writable.

... done!

No problems so far.

Wednesday, October 1, 2008

Way to go Logitech!

When the H&M moved their offices to Marievik, the moving boys lost the USB stick to my MXRevolution mouse. I was PISSED!

I called Logitech support to check if it was possible to buy a replacement somewhere. Instead they sent me a replacement for free! I am sitting stunned looking at the replacement right now!

Thumbs up and three cheers for Logitech!

Edit: Unfortunately they sent me the wrong USB stick.... a new one is on the way...

Edit: Three month later and I still haven't gotten the stick. I am now completely disappointed with Logitech.

Tuesday, September 30, 2008

Test of VirtualBox

Will be trying out running VirtualBox to satisfy my windows needs (banking, etc - Handelsbanken does not support Linux...).

More to come.
----------------------
Ok, had problems with the default Ubuntu VirtualBox package, so I downloaded the latest version from http://www.virtualbox.org/wiki/Linux_Downloads. Installed it and got it running. Currently installing XP and performing upgrades (installed SP1):


But some problems may be yet to come:


More to come.

Trying to get the USB working with this tutorial:
http://stikiflem.wordpress.com/2008/08/30/enable-usb-support-in-virtualbox/

Need USB to get Handelsbankens j-vla Nexus Personal att importera min cert!!
----------
Some problems still remaining with VirtualBox:
- CPU goes to 100% of one of the cores when I plugin a USb device - known problem, no fix found...
- VirtualBox OS hangs when I suspend Ubuntu - fix for this is supposed to out in release 2.0.4 of VirtualBox...
---------
This might be a really good idea for me:
http://blarts.wordpress.com/2007/12/06/how-to-run-virtualbox-using-a-physical-partition-using-ubuntu-feisty-fawn/

Using PartImage directly in Ubuntu

This seems to be a good description on how I can use PartImage to backup my XP partition:

Using PartImage in Ubuntu

Monday, September 29, 2008

MyPhoneExplorer on linux

I installed MyPhoneExplorer on my linux under Wine. It seems torunning fine, testing as I write this. I ran the script provided here and after some retries, it connected with my phone.

Happy camper!


Edit1: the clock-sync doen't work... yet...
Edit2: I screwed up (trynig to upgrade to the latest MyPhoneExplorer and all is lost. Will try again...

ScribeFire as blog editor

I have started using ScribeFire as my blog tools. It is an Add-on to Firefox. This is my first post using it.

Screenshot:

Sunday, September 28, 2008

Fixed windows name resolution

Windows names could not be resolved out of the box. I fixed it by following these instructions:

To enable WINS resolution in Ubuntu, do the following:

Edit the /etc/nsswitch.conf file, and change this line:

hosts: files dns

to this:

hosts: files wins dns

Then do a sudo aptitude install winbind to install winbind, and everything should work like a charm.

Note: Instructions nicely provided by Poromenos at http://www.poromenos.org/node/53

Fixed the sound

When I first installed Ubuntu, there was no sound available at all! I thought it was a matter of Ubuntu not recognizing the sound hardware or something, but the answer turned out to be more amusing... It assumed that there was an amplifier attached to the headphone jack!

This is fixed by doing this:
  1. Open "Volume control" in gnome (double-click in the task bar)
  2. goto "edit" "preference". Then, click on "External Amplifier".
  3. You will be able to enable External Amplifier in the "Switches" tab in gnome volume manager.
  4. Uncheck the External amplifier checkbox in the switches tab
...that's all folks!

Fixed WLAN

The default WLAN tool (right-clicking the networking icon in the taskbar) failed miserably). Instead had to use System/Administration/Network tool to edit the network setting and create a profile for the wireless connection.

I was only able to get it to work after enabling broadcast of the ssid in my wlan router (not nice) - I will fix this problem eventually.

After getting it to finally connect, I had the problem that I had to reconfigure the WLAN adapter EVERY time I rebooted the computer. This is how I fixed it:
It seems that the network interface need to be restarted during bootup (actually right after it has been started) so I created a script (/etc/init.d/wireless-network.sh) containg simply one row:

/etc/init.d/networking restart

I then chmod +x on the script and link it in the /etc/rcS.d/ dir with this command:

sudo ln -s /etc/init.d/wireless-network.sh /etc/rcS.d/S41wireless-network

After that, the network has been fawless...

Installing Ubuntu

From Ubuntu LiveCD 8.04

Partitioning for Ubuntu install

Resized "C:" partition using GParted.

Installing Ubuntu Linux

I finally decided to do a dual-boot installation on my laptop after getting pissed at Windows deteriorating into a slushy, soggy performance mess after only 1 year.

The laptop is an Asus V1Jp with the following specs:
  • Intel core2duo 2 GHz
  • 2 GB RAM
  • 160 GB SATA HDD
  • WLAN a/b/g
  • bluetooth
  • ATI graphics
...and then some. A pretty good machine. It came installed with Vista Business, but I only kept it on for about a month before getting rid of it. Vista completely shot the performance of the laptop by taking more than half the memory before it even started up! So back to XP it was... I've been quite happy with it, but it is getting slow as well now. Re-install was imminent and I thought I should try out running linux for "real" instaead. After some light-weight research on linux distros, I finnaly decided on Ubuntu (currently at version 8.04).

Being the chicken that I am, I am not willing to let go of windows quite yet. So I first needed to repartition my hdd that already has XP. I'll explain this and the extra steps I had to take inte the upcoming posts.

I face the following challenges if I am to keep Ubunto as an active partner in my life:
  • Getting all banking applications to work under linux
  • Getting my accounting program running under linux (Visma Enskild Firma), a program that is only distributed as Windows application...
  • It would be nice to get the fingerprint reader to work under linux (hate to write my passwork all the bloody time)
  • All keyoard shortcuts should work properly (which they don't under XP actually...)
  • VPN connections towards my clients must work smoothly
  • MyPhoneExplorer is a must to sync my phone with contact lists and calendar.
  • Interaction with my other computers running Windows must be flawless (RDP, shares, etc)
  • Printing - it must work with my current network printer...
  • It should be easy enough for Anna to use as weel (not as tech-nerdy as me... :-))
Anyway, so far I have done the following (to be documents in coming posts:
  1. re-partitioned the harddrive
  2. installed Ubuntu 8.04 from LiveCD
  3. Fixed non-functional WLAN
  4. Fixed non-functional sound
  5. Fixed non-functional windows name resolution
Still to do (except for the stuff stated above):
  • create an image of the windows installation with PartImage (that at least ensures I have something to fall back on - if it all goes wrong)
  • Find out why the graphics seem to get fucked after I hibernate the computer when I'm using the "extra visual effects" setting in Ubuntu. Must be something with the ATI/NVIDIA drivers
  • get Light-scribe to work under Ubuntu
Probably more problems ahead... Will keep me posted (yes, this blog is only for me...)