Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

Category Archives: desktop management

How to re-enable Ubuntu 13.04 systray to display Pidgin and other programs.

Previously, Ubuntu tweak, myUnity and other Unity tweaking tools can provide configuration to modify current whitelist for Unity’s system tray or systray. But with recent upgrade (as usual), it was suddenly gone and nowhere to be found.

But at last, there’s a workaround (again..pfff) for this, here’s how:

1. Add this PPA and update+upgrade your Ubuntu 13.04 system.

sudo add-apt-repository ppa:timekiller/unity-systrayfix
sudo apt-get update
sudo apt-get upgrade

2. Afterwards, restart Unity, press ALT+F2 (run application), then type in  unity, press ENTER key.

3. You must have  dconf-editor to modify configuration, if not yet installed, do this:

sudo apt-get install dconf-tools

4. Open dconf-editor and navigate to  com > canonical > unity > panel  and the “systray-whitelist” should be displayed there so you can enable some apps to be able to use the systray. From the default setting, change it to ‘all’ (yes with the single quote ““character)

5. Then configure Pidgin, from Tools > Preferences. Set the Show System Tray Icon to “always

6. Done.






Allow Standard User to connect to wifi on Ubuntu

Still using Ubuntu 12.04, and one of the problem we’ve encountered is it requires normal user to authenticated the designated admin user’s password when connecting to wireless network, which in my opinion doesn’t make sense. How can a normal user access internet over wifi if they aren’t allowed to do so?

Check what google search has to offer, I finally found a fix for this. Adding policykit rules for wifi users.

Create or modify a file  etc/polkit-1/localauthority/50-local.d/52-wifi-management.pkla

$> sudo gedit etc/polkit-1/localauthority/50-local.d/52-wifi-management.pkla

and then enter the following

[Wifi management]

and save on exit.

Add the user to the netdev group

$> sudo usermod -a -G ftp jerry

Restart the system and standard user should now be able to connect to wifi..


Hide network-manager applet in Ubuntu 12.04 when using ifup.

Wish to hide the nm-applet when decide to use conventional ifup instead of network-manager? Here’s how:

1. Install Gconf-Editor:

$> sudo apt-get install gconf-editor

2. Run gconf-editor and go to: Apps –> nm-applet

3. Uncheck the  setting called  show-applet

4. Done.

Ubuntu 12.04 /etc/resolv.conf implementation with dnsmasq

On the current version of Ubuntu (12.04), you might notice that the current /etc/resolv.conf file always record a nameserver which then resolv dns via dnsmasq, but most of the time after test few things, I found it more problematic. It always disregard my local DNS server, and goes directly to the DNS of my ISP.

If you’re having the same problem like mine, here’s a quickfix:

1. Modify the configuration /etc/NetworkManager/NetworkManager.conf

$> sudo gedit /etc/NetworkManager/NetworkManager.conf

2.  Comment the line that contain “dns=dnsmasq


3. Then restart the network-manager

$> sudo  service network-manager restart

4. Done



Show Hidden Icons from the Ubuntu’s Unity System Tray

Initially, since Ubuntu 11.04, I tried Unity several time and force myself to like it, but I can’t. Done several tweak to make it useful then, but when 12.04 came out, Unity if getting more usable and faster.

And another thing about Unity, is that I hides several icons from the default system tray, most of them place under the messaging menu icon ( the one that looks like a mail envelope), which includes pidgin, a multi-platform instant messaging client. I’ve tried several howtos to show it back to the system tray, but still I failed. Then read this acticle from ask ubuntu (here), and it works!.

Here’s how:

1. Via the console/terminal while under your login account, invoke:

$> gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

2. You can also use dconf-editor, which is included in the dconf-tool package, install it using either the “Ubuntu Software Center” or via console with the command:

$> sudo apt-get install dconf-tools

3. On dconf-editor, go to Desktop -> Unity -> Panel, and replace the value of systray-whitelist to “[‘all’]”.

4. Done.

Change Gnome3 Background via script.

Previously using gconftool-2 to replace the current desktop wallpaper via a script (normally a starting bash script). But with Gnome3 its not working anymore. As an alternative or should I say the proper way to do it in Gnome3 is via dconf-tools. Here’s the sample command via console:

$> gsettings list-recursively

will list all known schema and keys

$> gsettings list-keys org.gnome.desktop.background

will list all keys under the defined schema.

$> gsettings get org.gnome.desktop.background picture-uri

to change the value, enter this command:

$> gsettings set org.gnome.desktop.background picture-uri "file:///path/filename"


Lxpanel freeze after closing LibreOffice document.

As of Ubuntu 11.04, the package lxpanel 0.5.6 and Libreoffice 3.3.x, the bug still exist, freezing lxpanel after saving and closing current  ODF files. I suspected lxpanel bug, looking it over the Internet and haven’t found any confirmation that it actually does the freezing. While seeking answers over the Internet I’ve found this bug thread: (click here), which fixes my problem, I’m not 100% sure it will work on all cases though, but good enough to give it a try.

1. Install the necessary libraries and tools to compile the lxpanel 0.5.8 from  source.

sudo apt-get install libgtk2.0-dev libmenu-cache1-dev intltool

2.  Download the lxpanel 0.5.8 source from here, of check the newest version here.

3. Compile the source code. Go to the folder of lxpanel source and perform the following command:

./configure --prefix=/usr
sudo make install

4. Logout the current session or reboot your machine to confirm.

5. Done.


Ubuntu 11.04 Missing Indicators or System Tray Items

GMail Notifier and Vuze are some of my mostly used application, and when I upgraded my previously 10.04 to 11.04 system (Ubuntu), I noticed that some of my currently running application that has system tray icon or indicator gone in the Unity side panel and in the system tray area. Googled it and found this link: Ubuntu 11.04 Fix:  Show All Icons/Indicators Notification Area.

The quickest way to deal with it is the following:

1.  From console:

$> gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

2. Then refresh the Unity. Press Alt-F2 and type:

 unity --replace

3. Done.

Document Converter for Multiple Files

I’ve found a python script that uses OpenOffice.org’s UNO library. The script can convert from Open Document formats (.odt, .ods, .odp) to Microsoft Office Formats (.doc, .xls, .ppt) or to comma separated value (.csv), a PDF or even to a text file (.txt).

It works great, but still I need some enhancement to make it more usable in my current situation. I need to convert  multiple files located in different folders inside a common path. So I created a bash script that can convert them faster and more efficient than doing it manually.

The script requires a running OpenOffice.org as service on port 8100 and python 2.4 or 2.6.  The script automatically create a headless OpenOffice.org service and terminate it afterwards.

You can get the python script here: DocumentConvert.py.

Here’s my script:

# Document Converter Main
# To convert various document to different types (.doc, .xls, .odt, .ods, .ppt, .odp, .pdf)

/usr/bin/soffice -headless -nologo -nofirststartwizard -accept="socket,host=,port=8100;urp" & > /dev/null
sleep 2
GET_PID_SOFFICE=$(ps aux | grep "soffice.bin" | grep -v "grep" | grep "8100" | awk '{print $2}')

TARGET_DIR=$(zenity --file-selection --directory --title="Select Target Directory")

DOCTYPE=$(zenity --entry  --text="$RETURNVAL Enter Source File Extension" --title="Souce Document Type" --width=250)
SOURCE_DOCTYPE=$(echo "$DOCTYPE" | sed 's/[^a-zA-Z0-9]//g')

DOCTYPE=$(zenity --entry  --text="$RETURNVAL Enter Target File Extension" --title="Target Document Type" --width=250)
TARGET_DOCTYPE=$(echo "$DOCTYPE" | sed 's/[^a-zA-Z0-9]//g')


cat $TEMP_FILE | \
while read FILE; do
 FILENAME=$(basename "$FILE")
 PATHNAME="$( readlink -f "$( dirname "$FILE" )" )"

exit 0



%d bloggers like this: