Archives for the ‘linux’ Category

SVN over SSH in kdesvn


This one might just spare you about 2-3 hours of your time doing SVN+SSH kdesvn googling. One would think it would work out-of-the-box, but it doesn’t. To get kdesvn to work with SSH, there is one small undocumented trick – using an environment variable (as if you were using command line SVN+SSH). To do that, put the following line into your .bashrc:

1
export SVN_SSH="ssh -l <your_remote_ssh_username>"

If you try using SVN+SSH without it, kdesvn will try to login to remote server using your current username (the one you are using on your local machine). Of course, each time unsuccessfully because it’s not the right username. After that, go to Subversion->General->Checkout a repository, and enter:

1
svn+ssh://path_to_your_svn_repository

…in the URL field. Also, choose the target directory and check any other desired options. After that, just bookmark the connection and you’re all set up.

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:

1
2
3
4
5
ftp://username@domain/ bookmark_name
ftp://username@domain/:3322 bookmark_name
ftp://username%40domain@domain/ bookmark_name
ftp://username@domain/folder_path_option/ bookmark_name
sftp://username@domain/ 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

archlinux logo

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:

1
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:

1
2
3
/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:

1
2
3
4
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!

cheers