Posted (Updated ) in Linux

Update 2011-10-26: Added support for Ubuntu 11.04+ which uses slightly different FTP folder names

Lack of FTP keepalive functionality in Nautilus has been one of my biggest gripes in Ubuntu for a long time now. It’s infuriating attempting to open a folder only to discover the session has timed out and I need to reconnect. Well that problem is now solved!

Run the following bash script in the background each time you boot and you’re good to go:

#!/bin/bash
 
while true
do
	#10.10 and earlier
	ls ~/.gvfs/ftp* &> /dev/null
	#11.04+
	ls ~/.gvfs/FTP* &> /dev/null
	sleep 15
done

Many thanks go to the user who originally posted this script in a mailing list here.

PS. If anyone knows how to integrate this into a nautilus script I’d much appreciate it!

Read More »

Posted (Updated ) in Linux

Update 2011-11-20: Now working with Ubuntu 11.10+

I’ve always been pretty jealous of my Windows 7-using friends with their fancy rotating backgrounds so I thought I’d do a bit of research into adding similar functionality into Ubuntu. After a little investigation I found that sure enough, Ubuntu supported background lists through the use of XML files. The only problem now was: How do I automatically generate the XML file and set the active background to it?

Behold! My automatic rotating background generator! Below is the code, or you can download it here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
 
#
# Author: Flynsarmy
# Contributor: Ariel Barabas (ariel.baras atGmail)
#
 
#interval in seconds
INTERVAL=1800
OUTFILE=backgrounds.xml
DIR=$(pwd)
 
if [ $1 ]; then
	if [ $1 == "--help" ]; then
		echo "	Creates the background configuration xml file with 30min of delay between pictures with the images found in the same directory, you can modify that delay entering other number
Example:
	./createSlideShow.sh 15		makes the delay of 15 minutes"
		exit
	else
		INTERVAL=$(expr $1 \* 60)
	fi
fi
 
echo "<background>
  <starttime>
    <year>2009</year>
    <month>08</month>
    <day>04</day>
    <hour>00</hour>
    <minute>00</minute>
    <second>00</second>
  </starttime>
" > $OUTFILE
 
while read -r IMG;
do
	if [ "$FIRST_IMG" ]; then
		echo "<transition>
	<duration>5.0</duration>
	<from>$DIR/$LAST_IMG</from>
	<to>$DIR/$IMG</to>
</transition>" >> $OUTFILE
	else
		FIRST_IMG="$IMG"
	fi
 
	echo "<static>
	<duration>$INTERVAL</duration>
	<file>$DIR/$IMG</file>
</static>
 
" >> $OUTFILE
done < <(find -name "*.jpg" -o -name "*.png" -o -name "*.gif" | shuf)
 
echo "<transition>
	<duration>5.0</duration>
	<from>$DIR/$LAST_IMG</from>
	<to>$DIR/$FIRST_IMG</to>
</transition>
 
</background>" >> $OUTFILE
if hash gsettings &>/dev/null; then
	gsettings set org.gnome.desktop.background picture-uri "file://$DIR/$OUTFILE"
else
	gconftool-2 -t string --set /desktop/gnome/background/picture_filename "$DIR/$OUTFILE"
fi

Remember to chmod +x ./createSlideshow.sh to add execute permissions then ./createSlideshow.sh to run it.

Unlike the original script (written by Ariel Barabas), this version will search recursively from its location for jpg, png and gif files and will work with files/folders containing spaces in their names. It also shuffles the files in the slideshow so if you need to regenerate the background list you won’t get the same list every time.

It defaults to rotating every 3 minutes but you can change this by using ./createSlideshow.sh <minutes>.

Have fun with it!

Read More »

Posted (Updated ) in Linux

Upon downgrading back to Ubuntu 10.10 after my horrendously bad experience with 11.04, I’ve been reunited with a bug I’d previously put up with for 6 months: The trackpad on my laptop often ‘mouseups’ when dragging, resulting in windows not being dragged correctly. In addition, web browser and pidgin tabs will occasionally close on click instead of giving focus to that tab. Well here’s the fix!

Make sure the following 2 lines are In the InputClass section of /etc/X11/xorg.conf.d/50-synaptics.conf:

Option "ClickFinger3" "1"
        Option "EmulateTwoFingerMinZ" "280"

Here’s what mine looks like:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Option "ClickFinger3" "1"
        Option "EmulateTwoFingerMinZ" "280"
EndSection

You’ll probably need to do a reboot for the changes to take effect.

Thanks to users egermani and ejmarkow for their respective fixes here and here.

Read More »

Posted (Updated ) in Linux

Note: Also see the followup to this post: How to Make Ubuntu 11.10 More Usable

So my previous post How to Move App Menus Back Into Their Windows in Ubuntu turned out a little more bitter than even I had first intended. As a result I think it’s only fair I give a few more reasons as to why I have such a strong dislike towards Unity.

Let me preface this post by saying that I was actually quite looking forward to Unity. It looked relatively promising (although I was slightly worried about reports it wasn’t as customizable as Gnome) and after I ended up liking icons on the left when thinking I wouldn’t, I was determined to give Unity a fair go. I would also like to say that many of these issues will probably be sorted out in later bug fixes and updates – but that does not help me right here right now on my shiny new Ubuntu install a few days after release.

So here it is: a ‘by no means complete’ list of reasons using Unity is not a good idea at this point in time.

Read More »

Posted (Updated ) in Linux

You’ve recently upgraded to Ubuntu Natty and discovered that Unity is crap. Don’t worry – you’re in the vast majority. One of the many issues with this disastrous attempt at a shell is that it moves application menus into a global menu in the top panel. This may be useful for small screens – but for the other 99% of the market it’s just downright frustrating.

After a bit of searching I came across this post describing how to banish the global menu back to the warped hell from whence it came. You want to remove the indicator-appmenu package.

This is but one of a great many great challenge you’ll face if you decide to continue on with Unity. Good luck…and may God have mercy on your soul should you choose to stick with it.

Read More »

Posted (Updated ) in Linux

OK so this is an issue I’ve had for a very long time now (since Firefox 4 beta) whereby Google keeps defaulting to a strange language and seemingly completely ignoring my preference for English:

Incorrect language on google.com in Firefox 4

 

The reason for this is a bad language string in Firefox’s settings. You can fix it by doing the following:

Edit - Preferences 
Content - 
Choose... (under Languages)

You’ll see the following language:

chrome://global/locale/intl.properties

Delete it. It’s wrong and it’s causing you problems. Once deleted, time to add your language of choice:

Select Language to add... -
<pick your desired language>

You should now be greeted with a much easier to read google index page!

Here’s hoping this post will make it out in time to save the flood of Ubuntu Natty users on their shiney new Firefox 4 installs 🙂

Read More »

Posted (Updated ) in Linux

When performing various actions on a clean install of Ubuntu 10.10 on my web server, I kept being presented with the following message:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

After some googling, many people (in this thread http://ubuntuforums.org/showthread.php?t=138022) suggested:

sudo locale-gen
sudo dpkg-reconfigure locales

however the solution that worked for me was:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

You might need to reset your machine before changes take effect:

sudo shutdown -r now

Read More »

Posted (Updated ) in Linux

Ubuntu 10.10 was the first release of Ubuntu not to have ‘Mark Packages by Task’ working in the Synaptic Package Manager. For those who don’t know, ‘Mark Packages by Task’ is a handy little menu option that allows you to install pre-configured groups of applications very quickly – such as the Samba file server, video and audio creation suites but more importantly to us: a LAMP stack.

To get this nifty tool back where it belongs, just install the tasksel package:

sudo apt-get install tasksel

It should now be where it belongs.

Happy installations.

Read More »

Posted (Updated ) in Linux

Update 2011-10-30: Added instructions for Ubuntu 11.04+

An issue has crept up in the latest version of Ubuntu (10.10 as of writing) whereby installing beta versions of Firefox causes the browser to become the default application for FTP addresses. This is a real annoying development that I’m sure alot of you have a beef with. There’s a very simple fix to change it back to trusty ol’ nautilus:

Open ~/.gconf/desktop/gnome/url-handlers/ftp/%gconf.xml and change the stringvalue link to/usr/bin/nautilus like so:

<?xml version="1.0"?>
<gconf>
	<entry name="needs_terminal" mtime="1287534317" type="bool" value="false"/>
 
	<entry name="enabled" mtime="1287534317" type="bool" value="true"/>
	<entry name="command" mtime="1287534317" type="string">
 
		<stringvalue>/usr/bin/nautilus</stringvalue>
	</entry>
</gconf>

In 11.04+, you’ll also need to open ~/.local/share/applications/mimeapps.list and under [Default Applications] add:

x-scheme-handler/ftp=nautilus.desktop

Courtesy of radu cotescu.

Read More »