Categories
HowTo Posts Ubuntu

HowTo: Run .jar files in Ubuntu

To run a JAR file from the command line in ubuntu using the following command:

java -jar filename.jar

Otherwise it is also possible to enable double clicking to run jar files too by the following simple steps:

  1. Find the .jar file in the File Browser (a.k.a Nautilus)
  2. Right click the .jar file > Properties
  3. Click on the “Open With” tab along the top
  4. Change the bullet to be Sun Java 6 Runtime
  5. Click Close and you’re done.

Now you should be able to just double click the file and it will run just like most other files!

Categories
HowTo Linux Posts

HowTo Fix: The file ‘/path/file.exe’ is not marked as executable.

The file ‘/path/file.exe’ is not marked as executable.  If this was downloaded or copied form an untrusted source, it may be dangerous to run.  For more details, read about the executable bit.

While re-installing Spotify on my Desktop I came across this error while trying to run the .exe through wine (shown above) and here’s a really simple way of fixing it:

  1. Right click the .exe
  2. Properties
  3. Under the Permssions tab make sure “Allow executing file as program” is checked
  4. Click Close and you should be able to now run it through wine..
Categories
Posts Ubuntu

Spotify (wine+proxy)- Connection lost. Reconnecting

At University I am running Spotify through a proxy (and wine) which seems to result in lost of connections with 4 different error codes (shown below). What’s strange is I can usually get around 15/20 tracks at the start of the day without loosing connection and then it becomes gradually more frequent until I can’t even play an entire song.

If anyone else is experiencing these issues and have any ideas on how to workaround it or fix it please leave a comment and I’ll make sure to update this post if I get anywhere with the issue.

Connection lost. Reconnecting (error code:101)
Connection lost. Reconnecting (error code:107)
Connection lost. Reconnecting (error code:9)
Connection lost. Reconnecting (error code:114)

Categories
HowTo Posts Ubuntu

HowTo Fix: “There is a problem with your sound card. Spotify can’t play music.” (Wine)

Quite a few times I have encountered this problem, which I think is caused when the soundcard was recently used by another program and might still be busy but it means Spotify can’t play music, so a quick fix for this is to load winecfg and test your sound card which seems to force wine into tacking control of the it.

  1. Close Spotify
  2. In terminal type winecfg
  3. Click on the Audio tab (should be in the top middle)
  4. Click “Test Audio” and if you hear a sound this should work..
  5. Re-open Spotify and check a track, if it’s playing it’s worked otherwise you may have a different issue..
Categories
HowTo Posts Ubuntu

HowTo: Stop Ubuntu Checking For Automatic Updates

At work I can’t afford to have my Ubuntu system update and possibly wipe out some important libraries I need, and I get pretty tired of closing the Update Manager every time it decides I need to update so here’s how to stop it:

  1. System > Administration > Update Manager
  2. Open Settings (in the bottom left corner)
  3. Under Automatic Updates
  4. Uncheck “Check for updates: “
  5. Hit Close and the settings should be saved.
Categories
Posts Ubuntu

Where is this “Me Menu”? – Ubuntu Lucid (10.04)

After updating my Ubuntu Karmic (9.10) to Lucid (10.04) I was browsing the new features, one of which I couldn’t seem to find. The “Me Menu” which has been talked about quite a lot recently and referred to on the feature page of Lucid: “New in 10.04. Read and update your social networks instantly. Ubuntu’s new Me Menu lets you access your Facebook and Twitter accounts (and more) straight away. Connect to your chat channels and make updates through a single window. Being sociable has never been so easy.”
After a little searching on the applets under add to panel (right click on a panel and it should be the top option) I found it, it’s not called the “Me Menu” at all in fact it’s called the “Indicator Applet” and “Indicator Applet Session”. So if you happen to be asking yourself “Where is the me menu in ubuntu 10.04″” or “what is the ubuntu me menu called?” and find yourself to my site, there is your answer. Why they didn’t actually call it the Me Menu and save me a bunch of hassle I have no idea.

Categories
HowTo Posts Ubuntu Video

HowTo: Switch the Window Menu Buttons Back to the Right – Ubuntu 10.04 / 10.10 / 11.04

I’m not an OSX person and personally prefer my minimise, maximise and close buttons to be in that order on the right, which they are not as default on the new Ubuntu 10.04 (Lucid Lynx) so here’s how you can swap them back to their rightful place (pun intended).

This can be done either of two ways:
Use the following one line command to edit gconf (for more info type man gconftool):

gconftool -s /apps/met>gconftool -s /apps/met>gconftool -s /apps/metacity/general/button_layout -t string menu:minimize,maximize,close

OR
Using gconf-editor (the GUI version):

  1. In terminal type: gconf-editor
  2. Navigate to /apps/metacity/general
  3. Change button_layout to: menu:minimize,maximize,close
  4. Hit enter and you are done.

Categories
HowTo Posts Ubuntu

HowTo: Fix “An error occurred while mounting” – Ubuntu Lucid (10.04)

An error occurred while mounting /dev/bus/usb (and/or)
An error occurred while mounting /proc/bus/usb

Press S to skip mounting or M for manual recovery

If you are seeing this error on boot an easy way to get rid:

  1. sudo gedit /etc/fstab
  2. Fine the following line (or lines if you are having both errors)
  3. none /proc/bus/usb usbfs defaults,devmode=0666 0 0
    none /dev/bus/usb usbfs defaults,devmode=0666 0 0

  4. Add a # infront of them to comment it out
  5. Save & Exit.

As far as I am aware everything is still working fine and it might just be something left in from Karmic which isn’t needed any longer but just to make sure comment out these lines rarther than removing them.

Categories
HowTo Posts Ubuntu

HowTo: Fix Jumping/Skipping Sound in Spotify under Wine – Ubuntu Karmic (9.10)

The sound in Spotify was jumping or skipping much like a scratched disk would. After a little investigation I found a couple of ways to fix it with people saying one worked but the other didn’t for them. (Solution 2 worked for me).

Solution 1:

Open terminal and type:

winecfg

Click on the Audio tab along the top and remove ALSA and try OSS as your sound drivers

Solution 2:

gedit ~/.asoundrc

add the following line to the file:
pcm.pulse { type pulse } ctl.pulse { type pulse } pcm.!default { type pulse } ctl.!default { type pulse }

gedit /etc/pulse/daemon.conf

change the following to lines as shown below

default-fragments = 8
default-fragment-size-msec = 5

Categories
HowTo Posts Ubuntu

Howto: Reinstall Grub using Ubuntu Live CD

I recently installed Fedora 12 on my desktop alongside Ubuntu Karmic and Windows 7, however doing so I overwrite my grub which meant my Ubuntu system was hidden. To fix this is pretty simple..

Insert your Ubuntu Live CD
Click “Try Ubuntu without any changes to your computer”
Once loaded click Applications > Accessories > Terminal

sudo fdisk -l 

#That’s a lower case L
This displays all partitions on your system, in my case the installation of my Ubuntu system was /dev/sda5 so replace this for yours in the rest of the code.

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

#thats a double dash before root-directory, wordpress keeps changing it to a long dash, Ill fix it sometime..
If all goes successfully you should be done, try rebooting and see if your Ubuntu shows up.

Thanks to Whiblog in the comments this also works in Ubuntu 11.04:

“same thing except the last line : sudo grub-install –boot-directory=/mnt/ /dev/sda”