Archive

Archive for the ‘technology’ Category

LinuxMint: Run Two Instances of Firefox Simultaneously (for Zotero)

March 16th, 2013 2 comments
Number of Views: 260

Advanced users of Zotero, the amazing, free bibliography management software, may have run into the problem that you have two separate Zotero databases and want to access them at the same time.  I used to manage multiple databases simultaneously by using a really cool Firefox extension: Foxtester.  Alas, that extension is no longer working with the latest versions of Firefox, so I had to find another way of running two instances of Firefox simultaneously (this makes it much easier to transfer references between databases).  Luckily, built into Firefox is the ability to run multiple instances simultaneously, but it’s a bit trickier to set up (thus this tutorial).

First, you need to have Firefox installed, which is generally the case with most versions of Linux.  If not, use your software manager or Synaptic to install it.

Next, you’ll need to access the Profile Manager that comes with Firefox.  To do this, close any Firefox windows you have running then open a terminal and type:

/usr/bin/firefox -profilemanager

That will launch the Profile Manager:

firefoxX2-01

 

As you can see, I’ve already set up one extra profile (default is the one you normally use), but I’ll set up another to show that it works.

To add another profile, simple select the “Create Profile” button.  It will ask you for some information in a new window:

firefoxX2-02

You’ll need a name for the new profile.  Since I’m using these exclusively to run alternative instances of Zotero, I’m calling them “Zotero1″, “Zotero2″, and “Zotero3″.  By default, Firefox will create the new profiles in the default folder where it stores the default profile (on Linux machines, this is in: /home/USER/.mozilla  (Replace “USER” with your user directory.  Also, the “.” before the “mozilla” in the name of that folder makes it a hidden directory; you can view hidden directories in Linux if you tell your file manager to show you those folders.)  You can use that location, or choose a different folder.  Then select “Finish”.

Once you’ve created your profiles, you’ll now need a way to launch them.  This is a little tricky as it requires adding some code to the launch command in order to launch a SEPARATE instance of Firefox.  If you don’t use the code, then all that will launch is a new Firefox window, and what you want is a completely separate instance of Firefox.  You can launch the separate profile as an independent instance of Firefox from the command line using this command:

/usr/bin/firefox -P “Zotero1″ -no-remote

Of course, replace “Zotero1″ with whatever you named your profile.  The key is the “-no-remote” code which tells Firefox to run a separate instance rather than launch a new window.  Go ahead and try it to see that it works.  Of course, you’ll need to install Zotero in the new profile if that’s why you want a separate instance running.

And if you want to make this even easier to launch in the future, you can add a new application launcher for your alternate profile.  Doing this is window manager specific (e.g., Unity, Gnome, KDE, XFCE, etc.).  Since I’m running KDE, I’ll show you how to do this in KDE.

First, right-click the Kick-Off Application Launcher (bottom left corner in most installs) and select “Edit Applications.”

firefoxX2-05

You’ll get this window:

firefoxX2-03

 

Select “New Item”.  In the fields under the “General” tab, add a name in the “Name” field, e.g., “Zotero1″.  In the “Command” field add the same command that we used earlier to launch the separate profile: /usr/bin/firefox -P “Zotero1″ -no-remote.  Once you “Save” this, it will add the New Item to the Application Launcher menu.  If you want to get fancy, you can add an icon for the launcher.  I created three Zotero icons that have little numbers so I know which profile I’m launching.  You’re welcome to use them: icon 1, icon 2, icon 3.  And if you want to make it even easier to launch the profiles, you can drag your new application launcher to your quick launch bar, so a single-click will launch your separate instance of Firefox, like this:

firefoxX2-04

Categories: technology Tags: , ,

Linuxmint or Ubuntu: Crashplan backup using headless Synology NAS

January 15th, 2013 No comments
Number of Views: 2249

If you’re using a Synology NAS box and would like to back up your files to offsite storage service Crashplan (which is relatively inexpensive), there is a relatively easy way to do this.  However, you need to think about the Crashplan software as having two components.  There is the backup engine, or the software that communicates with Crashplan’s servers and sends the files you want backed up to their servers.  Then there is the “head” or user interface which tells the engine what to back up and when.  If you’re backing up your Synology box, then the engine will go on there.  You can use any OS for the head, but I’m running Linuxmint and here is how I got it to work.

1) On your Synology box, first you need to download and install Java SE for embedded packages following these instructions.  Then you need to download and install the Crashplan package for Synology NAS following these instructions. Make sure you choose the correct version of Crashplan from the link above.  You don’t want to install CrashPlan Pro if you’re just running CrashPlan – it won’t work.

2) Once you’ve got both of those up and running on your Synology box, you should see something like this:

crashplan-01

crashplan-02

crashplan-03

3) The next step is to install CrashPlan on your desktop computer so you can control the engine on your Synology box (i.e., tell it what to backup and when).  First, download the CrashPlan software for your OS here.  Once you’ve downloaded the .tgz file, uncompress it to a folder (doesn’t really matter where; your’e desktop or home folder will work).  Then open a terminal and navigate to where you unpacked the CrashPlan files.  At the terminal, type:

sudo bash install.sh

You’ll then need to follow the prompts, but it should install the software on your computer.

4) Now is the tricky part.  If you follow the directions on CrashPlan’s website to connect the “head” to the “headless engine” it won’t work.  Their directions say to edit the file /usr/local/crashplan/conf/ui.properties by uncommenting the line #servicePort=4243 and changing it to servicePort=4200.  You then need to set up an SSH tunnel.  Here are their directions.  I tried a lot of variations of this and didn’t work.  But you know what did?  Editing a different line.  In that same file, uncomment the line that says #serviceHost=127.0.0.1 and change it to serviceHost=192.168.2.100 (i.e., the IP of your Synology box).  Save the file and close it.

5) You should now be able to open the CrashPlan GUI and control your Synology box remotely.

LinuxMint or Ubuntu: How to Automount Synology Shares

January 15th, 2013 5 comments
Number of Views: 2327

If you’d like to share your network attached storage from a Synology file server with your Linuxmint or Ubuntu machine and have it appear as just another folder, you can set the Synology unit to automount on your computer.  These steps assume that you have already set up your Synology unit and are sharing at least one folder over the network.  It also assumes that you are already connected to the same local network as your Synology unit.

To set up the automount, do the following:

1) Install the package nfs-common, either using synaptic or the command line:

synology-01

(from the command line: sudo apt-get install nfs-common)

2) Open a console or terminal and type “ifconfig” to find out your IP address on your local network.

synology-02

 

Let’s assume your IP on the local network is 192.168.2.1 (as shown in the figure).

3) Open the Synology interface and then open the Control Panel:

synology-03

4) Click on “Shared Folder” which will show you a list of your shared folders.  Synology comes with the ability to share folders using the nfs protocol.  It is a secure protocol that requires you to add the IP address of the computer that is going to be allowed to access files on the Synology NAS.  Once you see the shared folders, select the folder you want to share, then click on “Privileges” and then “NFS Privileges”.

synology-04

 

5) In the next window, click on “Create” and then add the IP address of the computer with which you want to share that folder.  You should also decide what privileges you want to grant that computer.  If you grant it read/write privileges, that computer can modify files.  If you grant it the read privilege, that computer can only read files.

synology-05

6) Once you’ve done that, you should be able to access the shared folder over your network.  However, what we want to do is make any shared folders automatically mount over the network every time you start your computer.  To do so, you’ll need to do two more things.  First, create a folder on your computer to map the shared folder to.  An ideal location is in your home folder since you already have read/write privileges there.  So, for instance, if you are sharing photos over the network, create a folder in your home directory called “NASphotos” by doing the following from the terminal (or just create it in a file explorer): mkdir /home/user/NASphotos

7)  Next, you’ll need to edit your /etc/fstab file.  To do so, open a terminal and type: sudo kate /etc/fstab

(You could also use gedit or some other text program, like nano.)

8) This should open the /etc/fstab file in a text editing program.  You’ll need to add the following lines to your /etc/fstab file:

Any line that starts with the pound sign “#” is a comment line.  I like to add a comment line so I know what my command is doing.  Here’s the line I add:

# automount file synology

Next is the line that actually does the work:

     192.168.2.100:/volume1/photos /home/user/NASphotos nfs nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0

You’ll need to change the parts that are bolded.  The IP is the IP of your Synology unit on the network.  If you have a different name for your volume on your Synology unit, you’ll need to change “volume1″ to whatever it is.  Replace “photos” with the name of the shared folder on your Synology unit.  Replace “user” with your username.  And replace “NASphotos” with whatever folder you created in step 6.

Save the file and close it.

8)  Now, assuming you’ve done everything correctly, type the following into a terminal to mount the shared folder: sudo mount -a

Your shared folder should now show up in your file explorer (e.g. Dolphin) and should do so every time you start your computer.  Depending on the privileges you granted yourself on the Synology NAS, you should be able to read and/or write whatever files you’ve stored on the Synology unit as if they were on your own computer.

 

 

 

ubuntu: HP Elitebook 8540p wireless

June 14th, 2012 No comments
Number of Views: 272

This is primarily a note for me, but I just spent 3 hours reformatting my HP Elitebook 8540p because I couldn’t get it to connect to my new 802.11n router.  Turns out all I needed to do was switching the security on the router to WPA from WEP.  So, anyone searching for how to get their Intel Centrino Advanced-N 6200 wireless card running Linux to connect to their 802.11n router, make sure you’re using WPA or it won’t work.

Categories: technology Tags: , ,

Ubuntu: Adding Non-Repository Program to Menu and Dash

May 17th, 2012 No comments
Number of Views: 633

If you’ve ever downloaded a program to run in Linux from the web and not installed it from a repository, that program may not appear in your menu or dash (the activities screen activated when you hit the “super” button), making it difficult to launch, particularly with one of the new desktop managers like Gnome 3 or Ubuntu’s Unity.  There is a relatively easy way to add such programs to both the menu and the dash, however.  There is a program that comes installed with Ubuntu 12.04 called “alacarte” that provides a GUI for adding a program to the menu and dash.  Make sure you have it installed (check the Ubuntu software center, synaptic, or just type the following at the terminal):

sudo apt-get install alacarte

If you don’t have it installed, synaptic will install it with that command.

Next, download the program you want to run.  In all likelihood it will be zipped or compressed.  Uncompress it to a readable/writable location, like your home folder.  Once you’ve unzipped the downloaded program, now launch alacarte.  You can do that however you’d like.  I’m using Gnome 3, so I hit the “super” key (or “Windows” key) and type “alacarte”.  It will be listed as “main menu” but it is the program you want.  You’ll see this window once it loads:

 

Once that window is open, choose where you want your new program to be located.  I want mine in “Office” applications, so select “Office” in the left pane, then select “New Item” on the right.  You’ll see this window:

You should double check that the program you downloaded and unzipped has an “executable” file and that its permissions are set to allow it to run.  Once that’s done, type the name of the program, browse for the executable file, and type a comment to describe what it is you’re doing.  If your program has an icon associated with it, you can add that by clicking on the icon in the left of the window.  Once you’re done it should look something like this:

The program I’m installing is the stand alone version of Zotero.  It comes with icons.  Once you’ve filled everything out, hit “close” and then close alacarte as well.  That’s it.  Now you can verify that it load by clicking on the “super” key and searching for your program, like I did with Zotero here:

That should do it. You know have a non-repository based program included in the menu or dash.

Categories: technology Tags: