Mit 'linux' verschlagwortete Einträge

Finally some spare time…

…that I can use to write an article in my blog. That software I develop, ghostship, runs very stable in my experience. I think *someone* should package it for other Linux distributions. I’ve got already someone working on a Debian port, but I am not quite sure if and when he will actually do it – maybe I will do it myself in a few weeks.

Twitter became a handy tool for me, now I am able to post things like „the new southpark episode is [my opinion] [link]“ in just a few seconds rather than expanding this information to a whole blog article and finally posting it on wordpress (like I used to do previously). Another cool thing I noticed is that this information does get indexed on my blog by Google however, because the most recent (and who reads old ones anyway) tweets are shown in the navigation. That way you don’t even need to „follow“ me or add my twitter account to your feed reader :)

I’ve experimented around a bit with GTKRadiant (a map editor) in combination with Urban Terror as I wrote earlier. By now I am trying to remake cs_1337_assault from Counter-Strike 1.6, as this is one of my favorite maps with some outdated graphics though. On the other hand, I don’t like the Source version, because it is too different from the original cs_assault – I’ll try to mix it up with my own ideas. But by now I don’t have much yet except for the one building which is directly in front of the CT spawn, crappy lighting and some lame textures which I just use from the default Urban Terror maps. Well, if I have enough time and the map turns out to look great and be very playable without changing the original cs_assault feeling too much, I’ll definitely post it on this blog.

How to use Ultrasurf with Firefox

This is a little tutorial that should help you to set up Firefox for using Ultrasurf as Proxy. It should work on Windows as well as on Linux with either Ultrasurf running simply in Wine or as a daemon with ghostship. I will assume that you have already installed Ultrasurf (for detailed instructions on how to do that with wine, look here).

tl;dr: Server: 127.0.0.1, Port: 9666


1. Start Ultrasurf (or ghostship) for the first time. If you use ghostship, read on at step 6 (or if you require that Ultrasurf uses a proxy itself, run ghostship --viewer and follow the next steps).

2. The main interface appears now. Click Option (which should actually be named Options, but that does not matter – the software works anyway ;) ).

9.6-main-gui-option

3. Again, you will get another dialog right in your face. This time, check Do not use IE because we are talking about Firefox and not Internet Explorer and Hide Golden Lock because the image of a golden lock at the bottom right is not useful anymore (it should tell whether Ultrasurf has set the IE to use it or not).

9.6-options-gui-checked

4. Optionally, you can make Ultrasurf itself use a proxy by clicking Proxy Settings. This is only required if you can’t access the Internet without using a proxy in your local network or if you want to chain multiple proxy applications in a row.

5. Close the Options GUI (picture above) by clicking OK and the main window by clicking Exit. Then start Ultrasurf again, just as in step 1.

6. Start up Firefox, navigate to checkip.dyndns.org and write down your current IP somewhere.

7. Now you should think about whether you would like to always use Ultrasurf (easier, continue with step 12) or depending on a white- or blacklist with specific sites (read on) and/or with a icon in Firefox that allows easy switching on the fly.

8. Install the Firefox Add-On FoxyProxy by opening this website and clicking Add to Firefox as well as in the popping up dialog on Install Now.

install-foxyproxy

9. Restart Firefox.

10. After that, you will be greeted with a dialog that asks whether you would like to set up FoxyProxy for usage with TOR. In this tutorial, you don’t need to do this as the onion router is  a completely different proxy application and should therefore click on No, but you might want to do it anyway if you have TOR installed.

11. Foxyproxy is a very powerful application that allows – as mentioned before – the usage of proxys depending on lists just to name one big feature. Keep in mind that Ultrasurf will listen on your loopback IP, which is always 127.0.0.1 (that information might also be called server), on the port 9666. You can now either do a very simple setup that allows you to switch proxys on the fly by following this tutorial, or dive right into the official FoxyProxy documentation and learn how to use the more advanced features. Continue when you have Ultrasurf set up.

12. Open up Firefox’ preferences by clicking Edit/Preferences (Windows users will find it in the Tools menu).

firefox-edit-preferences

13. Navigate to Advanced, Network and set up a pretty high cache, like in the screenshot below (1024 MB). This will make sure that Firefox downloads only new data and keeps the old on the harddrive, thus speeding up the surfing experience and keeping away unnecessary traffic from Ultrasurf.

firefox-preferences-dialog

14. If you use FoxyProxy, click Close and continue with step 16 now. otherwise click Settings.

15. In the new GUI, click Manual proxy configuration, Use this proxy server for all protocols and fill in the following data:

HTTP Proxy: 127.0.0.1

Port: 9666

After that, click OK.

firefox-proxy-settings-for-ultrasurf

16. So you set everything up? You better check that by calling checkip.dyndns.org again and comparing the current displayed IP with the one from step 6. If it is different, everything works :)

RabbitVCS: Manage Your SVN Repository With Nautilus

I discovered this fine piece of software the day I pushed ghostship to sourceforge. SF.net allows you to choose between several version control systems, GIT and SVN among them. I usually choose GIT and to make life easier, I decided to look for a GIT integration in Nautilus. But I got pointed to RabbitVCS which does the exact thing for SVN. Actually they plan to implement GIT support in the next version, but as it isn’t there yet SVN got the cake.

Just take a look at the screenshots on their website – the integration is fantastic!

ghostship-svn in the Archlinux User Repository

Ghostship itself runs okay now in my experience, but I’ll keep on testing a bit longer, before I make a stable release. Archlinux is bleeding edge, so if you use that distribution, you may just build the most recent SVN revision from the AUR with the PKGBUILD I submitted.

Any feedback is welcome.

ghostship 0.4: some major rewrites

A few days ago I noticed that my ghostship software had much more bugs than I thought – in fact some bugs that prevented even bigger bugs (that happens sometimes…). Today I had enough time, so I read through all the code again, gave it better comments, simplified it where possible and rewrote some parts. The ship does still need a lot of testing and fixing, since some parts (shutdown, viewer and the init scripts) do not work anymore.

As said before, I will release an officiall tarball (gotta love that word) as soon as I think it is stable. But feel free to literary check out the svn and tell me what you think about it if you want to.

ultrasurf-tools becomes ghostship

As mentioned before, I like to run the Windows proxy software Ultrasurf on Linux.

Some time ago, I made a simple script, that keeps the connection alive by sending data through it from time to time. Two weeks ago I decided to advance it and give it a new name, „ultrasurf-tools“. This piece of bash code was able to completely hide the GUI and run it like a Unix daemon then.

A few days ago however, I decided to push the development even further and turn it into a full Unix daemon. That means automatic installation of the two needed DLL files, automatic download and update of Ultrasurf and even automatic setup of an own user with his own wineprefix and TightVNC settings. So basically one just needs to install that daemon and as soon as it gets started, everything works out of the box.

It basically does its job by now, except that there is still a little bug. When your internet disconnects, Ultasurf tries to connect again for an infinite amount of time, but it somehow does not trigger wget’s timeout (which I use to check whether we are online or not). Thus not only Ultrasurf hangs, but the daemon does not realize it and so nothing happens at all. As soon as I fix this, I will put an official release of the script on its brand new homepage.

Also you may have figured out from the title of this article, that I gave the software a new name. Why? Because ultrasurf-tools might be fine for a little bash script, but as a full functionally daemon, I’d rather use a name that is not related to another software’s name. So I came up with ghostship (metaphor for the invisibility of your IP as well as the invisibility of the GUI).

More information on the official homepage.

ultrasurf-tools

Update: Please use the newer and improved version of this script: ghostship.

In one of my earlier articles, I released a little script which keeps Ultrasurf connected by generating traffic every minute. Today I’ve gone one step further and made a script that does the following:

  • Ultrasurf starts invisible in its very own (vnc)X-server, which makes it possible to start it before you even started your X session
  • Generates traffic every 20 seconds and by doing that it checks at the same time whether Ultrasurf is still connected to the internet
  • It writes a status-file which you can use with conky to display whether Ultrasurf is currently working or not
  • When Ultrasurf is down, the script tries a few more times (with less waiting between the tries) and then it restarts the whole vncserver, thus killing everything inside it and starting clean (by doing normal restarts, sometimes Ultrasurf binds the wrong or simply no port)

Ready? Here’s my step by step tutorial:

  • install Ultrasurf (in its own wineprefix)
  • install tightvnc
  • run vncserver && vncserver -kill :1 once to set a password for your vnc server
  • open up ~/.vnc/xstartup and copy paste the following

#!/bin/sh

if [ $VNCDESKTOP = "ultrasurf-tools" ]; then

# you'll need to edit this line, so that it points

# to your Ultrasurf installation

WINEPREFIX=/home/you/.wine-ultrasurf wine c:/u.exe

else

xrdb $HOME/.Xresources

xsetroot -solid grey

xterm -geometry 80x24+10+10 -ls -title \

"$VNCDESKTOP Desktop" &

twm &

fi

  • paste the following to a file called ~/ultrasurf-tools or something and give it the executable flag

#!/bin/bash

# configuration

# warning, statusfile will get removed!

statusfile=~/.ultrasurf

# internal variables

errors=0

# functions

function restart_ultrasurf {

vncserver -kill :96

vncserver :96 -name "ultrasurf-tools" -localhost

errors=0

# echo "sleeping for 20 seconds"

sleep 20

}

# the main loop

# echo "starting ultrasurf..."

rm "$statusfile"

restart_ultrasurf

while [ 1 ];do

# echo "performing connection check..."

dyndns=`http_proxy="127.0.0.1:9666"\

wget --no-cookies checkip.dyndns.org -O - -q -nv`

if [ -z "$dyndns" ]; then

let errors+=1

# echo "error ($errors): couldn't request\

data through ultrasurf."

if [ $errors = 2 ]; then

rm "$statusfile"

fi

if [ $errors = 4 ]; then

# echo "error limit reached! restarting ultrasurf..."

restart_ultrasurf

else

# echo "sleeping for 3 seconds"

sleep 3

fi

else

errors=0

# echo "success. sleeping for 20 seconds..."

touch "$statusfile"

sleep 20

fi

done

  • to use the statusfile with conky, add a line similar to this one to the TEXT area (make sure you use your username):

ultrasurf: ${if_existing /home/you/.ultrasurf}${color}online$else${color red}offline$endif

  • you can now add this to your /etc/rc.local in order to start ultrasurf before you start your X (the result will be that as soon as your X is started, you are ready to go and do not need to wait for Ultrasurf anymore):

su yourusername -c ~/ultrasurf-tools &

  • if you would like to check what is going on, execute vncviewer :96 (but you usually don’t need that)

Speed Up Firefox And Liferea By Running VACUUM On Their Databases

Firefox and Liferea both use SQLite as their database-backend. You might try out running…

cd "~/.mozilla/firefox/yourprofile"
for i in *.sqlite; do echo "VACUUM;" | sqlite3 $i ; done

…to optimize Firefox’ databases (make sure you use the right profile folder) as well as the same thing for Liferea with (be careful with the version here):

sqlite3 ~/.liferea_1.6/liferea.db "VACUUM;"

If you run a desktop PC, you might want do do this parallelized to your boot-up, so on Archlinux I did the following:

  • copy both code snippets in separate scripts, in my case ~/bash/speedup/(firefox|liferea) and give them executable rights
  • write something like that (don’t forget to replace the username!) in your /etc/rc.local:

su yourusername -c ~/bash/speedup/liferea &

su yourusername -c ~/bash/speedup/firefox &

More Archlinux artwork!

Eleven days ago, I have posted my first piece of Archlinux related artwork, a wallpaper featuring the punk tux from this blogs header. Today I took a look at Ghost1227’s Arch logo variations thread (again) and decided that I should make one with the very same tux.

archlinux logo variation

archlinux logo variation

svg file, archbbs

Later this day I was still experimenting with Inkscape and guess what just came out? Right, a wallpaper with an exploding taco. Ghost1227 says it looks great, and trusting his word I release it now. I hope you enjoy it :)

Exploding tacos and conky configs?

Exploding tacos and conky configs?

svg file, archbbs

PS: This wallpaper also includes the JDownloader icon background fix I mentioned in the first wallpaper’s post.

License for the archlinux logo and text:

The Arch Linux name and logo are recognized trademarks. Some rights reserved. (taken from archlinux.org)

License for everything else in both pictures:

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Germany License.

Running Amarok 1.4 From Within a Debian Chroot at Arch

Amarok 1.4 is obsolete, but it still is my preferred linux audio player (foobar2k is my choice for windows). I know that there is a newer version out there called amarok2, but as with all of KDE4 it is in my opinion lacking features the previous versions had. Especially the interface is just a big different approach, just look at some screenshots and you will know what I mean.

You might think now: Why don’t I simply install the Amarok 1.4 from the AUR or from kdemod-legacy? The answer is that the AUR version does not build at all with software of newer versions such as gcc and the kdemod build just keeps on crashing. Seriously, I have used the later one for a very long time now, but it keeps on crashing randomly.

Old… one might say stable software… where would you look for that? Debian! My first try was to just use Debians binarys and install them with a PKGBUILD. But it did not work, I don’t remember why exactly, but it had to do with the fact that kde(mod) is installed to /opt/kde on arch and that the libraries weren’t the same.

Yesterday I decided to take a look at chroot again, I already use it for my bundled arch32 installation anyway. I’ve set it up and now amarok is playing without crashing all the time. Awesome!

This is roughly how I did it:

  • set up a debian installation in somewhere like /opt/debian and install amarok plus everything else you need via apt-get (eg. python for some plugins)
  • copy over some important files, see the arch32 article for details
  • create something like /etc/rc.d/debian which contains (adjust to your needs, make sure you mount the folder which has all the music; the mysql sock is used when you try to connect to localhost and dev is for accessing alsa’s dmix):

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case $1 in
start)
stat_busy „Starting Debian chroot“
mount –bind /var/lib/dbus /opt/debian/var/lib/dbus
mount –bind /proc /opt/debian/proc
mount –bind /tmp /opt/debian/tmp

mount –bind /home /opt/debian/home

mount –bind /dev /opt/debian/dev
ln -f /tmp/mysql.sock /opt/debian/var/run/mysqld/mysqld.sock
add_daemon debian
stat_done
;;
stop)

stat_busy „Stopping Debian chroot“
umount /opt/debian/var/lib/dbus
umount /opt/debian/proc
umount /opt/debian/tmp
umount /opt/debian/home

umount /opt/debian/dev
rm_daemon debian
stat_done
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo „usage: $0 {start|stop|restart}“
esac
exit 0

#!/bin/bash
echo „Starting ROCK stable amarok (from within debian chroot)…“
chroot /opt/debian su thoughtcrime -c „amarok $*“

  • And the other one called /usr/bin/amarok, which just calls the previous one with sudo:

#!/bin/bash
sudo /usr/bin/amarok_debian

In the end, I want to warn you that if you use this method, you will not be able to download covers from amazon (note: there are plugins which can do a better job anyway) anymore as well as retrieve artist/song/album information from wikipedia inside of amarok. Why? Because the Web 2.0, fast as it is, just changes and Debian’s amarok does not have the needed patches to keep track of it. KDEmod does, but it is not stable.

Nächste Seite »


languages

both  
english    
german    

newest tweets & articles (en)

licenses

Except where otherwise noted:

Creative Commons License
All the text is licensed under a Creative Commons Attribution-Share Alike 3.0 Germany License.



CC-GNU GPL

Code snippets are licensed under the CC-GNU GPL version 2.0 or later.