Nemo to look up smb://WINDOWS_NAME so we don't need type IPs
Posted: Wed Feb 13, 2013 2:12 pm
I'm tired of having to manually lookup the IP address of the host I'm connecting to and typing it into nemo's address bar. Since names are easier to remember than IP addresses, it would be more convienient if nemo would take the host name I type, say "MY_PC" and look up it's IP Address and either replace the host name with the address, or work with the IP address under the hood, but keep showing the clean hostname in the location bar.
I tried to put together a bash script that does all the work, but I'm not very good at using bash so here's what I have which might be a good starting point to work with for translating a windows host name to an IP address that can be then feed to Samba.
I tried to put together a bash script that does all the work, but I'm not very good at using bash so here's what I have which might be a good starting point to work with for translating a windows host name to an IP address that can be then feed to Samba.
Code: Select all
#!/bin/bash
X_VAR=`ifconfig | grep 'Bcast:' | awk '{print $3}'`
echo $X_VAR
IP_ADDRESS=`nbtscan 192.168.0.0/24 | grep XCAL | awk '{print $1}'`
echo $IP_ADDRESS