Primal Cortex’s Weblog

Amnesia sets in…

Posts Tagged ‘ubuntu’

Firefox and Dropbox syncronization for Bookmarks and Passwords

Posted by primalcortex on November 17, 2009

After upgrading from Mozilla FireFox 3.0 to 3.5 I tried Mozilla Weave for syncing my bookmarks and passwords in all my computers. I was using version 0.8 (1.0b1 is out now), but despite working more or less, most of my bookmarks where misplaced, put out of order, moved to unsorted bookmarks… a mess. Tiding up the bookmarks on one browser doesn’t mean that it would be ok on another, so after only 5 days of use, I thought that there is probably a better solution, and I found it.

The solution is to use Dropbox https://www.dropbox.com/referrals/NTE1NTQzMTA5, the FireFox Addon SyncPlaces: http://www.andyhalford.com/syncplaces/ for syncronizing bookmarks and passwords. It works as it should. It doesn’t mess with Bookmarks, the order is kept, Icons are kept, and passwords are synchronized without any issue.

So, what are the steps:

- Install Dropbox and create an account.

- Install the Syncplaces add-on for Firefox

- Create a directory for storing Firefox information on your Dropbox folder, for example: mkdir ~/Dropbox/Firefox

- On your Firefox menu, goto Bookmarks->Syncplaces->options

- Select the Server tab and then select on the Connection sub-tab, the protocol File

- Select now the Syncronization tab, and define the path for the files: prefix the suggested name with /home/primalcortex/Dropbox/Firefox. So it should look like

JSON PATH: /home/primalcortex/Dropbox/Firefox/syncplaces.json

If you want, you can output also in HTML and XBEL format. Use the same path for the files.

- For synchronizing passwords select the checkbox passwords, and input a strong password. The password path is like the previous ones: /home/primalcortex/Dropbox/Firefox/passwords

You’re set. So down on the FireFox status bar, there is now an icon with a blue and red lines/circles, right click on it and select Send Bookmarks/passwords. Make sure that on the Dropbox Firefox folder files where created. Now DropBox synchronizes these files into the “cloud”, and they are available to your other Dropbox computers.

On the other computers, just repeat the configuration process (Install Dropbox, SyncPlaces, same configuration) but this time select on those computers on the SyncPlaces icon, the Receive Bookmarks/passwords option. (Make sure that you use the same password for the password export/impor feature in all computers).

Voilá, full no fuss workable synchronization! You just decide now which is the master machine, if you want to, namely by tweaking the merge options of the Syncplaces Addon. Also to avoid bookmarks duplication, I recommend that the BookmarkDD addon at http://bookmarkdd.mozdev.org/installation.html be installed and set not to do pop-ups when duplicated bookmarks are found. This way, during import, no duplicate bookmarks are imported.

Now you can automate the synchronization process by just configuring Syncplaces to synchronize at a specific time, or periodically/automatically and your set.

Posted in Geral, Linux | Tagged: , , , , , , , | Leave a Comment »

Vmware 6.5.3 on Karmic Koala

Posted by primalcortex on November 12, 2009

Installing: At least these instructions worked for me:

#sudo bash
#chmod +x VMware-Workstation-6.5.3-185404.x86_64.bundle
# export VMWARE_SKIP_MODULES=true
#./VMware-Workstation-6.5.3-185404.x86_64.bundle
# vmware-modconfig --console --install-all

Voilá, installed Vmware without any issue. I’ve compiled the modules after installation because there are reports that it may hang by using the installer. Not sure, because I didn’t tried it. All VM Machines appear to be working.
Now for the other issues:

After upgrading from Kubuntu 9.04 to 9.10, I needed to upgrade to Vmware Workstation 6.5.3 as is the subject of this post… My previous version was 6.5.0. With this upgrade some older issues where back and new issues appeared…

- Keyboard mapping where again all wrong, with my Portuguese keyboard wrongly configured and some keys wouldn’t just work.

- The other annoying issue was the grab/ungrab mouse cursor problem. Kubuntu task bar area and the floating vmware toolbar area where unusable when the VM machines are in full screen. So for example the Windows task bar is, when the machine is full screen, at the same screen area than the KDE taskbar. The cursor on this area just flickered away like mad, and it was pretty difficult to do anything on this area. This also mean that Windows taskbar and systray where almost unusable and unacessible, and just couldn’t do anything on this area. The temporary workaround was to use machines not in full screen…
The solutions:
For the keyboard problem, on my home directory, just went to .vmware hidden directory (create one if it doesn’t exist) and add the following to the file named config:

xkeymap.nokeycodeMap = true
xkeymap.keycode.61 = 0x035
xkeymap.keycode.61 = 0x5f
xkeymap.keycode.47 = 0x027
xkeymap.keycode.47 = 0xc7
xkeymap.keycode.48 = 0x028
xkeymap.keycode.48 = 0xaa
xkeymap.keycode.51 = 0x02b
xkeymap.keycode.51 = 0xfe52
xkeymap.keycode.34 = 0x01a # +
xkeymap.keycode.34 = 0x2a # *
xkeymap.keycode.35 = 0x01b # ´
xkeymap.keycode.35 = 0xfe50 # `
xkeymap.keycode.20 = 0x00c # ‘
xkeymap.keycode.20 = 0x3f # ?
xkeymap.keycode.21 = 0xab # «
xkeymap.keycode.21 = 0xbb # »
xkeymap.keycode.49 = 0x029 # \
xkeymap.keycode.49 = 0x056 # |

xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu

Now if you copy and past the above content, just make sure that x is an ‘x’ letter, because WordPress may change it to something else that looks like an x but it isn’t. If you don’t due this, when you press a mapped key on VMware, you will get a popup window with an error complaining about a key code.
For the mouse issue, it looks like that the solution is this:
Temporary fix (solution from http://communities.vmware.com/thread/240766):

Open a shell window and start vmware from it with as follow:

#export VMWARE_USE_SHIPPED_GTK=yes

#export LD_PRELOAD=/lib/libglib-2.0.so.0

#vmware

It seems that to make the first two lines permanent, you just, as root, edit the following file: /etc/vmware/bootstrap and add the first to lines to the end of the file.
I hope that all issues are covered now….

Posted in 1 | Tagged: , , | Leave a Comment »

Shorewall firewall on UBUNTU LTS 8.04 server doesn’t start on boot

Posted by primalcortex on January 7, 2009

I have in one of my machines a pretty annoying situation related to the fact if the UBUNTU based firewall reboot’s, the firewall doesn’t start automatically…

This is pretty annoying because it means that after a power failure, there is a need for manual intervention to restore exterior access trough the firewall to internal servers.

The solution?

Well I’ve made a bash script, named resetfw.sh that checks the server uptime and if it falls bellow a threshold of 10 minutes, it restarts the firewall:

DAYS=`uptime | cut -d ‘ ‘  -f   4`
HOURS=`uptime | cut -d ‘ ‘  -f   6`
HOUR=`echo $HOURS | cut -d ‘:’ -f   1`
MIN_NP=`echo $HOURS | cut -d ‘:’ -f   2`
MIN=`echo $MIN_NP | cut -c 1-2`

if [ $DAYS = "0" ]; then

if [ $HOUR = "0" ]; then

if [ $MIN -lt "10" ]; then

/etc/init.d/shorewall stop
/etc/init.d/shorewall start
/etc/init.d/shorewall stop
/etc/init.d/shorewall restart

logger “Firewall reset due to reboot: Uptime on action: $DAYS days, $HOUR:$MIN”
fi
fi

fi

Then all we have to due is to run this script periodically through the crontab:

*/5 * * * * /root/resetfw.sh

Posted in Linux | Tagged: , , , , | 2 Comments »

[K]Ubuntu kernel upgrade breaks vmware

Posted by primalcortex on November 28, 2008

When after a kernel update from the repositories or pushed by the adepter updater, vmware refuses to start, you have to run the vmware-config.pl script again.

Posted in 1 | Tagged: , , | Leave a Comment »

[K]Ubuntu and Netbeans 6.1 with Firefox 3.0

Posted by primalcortex on August 19, 2008

One annoying things that took some time to solve was that on the Start page of Netbeans there are URL’s to several articles, blog posts and so one, but every time I’ve pressed one of the it say’s that it could not execute Firefox.

I’ve checked the path, permissions, and so on but with no solution.

Well the issue is quite simple:

Goto Netbeans Tools menu and select the last option Options. It should start on the general tab where you select the browser you which to use.

Select Edit and on the arguments for Firefox remove whats there: -remote “openURL({URL})” and just keep the {URL} nothing else.

Save, close and it should work.

Now back to work…

Posted in Geral, Linux, netbeans | Tagged: , , , , | Leave a Comment »

Ubuntu 8.04 LTS server HAVP problems

Posted by primalcortex on July 25, 2008

I’m using Ubuntu 8.04 LTS server as a proxy/mail gateway,  and I had a problem with apt-ge and havp.

It seems that every time I used apt-get it complained about some problem with havp:

Starting havp: Starting HAVP Version: 0.86
Could not create server (already running?)
Exiting..
invoke-rc.d: initscript havp, action “start” failed.
dpkg: error processing havp (–configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
havp
E: Sub-process /usr/bin/dpkg returned an error code (1)

So what I’ve done was:

sudo bash

cd /etc/init.d

mv havp havp.old

apt-get upgrade

mv havp.old havp

and this cleared my apt-get errors.

Now it works.

Posted in Linux | Tagged: , , | Leave a Comment »

Ubuntu: The perfect mail gateway server

Posted by primalcortex on June 6, 2008

I’m setting up a new firewall, email gateway server using Ubuntu 8.04LTS. As in a previous post, I’m following (not always by the book) the Howtoforge to setting up a email/spam gateway Ubuntu mail gateway.

Three things didn’t go quite as expected, and so here they are engraved for ever in the internet stone:

1st) General: In the Webmin Others->Server and System Status, the Apache server monitoring reports apache as always down. The solution is to go to Servers->Apache Webserver and select on the top the link Module Config. At the bottom the option Path to Apache PID file is set to Automatic. Change it to point to /var/run/apache2.pid and save. The webmin monitor now for apache should show the apache status as OK.

2nd) Mail: I really like Mailscanner and it’s partner Mailwatch. One of the issues that I was having was that the messages that where in quarantine, Mailwatch didn’t show any option to delete or release the messages for them. The issue was lack of folder permissions. Mailwatch couldn’t access the quarantine directory. So executing the command chown -R postfix:www-data /var/spool/MailScanner and chown -R postfix:www-data /var/lib/MailScanner/ did the trick, and I can now delete and release quarantine messages.

3rd) Mail relay: After setting up postfix, all incoming messages where refused on the external interface because postfix denied relaying. Please note that I’m using this server to receive mail from the internet, to see if a mail is safe, no virus, no spam, no phishing, and so on, and then forward it to our internal mail servers. So I have a relay_domains file that describes our domains, and a transport file that specifies where are the “real” mail servers, but even with this, postfix was always refusing the mails.

The solution for this issue is on the empty mydestinations option. Setting up this option with mydestination = hash:/etc/postfix/relay_domains and stoping and restarting postfix, did the trick.

Regarding the howtoforge manual, I skiped some of the things, like fuzzyocr, and removed Bind9 from the server.

As I progress in setting up and configuring the the server, if anything worth mention, I’ll post it here.

Posted in Linux | Tagged: , , , , | 2 Comments »

Linux mail gateway

Posted by primalcortex on May 11, 2008

I’ve run where I work for 4 years a Mandrake based firewall with Postfix and Mailscanner. I really, really liked mailscanner, but for my colleagues the setup was “too complicated”. So I moved to EFW, Endian Firewall comunity edition. What it brings in ease of use it lacks in flexibility.

Finally my prayers where listen, and I’m going to move again to a custom build full fledged mail gateway with Mailscanner. Check out: this howto.

Posted in Linux | Tagged: , , , , | Leave a Comment »

(K)Ubuntu and Visio Clone (Part II)

Posted by primalcortex on November 21, 2007

I’ve tried DIA http://live.gnome.org/Dia to make some network/deployment architectures graphics.

My impressions:

- I took me a while to understand how I add elements (in my case network elements) to the canvas.

- DIA works with the concept of layers, so if you want to put something in front of other object you must create a new layer, cut the object, change the layer and paste it.

- Linking objects works ok, but only on the same layer.

- After the drawing is made you can’t copy it and paste it on an OpenOffice document.

SO, as a standalone product, it’s good, despite the issue of layers depicted above. It means you must think your drawings a bit ahead, and if you want to make changes it can get quite complicated.

Posted in All about all | Tagged: , , , | Leave a Comment »

X-Windows access on your Windows PC

Posted by primalcortex on November 17, 2007

Sometimes you need to run graphical Unix/Linux applications on your Windows client PC. Text access is easy, there are several ssh clients available, and windows has a telnet client. What about X-Windows?

The solution is XLiveCD: http://xlivecd.indiana.edu/

This is a CD that just makes your Windows PC into a X-Windows client (Correct terminology would be Server… ;) ). With this you can just start a ssh session into your remote Unix/Linux box, and from there just run any graphical application that you need. The application will display along your other Windows applications.

By the way if you have Nero Image or something similar, you even don’t need to burn a CD…

Also as a bonus the CD has a complete CYGWin set of commands, and so you also get tail, grep, uniq…

Posted in Geral | Tagged: , , , , , , , , | Leave a Comment »