Archive for the 'Gnome' Category

Run john the ripper on several servers / password files

For sysadmins: I will give you an idea of how to test for week passwords on several servers.

First, collect all /etc/shadow from every server into a single directory (”passwordcheck”) on your own machine and name each of the files like the servername.

I assume that you have a ssh key installed on your user account on all of your servers.
Insecure: The ssh-commands below might give away your password to other users.
Continue reading ‘Run john the ripper on several servers / password files’

sync-liferea.sh syncing script


I wrote this liferea syncing script for liferea yesterday. It seems to work as I wanted.. When I’ve got some problems, the backup that this script implements helps me solving the issues. I’m pleased with how this script makes my RSS more joyful.

I hope you can get some good ideas or that this script helps you sync your RSS feeds.
Continue reading ’sync-liferea.sh syncing script’

Sync Liferea – How to synchronize what items you have read between two pcs

I’m going to make some ideas/thoughts about how to synchronize what you have read of your RSS feeds between two computers. I have wanted to do this for a while now.

First part is if you want to do the sql-stuff to export and import the items that you have marked as read.

Alternative1: Export a list of read items from liferea.db on pc1 and update items in liferea.db on pc2
First, make sure to turn of Liferea on both computers. It locks the sqlite database so it is not possible for us to export the list of items that are read on pc1 or update them on pc2.
Make sure to have backup of both computers. I just say this so you don’t blame me.
Continue reading ‘Sync Liferea – How to synchronize what items you have read between two pcs’

liferea-add-feed – Start Liferea if it is not running to add RSS feed

The bash script /usr/bin/liferea-add-feed is adding the url you send as an argument to your list of rss feeds in Liferea. If liferea is not running it will tell you “Liferea is not running! You need to start it first.” but if you did like me, the url is passed from firefox to the liferea-add-feed -script without you seeing that anything goes wrong. To avoid this, I changed the liferea-add-feed script so it makes sure that liferea is running before trying to add the RSS feed.
Continue reading ‘liferea-add-feed – Start Liferea if it is not running to add RSS feed’

Multimedia keyboard: Control XMMS by assigning special keys


This mini guide will show you howto control XMMS (or launch any other application/scripts) from key-combinations or special multimedia keys.

Keyboard shortcutsFirst, make sure you don’t have any application capturing the key-kombination. Gnome has it’s own keyboard shortcuts (System->Preferences->Keyboard shortcuts). Make sure to disable any shortcut assigned to XF86Audio* -keys. Mark the shortcut so it asks you to assign a new key, then hit backspace to disable it.

Continue reading ‘Multimedia keyboard: Control XMMS by assigning special keys’

Change keyboard shortcuts in nautilus: Howto disable the CTRL+T combination from ‘move to trash’ in GNOME/Nautilus?

I found myself putting things into the trashcan because I was pressing the CTRL+T combination on the keyboard. (using it for new tab/location bar in firefox).

Continue reading ‘Change keyboard shortcuts in nautilus: Howto disable the CTRL+T combination from ‘move to trash’ in GNOME/Nautilus?’

zenity progress example script (Gnome/X)

screenshot-exampleprogress.png

I like to see the percentage done of an ongoing process. I also want to make it easier for others to do the same, so I created a small example-script for how to do it from a bash script. On the left side, you see how it will look like.

I have seen some scripts using awk to calculate the percentage of a progress when the output is to verbose maybe doesn’t show the percentage but a number of a total.

You can also add –auto-kill if you want the cancel-button to kill the parent pid.

Enjoy making X graphical verbose scripts!

zenity-progress-example.sh

(for a in `seq 1 100` ;
do
echo $a;
sleep 0.03;
done) | zenity --auto-close --progress \
--text="Slow counting from 1 to 100" \
--title="Example Progress"

Cannot talk to klauncher

cannot_talk_to_klauncher.png

I got this error message from several kde programs in tried to start them. Something had stopped working in my gnome-session. I tested with creating a new user on my system, and it worked as it should for the new user.

programs_failed_to_append_to_menubar.png The programs suppose to attach them to the menubar, but they did not do that for my user when klauncher was not started. They started up as small icons (Se image to the right).

Continue reading ‘Cannot talk to klauncher’

KDE-nisse?

I was alt-tab’ing to switch active programs in KDE when I suddenly noticed a text on one of the dialog boxes saying “KDE-nisse”. Nisse is in norwegian something like a pixie/gnome or one of Santas little helpers.. But it can also be a kind of person who just whir around doing non-essential things.

Here is a screenshot picture I took:
kde_nisse_2.png

SSH X11forwarding needs xauth to set $DISPLAY variable

To get any program to be forwarded through your ssh connection, you need xauth installed on the ssh-server that you’re logging into.

After just putting the xauth in /usr/X11R6/bin/ on the server, the X11 forwarding worked fine for me, even when X11/XFree86/X.org wasn’t installed.

The fastest way to get xauth installed is to get the binary from the XFree86 package. The alternative way is to build the XFree86 from source.

Next time you login, you will se:

/usr/X11R6/bin/xauth:  creating new authority file /home/user/.Xauthority
 
$ set
...
DISPLAY=localhost:10.0
...