Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

18/06/2016

If Plasma's network manager doesn't display available networks after suspend/lock screen/etc....

sudo service networking restart
sudo service network-manager restart
Bingo.

30/11/2015

apt-get update gets stuck

Just a quick note: apt-get update froze regularly updating my software sources, with the shell output stuck at 100% [Connecting to security.ubuntu.com] or similar.
Apparently, this was caused due to IPv6 being enabled on my system. See this askubuntu discussion.
Fixes (as copied from the link above):
  • edit /etc/gai.conf and uncomment the last line to change the order of precedence to IPv4 first:
    #
    # For sites which prefer IPv4 connections change the last line to
    #
    precedence ::ffff:0:0/96 100
  • Alternative: disable IPv6. Not sure whether that is a good idea, so first try option 1. Anyway, you can reverse this action by deleting the lines added to /etc/sysctl.conf (everything below #disable ipv6).
    echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
    sudo sysctl -p
  • Check whether IPv6 is enabled with cat /proc/sys/net/ipv6/conf/all/disable_ipv6, output is 0/1 for enabled/disabled.
  • "Have you tried switching it off and on again?"

23/10/2013

Broken Saucy update on a Zenbook

Confession: I did a somewhat rash Kubuntu Saucy upgrade while on holidays. It left me with a blank screen at startup. But what better entertainment can you have lying awake with a 6 hour jet lag at 4am than fixing your Linux?
The issue, by the way, is the Zenbook (UX31A) not liking the new kernel. The solution is Joseph Salisbury's inofficial kernel fix.

14/11/2009

It sort of works

First impressions of 11.2
The first one is purely aesthetical: the SuSE 11.2 installer looks like a gothicised version of Win 7's cutesy scrollwork, in a blackish-green colour scheme and without all those birdies.
The setup procedure (64-bit) was not noticeably different from 11.1: in partitioning, I fared best with importing the previous installation's partitioning and setting the root partition to be formatted to ext4 after that.

02/11/2008

Vanity Statcounting

Hooray, we cracked 10,000 visitors! Actually, some blogs get 10 times more in one day... Visitor with the IP 72.222.146.134 from Scottsdale, Arizona, you have our exclusive permission to download the following image of a nice and tasteful flower arrangement. If you contact us, we might even send you a package of genuine German Gummi Bears.

So it's time for an off-topic post on a previously undocumented office sport: vanity statcounting.
First: The ego boost. NASA dropped in. The Ivy League. Porsche. Nokia. Some actual human being from Mountain View. Completely makes your day.
Seriously, US military, no weapons of mass destruction here - oh, all right, you were googling "quicktime". Whew.
Second: competition. Try beating taaris' 'automount NTFS' post in popularity. Did I just shoot myself in the foot...?
Third: Feel totally international. Seriously, why oh why is Iceland ignoring us this week?
Fourth: Fun with statistics. (Is that an oxymoron or what?) Here's to penguin world domination: Two thirds of our visitors use Linux! OK, might be slightly topic related.
More from the animal kingdom: Firefox rules the browser stats. IE: also ran. Six to ten percent. On principle, we don't apologise for screwed-up layout in IE 6.
Chrome users started dropping in on the day after the release, whereas the Google bot is still running on Mozilla. Makes one trust in beta releases. (Seriously, people: version 0.2? Not to mention handing your complete browsing behaviour to Google on a silver salver?)
Fifth: one might actually use the keyword stats to improve one's posts. Gah. Booooring.
Sixth: Be a Do-Gooder. Wait for nice comments. If necessary, beg for them.
Seventh: Our Google PageRank™. It's 0.0000(0). Nice round number. Proud of it.
Last but not least: our sincere apologies to all the frustrated guys googling "bitches in latex".

08/10/2008

Network print on a Windows machine

Here is the howto for connecting to a Windows printer from Linux

Prerequisites: installed samba (maybe samba-client is sufficient), cups, ghostscript, foomatic-filters (most of them are default anyway), the printer must be shared and accessible over the network.

  1. Open a browser of your choice and type localhost:631 into the address bar
  2. Click "Add printer" and fill name, location and description and continue
  3. For device choose "Windows Printer via SAMBA"
  4. Device-URI: smb://<windowsboxname>/<printersharename> - no port required, so leave it empty
  5. Choose the model of the printer - if the driver is not in the database you'll have to provide the ppd-file.
  6. At around this point you'll be asked for user name and password for CUPS (most likely, your root password, depending on your configuration)
  7. Change options if neccessary and enjoy

25/09/2008

HTML special characters with KFileReplace

O my beloved Umlaut! … and all the characters I never wanted to know about … €¶Ŧ←↓→ØÞ¨ÆßÐŊĦĸŁ …
Copy and paste of non-standard ASCII text in Quanta can be cumbersome as the automatic replacement plugin only works with typing (Settings->Configure Quanta…->Automatic replacement of the accented characters). Another option would be to do some batch search-and-replace.
KFileReplace works both as a standalone app and a Quanta plugin (I don't think there is a Kate plugin yet). Multiple strings can be replaced directory-wide in one go, the session format is XML. I just googled a special character map (for reference, see e. g. here), wrote the .kfr XML file with a spreadsheet editor, and loaded it from KFileReplace. (Search/Replace->Strings->Load Strings List From File...)
Warning: Alpha-Howto! This has not been tested rigorously and might do some unwanted replacements; neither can it be a comprehensive list (e.g. no Greek characters except µ, sadly, I also decided against Chinese). Also, KFileReplace overwrites your original file (no undo!). I strongly recommend to enable "Do backup copy instead of overwrite" in the "Customise Search/Replace Session" dialog.
Whoever finds another culprit in the replacement list, please leave a comment.

19/09/2008

KRDC/KDE4 screws up my keystrokes...

...and just now I have neither time nor nerve to look for a fix. "O" apparently is transmitted as enter, the left mouse button opens context menus, and so on. Neither a VNC restart on the remote machine nor a KRDC restart change anything - I've had that problem before (maybe it's the compressed ssh tunnel). Most forum and blog posters complain about apparent tightvnc bugs, but for me, switching to a different viewer already did the job.
Usually, the KDE3 KRDC version is less buggy (look for package kdenetwork3-vnc), but if you need just a plain vanilla VNC without extras like full screen windows and special key transmission, tightvnc's vncviewer (package tightvnc, binary is /usr/bin/vncviewer) has a nice minimalist interface (no space-eating menus). The -fullscreen option is also very useful.

18/09/2008

Setting up an Apache server for testing purposes

First, why the hell would we do that? In my case, I have to play around with some simple PHP gallery scripts at the moment, and I am not very keen on testing them instantly on our university server (I expect the sysadmins aren't very keen on that, either, I'm a complete noob on a steep learning-by-doing curve).
Note: I include some MySQL directions here, because a lot of scripts manage MySQL databases. However, e.g. for a not-too-complicated image gallery PHP alone should do the job.
Warning: Don't follow this to configure a fully functional web server: a little knowledge is a dangerous thing - and who lets a total noob configure a web server anyway? This is just to get some practice - reduce my amount of noobness, so to say - working locally, I didn't care too much about security.
Packages to install: Either go for the full LAMP glory (YaST->Software->Patterns>Web and LAMP server), or install by hand apache2, php5, apache2_mod_php5 (if you want php4, find a repo, it's not in the official openSuSE 11 distro any more), if you want Mysql, also mysql, php5-mysql and probably phpMyAdmin. For any kind of server administration, Webmin is also not a bad idea.
To start the apache daemon: run sudo /etc/init.d/apache2 start (at least that's where the http daemon is on my system - you need the full path because it's not in PATH). Guess the code for stopping…

Check your firewall (YaST->Security and users). The allowed services for the External zone should include nothing like 'Apache' or 'HTTP daemon'. Thus, you won't need to fiddle with access control settings, the server is only accessible from localhost (however, some good information on that subject is here and here).
I don't know about other distros, but on openSuSE there is a public_html directory in your home folder. Any HTML documents you store there can be accessed on http://localhost/~<your user name>.
This is comfy if you keep the server local. On a public server I would strongly advise against public folders in one's home directory. However, you can change that in the Apache config files: Remove the userdir entry from the APACHE_MODULES list in /etc/sysconfig/apache2 (either modify the file directly or use the YaST module System->/etc/sysconfig Editor).

Konqueror wants to open web documents in editor

Konqueror trying to open HTML web document
One of the problems when you marry a file manager to a web browser. I don't recollect why the file association got changed in the first place, but it's easy to change it back again:
Settings->Configure Konqueror...->File associations: Search for HTML under 'Find filename pattern', it's probably in 'text' or 'application'. Set 'Show file in embedded viewer' in the Embedding tab and make sure 'KHTML' is the first item under Services Preference Order.
If you still want to edit local HTML documents, use the right-click menu.

25/06/2008

FlexLM Licence Manager Tricks (IDL version)

This is more of a very special entry for myself in order to store information - but maybe for some of you out there information of this might be useful.

The FlexLM Lincense manager is used e.g. by idl to distribute floating licenses. It uses two TCP/IP ports for communication, the first normally being 1700, the second one is chosen randomly in the standard installation. To fix the second port (which might be useful in order to configure the firewall of the server running it ;-) ) add the following to the specific license.dat file you received:
DAEMON idl_lmgrd /usr/local/itt/idl70/bin *PORT=31700
Another important step is to run the FlexLM license manager as a non-privileged user - which you can achieve by the following procedure:

  1. create a non-privileged user flexlm with own group and own user id - password set to * in order to avoid direct login and give it the standard shell /bin/sh

  2. locate the license files and manager executables and change their access rights to readable for the flexlm user (and group).

  3. locate the startup script (in my case on a SuSE 10.2 machine it is stored in /etc/init.d/sys5_idl_lmgrd)
    and modify the line where the daemon is started to:
    su flexlm -c "{original command line in startup file}"
  4. in the startup script add the line
    umask 022
    directly after
    #!/bin/sh

03/04/2008

VNC server over a secure SSH connection

The standard way provided by openSuSE to get a remote graphical login to your linux desktop is Krfb. It uses an obscure kind of 'invitation' system and I never got the hang of it. TightVNC works like any old VNC server on Linux: start a VNC X session and log in with password protection from a remote machine via a VNC viewer like Krdc (KDE3 version works for me, KDE4 doesn't). Unhappily, a VNC connection is not exactly secure, anyone sniffing into your network might find out what you are doing at the moment on the remote machine (e.g. typing passwords). A safe alternative would be to export the VNC session over a SSH tunnel as follows.

18/02/2008

Send your hostname over DHCP

A micro-howto on how to make your network admin's life easier and send your hostname via DHCP - so that it shows up in your router's connected devices monitor.

sudo vi /etc/dhclient.conf

and add the following lines:

send host-name "<your hostname>";
send dhcp-client-identifier <your MAC address>;


hint.... HINT... HINT ;-)

Edit: In Ubuntu (and possibly also other Debian-based systems) the file to modify is not /etc/dhclient.conf but rather /etc/dhcp3/dhclient.conf .

31/12/2007

Ndiswrapper and WPA in a (nut)shell

Say hello to Hactar: cheap office PC (presumably AMD Sempron and some or other chipset) gracing my parents' WPA1-encrypted network via a Siemens Gigaset 108 USB WLAN adapter. The Gigaset is supposed to have an atheros chip, but apparently madwifi cannot handle USB devices yet, so it had to be ndiswrapper. Network cards set up with ndiswrapper don't seem to show up in Yast without effort, so I did it quick n' dirty in a shell.
Note: the ndiswrapper wraps Windows drivers compliant to the Network Driver Interface Specification for use under Linux. The following HowTo is in part taken from openSuSE.

You need the packages ndiswrapper, wpa_supplicant, dhcpcd (all in SuSE distro), and the Windows driver from the installation CD (net5523.inf worked for me).
Do the following in a root shell (in whatever directory you copied the Windows drivers to):
# ndiswrapper -i net5523.inf (install)
# ndiswrapper -l (list drivers, you should get the net5523 here)
Now plug in you WLAN adapter.
# modprobe ndiswrapper
See if you find a wlan0 entry in the ouput of the following lines, note the missing configuration data in iwconfig.
# dmesg
# iwconfig
Scan for available networks:
# iwlist scan
Create a configuration file
# vi /etc/wpa_supplicant.conf
containing this (with the appropriate ESSID and PSK key):
network={
ssid="networkname"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="mypsk"
}

The next lines do the actual network setup by starting the adapter, setting up the network configuration with wpa_supplicant and getting an IP with dhpcd (if you want a fixed IP, set it with ifconfig). As this is the part to do after every boot, I copied all this to a shell script.
# ifconfig wlan0 up
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
# dhcpcd wlan0


I suppose you can put all this in a startup script in /etc/init.d, but by this time my vacation was up.
BTW, the ndiswrapper module has to be reloaded after a kernel update with modprobe ndiswrapper. I put it also into the shell script (first line), just in case.
A nice overview over network-related shell commands can be found at Wirelessdefence.org.

10/10/2007

Wiring a wireless card - case named Intel 2200 BG

Yesterday night I wanted to configure the Intel 2200 BG wireless card of my Samsung P35. Using YaST, this seemed to be a very easy task to do. The only problem was: it didn't work and it took me several configuration trials and restarts to find out why. Actually, being able to read helps a lot.

The thing is, openSUSE 10.3 associates the card with an eth kind of network and configures it to start when a cable connection is detected. Riiiiight... starting a wireless card when a cable is connected... Anyway, change that to "start at system startup" in YaST and restart your system (not only the X-Server) and it should work.

Another remark: KNetworkmanager can still not deal with WEP encryption keys when you need to set the key index different from 0. If you have such a network configuration, use the "conventional method with ifup" instead and configure the key in the expert options of YaST for your Wireless card.