Category Archives: linux

Login to Telekom Hotspot on Linux command line

So, my old laptop has been reactivated to a 16.04 LTS ubuntu release. When traveling, I frequently do use the Telekom Hotspot services, and given how I like using the Tor Browser (with some additional plugins just because I’m fed up with all the tracking) there’s a litle issue: I need to log in to a web page to start using the hotspots, but I cannot start browsing with the Tor browser before I have a network connection.

No big deal on a Mac with the wispr stuff to automatically fill out the captive portal pages for you, or at least automatically pop them up in a window separate from your browser. So, what are the options on Linux?

  1. Start firefox, first, log in to the hotspot, shut down firefox again to then start the Tor browser.
  2. Somehow work in a “-new-instance” argument into starting Tor Browser so you can actually do #1 but leave firefox open (which helps with stuff like posting on wordpress.)
  3. Use some entirely other browser unrelated to firefox as your second/first browser to log in to the hotspot
  4. Use a WISPR client like this one (though the page has issues as of writing this), but the whole approach seems like a security issue.
  5. log in to the hotspot on the command line

So, yes … Linux geeks chose option #5:


use strict;
use Term::ReadKey;

my $username;
my $password;

print "username: ";
$username = <>;
chomp $username;

ReadMode ('noecho');
print "password: ";
$password = <>;
chomp $password;
ReadMode ('restore');

print "\n";

system ( "curl '' -H 'Host:' -H 'User-Agent: Mozilla/5.0 (X1
1; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Lang
uage: en-US,en;q=0.5' --compressed -H 'Content-Type: application/json;charset=utf-8' -H 'X-Hash: AjbCkwnbQWKb+eKqFSelsyugcyVt
XiU1ZkUjnqDYhsA=' -H 'Referer:' -H 'Content-Length: 
57' -H 'Cookie: JSESSIONID=1111D92CBA6C27FE69D13F04F5CD4497.P3; POPUPCHECK=1496237026311; DT_H=NzY5OTk0MTgy' -H 'Connection: 
keep-alive' -d '{\"username\":\"$username\",\"password\":\"$password\"}' ");

Make sure you have the Term::ReadKey module installed. On Xenial you do:

apt install libterm-readkey-perl

Tagged , , ,

Neverwinter Nights on Ubuntu 12.04 64bit with Nvidia

My NWN install doesn’t see as much action as it used to, but I’m still happy I can run it on my somewhat new install of Ubuntu 12.04 LTS 64bit.

  • I solved the too-much-black issue by “export MESA_EXTENSION_OVERRIDE=-GL_NV_vertex_program”
  • Solved the too-much-white issue by using the 310 experimental driver for my NVIDIA Quadro 2000M from the ubuntu-x-swat ppa
  • Solved the non-starting client by removing the package libtxc-dxtn-s2tc0

Given that, my nwn script looks like this:


# This script runs Neverwinter Nights from the current directory


# If you do not wish to use the SDL library included in the package, remove
# ./lib from LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=./miles:/usr/lib/i386-linux-gnu/mesa
export LD_LIBRARY_PATH=./miles:/usr/lib32/nvidia-experimental-310
export SDL_AUDIODRIVER=pulse
export MESA_EXTENSION_OVERRIDE=-GL_NV_vertex_program

./nwmain $@

Tagged , , ,

Neverwinter Nights in VirtualBox: My Settings

Now that I’ve managed to get my copy of Neverwinter Nights to run in a VirtualBox VM (as detailed here), I wanted to make sure I got the most bang for my bucks, and played around a bit with a few tunables.

My VirtualBox settings depend a lot on my hardware, of course. In my case it’s a MacBook Pro with 4 GB of RAM. I initially started granting 2 GB to the VM and trying to measure how much is needed with vmstat while running the game. However, either there is a memory leak in nwmain or the way of measuring vmstat into a file leaks memory somehow (to HDD cache or some such). The measurement had only 400 MB of the 2 GB left after playing and quitting the game only freed up memory to a total of about 900 MB. However, setting the total available memory to 1 GB seems to work nicely. My settings are like these:

The first thing I do after starting the VM is turn off host integration for the mouse. While that generally works quite satisfactorily, with NWN, I can’t stand it. Because the SDL game tries to mess around with the mouse pointer at a lower level, moving the mouse out of the VM leaves the mouse pointer invisible. When you click on something rendered by the host (say an icon on the backdrop or a window), the mouse pointer becomes visible. If you, then, move back into the VM, you suddenly have two mouse pointers painted one over the other … rather distracting.

As far as settings in Neverwinter Nights itself are concerned, a resolution of 1400 x 1050 was what I was going for. One word of caution: “environment mapping on creatures” seriously messes up your display. I started with these settings:

Initial Video Options

Initial Video Options

Initial Advanced Video Options

Initial Advanced Video Options

Those settings worked well for a while. The only thing I noticed were some white polygons here and there, a couple of trees, some carpets, my Paladin mount, nothing terrible. But it turned out that I was quite lagged in situations where a large number of other characters were around. I was looking into my network connection, memory and storage load, but it, quite simply, turned out to be anti-aliasing. Turning that off removed any lag for me (that I couldn’t explain by a major download or some such.) It also doesn’t impact the look and feel so much IMHO. My current settings, thus, are:

Current Video Options

Current Video Options

Current Advanced Video Options

Current Advanced Video Options

I don’t use any of the SDL environment variables that I used to, anymore. The only thing that I changed in nwn is to remove the game provided SDL libraries from the library path to make it use the newer ones from jaunty. Not sure that makes much of a difference, though.

Anyway, I’m set. The game hasn’t crashed ever once in VirtualBox.

Tagged , , , ,