How to stop avahi-daemon from advertising on a network

The problem exists when a box decides to tell everyone on the network “hey, I have a VNC / SSH / Remote Disk connection, come and try me out!”  This can be evidenced by running the command ‘avahi-browse -a’ on the host pc with the services being advertised.

Some people go to lengths to kill of the daemon all-together, but there are some things avahi-daemon does with can be beneficial, other than advertising services.  Also killing off the avahi-daemon during runtime is difficult as alot of other things like talk to it.

All you need to do is modify the /etc/avahi/avahi-daemon.conf file.

uncomment and edit the line to read:
disable-publishing=yes

And then restart the service to make the changes stick
sudo service avahi-daemon restart

from the man page avahi-daemon.conf
disable-publishing= Takes a boolean value (“yes” or “no”). If set to “yes”, no record will be  published  by Avahi, not even address records for the local host. Avahi will be started in a querying- only mode. Use this is a security measure. This option defaults to “no”

It’s not all beer and skittles, clients looking for services on the host may throw up errors sometimes.

references:
man avahi-daemon
mon avahi-daemon.conf

WindyCityTech Blogger
WindyWindyCityTech WordPress

Disabling ebay auto-suggest easily and permanently using adblock

Ebay search auto suggest sucks, it is completely broken, often screwing up my typing searches, replacing words without my permission.  It is not all that useful and deserves a bullet in the brain.

There is a option to disable it “Hide eBay suggestions”, but it is only cookie based and session dependent.  Not good enough.

Here is how to get rid of it for ever using adblock for good!
Add this line to your adblock plus block list: “autosug.ebaystatic.com

If you don’t have adblock you can certainly add the same domain to your hosts file, there is plenty of resourced on the inter-webs to show you how.

WindyCityTech Blogger
WindyWindyCityTech WordPress

Privacy Risk on new ebay.com.au website First and Last Name in Cleartext

The new ebay.com.au website has been released with much fanfare but the creaters of the website have now decided to embed the users first name and last name on most pages visited.  The test is delivered under plain http and can easily be captured over the air or wire using Wireshark.

Steps to replicate:

  1. Login to ebay.com.au with correct credentials
  2. Navigate to he home page
  3. Hover the mouse to the top left hand corner under the “G’Day <First Name>”
  4. Be greeted with a hover over panel with <First Name> <Last Name> in plain sight.

Conducting a Wireshark trace illustrates the issue.  A sting search in packet details for GH_alertData will display the first / last name.

Why is this bad:
Potentially a hacker can gain easy access to your first, last name and ebay id and use this info to produce a phishing email or collect this data for further attacks.

Where can this happen:
The most likely place for this to happen is over an unencrypted wireless network, i.e at the airport or the cafe.  Wired networks are also vulnerable.

What can ebay do:
Secure their website by using the https protocol for the entire website.

What else sucks:
On a internet connection that can stall, i.e 3G/wifi, the hover function can time out and throw up the message, “We’re sorry, there was a problem retrieving this information”.  Now the user can easily log out without refreshing the page.
Sidejack friendly…

WindyCityTech Blogger
WindyWindyCityTech WordPress

How to get rid of the Banner ‘media contains digital photos’ downloads bluetooth linux mate for ever [solved]

Problem:
When I look in my SD card, caja throws up a stupid blue banner saying “The media contains digital photos”

Cause:
Not entirely sure.  Related to gthumb-import.desktop, which has the text “Import with gThumb” which is in /usr/share/applications/gthumb-import.desktop
Nothing in mateconf-editor to tweak as well.  Bad coding…
Uninstalling  gthumb and any other image program got rid of the banner, but that is not desirable.

Solution:
Open/create the file /home/$USER/.local/share/applications/mimeapps.list and add these lines (reference http://www.freedesktop.org/wiki/Specifications/mime-actions-spec)

[Removed Associations]
x-content/image-dcf=gthumb-import.desktop;
x-content/image-picturecd=gthumb-import.desktop;brasero.desktop;

then update the mime database and killall instances of caja
sudo update-mime-database /usr/share/mime
pkill caja

Do not get happy and try modifying /usr/share/applications/mimeinfo.cache as it will get overwritten without warning.
Reference: http://www.allquests.com/question/1705936/This-media-contains-digital-photos.html

Had a similar problem with the Downloads directory, same stupid blue banner again, “Personal File Sharing”, “You can receive files over Bluetooth into this folder”.
This time I uninstalled the bluetooth sharing agent:
mate-user-share
and did another pkill caja

in mateconf-editor the key /desktop/mate/file_sharing/bluetooth_obexpush_enabled looks suspicious

To all the retards that want these helpful hints, download Ubuntu please or better yet, purchase Windows / Mac OS.

WindyCityTech Blogger
WindyWindyCityTech WordPress

Creating a custom montitor configuration in mate Linux laptop that sitcks!

Scenario:
One laptop and one external monitor.
The laptop screen is the primary monitor (LVDS1)
The external monitor is the secondary monitor, orientated left (HDMI1)

Problem:
When the lid of the laptop is put down and then raised, the screens do not retain resolution settings and does either one of the following:
Laptop LCD off
Laptop LCD resolution wrong
External monitor rotated back to normal instead of orientated left.

Why this is happening:

It seems that there are too many things that can cause the screen resolution to change, including ACPI daemon, mate screensaver, lid.sh….  Too many cooks spoil the broth….

Solutions:
The manual solution is to unplug the HDMI cable and lower and raise the lid and then plug HDMI back in.  Not good enough.

Control freak Solution:
First get your screen setup right, use the ‘mate-display-properties’ to get your resolution and orientation correct.

Then open ‘mateconf-editor’ and tweak these settings:
apps/mate-power-manager/buttons  lid_ac = nothing
This will now prevent your system form changing your monitor settings on your behalf.

In a command line as a normal user excute the xrandr command.


Screen 0: minimum 320 x 200, current 2266 x 1440, maximum 8192 x 8192
LVDS1 connected 1366x768+0+327 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768       60.0*+
   1360x768       59.8     60.0 
   1024x768       60.0 
   800x600        60.3     56.2 
   640x480        59.9 
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 900x1440+1366+0 left (normal left inverted right x axis y axis) 410mm x 256mm
   1440x900       59.9*+   75.0 
   1280x1024      75.0     60.0 
   1280x960       60.0 
   1152x864       75.0 
   1024x768       75.1     70.1     60.0 
   832x624        74.6 
   800x600        72.2     75.0     60.3     56.2 
   640x480        72.8     75.0     66.7     60.0 
   720x400        70.1 
DP1 disconnected (normal left inverted right x axis y axis

translating from the xrandr output, a single line command to reset the screen to the desired dimension can be found:

xrandr –output LVDS1 –mode 1366×768 –rotate normal –output HDMI1 –mode 1440×900 –rotate left –right-of LVDS1

Now at this stage, depending on your situation, you can ‘hardcode’ you configuration into your system and make it stick OR crate a xrandr script that is manually activated.

looking in /etc/acpi/events/lidbtn shows that the script /etc/acpi/lid.sh
 is called when the lid button is activated

# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid

event=button[ /]lid
action=/etc/acpi/lid.sh

Having a look in the last line of /etc/acpi/lid.sh yeilds this:

[ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post

This file lid.sh.post, if exists is excututed when the lis switch is activated.  Note that this file does not exist by default, so it needs to be made.

sudo mkdir /etc/acpi/local/
sudo touch lid.sh.post

add this to the file lid.sh.post

#! /bin/sh
xrandr --output LVDS1 --mode 1366x768 --rotate normal --pos 0x327 --output HDMI1 --mode 1440x900 --rotate left --pos 1366x0 --right-of LVDS1

then make it excutable:
sudo chmod +x lid.sh.post

Test to see if the lid closing and opening changes the screen setup.

References:
http://dosnlinux.wordpress.com/2007/01/19/xubuntu-acpi-the-lid/

WindyCityTech Blogger
WindyWindyCityTech WordPress

caja Mint 14 mounting /media/user udisks2

New behavior in Mint 14, flash drives, usb drives now mount in /media/$USER/$DEVICE

Caused by the udisks2.  Cannot remove udisks 2 easily because the rest of the system relies on it.

A lot of people are angry about the lack of documentation associated with this major change and rightfully so.

It is still not clearly illustrated why the writer of udisks2 has decided to change the way we look at out personal filesystems but there are a few options.

Fight it:
http://www.linuxmint-fr.org/forum/33-trucs-et-astuces/127919-udisks2retrouver-montage-dans-media-et-non-mediauser.html
(use google translate)
or
Create several symlinks each session, ugly…

Roll with it:
Disable caja from automounting, as it still defaults to /media/$DEVICE
run, mateconf-editor -> search for keys called automount -> disable automounting

Although there are changes to the filesystem, it still works.  Users have th be cautious upgrading their systems as torrent clients and VM on other partitions cannot be found straight away.

WindyCityTech Blogger
WindyWindyCityTech WordPress