It's been quite a while since I've posted anything. Life's gotten busy!
Recently I've been writing some scripts and thought it would be nice to guify them a bit. I then recalled using Zenity for a few things and though it would be great to take a look. Since it had been a while I didn't quite remember everything. A quick Google search returned a pair of great sites that helped out with this.
Zenity guide by examples 1 and Zenity guide by examples 2 both of which can really describe how it works in nice to understand examples.
Now to start using these!
-P
The thoughts, rants and discoveries by Patrick Bulteel. Actually, it's a way to remember things.
Friday, 24 February 2012
Friday, 19 August 2011
DNS and DHCP
For some reason I hadn't enabled the ability for DHCPD to update my internal DNS server when a new client joined the network, so I decided to do that.
The process is quite simple, you generate a key which you give to both DHCP and DNS and they hash out the communication.
However after I did that I noticed I was getting an error:
I Googled for any signs of what this could mean and I didn't find anything. There weren't too many people reporting the same issue, so I guess there wasn't that much to it.
I finally did an strace on the named server and managed to catch that the server was getting an access denied error. I looked at my bind directory and realized it was owned by root as were the files... I quickly changed this to the bind user and voila! problem solved.
-P
PS - many people may wonder why I would want to do this in the first place, do I REALLY have that many machines or ... anyway, the answer is it's "because I can".
The process is quite simple, you generate a key which you give to both DHCP and DNS and they hash out the communication.
However after I did that I noticed I was getting an error:
Aug 19 17:00:56 server01 dhcpd: if iPod-touch.mydomain.org IN A rrset doesn't exist add iPod-touch.mydomain.org 3600 IN A 192.168.1.140: timed out.
Aug 19 17:00:56 server01 dhcpd: DHCPREQUEST for 192.168.1.140 from 00:26:bb:a1:cf:a0 (iPod-touch) via eth1
Aug 19 17:00:56 server01 dhcpd: DHCPACK on 192.168.1.140 to 00:26:bb:a1:cf:a0 (iPod-touch) via eth1
I Googled for any signs of what this could mean and I didn't find anything. There weren't too many people reporting the same issue, so I guess there wasn't that much to it.
I finally did an strace on the named server and managed to catch that the server was getting an access denied error. I looked at my bind directory and realized it was owned by root as were the files... I quickly changed this to the bind user and voila! problem solved.
-P
PS - many people may wonder why I would want to do this in the first place, do I REALLY have that many machines or ... anyway, the answer is it's "because I can".
Monday, 11 April 2011
VMWare MKS plugin on 64bit Ubuntu with nspluginwrapper
Since I've been running Ubuntu 64bit at work I've found a few things that still don't work like I'd like.
We use VMWare Lab Manager which gives you access to a console for the VMs that you deploy. However, the plugin that is provided by VMWare is only a 32bit app and due to that it doesn't seem to work when you install it.
Every time you go to the console, you get a black screen which allows you to install the plugin even though you already installed it.
However, there is a solution. You can go ahead and install the MKS plugin as usual, restart your browser and make sure that the plugin shows in the Extensions.
Then shutdown the browser (so you might want to print this blog entry or copy paste to gedit) and you can then try using nspluginwrapper to install it.
I suggest you run it like this:
Where xxxxx.default is your profile.
You can use sudo if you want, but this way it installs it into your .mozilla/plugins/ directory. The reason for the -v is so that you get verbose output if the installation fails (see below.)
Now what problems can you encounter? Well, in my case I found that I needed libexpat.so.0 as you can see above. Since this library isn't available to install, I installed libexpat.so.1 (sudo apt-get install libexpat1) and I just created a symbolic link in the /lib32 directory like this:
I then ran it again and it was successful.
Now I can start my browser go to the console and voila, it works.
I'm not sure if there are other libraries that are needed, but at least by doing this I managed to get it working.
Getting this plugin to work with nspluginwrapper has given me hope that any other plugin that I cannot get working out-of-the-box will work through nspluginwrapper as long as I have the -v to be able to find the libraries that are missing.
Good luck!
-P
We use VMWare Lab Manager which gives you access to a console for the VMs that you deploy. However, the plugin that is provided by VMWare is only a 32bit app and due to that it doesn't seem to work when you install it.
Every time you go to the console, you get a black screen which allows you to install the plugin even though you already installed it.
However, there is a solution. You can go ahead and install the MKS plugin as usual, restart your browser and make sure that the plugin shows in the Extensions.
Then shutdown the browser (so you might want to print this blog entry or copy paste to gedit) and you can then try using nspluginwrapper to install it.
I suggest you run it like this:
/usr/bin/nspluginwrapper -v -i $HOME/.mozilla/firefox/xxxxxx.default/extensions/VMwareMKSNPRTPlugin@vmware.com/plugins/libnprtmks.so
Where xxxxx.default is your profile.
You can use sudo if you want, but this way it installs it into your .mozilla/plugins/ directory. The reason for the -v is so that you get verbose output if the installation fails (see below.)
*** NSPlugin Viewer *** ERROR: libexpat.so.0: cannot open shared object file: No such file or directory
nspluginwrapper: no appropriate viewer found for /home/USER/.mozilla/firefox/xxxxxxx.default/extensions/VMwareMKSNPRTPlugin@vmware.com/plugins/libnprtmks.so
Now what problems can you encounter? Well, in my case I found that I needed libexpat.so.0 as you can see above. Since this library isn't available to install, I installed libexpat.so.1 (sudo apt-get install libexpat1) and I just created a symbolic link in the /lib32 directory like this:
sudo ln -s /lib32/libexpat.so.1 /lib32/libexpat.so.0
I then ran it again and it was successful.
Now I can start my browser go to the console and voila, it works.
I'm not sure if there are other libraries that are needed, but at least by doing this I managed to get it working.
Getting this plugin to work with nspluginwrapper has given me hope that any other plugin that I cannot get working out-of-the-box will work through nspluginwrapper as long as I have the -v to be able to find the libraries that are missing.
Good luck!
-P
Labels:
64bit,
nspluginwrapper,
Ubuntu,
vmware,
vmware mks plugin
Thursday, 31 March 2011
Dual Booting Blues?
It's been a while since I wrote anything. Not because I didn't have anything to say, just I didn't have the time to really write anything.
However, today I decided I would write THIS down. It's information that was gleaned from different sources and finally helped work the issue out. None of the places I read had the FULL steps to fix the issue. Hopefully this will help a poor soul.
Yesterday, someone installed Ubuntu on their system when I wasn't locally around to help out. They've installed Ubuntu on their home PC and on another desktop without really encountering any issues. That wasn't the case yesterday.
Somehow, the installation had frozen and they had therefore canceled it in mid-stride. They then reran the installer but manually selected the partition where they wanted to install (the one previously created/resized during the first install attempt.) Luckily they didn't wipe the Windows partition which they still needed, however booting into the machine was now not possible.
Investigating the issue I discovered that os-prober didn't see the Windows files it needed to boot. I went ahead and updated the system in case there were any fixes included in one of the updates. However, it seemed that the boot information for Windows was gone.
I was going to run something to recover the boot manager, but I wanted to be there to be able to troubleshoot things.
When I arrived at the office, I found out that they had taken things into their own hands and had used a Windows 7 install disk to "fix the boot manager" which in turn broke grub2 and now he couldn't boot into Windows 7 OR Ubuntu.
He could boot into the USB stick with Ubuntu, so quickly I did the following.
This fixed the grub bootloader and we were now able to boot into Linux once more. However, During the update-grub, the Windows partition wasn't added to the loader. (This information came from Ubuntu's Help site.
Once in Ubuntu, I opened a terminal and did:
Ok, in reality I initially mounted the Windows partition and checked that the files which were missing (BCD, BCD.log, etc) were there. Then I unmounted the Windows partition, ran os-prober which didn't detect Windows. So I then mounted the partition, re-ran os-prober and it DID find the Windows installation. At that point I ran update-grub which added the Windows information to the grub.cfg file and voila!
The things I had to "put together" were:
1. os-prober seems to need the Windows partition mounted when you run it manually. Not sure why it doesn't seem to need it when Ubuntu runs updates. Maybe it takes care of that itself.
2. The Windows 7 (and Vista) Boot Manager needs the files in the C:\boot\ directory to boot and os-prober needs those files to detect Windows 7/Vista.
I hope these steps help people out.
-P
However, today I decided I would write THIS down. It's information that was gleaned from different sources and finally helped work the issue out. None of the places I read had the FULL steps to fix the issue. Hopefully this will help a poor soul.
Yesterday, someone installed Ubuntu on their system when I wasn't locally around to help out. They've installed Ubuntu on their home PC and on another desktop without really encountering any issues. That wasn't the case yesterday.
Somehow, the installation had frozen and they had therefore canceled it in mid-stride. They then reran the installer but manually selected the partition where they wanted to install (the one previously created/resized during the first install attempt.) Luckily they didn't wipe the Windows partition which they still needed, however booting into the machine was now not possible.
Investigating the issue I discovered that os-prober didn't see the Windows files it needed to boot. I went ahead and updated the system in case there were any fixes included in one of the updates. However, it seemed that the boot information for Windows was gone.
I was going to run something to recover the boot manager, but I wanted to be there to be able to troubleshoot things.
When I arrived at the office, I found out that they had taken things into their own hands and had used a Windows 7 install disk to "fix the boot manager" which in turn broke grub2 and now he couldn't boot into Windows 7 OR Ubuntu.
He could boot into the USB stick with Ubuntu, so quickly I did the following.
sudo fdisk -l
sudo mount /dev/sda5 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
update-grub
grub-install /dev/sda
grub-install --recheck /dev/sda
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt
sudo reboot
This fixed the grub bootloader and we were now able to boot into Linux once more. However, During the update-grub, the Windows partition wasn't added to the loader. (This information came from Ubuntu's Help site.
Once in Ubuntu, I opened a terminal and did:
sudo fdisk -l
sudo mount -t ntfs /dev/sda1 /mnt
ls /mnt/boot
os-prober
sudo update-grub
sudo umount /mnt
sudo reboot
Ok, in reality I initially mounted the Windows partition and checked that the files which were missing (BCD, BCD.log, etc) were there. Then I unmounted the Windows partition, ran os-prober which didn't detect Windows. So I then mounted the partition, re-ran os-prober and it DID find the Windows installation. At that point I ran update-grub which added the Windows information to the grub.cfg file and voila!
The things I had to "put together" were:
1. os-prober seems to need the Windows partition mounted when you run it manually. Not sure why it doesn't seem to need it when Ubuntu runs updates. Maybe it takes care of that itself.
2. The Windows 7 (and Vista) Boot Manager needs the files in the C:\boot\ directory to boot and os-prober needs those files to detect Windows 7/Vista.
I hope these steps help people out.
-P
Friday, 1 October 2010
gconf-sanity-check-2 exited with error status 256
Today I discovered I knew something was wrong before it was wrong. That doesn't make much sense, but let me explain.
One day on my laptop I had a problem with my /tmp directory where the permissions had changed and therefore my user was not able to install applications, etc, etc. I didn't know what changed it, but since I didn't reboot, I just changed the permissions of /tmp back to 1777. Everything happy.
Today, a colleague of mine installed Ubuntu on his desktop. He did the usually good thing of installing all the updates. However after the reboot he got the error listed above and couldn't log into his system. The rather odd error of /usr/lib/gconf2-4/gconf-sanity-check-2 exited with error status 256 didn't really give much as to why this was happening.
We used ctrl-alt-f1 to go into a tty and look around. We tried a few things but nothing seemed to fix it. I did a quick Google search and discovered that others had had this issue even with versions prior to 10.04. The solution?
And guess what? That fixed it. What exactly changed the permissions on /tmp we're not sure, but at least we were able to fix it.
-P
One day on my laptop I had a problem with my /tmp directory where the permissions had changed and therefore my user was not able to install applications, etc, etc. I didn't know what changed it, but since I didn't reboot, I just changed the permissions of /tmp back to 1777. Everything happy.
Today, a colleague of mine installed Ubuntu on his desktop. He did the usually good thing of installing all the updates. However after the reboot he got the error listed above and couldn't log into his system. The rather odd error of /usr/lib/gconf2-4/gconf-sanity-check-2 exited with error status 256 didn't really give much as to why this was happening.
We used ctrl-alt-f1 to go into a tty and look around. We tried a few things but nothing seemed to fix it. I did a quick Google search and discovered that others had had this issue even with versions prior to 10.04. The solution?
sudo chmod 1777 /tmp
And guess what? That fixed it. What exactly changed the permissions on /tmp we're not sure, but at least we were able to fix it.
-P
Cancel or Cancel?
I'm not a design guru by any means, but something caught my eye today.
I was on a web screen that gave me the options to click OK or Cancel. Those were the only two choices, which is fine because I was looking at a page that was just displaying my preferences and if I did or didn't make any changes, those were my options. However, when I click "Cancel" I got a popup that said "Do you really want to cancel?" and my options were once again "Ok" and "Cancel."
So, lets recap. Options: "Ok" and "Cancel" - I press "Cancel". Popup: "Ok" and "Cancel".
Now do you see the problem? I pressed "Cancel" the first time, but I have to press "OK" the second time. Why not "Cancel" and "Cancel"?
Granted the question is "Are you sure you want to cancel?" but surely if I didn't make any change there shouldn't be any reason why I'm asked if I am sure I want to cancel.
Note that pressing "OK" doesn't prompt me if I'm sure I want to "OK" the action. It just submits the form and takes me to a completely different page. In other words, I don't get to continue editing my preferences.
Oh well. I guess whoever designed that workflow didn't think anyone would want to cancel their Ok.
-P
I was on a web screen that gave me the options to click OK or Cancel. Those were the only two choices, which is fine because I was looking at a page that was just displaying my preferences and if I did or didn't make any changes, those were my options. However, when I click "Cancel" I got a popup that said "Do you really want to cancel?" and my options were once again "Ok" and "Cancel."
So, lets recap. Options: "Ok" and "Cancel" - I press "Cancel". Popup: "Ok" and "Cancel".
Now do you see the problem? I pressed "Cancel" the first time, but I have to press "OK" the second time. Why not "Cancel" and "Cancel"?
Granted the question is "Are you sure you want to cancel?" but surely if I didn't make any change there shouldn't be any reason why I'm asked if I am sure I want to cancel.
Note that pressing "OK" doesn't prompt me if I'm sure I want to "OK" the action. It just submits the form and takes me to a completely different page. In other words, I don't get to continue editing my preferences.
Oh well. I guess whoever designed that workflow didn't think anyone would want to cancel their Ok.
-P
Monday, 27 September 2010
Hair washing robots
As you know, Japan develops a lot of robots. They do so because the country has a rapidly ageing population and the idea is to have robots do chores and help out elderly, etc with as many tasks as possible.
So now, they've come up with a hair washing robot.
Meanwhile I'm still trying to put together my washing machine.
-P
So now, they've come up with a hair washing robot.
Meanwhile I'm still trying to put together my washing machine.
-P
Subscribe to:
Posts (Atom)