Tag: linux

Preventing Wine from registering mimetypes

When installing Wine for Linux, the install script insists on associating all text files with its built-in notepad.exe

As someone who uses Vim almost exculsively, this is definitely not the desired behaviour.

To stop this from happening, run the following command before installing Wine.

1
export WINEDLLOVERRIDES='winemenubuilder.exe=a'

This sets the path of the winemenubuilder library (the library that creates mimetype associations) to something invalid, preventing the associations from being made when Wine installs.

Once Wine is installed, it won't try to associate notepad.exe again. However, if needed, the library can be properly disabled via the libraries tab of wineconf.


Making Steam for Linux close to the system tray

Steam for Linux is a little odd in how it handles a user clicking the close button. Instead of exiting the program or mimimizing the application to the system tray, it just minimizes it to the taskbar. The developers have said that this is temporary and that it will be changed in the future, but for now, there is a workaround.

To make Steam always minimize to the system tray, just add STEAM_FRAME_FORCE_CLOSE=1 to your environment.

For more information see the original GitHub issue.


Resolving Windows NetBIOS names in Linux

When accessing computers on a LAN, it's often useful to access them by name instead of IP. This is especially true when dealing with dynamic IP addresses.

In Windows, other Windows computer names are automatically resolved to an IP address. In most Linux distros however, this is not the case (by default).

To resolve Windows NetBIOS names in Linux, you'll need the winbind component of the Samba suite. Winbind allows a UNIX box to become a full member of an NT domain, giving the ability to resolve names from it.

Install winbind via your preferred package manager. For Debian and derivatives, the following should work.

1
apt-get install winbind

Now that winbind is installed, the OS must be configured to use it when looking up hostnames. Open the file /etc/nsswitch.conf and add "wins" to the end of the line starting with "hosts:".

For example, the line in my file now looks like

1
hosts: files dns wins

Save the file and reboot to start the winbindd deamon.

To test if if worked, try pinging a computer on your LAN by name. For example:

1
2
3
4
5
$ ping windows-server
PING windows-server (192.168.0.107) 56(84) bytes of data.
64 bytes from 192.168.0.107: icmp_req=1 ttl=128 time=0.268 ms
64 bytes from 192.168.0.107: icmp_req=2 ttl=128 time=0.604 ms
64 bytes from 192.168.0.107: icmp_req=3 ttl=128 time=0.607 ms

© Carey Metcalfe. Built using Pelican. Theme is subtle by Carey Metcalfe. Based on svbhack by Giulio Fidente.