Click here to send us your inquires or call (852) 36130518

Edit Alacarte Menu Folders and Items

1
Jun/09
0

In Ubuntu you can edit your main Gnome Panel menu by right clicking on it and selecting “Edit Menu”

I however found out fairly shortly that the Alacarte menu editor is not ideal and seems to be missing some features - for example the ability to rename menu directories or the ability to permanently delete old menu items. I figured that there must be a way to manually change the menu but I needed to find out where Alacarte stores its configuration files.

It turns out that the files you need are all in:

~/.local/share/applications (Menu entries created with Alacarte)
~/.local/share/desktop-directories (Menu directories created with Alacarte)

Menu entries can be edited in a plain text editor and are named as alacarte-made-3.desktop, alacarte-made-4.desktop etc.

Menu directories can also be edited in a text editor and are named as alacarte-made.directory

Add Shutdown Scripts (Ubuntu)

1
Jun/09
0

I recently made some shell scripts for my Ubuntu box that I wanted to run at shutdown but didn’t know where to add them. After a bit of research I found out how it is done:

First add your commands to /etc/init.d/ and give them the right permissions (sudo chmod 755 yourscript)
Now use update-rc.d to add them to the scripts to be run at shutdown and restart

cd /etc/init.d/
sudo update-rc.d yourscript stop 22 0 6 .

Notice the period character on the end - it is important! You should see something like this:

update-rc.d: warning: /etc/init.d/backupfirefox missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/yourscript …
/etc/rc0.d/K22backupfirefox -> ../init.d/yourscript
/etc/rc6.d/K22backupfirefox -> ../init.d/yourscript

That should do the job :-)

Ubuntu Change Volume Control Increments

1
Jun/09
2

After updating to Ubuntu Intrepid (8.10) and later Jaunty (9.04) I was finding that when I used the volume control buttons on my laptop to change the volume, the changes were drastic and sound would either be very loud or barely audible with no settings in between.

After a bit of research I found out that the size of volume increments can be changed in gconf-editor:

Alt + F2 –> gconf-editor
Apps –> gnome_settings_daemon –> volume_step

Change the volume step value to something more appropriate - the smaller the value the smaller the change in volume each time you hit the button.

Gwibber Error 400 No Twitter Updates

30
May/09
0

After recently updating Gwibber to the latest daily version, I noticed that I was regularly getting the below error and that nothing was showing up in my Twitter timeline:

HTTPError: HTTP Error 400: Bad Request

The Traceback is as below:

Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/gwibber/microblog/__init__.py", line 50, in get_data
for message in method(client):
File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 207, in responses
for data in self.get_direct_messages():
File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 182, in get_direct_messages
"http://twitter.com/direct_messages.json"))
File "/usr/lib/python2.6/dist-packages/gwibber/microblog/twitter.py", line 158, in connect
url, data, headers = {"Authorization": self.get_auth()})).read()
File "/usr/lib/python2.6/urllib2.py", line 124, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 389, in open
response = meth(req, response)
File "/usr/lib/python2.6/urllib2.py", line 502, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.6/urllib2.py", line 427, in error
return self._call_chain(*args)
File "/usr/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 510, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request

At first I thought that this was a problem with Gwibber, however, after a bit of research, it turns out that this is a problem at Twitters end. Basically, Twitter recently changed their API and now limits the number of update requests you can make per hour using Gwibber. If you have your Gwibber client set to update too regularly (i.e. every minute or so) then it will run out of update permissions before the hour is over and you will get lots of error messages. It is therefore recommended to set the update frequency to something a bit higher (5 minutes should be fine) and hopefully you shouldn’t see the error any more.

If you want to know how many more Twitter update requests you have remaining (for the current hour), there is a simple curl command that you can enter in a terminal that will prompt you for a password and then provide the info you need.

$ user@jonoxps:~$ curl -u yourusernamehere http://twitter.com/account/rate_limit_status.json
$ Enter host password for user 'yourusernamehere':
$ {"reset_time_in_seconds":1243702342,"remaining_hits":0,"hourly_limit":100,"reset_time":"Sat May 30 16:52:22 +0000 2009"}

Sure enough, as soon as the clock turned 16:52:22, my hourly_limit went back up to 100 and Gwibber started working again!

Hopefully that should clear things up for a few of you, there is more information about the bug on Launchpad.

Tagged as: , , ,