Archive | Linux RSS feed for this section

Permanently deactivating a network adapter in Linux

14 Sep

So my PC has 2 wireless adapters. One crappy internal one and a good external one which I bought because the internal one is so bad. But on system start I now had the problem that the crappy wifi card always wanted to connect which I didn’t want it to do. So I had to go through the trouble of running the following command in my shell:

sudo ifconfig wlan0 down

mostly a few times, since it didn’t seem to pick it up from the beginning. I tried to run this command at system startup using rc.local as described here, but that didn’t work for some reason. But there is a different solution, that worked for me!

Solution

Blacklist the kernel module that is responsible for running the wifi adapter. In other words, don’t load the Linux driver for the bad wifi adapter so it won’t work. You can do this the following way:

At first you need to find out which kernel module is responsible for the wireless card you want to deactivate. The following command shows you all currently loaded kernel modules:

sudo lsmod

I grepped this list for part of the name of the chipset of my wireless card, which is “RTL8185″ so I went with:

sudo lsmod | grep rtl81

There the “rtl8180″ kernel module showed up as being loaded, with no other modules using it. Now we can try to remove this module from the currently loaded modules with

sudo modprobe -r rtl8180

If everything worked, the unwanted wifi card should just have disappeared from your network control panel. It also shouldn’t show up any more when running the “ifconfig” command. If not, you probably removed the wrong module in that case you should rather add that Linux kernel module back in:

sudo modprobe -a removed_module_name

However if it worked and the wireless adapter really disappeared, then we don’t want to remove it every time we boot our system. That should be done automatically! And there indeed is a mechanism for that. There is a blacklist of modules that shouldn’t be loaded on system boot. In order to use this you have to modify /etc/modprobe.d/blacklist (or create it, as I had to) with a text editor and admin rights. So I did:

sudo nano /etc/modprobe.d/blacklist

And modified the file to look like this:

blacklist rtl8180

Of course you have to modify my module name with yours. This will blacklist the module/driver automatically on system boot/startup. This worked beautifully for me on my Linux Mint Debian Testing operating system. I hope it works for you as well. Of course this technique is more general and can be used to blacklist any kernel module/driver.

Getting the “fortune cookies” back in the Linux Mint Debian Edition terminal

13 May

Some weeks ago I installed Linux Mint Debian edition after being a loyal and happy user of the Linux Mint main edition for some years. It was a very nice experience but something was missing… in the main edition, every time you open a terminal you are greeted by an animal, which has something more or less funny to say. I always liked that, it’s part of Linux Mint for me. However when I opened the terminal in my freshly installed Linux Mint Debian Edition I saw the following:

empty_terminal

No one greeted me. So I decided to ask on the forums. Gladly there is a solution for this (thanks to äxl for the answer!). You can simply run:


gconftool -s -t bol /desktop/linuxmint/terminal/show_fortunes true

Alternatively you can open the graphical configuration tool with “gconf-editor”, navigate to that path and change the value by hand. And then there they are again, my beloved “funny greeting messages”, “fortune cookies” or whatever you want to call them. And notice what really important wisdom my terminal has to share with me this time:

funny terminal

Autostarting applications in Linux Mint Debian Edition

17 Apr

A few days ago I finally made the step to switch from Linux Mint main edition (Linux Mint 10 was getting old) to the all new Linux Mint Debian Edition Release Candidate with the new Cinnamon desktop. It’s been great so far.

However I was really missing a feature of the main edition. There you could simply right click on a menu entry and say “Launch on startup”, which has been the most convenient way to add an autostart that I’ve ever seen. Browsing the settings and the web I at first didn’t find a way to autostart applications. I found lots of descriptions involving files and directories that don’t seem to exist in my Linux Mint Debian Edition. Well enough babbling.

Solution

Simply run:


gnome-session-properties

You can do this in the terminal or with Alt + F2 (gnome do). There you have a list of all your startup applications and you may add applications by specifying their command (like: “thunderbird” or “firefox”) but you may also remove startup applications. This looks something like this:

This should work with all Gnome based desktops (Gnome 2, Gnome 3, Mate, Cinnamon), I haven’t tested it though. It’s fairly easy but embarrassingly took me long enough to figure out, so I figured that it’s better to blog about it and maybe save somebody else some time.

Follow

Get every new post delivered to your Inbox.

Join 356 other followers