DevHeads.net

Postings by thufir

snap umake?

I'd never heard of snap until today.

copy only non-hidden files

From time to time I see different scripts or techniques on this
question. The best approach I've seen yet is:

rsync -av --exclude=".*" src dest

<a href="https://stackoverflow.com/a/11557219/262852" title="https://stackoverflow.com/a/11557219/262852">https://stackoverflow.com/a/11557219/262852</a>

the rare time when I want to do this then I spend time trying to recall
how to even find that solution. Is there another tool or approach,
perhaps?

thanks,

Thufir

pastebinit & gist

how do you configure pastebinit for gist? does that even work?

what I tried:

thufir@dur:~$
thufir@dur:~$ pastebinit pan
Unknown website, please post a bugreport to request this pastebin to be
added (<a href="http://gist.github.com/" title="http://gist.github.com/">http://gist.github.com/</a>)
thufir@dur:~$
thufir@dur:~$ cat .pastebinit.xml
<pastebinit>
<pastebin>http://gist.github.com/</pastebin>
<author>Thufir</author>
<format>text</format>
</pastebinit>

thufir@dur:~$

the bug report:

<a href="https://bugs.launchpad.net/pastebinit/+bug/268287" title="https://bugs.launchpad.net/pastebinit/+bug/268287">https://bugs.launchpad.net/pastebinit/+bug/268287</a>

doesn't it say "fixed"? 2008

-Thufir

umake usage

I get this:

thufir@dur:~$
thufir@dur:~$ umake ide eclipse
Choose installation path: /home/thufir/.local/share/umake/ide/eclipse
Downloading and installing
requirements
|
100% |
##############################################################################################################################|
Installing Eclipse
|
###################################################################################################################################|
Installation done
thufir@dur:~$ eclipse
The p

min/max/close & menu in artful

Is artful using unity? I've read that unity is on its way out? to be
replaced by GNOME?

I actually like unity. It used to imperfectly incorporate the "x" for
close window icon into the very very top "bar". Now it seems to have
moved those icons from the left hand side back to right hand side and
they're no longer part of the menu bar.

It just is what it is for that?

-Thufir

automount external hdd

I'm trying to auto-mount an external hdd enclosure with nautilus:

thufir@doge:~$
thufir@doge:~$ sudo mount -t ext3 /dev/sdb1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
thufir@doge:~$
thufir@doge:~$ dmesg | tail
[38425.298930] entry_SYSCALL_64_fastpath+0x1e/0xad
[38425.298932] RIP: 0033:0x7f32d242e987
[38425.298934] RSP: 002b:00007fffd3152ed8 EFLAGS: 00003246 ORIG_RAX:
0000000000000010
[38425.298936] RAX: ffffffffffffffda R

syslog 101

rsyslog is the Ubuntu default?

I want to run syslog on a Grandstream GXP 1625 IP hard phone. Which
implementation has the least steep (ready easy to get to step one)
learning curve?

I was looking at syslog-ng and the documentation is rather huge. But
maybe there's alternate documentation, or I was just reading the wrong
part. Or, maybe rsyslog would be easier to get going. What are some
recommendation?

thanks,

Thufir

sudo su -

To switch to root, this is reasonable?

thufir@doge:~$
thufir@doge:~$ sudo su -
root@doge:~#
root@doge:~# pwd
/root
root@doge:~#

thanks,

Thufir

sudo jython ez_setup.py

Going by the jython book:

<a href="http://www.jython.org/jythonbook/en/1.0/appendixA.html" title="http://www.jython.org/jythonbook/en/1.0/appendixA.html">http://www.jython.org/jythonbook/en/1.0/appendixA.html</a>

I downloaded their script, ez_setup.py and ran it as so:

thufir@doge:~/jython$
thufir@doge:~/jython$ jython ez_setup.py
"my" variable $jythonHome masks earlier declaration in same scope at
/usr/bin/jython line 15.
Downloading
<a href="http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg" title="http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg">http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5...</a>
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied:
'/usr/Lib/site-p

ppa-purge webupd8team

How do I purge this ppa?

thufir@doge:~$
thufir@doge:~$ ls /etc/apt/sources.list.d/
google-cloud-sdk.list ring-nightly-man.list
webupd8team-ubuntu-java-xenial.list
google-cloud-sdk.list.save ring-nightly-man.list.save
webupd8team-ubuntu-java-xenial.list.save
jitsi.list ubuntu-desktop-ubuntu-ubuntu-make-xenial.list
jitsi.list.save
ubuntu-desktop-ubuntu-ubuntu-make-xenial.list.save
thufir@doge:~$
thufir@doge:~$ sudo ppa-purge webupd8team-ubuntu-java-xenial
Updating packages lists
AppStream cache update completed, but some metadata was ignored due to
errors.
W: http://

SIP to SIP on same computer?

Is there a port collision, or other problem, with initiating SIP to SIP on
the same computer? I'm using Linphone and Ring. I'm not running
Asterisk.

thanks,

Thufir

man linphone in russian

For some reason my manual page for linphone and linphonec are not in
English...very odd. Perhaps Russian or Finnish. The man page for man
says:

International support is available with this package. Native
language manual pages are accessible (if available on your
system) via use of locale functions.

web interface security

I disabled root and password based ssh for increased security.

Using fail2ban or other firewalls, I suppose a web server can blacklist
certain IP's?

Whether it's a web server, or perhaps a web service, are there other
options? To whitelist only one, or a few, IP addresses? How effective
would a white list be?

Might there be something like ssh keys? So that access to a web server
or service requires a key?

(This is somewhat off topic, it's for Elastix (asterisk) on CentoOS, but
I am using Ubuntu to connect..)

thanks,

Thufir

ssh-copy-id

reading the fine manual:

The key you need to transfer to the host is the public one. If you can
log in to a computer over SSH using a password, you can transfer your RSA
key by doing the following from your own computer:

ssh-copy-id <username>@<host>

<a href="https://help.ubuntu.com/community/SSH/OpenSSH/Keys" title="https://help.ubuntu.com/community/SSH/OpenSSH/Keys">https://help.ubuntu.com/community/SSH/OpenSSH/Keys</a>

the "host" refers to the remote? local would be, for example, a laptop.

I thought I read to copy the private key...?

thanks,

Thufir

passwordless ssh from laptop

To disable password authentication, look for the following line in your
sshd_config file:

#PasswordAuthentication yes

in:

/etc/ssh/sshd_config

this change is made in the target machine not the laptop I'm sitting at?

The laptop I connect from usually, but not always, has the same IP
address. It has a registered FQDN which, in a pinch, I could update
through <a href="http://www.noip.com" title="www.noip.com">www.noip.com</a> when at a cafe. Would that be a problem?

thanks,

Thufir

grub-efi bootloader & windows 10

How does the grub-efi bootloader indicate that it's in EFI mode and not
MBR?

Reading:

<a href="http://askubuntu.com/questions/395879/" title="http://askubuntu.com/questions/395879/">http://askubuntu.com/questions/395879/</a>

the simplest answer to create a UEFI bootable thumb drive is like:

7z x ubuntu-12.04-desktop-amd64.iso -o/media/$USER/604A-00EA/

This is to dual-boot with Windows 10. I've looked at some different
sources but don't quite follow how the ESP fits in to the picture. This:

"Note that these factors can conflict with one another.

boot the kernel directly from firmware with UEFI?

Most of what I read at:

<a href="http://superuser.com/posts/1113787/revisions" title="http://superuser.com/posts/1113787/revisions">http://superuser.com/posts/1113787/revisions</a>

is over my head. But what are the ramifications to eliminating GRUB?
Obviously that's just one less component to maintain for developers.

-Thufir

ESP dual boot Windows 10

I've been reading about UEFI:

<a href="https://help.ubuntu.com/community/UEFI" title="https://help.ubuntu.com/community/UEFI">https://help.ubuntu.com/community/UEFI</a>

and want to dual boot Ubuntu with Windows 10. So, I'll be creating a
UEFI-only bootable thumb drive. The directions say not to format if
there's already an ESP.

I don't know what they mean with:

"Performing the Installation

Once you've taken care of the preliminaries, you can install Ubuntu
normally. Aside from the ESP, Ubuntu installed in UEFI mode has no
special partition requirements, and you need not adjust other
installation options.

linux on a motherboard?

I seem to recall there was, or was going to be, Linux literally running
on motherboards? Presumably it would be an option to boot into some
minimal CLI. Did this notion not prevail?

-Thufir

which .deb to install jitsi?

How do I install Jitsi?

The instructions:

"You can also download the .deb package and install it with dpkg -i
package.deb. "

but *which* .deb package? There are many...they seem to require each
other.

<a href="https://download.jitsi.org/jitsi/debian/" title="https://download.jitsi.org/jitsi/debian/">https://download.jitsi.org/jitsi/debian/</a> says:

Note that once you install one of the Jitsi debian packages, our debian
repository would be automatically added to your package sources so that
you would be able to easily upgrade.

this seems better than adding the repo.

thanks,

Thufir

bluetooth USB adapter troubleshooting

On a lower level, I can see the bluetooth hardware:

thufir@mordor:~$
thufir@mordor:~$ hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:11:22:98:76:54 ACL MTU: 1021:4 SCO MTU: 180:1
UP RUNNING PSCAN ISCAN
RX bytes:1118 acl:0 sco:0 events:39 errors:0
TX bytes:413 acl:0 sco:0 commands:37 errors:0

thufir@mordor:~$
thufir@mordor:~$ hciconfig -a hci0
hci0: Type: BR/EDR Bus: USB
BD Address: 00:11:22:98:76:54 ACL MTU: 1021:4 SCO MTU: 180:1
UP RUNNING PSCAN ISCAN
RX bytes:1118 acl:0 sco:0 events:39 errors:0
TX bytes:413 acl:0 sco:0 commands:37 errors:0

tcl editor or IDE (komodo?)

I've installed ubuntu-make, umake, but can't find a reasonable IDE for my
tcl needs. There's a Netbeans plugin which might use, or, if all else
fails, resort to Eclipse.

The tcl page on IDE's seems woefully out of date and vague:
<a href="http://wiki.tcl.tk/998" title="http://wiki.tcl.tk/998">http://wiki.tcl.tk/998</a>

The most interesting, komodo, is closed source; I'm installing the open
source, and free as in beer, komodo edit. My needs are pretty basic,
primarily to catch syntax errors and to nicely format tcl and expect with
standard indenting. Git I can use from the CLI.

Any suggestions or alternatives?

what is plink? putty?

I was looking at driving telnet, and came across putty and plink. Putty
has a good Wikipedia entry, but only says this about plink:

Plink: a command-line interface to the PuTTY back ends

a quick search through apt-cache shows:

<a href="http://packages.ubuntu.com/wily/libjsch-agent-proxy-java" title="http://packages.ubuntu.com/wily/libjsch-agent-proxy-java">http://packages.ubuntu.com/wily/libjsch-agent-proxy-java</a>

which looks interesting. While there are numerous telnet libraries, I'd
rather use the system telnet. Thoughts or pointers?

thanks,

Thufir

unix lint utility with java, using pipes

I was perusing the tee utility, and came across this example:

lint program.c | tee program.lint

This displays the standard output of the command lint program.c at the
computer, and at the same time saves a copy of it in the file
program.lint. If a file named program.lint already exists, it is deleted
and replaced.

<a href="https://en.wikipedia.org/wiki/Tee_%28command%29#Unix-like_2" title="https://en.wikipedia.org/wiki/Tee_%28command%29#Unix-like_2">https://en.wikipedia.org/wiki/Tee_%28command%29#Unix-like_2</a>

I would want the OS to simultaneously run a console program, and save the
output to a log file, as above. Emphasis on *Operating System*, not the
JVM.

can lint be used with java, instead of a c program?

rastertosamsungspl not available (printing with CUPS)

The notion is to find this missing file and copy over? Seems an odd
thing to do, or odd that it's missing.

gpar2 or other GUI for par2

is gpar2 a good gui for par2 archives? Just curious whether there are
any recommendations for a GUI.

thanks,

Thufir

alias with switches

Hi, for some aliases, I use \"foo\" to escape the quotes, so that I can
pass in a double quoted word.

However, I can't seem to get a switch passed in correctly.

alias fjdk = 'ls -alh`

just to pick something simple. That doesn't work when I put it
in .bash_aliases and try "source .bashrc", it just chokes. What's the
correct way?

thanks,

Thufir

sudo dpkg-reconfigure mail-stack-delivery

How do I reconfigure mail-stack-delivery?

thufir@mordor:~$
thufir@mordor:~$ sudo dpkg --configure mail-stack-delivery
dpkg: error processing package mail-stack-delivery (--configure):
package mail-stack-delivery is already installed and configured
Errors were encountered while processing:
mail-stack-delivery
thufir@mordor:~$
thufir@mordor:~$ sudo dpkg-reconfigure mail-stack-delivery
thufir@mordor:~$

Nothing happens with dpkg-reconfigure.

thanks,

Thufir

mailutils didn't create mailbox for user(?)

I was having trouble opening a mailbox:

<a href="http://askubuntu.com/questions/735337/" title="http://askubuntu.com/questions/735337/">http://askubuntu.com/questions/735337/</a>

the solution was to add the direcotory by hand:

thufir@mordor:~$
thufir@mordor:~$ sudo touch /var/mail/thufir
thufir@mordor:~$ sudo chown thufir:mail /var/mail/thufir
thufir@mordor:~$ sudo chmod o-r /var/mail/thufir
thufir@mordor:~$ sudo chmod g+rw /var/mail/thufir
thufir@mordor:~$
thufir@mordor:~$ mail
No mail for thufir
thufir@mordor:~$

however, this system was, literally, just installed.

hostname FQDN

Why does the --all-fqdns return an empty line?

thufir@tleilax:~$
thufir@tleilax:~$ hostname -f
tleilax.bounceme.net
thufir@tleilax:~$
thufir@tleilax:~$ hostname --all-ip-addresses
192.168.1.4
thufir@tleilax:~$
thufir@tleilax:~$ hostname -i
127.0.1.1
thufir@tleilax:~$
thufir@tleilax:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 tleilax.bounceme.net tleilax

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
thufir@tleilax:~$
thufir@tleilax:~$ hostname --al