Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

April 14, 2018

Increase Keyboard Backlight Timeout on Ubuntu Dell XPS


Modify
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout

Default = 10s (seconds); Set to 20m (minutes)

Unsure how to disable timeout completely, but setting to a large value could work too.


Source:http://www.dell.com/support/article/us/en/04/sln308123/how-to-configure-the-keyboard-backlight-time-out-interval-in-ubuntu-linux

Please consider crypto tipping:
  

October 11, 2016

Quick and Dirty Install SyncThing in Debian with a Systemd Service

Sync
I really like BTSync (aka “bittorrent sync” aka “Resillio”). It was a god-send considering a wanted to sync files between multiple computers and NAS, but did not want to store them in the cloud (read as: These are not he DropBoxes you are looking for.) I first tried AeroFS for a short stint, but the vendor soon shifted focus from individual to team/business oriented support. BTSync was released during this time.

I’ve been using BTSync for 2 years now. I stayed at v1.x all this time. BTSync is exactly what i want and has been working great.

When I recently had my work notebook replaced, I decided to “upgrade” BTSync to v2. I seem to likeed it more – the interface worked a little better, so i decided to upgrade BTSync on my Synology Diskstation to v2 also, but it failed to run at all . I seem to be stuck with v1.4.11. Let me be clear, v1 is not bad; It does work. But sometimes, i just can’t live with older, obsolete, and unsupported software. Also, I don’t believe the bittorrent team are freedom-hating, but it is certainly closed-source.

I’ve researched the file-syncing subject many, many, times. On several occasions, I was super close to trying open-source (freedom-loving) Syncthing, but at various times it was not quite ready. Well this time, after looking at it again, it was ready. And so was I.

So here is the quick and dirty install for debian/ubuntu with a systemd service:
(Note: If you are not using systemd, or are using an alternate OS, then there are other service options. )
# install syncthing as per http://apt.syncthing.net/ instructions
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb http://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing

# create new service file via syncthing's systemd "system" file:
sudo curl -o /etc/systemd/system/syncthing@.service https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-systemd/system/syncthing%40.service
sudo curl -o /etc/systemd/system/syncthing-resume.service https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-systemd/system/syncthing-resume.service
# enable and start the syncthing per-user service user=$(whoami) sudo systemctl daemon-reload sudo systemctl enable syncthing@${user} sudo systemctl start syncthing@${user} systemctl status syncthing@${user} #launch web-UI xdg-open http:127.0.0.1:8384

To install on Synology DiskStations, use the SynoCommunity package repository.

I won’t go into the setup, but some key things are the following:

First, be sure to set a “GUI Authentication User” and “GUI Authentication Password” via the Actions>Setting menu, then restart the service.

Next, it is important to understand that a Syncthing relationship is different than BTSync. Rather than a single key that enables syncing as with BTSync, in Syncthing you will add “devices” to each system and specific share folders. You are required to add these “both-ways“. For example for two systems to sync, you will add device A to your device B, and vice-versa. If you wish to sync between three devices, device A will need both device B and C added; device B will need both device A and C added; and finally device C will need both device A and B added. During this, you may need to create the folders before-hand, and pay special attention to the folder ID (key) provided by Syncthing, as it must be the same on each end-point.

Also, I was certainly having some sync/connection issues, and after much troubleshooting, it seemed IPv6 was stopping IPv4 from being the preferred connection method. There is no documentation stating a defacto way to disable IPv6, but after reading https://docs.syncthing.net/users/config.html, i tried setting my “Sync Protocol Listen Addresses” to simply tcp://0.0.0.0, which seems to be the equivalent of saying “use IPv4 on all interfaces.” I am still uncertain if this is necessary or even proper, so use with caution. In fact, I'd recommend do not do this yourself.

With both BTSync and Syncthing, the software repeatedly scans files for hashes, and if changed, will sync updates.  These computations are a heavy burden on an ARM based NAS such as the Synology. Syncthing's default scan interval is 60 seconds.  Every 60 seconds it will scan a sync-folder for changes -- this caused my Synology to continuously thrash the disks.  In an effort to reduce this heavy activity, i went to the advanced settings, chose my folder(s) and set rescanIntervalS to 900 seconds (15 minutes). Since my Synology is more of a backup device and I do not edit these files directly, this is a much better sync-interval.

You should certainly visit the Syncthing Documentation for your needs. Also, You may or may not need to open or port-forward TCP 22000 and UDP 21027 depending on your network environment.

As always, Good Luck!

- - -


Please consider crypto tipping:
  

November 14, 2014

Fusion 7 upgrade and Ubuntu 14.04 LTS startup shutdown scripts fail.

 

Upon upgrading VMWare Fusion 6 to version 7, I had an issue with my Xubuntu 14.04 vmware-tools.

Upon Startup I would receive the warning:

The VMware Tools power-on script did not run successfully in this virtual machine. If you have configured a custom power-on script in this virtual machine, make sure that it contains no errors. You can also submit a support request to report this issue.


And upon shutdown, I would receive the warning:

The request to halt this virtual machine failed because the corresponding VMware Tools script did not run successfully. If you have configured a custom halt script in this virtual machine, please inspect it for errors; otherwise, please submit a support request.

Typically I use the repository's open-vm-tools, so i tried to reinstall them, but this did not resolve the issue.  I uninstalled open-vm-tools and installed the vmware-tools from Fusion, but this did not resolve the issue either.

When i searched the repository, I noticed a new group of tools containing the keywords open-vm-tools-lts-trusty*, so I i uninstalled vmware-tools with the command:

sudo vmware-uninstall-tools.pl

I purged any instances of open-vm-tools like so:

sudo apt-get purge open-vm-tools*

I then installed the LTS version of the open-vm-tools:

sudo aptitude install open-vm-tools-lts-dkms open-vm-tools-lts-desktop open-vm-toolbox-lts-trusty

Upon reboot, I had no more warning and things worked as expected.
---
Please consider crypto tipping:
  

May 22, 2010

Recommended Linux Distros -- Making a tough decision on which Linux to use.

EVERYONE has their own choices and opinions about which Linux Distro is best. This is simply another HUMBLE OPINION on which Linux Distribution to decide upon. There are literally thousands to choose, I have tried tens of tens, and these are my choice recommendations for a Linux Desktop.

COMPLETE NOOB: (or tired of Ubuntu and want a little more class)
http://www.linuxmint.com/
If you are completely new or very novice, I suggest Linux Mint. Mint is easier and a bit more complete than Ubuntu, as it is based from the Ubuntu Distributions with added features and usability. Since it is Ubuntu based, expect updates slightly behind Ubuntu's releases, but the fine-tuning is already there for you.

AVERAGE JOE: (Today's most popular distribution)
http://www.ubuntu.com
If you have a shallow Linux background, you can start with Ubuntu. It's where I learned most of my experience in my second coming into Linux and I recommend it as a great way to start the fun. Ubuntu is highly modified and much easier than base distributions. It is Debian-based with many added features to make using Linux as an every-day desktop very easy.

EXPERIENCED HACKER:
http://www.debian.org
If you've learned the basics and then some, and are tired of Ubuntu's random breakages, bugs, or user interfaces, then Debian is for you. It is King. There are several branches: Stable, Testing, and Unstable. For a good balance between stable and cutting edge, I always choose testing. There are usually ways to install cutting edge software within Debian regardless of which branch you use. However, I list this under "experienced hacker" with reason.

LIGHT IN THE FEET:
http://crunchbanglinux.org
If all of the above Distros are just too power hungry, try CrunchBang. Previously Ubuntu-based and now Debian-based it's lightweight and quick as lightning. Using CrunchBang makes you the envy of all your dorky friends and upgrades you to an elite class of nerd.

The above mentioned Distros are ALL Debian. If you know commands in one, you know them in the others. The easy ones have done a great deal to lessen the pain such as automatically adding users to the sudoers file and adding paths to environment variable to make command line action easier. That and a hole bunch of eye-candy and applications give them modern pizazz. You could theoretically start with Debian and make your own super-distro. But why do what others have spent millions of dollars doing for you.

ENTERPRISE:
http://www.centos.org
The real world work-force tends to use Red Hat Enterprise Linux. But for you and me, we're CHEAP. CentOS is binary compatible, if not equivalent. Updates are generally only a few weeks slower than the official Red Hat Enterprise distribution. If you need a solid, stable, commercial grade system, this is it.

http://www.debian.org
Debian is a highly popular and extremely stable enterprise ready distribution. Be sure to use the stable branch of course.

PLAY TOY(s):
http://www.slitaz.org/en/
http://www.tinycorelinux.com/
I still like to distro hop. Some very interesting Distros I've come to enjoy and keep the newset copies of include Slitaz and TinyCore. Stick them in just about any computer boot from CD and you're running linux without even installing. Yes, most distros are LiveCD's lately, but these are super small and super quick. Burn a business-card CD and keep it in your wallet to show your family, friends, or boss just how cool you really are.


Please consider crypto tipping:
  

May 13, 2010

Top Things I install on a fresh Ubuntu 10.04 Installation.

0) 64bit fails to provide me with a functional logmein.com ability, so I opt for 32bit.

1) Full update
sudo aptitude update ; sudo aptitude full-upgrade
Or if you install from the Mini.iso, then all should be up to date.


2) Install VLC Media player
sudo aptitude install vlc


3) Install NTP services becuase by default Ubuntu only updates the clock on boot-up. Leaving your machine on requires NTP services for continous updating.
sudo aptitude install ntp
edit /etc/ntp.conf to include
server us.pool.ntp.org
as the first server.


4) To use the command "srm" to shred/delete sensitive files, install Secure Delete
sudo aptitude install secure-delete


5) Install Gnome-Do. I recommend "docky" mode as it provides the "do" & a dock-bar.
sudo aptitude install gnome-do gnome-do-docklets


6) I use KeePass 2.10 Portable which requires Mono's winforms2 to run in linux. KeePass Portable is launchable via command line "Mono KeePass". Install winforms first
sudo aptitude install libmono-winforms2.0-cil libmono-system-runtime2.0-cil


7) Install SSH server for remote login and scp
sudo aptitude install openssh-server


8) I use DynDNS.org for dynamic DNS services. Install ddclient and ssl socket.
sudo aptitude install ddclient libio-socket-ssl-perl
after configuring ddclient, edit /etc/ddclient.conf to include
ssl=yes
daemon=360


9) I prefer x11vnc over ubuntu's default vine-server. For security I only run it from a remote SSH session. There are many options, but this suits my needs. First install x11vnc:
sudo aptitude install x11vnc ; x11vnc -storepasswd

Then from a remote SSH session I can
sudo x11vnc -once -usepw -display :0 -autoport 5900 -nap -noxdamage -nolookup -auth guess &
allowing me to use my vncviewer to connect remotely to the desktop.

10) Firefox plugins: AdBlock Plus, Ghostery, Privacy Plus, Update Notifier, GMail Manager, WOT, NoScript.

11) More than likely at some point you may need to re-install Ubuntu. Remastersys allows to to create your own distribution (with all updates) or a backup cd. You can run "remastersys" from the gui or the command line.
First add
deb http://www.geekconnection.org/remastersys/repository karmic/
to synaptic repositories then
sudo aptitude install remastersys

12) Add "Open in Terminal" item to nautilus context menus.
sudo aptitude install nautilus-open-terminal

13) Add "Open as Administrator" item to nautilus context menus.
sudo aptitude install nautilus-gksu

14) Get a more current NVidia driver:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo aptitude update
sudo aptitude install nvidia-current

15) Sometimes the colors just don't work, install this to edit them:
sudo apt-get install gnome-color-chooser

16) Install webmin for various configuring, including easier iptables firewall setup.  Refer to http://www.webmin.com/deb.html for installation.


Also take a look at Tips and Tricks for Ubuntu after Installation


Please consider crypto tipping: