• GEdit FTP browsing / editing under KDE
    (using GNOME bookmarks without Nautilus)

    Problem with using GEdit (v2.30.4 in the moment of writing this post) for FTP browsing/editing under KDE (if you don’t have Nautilus installed in your KDE) is that since it is a GNOME app – you need a way to somehow manage your connections which is usualy done through Nautilus by using GNOME bookmarks (the ones you would create by going to Places -> Connect to Server) and at the moment there is no way to create this bookmarks from within GEdit.

    Anyway, you can do the same thing by editing .gtk-bookmarks file located in your home folder even if you don’t have Nautilus installed. Here’s a few examples of what you can put inside:

    ftp:[email protected]/ bookmark_name
    ftp:[email protected]/:3322 bookmark_name
    ftp:[email protected]/ bookmark_name
    ftp:[email protected]/folder_path_option/ bookmark_name
    sftp:[email protected]/ bookmark_name

    The first one is just a regular FTP login bookmark. The second one uses a different port than the default one. The third one is for usernames containing @ (like in the image below) which you have to replace with %40 to differentiate them from @ for domain association. The fourth one uses the folder_path_option like in picture below and the fifth one is for using sFTP. Of course, you can combine all this together depending on your needs…

    Browsing/editing directly from GEdit is much faster than using Filezilla which prompts for uploading every time after you edit and save the file which is kinda annoying, or for example using Krusader which works well with FTP, but if you use sFTP – then it edits files localy instead of online so you have to save them as a new file and upload them again… You get the drift.

  • Sony Playstation gamepad as remote controller on Linux?

    You have an old PS gamepad somewhere in your closet collecting dust and you would like to use it as a remote controller on your Linux box? Is it possible? Yes. The first thing you’ll ned is one of these PS-to-USB adapters:

    They’re quite cheap, and you can probably find one in your local electronics supply store for the price of about 5-8€. You could also get one for a very small price on eBay… After acquiring one, the question is – which application to use with PS gamepad? I found QJoyPad to work pretty well – it’s easy to configure and it will automaticaly recognize your gamepad, so that’s one less thing for you to worry about. Just get it from your distros repositories (or if you’re out of luck – get the source code and compile it by yourself).

    I configured it for some basic desktop maneuvering. For example so that I could command VLC from my bed not having to get up each time to turn the volume up or down, or if I want to rewind a part of a video, put some music on, read email… This is how I configured the buttons, perhaps it will help:

    Holding “shift” or “ctrl” buttons + “left” or “right” keyes is for rewinding videos, L2 and R2 buttons are for volume… You can even set zooming in your Compiz to work with ctrl+alt+left/right – so you could zoom in read all this tiny letters from a distance (for example if you want to choose a song in your favorite audio player or whatever). You also get “space” for pausing multimedia…

    I also wanted to use analog stick instead of a mouse, but it was just too fast and too responsive in the beginning. But, what you can do is you can also set its sensitivity and treshold up to suit your needs. You’ll need some time to get used to clicking around with analog but it gets easier after aiming at everyones forheads during a few movies. :D

  • Sometimes no sound in browser / video player on Arch Linux

    Sometimes no sound in browser / video player on Arch Linux

    Sometimes after booting the machine up I would just get no sound in my browser / video player and sometimes it would be there working just perfectly. The only way to get the sound if it wasn’t there was to reboot the computer. A strange issue I ignored at first thinking it would go away after a few full system updates, but after a while the problem was still there and I got annoyed by it and thankfully found a cure.

    The problem was the usb webcam. Turns out ALSA isn’t very smart when it comes to device assignment so sometimes it would make the snd_usb_audio (webcam) the first sound device instead of the soundcard. A workaround is just putting your soundcard module name before the snd_usb_audio in your /etc/rc.conf. In my case it was like this:

    MODULES=( ... snd_hda_intel snd_usb_audio ... )

    edit: I think there is one more situation when sound does not work – it’s when your skype autostarts on startup. It starts webcam of course and sometimes skype starts before you can hear the welcoming sound of entering into your WM.

  • Using irssi as proxy for pidgin

    If you would like to use irssi on a remote server so that it works as proxy for pidgin, you should already have ‘server’ and ‘network’ parameters set up in your ~/.irssi/config . If you don’t know what I’m talking about, take a look here and also examine the config file. You should figure it out pretty fast how to configure irssi to do basic stuff it is supposed to do.

    What you will also need is GNU screen installed on the remote server. So, what is screen? “Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.” Basically what you can do with it is that you can run certain processes and put them into the background (detach from them), and than later see them again (attach to them) when you want to. If you don’t know how to use screen, take a look here, or use google to find a tutorial on using screen. There is plenty of them out there. You will need screen to put the running irssi into the background on your server so that you may disconnect from the remote server after you set irrsi up.

    So, after you have got your irssi configured and running under screen, you will have to load the proxy plugin for irssi, set a password for your future pidgin-to-irssi connection and bind one free port to irssi for sharing server connection. Here is how to do it:

    /LOAD proxy
    /SET irssiproxy_password <password>
    /SET irssiproxy_ports <network>=<port>

    where the parameter is a network name you configured earlier, and

    is the port number you want to bind irssi to.

    The final step is to configure your pidgin client to connect to your remote server. In pidgin, go to accounts -> manage accounts and then add a new IRC account. Fill the following parameters:

    Username: <network name from your config file>
    Server: <IP address or hostname of your server>
    Password: <password you set for irssiproxy>
    Port: <port number you used for binding>

    Keep in mind that you should have your irssi running all the time on your remote server under screen for this connection to work… and, that’s all folks!


  • Locking a session after suspending to disk in Ion3

    Ok, so I wanted to lock my session after suspending to disk while using Ion3 WM. There are a few solutions to this but what I’ve found works best for me is using vlock. What you should do to make this work is the following (after you have installed vlock):

    Edit your .xinitrc and add the following line before the exec part:

    vlock -n &

    Also, uncomment the following line in /etc/hibernate/common.conf


    After you suspend to disk, vlock will lock all virtual terminals and sessions and again later after unsuspending will it prompt you for your username and password.

  • GDM keyboard layout change

    Here’s a solution on how to use a different keyboard layout in GDM (different then the default en). The problem was that if you wanted to use any special character (that i.e. needs alt gr) or any other character specific to your keyboard layout (in my example čćžšđ), you couldn’t do it even though you already set locales globaly on your machine. I did this on arch distro but my guess is that it will work on any other too.

    Execute the following in your terminal as root:

    cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi

    and then replace “en” layout with the one you need (in my example hr):

    <merge key="input.xkb.layout" type="string">en</merge>
Back to top