1.
Yes. You should update your OS. Mint 9 ended it's support in April 2013 according to http://en.wikipedia.org/wiki/List_of_Linux_Mint_releases.

2.
I believe the problems you had installing skype and frostwire will be fixed with a newer OS, like mint 17 (yes, the newest is number 17).


GPU not working correctly after suspend (Ubuntu 16.04)

Found the following bug report about the same problem:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1559576

So it is an unsolved bug...

Will update if I find anything in case someone
has the same problem.


Where do I find my bookmarks in my old homefolder and where do I put them in 12.04?

They should be here: .mozilla/firefox/xxxxxxxx.default/.

This xxxxx stuff is a random string of 8 characters.

If you don't see ".mozilla" folder in your old home folder you have to make nautilus to show you also hidden folders:
http://www.techheadz.co.uk/253.html


Wine version conflict causing update manager to crash

Remove wine1.5

sudo apt-get remove wine1.5

Then install wine1.7

sudo apt-get remove wine1.7


How do I stop websites, opened in firefox, such as YouTube and Amazon from appearing seperately as an app on the launcher or dash?

These are called the Unity Webapps. If you want to stop them from showing up in the Launcher, you'll have to uninstall or disable them. The easiest way is to disable them.

To disable the Unity Webapps in Firefox: open Firefox, go to Tools > Add-ons (or Ctrl+Shift+A), click on Extensions, and disable Unity Desktop Integration. I'm not sure if you'll need to restart Firefox, but do so.


Try this:

At boot time choose to go to recovery mode in the GRUB menu.
Then choose to repair filesystems, when it finishes then reboot.

Now you'll see booting will be fine until sooner or later it'll happen again and then you've to repeat the procedure.

If you're a little more into tinkering with your computer try to install the newest kernel from: http://kernel.ubuntu.com/~kernel-ppa/mainline/

Don't install a new kernel if you're not sure about how to cope with new problems that you might encounter after doing this.

It did solve problems for me, however.


How to align virtual desktops to 2x2 in cairo-dock switcher?

Turns out the virtual-desktops layout setting in ccsm may not be the same as when you right-click on the virtual-desktop app, wishing to add or remove workspaces.  Can't seem to PrtSc while viewing the right-click menu of the upper left switcher/workspace/virtual desktop preview app, but the 3rd and 4th items down the list are Add a workspace and Remove last workspace.

So I selected the Remove last workspace a few times till it returned to the 2x2 layout, and consistent with what's actually in ccsm

UPDATE (again)

To spare others aggravation & unclear documentation(if any) the Switcher applet and CCSM virtual workspace/desktop settings indeed are independently-minded. Not only that, their initial appearance after a fresh startup may actually be different than how they will behave. For instance, the Switcher applet docked in my upper-left corner in the screenshot, showed a big 1 and only one single box at first, but as soon as you try sliding to another desktop, it magically updates to show boxes 1-4.  This glitchy startup appearance had me definitely fooled before, troubleshooting configs in vain, when it probably was ready to behave all along.

For now I recommend keeping CCSM at 1 virtual desktop not 4, and instead let Switcher manage your 2x2 or whatever layout.  Shortcuts etc. finally seem to remain more consistent across restarts this way, for me, and now I know to disregard the initial appearance of only one desktop.


Is there a way to make the sidebar be out permanently?

Install CCSM (compiz manager) and under the Unity tab you can configure the behaviour of the sidebar.


Rhythmbox 3.3 not working with Ubuntu 16.04 Xenial Xerus

First to be able playing MP3, MP4 and other media files you will need the multimedia codecs
Type in terminal:
sudo apt-get install ubuntu-restricted-extras

Than try to get Rhythmbox
sudo add-apt-repository ppa:fossfreedom/rhythmbox
sudo apt-get update
sudo apt-get install rhythmbox

If for some reason you would like to uninstall this ppa, use:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:fossfreedom/rhythmbox


As I don't have enough rep to comment on your question, I'll have to ask you this through the answer.

Did you try to open monodevelop through the bash (open a terminal then type monodevelop and press enter)

In case monodevelop is not installed, you might need to install it yourself

sudo apt-get install monodevelop


Try deleting $HOME/.profile, I had the same problem before, because I added a function into $HOME/.profile.

When I deleted the function, I could login again.
The original content of $HOME/.profile is

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi


You boot a computer with a Live CD or USB stick. You then insert (another) USB stick and install Ubuntu on to it. When you run the installer, you select the (second) USB drive for installation and choose the manual partitioning. If it creates a swap partition, you can edit and set it to "do not use the partition." There is some "swap off" command that you can try. Gparted also allows you switch off the swap.


How to specify which child terminal gets focus on terminator startup

Here's what I've been testing with your profile setup:
nohup terminator -l TestProfile --command="xdotool key Ctrl+Tab;$SHELL"  & 2>/dev/null
This command , ran from gnome-terminal, opens terminator with your specified layout, and executes two commands - xdotool key Ctrl+Tab and $SHELL. xdotool is an emulator for keyboard or mouse behavior, basically, and once the terminator starts, it emulates pressing Ctrl+Tab, which makes focus switch from window 3 to window 1. $SHELL environment variable then gets expanded to your shell (for example, for me it is /bin/mksh), and that way the window won't exit once xdotool command completes.
You can bind a script to a shortcut (full path to script) or create.desktop file (in your ~/.config/autostart ) to launch this whole setup on startup. The script would have to go something like this:
#!/bin/bash

terminator -l TestProfile --command="xdotool key Ctrl+Tab;$SHELL"  &

Pros ? Does exactly what you ask of it. If you'd want to focus on window 2, your --command= would look like --command=xdotool key Ctrl+Tab;xdotool key Ctrl+Tab;$SHELL, i.e., emulate pressing Ctrl+Tab twice.
Cons: need to install xdotool
and remember to make the script executable with chmod +x


How to control Logitech G915 TKL keyboard lightning in Linux Ubuntu?

Features that work out of the box:

All the media buttons, game mode (disables the Win key), volume control. In other words, all the buttons work.
Pressing ☀ cycles through brightness levels.
Pressing ☀ + [NUM] (where [NUM] is 0, 1, 2, ..., 9) allows you to change the lightning effect on the fly.
Pressing ☀ + - and ☀ + + changes the lightning effect speed for the non-custom effects.

Features that require setup
These require one-time setup with G HUB (connected through Lightspeed), then works everywhere you attach the keyboard to, including Linux:

You can create custom lightning effects in the G HUB app (or download free lightning effects created by others from the G HUB) and then store two of them on the keyboard itself. The animations are accessible through ☀ + 8, ☀ + 9 (You can also set it to FN + F1, FN + F2, etc.)
You can change the keyboard sleep timeout

Note: you might (not sure) need to activate the on-board mode for these to work fully. More on that below.
P.S. How to fix the reset to rainbow lightning effect after keyboard wakes up from sleep
Install G HUB (Windows or MacOS), connect keyboard with Lightspeed, go to Settings, and set ON-BOARD MEMORY MODE to ON. This is a one-time setup for the lifetime of a keyboard.


Howto make "update-grub" to ignore guest volumes on a KVM Hypervisor?

Try editing /etc/defaults/grub

sudo -e /etc/defaults/grub

Add the line:

  GRUB_DISABLE_OS_PROBER="true"

Save your edits and re-run update-grub

FWIW, I have used physical partitions with KVM in the past and IMHO it causes more problems then it is worth and I did not see any performance boost. Consider using virtual disks, they have a number of advantages including cloning and portability. YMMV, good luck.


How can I install Swift on Ubuntu 19.04?

Ubuntu has a swift snap package that is buggy and cannot be run at all. What "cannot be run at all" means is that not only does the swift snap package not run at all, but it can't be hacked to run at all without rebuilding the swift snap package. Hopefully this bug will be fixed soon, so that swift can be installed the nice way with sudo snap install swift

For the time being, the alternative is to install the contents of the swift .tar.gz file for Ubuntu 18.04 to your own home directory. Normally it's anathema to mix packages of different releases, but if swift is installed without sudo in your home directory, it will run by itself and it will not interfere with anything else that is already installed in 19.04 and later.

Go to https://swift.org/download/#snapshots and download the Swift 4.2 Development archive: swift-4.2-DEVELOPMENT-SNAPSHOT-2018-10-30-a-ubuntu18.04.tar.gz to your desktop.
Extract the contents of swift-4.2-DEVELOPMENT-SNAPSHOT-2018-10-30-a-ubuntu18.04.tar.gz.
Copy the entire swift-4.2-DEVELOPMENT-SNAPSHOT-2018-10-30-a-ubuntu18.04 directory that you extracted to your own home directory, so that you can run it locally. swift can be run by a normal user from your home directory, without needing to be installed with root privileges.

cd ~/Desktop/
cp swift-4.2-DEVELOPMENT-SNAPSHOT-2018-10-30-a-ubuntu18.04 ~/swift/

Add the path to swift to your $PATH variable so that the path to swift looks like this: /home/your-username/swift/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-10-30-a-ubuntu18.04/usr/bin, only replace your-username with your own username.

export PATH="/home/your-username/swift/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-10-30-a-ubuntu18.04/usr/bin:$PATH"
source ~/.bashrc

Swift programs can be run interactively from the terminal in the form of an interactive Read Eval Print Loop, or REPL as shown in the below example:

$ swift
Welcome to Swift version 4.2.3 (swift-4.2.3-RELEASE). Type :help for assistance.
  1> import Swift
  2. print("Hello, World!")
Hello, World!
  3>


First, Java SE 6 is archived, so please use 7 instead.

Personally I prefer to use the tar.gz package to manually install Java SE.

Manual

For example the latest => jdk-7u25-linux-x64.tar.gz

Just extract it to somewhere,for example /opt/jdk1.7.0_25, set proper mode for the directory, write a script to set up java

Example: java7.sh

#Set JDK for all users
JAVA_HOME=/opt/jdk1.7.0_25
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME CLASSPATH

when you need to use java, just . java7.sh or source java7.sh.

You can add it to your ~/.bash_profile (Ubuntu doesn't have this by default), so do it in ~/.profile instead. You can do it for all users (system wide), up to you.

If you have multiple java versions, use update-alternatives to install / config.

update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.7.0_25/bin/java" 1
update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.7.0_25/jre/bin/java" 2

Use update-alternatives --config java to manage.

Shell script (kind of automated)

Last but not least: oab-java can be used to build .deb packages from the tar.gz provided by Oracle.


Need to resize Ubuntu root partition but cant use live boot usb

Try making a GParted live USB with Startup Disk Creator. The GParted live USB is about 1/10 the size of an Ubuntu live USB and it boots on anything.

Download the GParted Live iso file.
Run the built-in Startup Disk Creator application, and follow the instructions in the GUI to install GParted Live on your USB flash drive.

If the GParted live USB fails to boot on your system I recommend that you take a serious look at your UEFI/BIOS settings.


Isn't it possible to REPLACE IOS BOOTLOADER to install Ubuntu Touch?

Not as simple as that.

You would need support in Ubuntu Touch for the hardware in your iOS device. You would also need full access to the iOS device (storage, partitions, bootloader). You also need a hardware infrastructure that allows you to do this. Apple works very hard to make OS changes almost impossible.


Can I have common CD for 64 bit Ubuntu and 32 bit Ubuntu?

Not to my knowledge, but maybe someone else can tell you if one exists. It is usually expected that the user will know the target platform and download the appropriate DVD. Having 2 DVDs has never been a cause of concern for me.

I stand corrected. Had a look around after reading the comments above and you can use multicd on Linux.http://multicd.tuxfamily.org looks good, I'm going to try it out myself.


XCompose not working for high level Unicode characters

The ComposeKey sequences used by Gnome to enter special characters are hard coded into the program.

To use a custom Xcompose file, you will need to use the xim input method.

More information about using the compose key - and using xim to bypass the Gnome hardcodings - is given at ComposeKey in the community documentation.

The Gnome hard coding can be overruled in favour of the original Xwindow Input Method (XIM) by setting the environment variable GTK_IM_MODULE. This can be set in the /etc/environment file, but if the machine has more than one user then it is best set from the home directory on a per user basis by modifying ~/.gnomerc or ~/.Xsession

export GTK_IM_MODULE="xim"

Beyond that, it seems likely that you are essentially correct about the additional problems you are having. Direct Unicode input follows ISO 14755 in specifying only 4 hex digits in the code point and the cuneiform code points have 5 digits. It seems likely that this is also the underlying problem here. It seems that the layout is too complex for the compose key.

To enter cuneiform, I think you could create a custom keyboard layout (rather than using the compose key), but really this seems to require an input method editor rather than a keyboard. Your best option is to create a custom input table that would work with Ibus.


Initialising the Build Environment for Android on 64-bit 12.04

I installed Ubuntu 12.04.2 amd64 and the following command worked to me.  The second command (symbolic link) is not needed.

sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx-lts-quantal:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386

I did not install openjdk-6-jdk, instead, I used to use jdk-6u37-linux-x64.bin.

cd ~
./jdk-6u37-linux-x64.bin
export PATH=~/jdk1.6.0_37/bin:$PATH


How do I install UBUNTU TOUCH in Nokia XL?

There is neither active, nor discontinued ports for the phone. So, you would need to do this all for yourself. I would not recommend it, because it would a tremendous work, and the phone is too low-end anyway.


Is it possible to do a dual boot for Acer Iconia W700?

I think this might answer your question: http://community.acer.com/t5/Windows-Tablets/Linux-on-W700/td-p/47489

If not just tell me.


You should download one of the 12.04 LTS .iso images, then tell VMware to mount those as the CD-ROM  when booting.


How to check if Xvfb is (already) running on display :0?

I'm not sure what you're trying to accomplish, but you can check whether a X Display is available by running "x display info":

xdpyinfo -display :0 >/dev/null 2>&1 && echo "In use" || echo "Free"

Note: if you cannot access the display, it'll be reported as "Free" too. Another way is checking for the existence of /tmp/.X0-lock which contains the PID file of a X server.

Instead of displaying the command, a more reliable way would be checking for processes matching the binary:

pids=$(pidof /usr/bin/Xvfb)
if [ -n "$pids" ]; then
    processes="$(ps --format command --no-headers -ww --pid $pids)"
else
    echo "Not running"
fi

Source: https://github.com/Bumblebee-Project/Bumblebee/blob/master/install-files/common-functions#L112


You need to install binutils:

apt-get install binutils

That should do the job.


How to find out CUDA cores and information on command line for NVIDIA GPU

There is /proc/driver/nvidia which looks promising:
sh@balrog:~$ tree /proc/driver/nvidia
/proc/driver/nvidia
├── capabilities
│   ├── gpu0
│   │   └── mig
│   └── mig
│       ├── config
│       └── monitor
├── gpus
│   └── 0000:01:00.0
│       ├── information
│       ├── power
│       └── registry
├── params
├── patches
│   └── README
├── registry
├── suspend
├── suspend_depth
├── version
└── warnings
    └── README

...but I couldn't find the number of GPUs there.
sh@balrog:~$ cat /proc/driver/nvidia/gpus/*/information
Model:       NVIDIA GeForce GTX 1050 Ti
IRQ:         34
GPU UUID:    GPU-4087ca95-8a80-05fd-85f9-f50a4849fe4e
Video BIOS:      86.07.42.00.77
Bus Type:    PCIe
DMA Size:    47 bits
DMA Mask:    0x7fffffffffff
Bus Location:    0000:01:00.0
Device Minor:    0
GPU Excluded:    No

In some related articles, people are pointed to nvcc which is part of the nvidia-cuda-toolkit package. You might give that a try.
See also
http://manpages.ubuntu.com/manpages/bionic/man1/cuda-binaries.1.html


What's the actual download size of Gimp?

Software in Ubuntu, when packaged, are usually split up into different packages, separating:

architecture-independent data, (gimp-data)
binaries, (gimp)
shared libraries, (libgimp2.0)
development headers, (libgimp2.0-dev)
plugins, (gimp-data-extra)
documentation, (gimp-help-en)
and any external dependencies are usually separate packages as well.

The result is that the main gimp package depends on other gimp-related packages and many libraries as well. The download size of the main gimp package is, in fact, around 3 MB. The total download size, however, would be much more than 3 MB.

But you rarely see huge monolithic packages in the Ubuntu repository. 0ad-data, a particularly large package, is not even monolithic - it contains just the data files for the 0 A.D. game, and the binaries are in 0ad.

Packages from outside the repository, such as the Gitlab omnibus package (~300 MB!), can be huge because those developers decided to include every dependency in a single package instead of relying on repository packages.

As for the total download size, that depends on which libraries you already have installed on your system. apt will tell you how much will be downloaded:

$ sudo apt install gimp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  gimp-data libamd2.4.1 libbabl-0.1-0 libblas-common libblas3 libcamd2.4.1 libccolamd2.9.1 libcholmod3.0.6 libgegl-0.3-0 libgfortran3 libgimp2.0 liblapack3 libsdl1.2debian libumfpack5.7.1 python-cairo python-gobject-2 python-gtk2
Suggested packages:
  gimp-help-en | gimp-help gimp-data-extras python-gobject-2-dbg python-gtk2-doc
The following NEW packages will be installed:
  gimp gimp-data libamd2.4.1 libbabl-0.1-0 libblas-common libblas3 libcamd2.4.1 libccolamd2.9.1 libcholmod3.0.6 libgegl-0.3-0 libgfortran3 libgimp2.0 liblapack3 libsdl1.2debian libumfpack5.7.1 python-cairo python-gobject-2 python-gtk2
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 17.2 MB of archives.
After this operation, 92.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]


Unable to use files with special characters in shell

Don't parse ls

files=()

cd ~/Downloads
for file in *; do
    [[ -d $file ]] && continue
    files+=( "$file" )
done

printf "%s\n" "${files[@]}"

comma_separated=$(IFS=,; echo "${files[*]}")
echo "$comma_separated"

As you've seen, for f in $(ls) iterates over the words in the output, not the lines. Save ls for when you want human eyes to see the files, and use the shell filename patterns when you want your script to do something with filenames.


To bring up the missing upper bar of commands you might press Ctrl+M, which gives access to the preferences and configuration menu.
Now there is an appimage for download, which contains the Export-menu.


This is more of a comment, but I lack the reputation...
If @Michael's answer doesn't work, it could be an issue with lightdm. If so, you can install gdm to get you logged in.

To Install:

$ sudo apt-get install gdm

To (Re)configure /  switch back to lightdm

$ sudo dpkg-reconfigure gdm


How to manually install latest Pepper Flash onto Chromium?

Really, you can't. "Pepper flash" is not from Adobe, but from Google. You can't get the tarball for it from Adobe. What you got from Adobe is almost certainly what you already have. The main problem is that you are on 32-bit, and Google no longer builds Chrome for 32-bit, which means they also no longer build the flash plug-in for 32-bit.

You can install the adobe-flashplugin package, but it will also be stuck at version 11.2.999…


VirtualBox errors out when trying to install Ubuntu (failed to open ISO)

Your ISO file is not the same as the release on the download servers and is probably corrupt. We've determined that from the comments - here's the how and why. In the meantime, just re-download it from a reliable source and check it using md5sum after download against the list of published hashes here: Ubuntu community wiki - UbuntuHashes.

Ubuntu installation media are large sets of downloads. For each file available, Ubuntu publishes SHA1, SHA256 and MD5 checksums (available on your favourite mirror, e.g. here). You can check the integrity of your copy by running the same checksum and verify it is the same as Ubuntu has published. If it matches, then both files are exactly the same1 and you're all set. In a case of a mismatch, several things could have caused it: download from an untrusted source, unreliable network connection, local file system corruption, etc.

Yours didn't match and produced a completely different string. All we know from there is that your image is different than the "official" ones on the Ubuntu servers. This may just be a harmless one-off, but if you downloaded it from an untrusted source, somebody may have altered it without you knowing it. Be careful in such a case.

This is why one should always check the integrity of the files you are running on your PC. Either an ISO or an application package. APT, the package management tool on Ubuntu, will check it for you already by verifying the integrity all the way from the developer last to touch it until it gets installed on your machine. This is done using GnuPG signatures and the keyring installed on your machine to check it against. However, for ISOs to install the operating system on, this isn't available yet, so you'll have to do it manually.

1There's a remote possibility of hash collisions, i.e. two different files producing the same hash. However, that's very very unlikely to be as a result of a coincedence.


How do I determine what is using the folder?

You can use:

sudo lsof +D /var/www/dir_name

Once you know which processes have files open, you can exit those apps, or kill them with the kill command.

If you had a partition mounted to that point, you should  umount first.


How to start Image Viewer in front of other Windows?

This is intentional Gnome Shell behavior. The way this focusing behavior works is if you double click the image or right click and open/open from Open With, the shell will detect if the e.g File Manager is still in focus/on top.
Example, if you opened the image and then clicked back in to the File Manager in the 1-5 seconds it takes to open (perhaps to open something else), it will open in the background. If you have not clicked anything since you opened the image via either double click, Open with or return then it will automatically open that image in the foreground. If this behavior is not occurring the shell is either detecting the wrong activity inside of the File Manager, or something else is stealing focus.
The best way to change this would be to use the Steal My Focus extension, it does not work per application but hopefully that will be possible in the future.
You can install it by clicking THIS and selecting the On/Off toggle switch, then accept to install. Once installed it should begin working automatically.
This should work on 3.2 as well as 3.4.


Is it bad practice to use gksu when writing code in development?

If at all possible, you should probably develop this from a live DVD/USB so that you don't have to worry about making a mistake. Push your work to a remote server just in case and then do all of your development on the live device so if something goes wrong, you can just wipe it and reinstall it without losing any personal data.


Black Screen when I run Tropico 5 in Ubuntu 16.04

Use launch options and type this in

MESA_GL_VERSION_OVERRIDE=4.0 MESA_GLSL_VERSION_OVERRIDE=400 %command%

Source:
http://steamcommunity.com/app/245620/discussions/0/492379439670516309/?ctp=2

I used it, works for me.


How to disable touchpad on Dell Latitude E-Series (E5510, E6510)?

The failure to recognise the touchpad and fallback to identifying it as a PS2 mouse is due to the hardware using a new protocol and the manufacturer not releasing the specs so that a free driver can be written.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/550625

The protocol has been mostly reverse engineered and there is now a fix involving a patched kernel module, but it isn't completely perfect (won't do multitouch) and hasn't yet found its way into the mainstream kernels. See the discussion for details. It also tells you how to do the patch if you feel brave enough to patch your kernel.

If all you want is to be able to quickly and easily disable the touchpad so you can type, then try setting up keyboard shortcuts as follows.

xinput --set-prop "PS/2 Generic Mouse" "Device Enabled" 0

will disable the touchpad while

xinput --set-prop "PS/2 Generic Mouse" "Device Enabled" 1

will enable it again. Being able to turn the touchpad on and off with a simple key combination makes the problem bearable while we wait for a better solution.


Is there a git indicator to get notification on commit, pull?

I think what you want is git-dude.

git-dude

https://github.com/sickill/git-dude

git-dude is a simple git desktop notifier. It monitors git repositories in
current directory for new commits/branches/tags and shows desktop notification if
anything new arrived.

How it works

It simply uses git fetch and parses its output to see what has changed. Then it
formats new commit messages with git log and shows desktop notification with
notify-send / kdialog (Linux) or growlnotify (OSX). All of this in infinite loop.

How does it look

Fedora (Gnome-Shell) :

Ubuntu:

Requirements

On Linux:

notify-send on Gnome (Fedora: libnotify package, Ubuntu: libnotify-bin package)
kdialog on KDE (included in KDE)

On OSX:

growlnotify, from Growl Extras
(Homebrew: growlnotify package)

Installation

$ curl -skL https://github.com/sickill/git-dude/raw/master/git-dude >~/bin/git-dude
$ chmod +x ~/bin/git-dude

* Make sure ~/bin is in your $PATH or put git-dude script somewhere else
on your $PATH.

Usage

git-dude iterates over repositories that live inside the dude directory. This
directory is nothing more than container for cloned repositories of projects
you want to watch.  Name it like you want, here for example we use
~/.git-dude:

$ mkdir ~/.git-dude
$ cd ~/.git-dude

Clone some repositories:

$ git clone --mirror https://github.com/joelthelion/autojump.git
$ git clone --mirror git://github.com/pyromaniac/hoof.git

I recommend git clone --mirror - it doesn't checkout working directory so it
saves some disk space for bigger projects.

Symlinked repositories work too. This way you can monitor already cloned
projects:

$ ln -s ~/code/tmuxinator .

Now run this to monitor pwd:

$ git dude

You can also pass directory name as first argument to specify which directory
to monitor instead of pwd.

$ git dude ~/watched-repos

This way you can have multiple dude directories each being monitored by
separate git-dude process.

Configuration

Global

Set how often git-dude should check for changes (in seconds, default: 60):

$ git config --global dude.interval 30

Set path to icon used by desktop notifications (default: none):

$ git config --global dude.icon ~/.git-dude/github_32.png

Set custom notification command ($TITLE, $DESCRIPTION and $ICON_PATH
environment variables are set when invoking notification command):

$ git config --global dude.notify-command 'gntp-send "$TITLE" "$DESCRIPTION" "$ICON_PATH"'
$ git config --global dude.notify-command 'echo -e "$TITLE\n\n\n$DESCRIPTION" | espeak --stdin -k20 -ven+12'

Per-repository

Set path to icon used by desktop notifications for this repository (default:
taken from global setting):

$ git config dude.icon ~/.git-dude/dm-core/datamapper.png

Tell git-dude to ignore specific repository (if you want to unmonitor it):

$ git config dude.ignore true

Author

Marcin Kulik (http://ku1ik.com/ | @sickill)

To track notifications use Recent Notifications indicator.

In a terminal run:

sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt-get update
sudo apt-get install indicator-notifications

After installing run Alt+F2 unity --replace.

You will find a little mailbox in the panel:
]


Pursing the error log message from catalina.out, finally realized that I got confused when copy-pasting and put the <role> and <user> tags in both tomcat-users.xml and manager.xml. Those tags can only go in tomcat-users.xml. Once the tags were removed from manager.xml, the Manager began working.

To restate, the only contents of manager.xml are

<Context path="/manager"
docBase="/usr/share/tomcat6-admin/manager"
antiResourceLocking="false" privileged="true" />

Would be nice to

Have better error message in the parser
Require the manager.xml to be well-formed
not have the Manager serve a 404 error when a deployment fails.


Ubuntu Installation -> HP 1000 - i3-2370M

You could install via:

LiveCD (Windows)
(MAC) LiveCD
(Ubuntu) LiveCD

And you could install via USB.

USB (Windows)
USB (MAC)
USB (Ubuntu)

Relese Notes:

12.10 Relese Notes
12.04 Relese Notes
12.10 Images and Checksums
12.04 Images and Checksums

I would reccomend 12.04. Have a little try before you install Ubuntu!

Enjoy Ubuntu!


I got the answer I tried some random hits and the solution is...

alias tree="find ./ -type d -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"

By using double quotes " .


MAAS - use different preseeds-scripts based on zone or tag

Because the generic and preseed_master are generated automatically by the template engine Tempita we could access the objects from django / python and decide which parts of a preseed-script is called.

I'm for example created some zones (production, staging) and use different mirrors for the resource that is required. I've modified the generic file to add an extra definition:

{{def example}}
# set repository based on zone name
#·{{node.zone}}
{{if node.zone.name in {'staging',} }}
d-i apt-setup/local0/repository string deb https://repo.example.com/ubuntu staging/
d-i apt-setup/local0/comment string staging repository
d-i apt-setup/local0/key sting http://repo.example.com/repo.key
{{endif}}
{{if node.zone.name in {'production',} }}
d-i apt-setup/local0/repository string deb https://repo.example.com/ubuntu production/
d-i apt-setup/local0/comment string production repository
d-i apt-setup/local0/key sting http://repo.example.com/repo.key
{{endif}}
d-i apt-setup/local1/repository string deb https://repo.example.com/ubuntu common/
d-i apt-setup/local1/comment string common reposiotry
d-i apt-setup/local1/key sting http://repo.example.com/repo.key
d-i pkgsel/include string git jenkins-slave jenkins-scripts ntp
{{enddef}}

This definition could easily called in the preseed_master file via:

{{self.example}}

You could access all node information with the object node. All object / module details could be checked in the source code on /usr/lib/python2.7/dist-packages/maasserver/models/node.py


Is it possible to symlink a ssh command?

What you want is an alias. An alias is made like this:
alias somecommand="someotherverylongcommandwithaverylongcommandname thearguments"
Then, you can run somecommand and it will run the other command. To make it permanent, however, you need to edit your ~/.bash_aliases file. Open it in your prefered text editor and put in the alias command. Then, the alias will be set on bash startup.
Note: You may need to create the ~/.bash_aliases file. Also, ~ is the /home/username folder. Also, the . at the beginning means that the file is hidden.


Why the file isn't running as executable?

The article you linked to recommends downloading unetbootin from the Ubuntu repositories. The unetbootin download site gives the following instructions:

To install UNetbootin from the Ubuntu PPA, run the commands:
sudo add-apt-repository ppa:gezakovacs/ppa

sudo apt-get update

sudo apt-get install unetbootin

You should be able to run the file from your applications menu once install is complete


There is a software for Linux called Timeshift exactly for this purpose. Using Timeshift you can take snapshots of your Linux system regularly and restore them whenever you need.

This software brings System Restore feature of Windows to your Linux distribution.

A short description from its official website:

  TimeShift for Linux is a application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS. TimeShift protects your system by taking incremental snapshots of the file system at regular intervals. These snapshots can be restored later to bring your system to the exact state it was in at the time when the snapshot was taken.

  Snapshots are taken using rsync and hard-links. Common files are shared between snapshots which saves disk space. Each snapshot is a full system backup that can be browsed with a file manager.


Ubuntu 12.04 audio playback silent (Vista stutters, Fedora normal)

Discovered the solution with the help of this post.

Around the time I installed Pianobar and Pithos, I installed the Roar audio server (not sure why; presumably as part of one of those installations). Roar seems subsequently to have taken over management of the audio. Uninstalling roaraudio and its dependencies solved the problem immediately.


How to copy an entire command line to my clipboard, without the mouse?

My answer offers a simple command in three different syntaxes, which all work equally, but one is a bit shorter and easier to type than the second. The third variation is a so-called alias, that means you can assign the command a custom name and call it by executing that without having to remember the complex stuff.

Preparation:

First, install the package xsel which allows you to access the X clipboard from the terminal:

sudo apt-get install xsel

Command variation 1 (short):

After that, you can type the following line to copy the previous command to the clipboard:

xsel -ib <<<!!:q

If you want to copy the second latest command, replace !! with !-2, for the third latest use !-3 and so on.

To explain what you're running, here a short break down of the command:

xsel is a command-line tool to access the X clipboards.
For more info, read it's manpage online  or by running man xsel.

The -i parameter tells xsel to read from the stdin (usually this means keyboard input, but we're going to redirect something here)
The -b parameter specifies to use the clipboard instead of X's "primary" or "secondary" selections.

<<< is a special Bash syntax called "Here String".
It basically expands (not evaluates!) the argument (only one!) after it and redirects it as string to the stdin (standard input) of the command before/after which it stands.
!!:q is called a "bang command" for history expansion in bash. It replaces itself with any previously typed command line.
For more info, read it's local manpage by running man history (online manpage is not helpful).

The !! stands for the previous command line and is a synonym for !-1.
Obviously !-2 means then the second last command line. Don't forget the minus sign -, otherwise it will return the 2nd (3rd/...) command you have ever typed.
The :q modifies the bang command and tells bash to enclose the substitution in single quotes (') to prevent further expansion by the shell.

Command variation 2 (slightly longer):

echo !!:q | xsel -ib

echo has the simple job of printing all its arguments to the terminal's stdout.
!!:q is called a "bang command" for history expansion in bash. It replaces itself with any previously typed command line.

The !! stands for the previous command line and is a synonym for !-1. Obviously !-2 means then the second last command line. Don't forget the minus sign -, otherwise it will return the 2nd (3rd/...) command you have ever typed.
The :q modifies the bang command and tells bash to enclose the substitution in single quotes (') to prevent further expansion by the shell.

| is a pipe. It redirects the terminal output ("stdout") of the command before it to the terminal input ("stdin") of the command after it.
xsel is a command-line tool to access the X clipboards.
For more info, read it's manpage online  or by running man xsel.

The -i parameter tells xsel to read from the stdin (usually this means keyboard input, but we're going to redirect something here)
The -b parameter specifies to use the clipboard instead of X's "primary" or "secondary" selections.

Command variation 3 (alias):

A bash alias is a cool thing if you don't want to remember long or complicated commands you often use. You can assign this command to a simple alias name, which you can run instead of the long command to achieve the same.

Unfortunately, as bang commands are a special Bash feature and get expanded before aliases are resolved, you can't simply alias one of the variations above because the !! part will not work. There's a workaround though.

To set the alias, run the following line in your terminal. Note that you may chose any valid Bash variable name instead of copylastcommand:

alias copylastcommand='history -p \!\! | xsel -ib'

This is however only persistent for your current Bash session, which means the alias will vanish after you close the terminal window. You can make it persistent in every of your Bash sessions by adding this line above to the end of your ~/.bashrc file, or to your ~/.bash_aliases file if you have one.

Again, a short break down of the line:

alias name='command' is the syntax to set an alias in Bash. The command will be run whenever you execute name from now on.
history -p \!\! outputs the previously executed command line to stdout (standard output). Without the -p switch, it would not only print but also run the command again.
Note that we need to escape the bangs (!) with backslashes (\), because otherwise bash would expand them when we try to set the alias, which makes no sense as they need to be in the alias as they are.
Again, you can also specify the [n]-th recent command by replacing the second bang with -n, e.g. \!-2.
| is a pipe. It redirects the standard output ("stdout") of the command before it to the terminal standard ("stdin") of the command after it.
xsel is a command-line tool to access the X clipboards.
For more info, read it's manpage online  or by running man xsel.

The -i parameter tells xsel to read from the stdin (usually this means keyboard input, but we're going to redirect something here)
The -b parameter specifies to use the clipboard instead of X's "primary" or "secondary" selections.


Help! My wallpaper is broken after installing Pantheon Shell?

A possible fix is:

Install dconf-tools

sudo apt-get install dconf-tools

Open dconf-editor
Navigate to: desktop -> wallpaper -> picture path.
Type/paste the path to your wallpaper and press enter.

This should fix the problem.


With GIMP, how do I hide all layers except the current one?

Version 2.6

Shift+ Click on the eyeball, on the layer you want to remain visible.

Version 2.8

Installed from http://www.noobslab.com/2012/04/install-gimp-28-on-ubuntu-1204-precise.html

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp

Gimp 2.8 will still toggle visible layers using Shift+Click on the eyeball, but now with layers within Layer Groups Gimp will respect layers that are invisible, or visible within a Group, There is a discussion here by developers - 1

What this means is that when you make a layer invisible within a group, it will stay invisible when toggling visibility of other layers and groups.

Before toggle and after toggle, I am toggling the visibility of the layer pointed to by the red arrow-
----------------
Notice that the layer within the layer group stays invisible when toggling the other layers with Shift+Click

Now for the bad news, This also means that When trying to toggle the visibility of many layers Within a layer Group It does not work, only selecting the visibility of the group as a Whole,

Notice that I am toggling the visibility of the layer pointed to by the red arrow, yet only the layers outside the group are affected.

I have not found any workarounds for this behavior yet.


How to download steam games and install it on a computer offline?

easiest Way would be to link the Archive to the other Computer in Steam Options so you dont have to move Files, Performance may vary though. Or the other Way around, install the Archive from the Online-Machine directly on the Offline one by changing the Archive Folder in Steam Options.


I found a solution to my problem. I just used a different USB-thumb drive, and that did the trick.

Thanks


I'm getting this "You should replace this file (located at /var/www/html/index.html)" after update to v14.4 ubuntu

Apache configuration files live in /etc/apache2. You can use the cd command to change to the appropriate directory:

cd /etc/apache2

There are several ways to edit configuration files. The easiest to learn is nano. You'll also probably need to use sudo to edit Apache's configuration. Thus:

sudo nano apache2.conf

You need to change Apache's DocumentRoot directive (or VirtualDocumentRoot). Which file it is in depends on your specific configuration. I'd recommend looking first in /etc/apache2/apache2.conf as well as whatever may be in /etc/apache2/sites-enabled.

If you search the Apache website for DocumentRoot, you'll find a lot of useful documentation. In general, Apache's documentation is quite good.

After you make changes to the configuration, you'll have to restart Apache for them to take effect:

sudo service apache2 restart

EDIT

I just realized something important: Since when you upgraded you blindly answered each question without finding out what you were doing first, it's highly likely that you hosed your Apache configuration, and there are probably quite a few things wrong beyond this one issue. (You may have also hosed the configuration of other software on the machine, as well.) I'd recommend that you get /etc/apache2 from backup and carefully compare the two versions to decide how to reconstruct your configuration. If you don't have backup, then you'll have a lot of fun!

One key difference between Linux and Windows: Windows installers ask lots of pointless questions, leading to the "next, next, next" phenomenon. But Linux tends not to ask pointless questions. So if it asks a question, be careful how you answer it, because it is probably important.

EDIT 2

Wait a second. The files ending in .dpkg-old are the versions of the files pre upgrade. They should contain the correct configuration. You can probably compare them with the non-suffixed files to discover the correct configuration.

Use the diff command to see the differences between two files. Use nano to edit a file, and cp to make a copy of a file (or a backup in case something goes wrong). mv will move or rename a file, and rm will permanently delete a file without confirmation and without a recycle bin. So be careful. To learn how to use a command, use man: e.g., man diff.


Just able to solve the issue and hope its better to post the solution rather than deleting the question.
The link (https://ubuntuforums.org/showthread.php?t=2323700) contains the answer.
i.e. run

lsmod | grep acer

and there will be several entries appear in the console. If acer_wmi is in the output then enter,

echo "blacklist acer_wmi" | sudo tee -a /etc/modprobe.d/blacklist.conf

and then reboot.

Hope this helps somebody.


I was looking around on how to replace the default Japanese font quite some time back as well. I found a solution by akai_kenshi at that time, but I don't know if it still works or not (it should). It shouldn't mess up your system even if it fails though, so give it a try:
http://ubuntuforums.org/showthread.php?t=1588772&p=9940183#post9940183

Quoting the solution here in case URL breaks in the near future:

  1) Open a terminal.

  2) Type:

sudo gedit /etc/fonts/conf.d/69-language-selector-ja-jp.conf

  3) Copy and paste this code into the opened file:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- Japanese (ja) -->
    <match target="pattern">
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>DejaVu Serif</string>
            <string>Takao P明朝</string>
            <string>IPA P明朝</string>
            <string>IPA モナー P明朝</string>
            <string>梅P明朝</string>
            <string>さざなみ明朝</string>
            <string>東風明朝</string>
        </edit>
    </match>

    <match target="pattern">
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>DejaVu Sans</string>
            <string>Takao Pゴシック</string>
            <string>IPA Pゴシック</string>
            <string>IPA モナー Pゴシック</string>
            <string>UmePlus P Gothic</string>
            <string>梅Pゴシック</string>
            <string>VL Pゴシック</string>
            <string>さざなみゴシック</string>
            <string>東風ゴシック</string>
        </edit>
    </match>

    <match target="pattern">
        <test qual="any" name="family">
            <string>monospace</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>DejaVu Sans Mono</string>
            <string>Takaoゴシック</string>
            <string>IPAゴシック</string>
            <string>IPA モナー ゴシック</string>
            <string>UmePlus Gothic</string>
            <string>梅ゴシック</string>
            <string>VL ゴシック</string>
            <string>さざなみゴシック</string>
            <string>東風ゴシック</string>
        </edit>
    </match>

    <match target="pattern">
        <test qual="any" name="family">
            <string>Ryumin</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Takao P明朝</string>
            <string>IPA P明朝</string>
            <string>IPA モナー P明朝</string>
            <string>梅P明朝</string>
            <string>さざなみ明朝</string>
            <string>東風明朝</string>
        </edit>
    </match>

    <match target="pattern">
        <test qual="any" name="family">
            <string>GothicBBB</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Takao Pゴシック</string>
            <string>IPA Pゴシック</string>
            <string>IPA モナー Pゴシック</string>
            <string>UmePlus P Gothic</string>
            <string>梅Pゴシック</string>
            <string>VL Pゴシック</string>
            <string>さざなみ ゴシック</string>
            <string>東風ゴシック</string>
        </edit>
    </match>

    <match target="font">
        <test name="family" compare="contains">
            <string>Takaoゴシック</string>
            <string>Takao Pゴシック</string>
            <string>TakaoExゴシック</string>
            <string>Takao明朝</string>
            <string>Takao P明朝</string>
            <string>TakaoEx明朝</string>
            <string>IPAゴシック</string>
            <string>IPA Pゴシック</string>
            <string>IPAexゴシック</string>
            <string>IPA明朝</string>
            <string>IPA P明朝</string>
            <string>IPAex明朝</string>
            <string>IPA モナー ゴシック</string>
            <string>IPA モナー Pゴシック</string>
            <string>IPA モナー UIゴシック</string>
            <string>IPA モナー 明朝</string>
            <string>IPA モナー P明朝</string>
            <string>梅ゴシック</string>
            <string>梅ゴシックC4</string>
            <string>梅ゴシックC5</string>
            <string>梅ゴシックO5</string>
            <string>梅ゴシックS4</string>
            <string>梅ゴシックS5</string>
            <string>梅Pゴシック</string>
            <string>梅PゴシックC4</string>
            <string>梅PゴシックC5</string>
            <string>梅PゴシックO5</string>
            <string>梅PゴシックS4</string>
            <string>梅PゴシックS5</string>
            <string>梅明朝</string>
            <string>梅明朝S3</string>
            <string>梅P明朝</string>
            <string>梅P明朝S3</string>
            <string>梅UIゴシック</string>
            <string>梅UIゴシックO5</string>
            <string>UmePlus Gothic</string>
            <string>UmePlus P Gothic</string>
            <string>VL ゴシック</string>
            <string>VL Pゴシック</string>
            <string>さざなみゴシック</string>
            <string>さざなみ明朝</string>
            <string>東風ゴシック</string>
            <string>東風明朝</string>
            <string>TakaoGothic</string>
            <string>TakaoPGothic</string>
            <string>TakaoExGothic</string>
            <string>TakaoMincho</string>
            <string>TakaoPMincho</string>
            <string>TakaoExMincho</string>
            <string>IPAGothic</string>
            <string>IPAPGothic</string>
            <string>IPAexGothic</string>
            <string>IPAMincho</string>
            <string>IPAPMincho</string>
            <string>IPAexMincho</string>
            <string>IPAMonaGothic</string>
            <string>IPAMonaPGothic</string>
            <string>IPAMonaUIGothic</string>
            <string>IPAMonaMincho</string>
            <string>IPAMonaPMincho</string>
            <string>Ume Gothic</string>
            <string>Ume Gothic C4</string>
            <string>Ume Gothic C5</string>
            <string>Ume Gothic O5</string>
            <string>Ume Gothic S4</string>
            <string>Ume Gothic S5</string>
            <string>Ume P Gothic</string>
            <string>Ume P Gothic C4</string>
            <string>Ume P Gothic C5</string>
            <string>Ume P Gothic O5</string>
            <string>Ume P Gothic S4</string>
            <string>Ume P Gothic S5</string>
            <string>Ume Mincho</string>
            <string>Ume Mincho S3</string>
            <string>Ume P Mincho</string>
            <string>Ume P Mincho S3</string>
            <string>Ume UI Gothic</string>
            <string>Ume UI Gothic O5</string>
            <string>Ume Gothic</string>
            <string>Ume P Gothic</string>
            <string>VL Gothic</string>
            <string>VL PGothic</string>
            <string>Sazanami Gothic</string>
            <string>Sazanami Mincho</string>
            <string>Kochi Gothic</string>
            <string>Kochi Mincho</string>
        </test>
        <test name="pixelsize" compare="less_eq">
            <double>18</double>
        </test>
        <edit name="hintstyle" mode="assign">
            <const>hintnone</const>
        </edit>
        <edit name="embeddedbitmap">
             <bool>false</bool>
        </edit>
    </match>
    <!-- Japanese (ja) ends -->
</fontconfig>

  4) Save the file, close it, and restart your computer.

  You should now have a desktop with a nice looking English and Japanese
  font display, and you can install as many Japanese fonts as you like
  without altering it.

The only difference here is that you'll want to place whatever you want to be loaded first at the top of every font family if you want them to be the first font candidate for loading.

Another method which is far simpler and faster, and doesn't involve a reboot. Not the proper way of going about it, but it's an alternative and probably the fastest way.

Install something that you have no need for, but would replace your current default font.
I used the example that I found fonts-arphic-uming, it's a Chinese font but it overwrites your default Japanese font:

sudo apt-get install fonts-arphic-uming

Change your working directory to /etc/share/fonts/truetype for convenience' sake since the fonts are all in that directory:

cd etc/share/fonts/truetype

Replace /etc/share/fonts/truetype/arphic/uming.ttc with the font of your choice (I assume your ukai.ttc font is in /etc/share/fonts/truetype/arphic/ in this case):

sudo cp arphic/ukai.ttc arphic/uming.ttc

Should do the job pretty well. Every time I notice my Japanese fonts changed after installing something, I remove and reinstall fonts-arphic-uming and do the same thing again.

I highly recommend using something else other than UKai though, as it's a Chinese font and some kanji characters won't load, in which case it will switch to loading the next available Japanese font if available, or simply showing a box for said kanji.


“English (US, International with dead keys)” missing on Ubuntu 18.04

The menu with the keyboard-layouts is bit hidden in Gnome. To set your keyboard-layout open language-settings and click the Plus-Button(+) at the bottom left. Than add your language again and after that the sub-menu with the keyboard-layouts will open.
The full path to reaching the option is: Settings app -> Region & Language -> Click the + icon in Input Sources -> Select your main language -> Select the keyboard layout from the sub-menu


Import the Public Key with the following command. Then update:

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 241FE6973B765FAE


Difference between Dnsmasq and Dnsmasq-base

Difference
dnsmasq package require dnsmasq-base package as dependecy
See packages details for dnsmasq and dnsmasq-base
If your Ubuntu setup has some package conflicts, see how to resolve it:
https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure
Feature dns and dhcp
Of course yes, dnsmasq is made that for
How to...
Simply as docs describe it :)
You asked quite same question earlier, some answers where posted.
See those too:
Configuring DHCP-Server using dnsmasq
home server DNS with dnsmasq
How to Add dnsmasq and keep systemd-resolved (18.04)
https://help.ubuntu.com/community/Dnsmasq


Command to perform a recursive chmod to make all .sh files within a directory executable?

To make this possible you can use the find command and search for all  files with a .sh extension and then run the chmod command on each one found:

find /directory/of/interest/ -type f -iname "*.sh" -exec chmod +x {} \;

Information:

-type f: Normal files only (skip directories, symlinks, named pipes and sockets, and the special files found in /dev)
-iname: Ignore case in the name
"*.sh": Globbing, telling the find command to search for files with ".sh" extension
-exec chmod +x {}: This tells the find command to carry out a chmod command on each found file. Making each executable
\;: Indicating end of command


taking ANDROID_HOME PATH error while building cordova project

The key is in /etc/profile and to remove double quotation

try putting your environment variable in /etc/profile then make a reboot for your computer

export PATH=${PATH}:~/android-sdk-linux

without double quotations


How can I (install and) use the cloop device in Ubuntu?

Unfortunately Ubuntu 12.04 doesn't include the cloop.ko module needed to have a compressed loopback device. However, it's very easy to add it to the running kernel.

I found it on this page (not sure if it's the latest version but compiles and works well), so I wget'd and uncompressed this file. The configure seems to be already included inside the Makefile so running:

make

is enough to build the module correctly. The package also contains the advfs utility, the original name for the command create_compressed_fs whose synopsis can be found here.

I copied the modules in /lib/modules with:

sudo cp cloop.ko /lib/modules/`uname -r`

but this step is not mandatory. Then one can choose to use the advfs or install the ubuntu package cloop-utils that provides the same utility with another name. I chose the package option because it's cleaner (I also suggest to install pv to have a nice progress bar):

sudo aptitude install cloop-utils pv

Now the compressed image can be created through the create_compressed_fs utility, and can be subsequently assigned to the /dev/clooop0 device passing the filename as parameter to the module cloop.ko. Honestly I didn't find a better way to pass the filename to the cloop module and this poses a problem if one wants to mount multiple compressed images in different time frames. However, for the moment I don't have this problem, so this script has been more than adequate for my needs.

#/bin/sh -e

INPUTDEVICE="/dev/sda1"
OUTPUTFILE="/tmp/dev-sda1.cloop.img"
BLOCKSIZE="1048576"
NUMBLOCKS="2000"
COMPRESSIONLEVEL="9"
#COMPRESSIONLEVEL="-1" # for 7zip compression (untested)
CLOOPLOGFILE="/tmp/cloop-creation.log"
CLOOPBLOCKSIZE="64K"

dd if="$INPUTDEVICE"  bs="$BLOCKSIZE" count="$NUMBLOCKS" | pv -s "$((NUMBLOCKS * BLOCKSIZE))" -Wpetr | create_compressed_fs -L "$COMPRESSIONLEVEL" -B "$CLOOPBLOCKSIZE" -s "$NUMBLOCKS"M - "$OUTPUTFILE" > "$CLOOPLOGFILE" 2>&1

insmod /lib/modules/`uname -r`/cloop.ko file="$OUTPUTFILE"

mount -o ro /dev/cloop0 /mnt/cloop

Some other information can be found on the Knoppix wiki about cloop devices, here.


Download this file and save it in "Downloads":

http://media.cdn.ubuntu-de.org/forum/attachments/04/32/2480236-Broadcom_Firmware.tar.gz

Installation

cd ~/Downloads/
sudo tar xvf 2480236-Broadcom_Firmware.tar.gz -C /lib/firmware/

Reboot. From here:
http://forum.ubuntuusers.de/topic/netzwerkkarte-nach-deaktivierung-im-autostart/#post-2480236


You can try HDA-analyzer

The HDA analyzer tool provides a graphical interface to access the raw HD-audio control, based on pyGTK2 binding. The program gives you an easy-to-use GUI stuff for showing the widget information and adjusting the amp values, as well as the proc-compatible output.

This tool can parse also proc files (/proc/asound/card#/codec*) and output from alsa-info.sh script and monitor mode

Open this command on terminal:

Get the basic run.py script:

wget -O run.py http://www.alsa-project.org/hda-analyzer.py

Quick run:

python run.py

Quick help:

python run.py --help

Quick alsa-info.sh file analyzer:

python run.py /tmp/alsa-info.txt

Quick monitor mode:

python run.py --monitor


how to attach pen drive, and external HDD in ubuntu?

Use blkid to view the list of disks and partitions. Note which one is your pendrive, example: sdc3
Create a folder where to mount sdc3 : mkdir /path/to/myfolder
Finally attach it (=mount it) mount /dev/sdc3 /path/yo/myfolder

To "eject"
umount /dev/sdc3 or umount /path/to/myfolder


pygmentize will output a colorized source code file. It has support for many languages. It determines how to color it based on the file extension or  the value you provide with the -l option. To get pygmentize install the python-pygments package.


There are several ways to do this:

Use a PPA to provide your package. This is probably the easiest and fastest way. See https://help.launchpad.net/Packaging/PPA and How do I create a PPA?
Check if Debian already provides a newer version of the package. If so, it usually will be available in the next major version of Ubuntu.
Contact the maintainer of the Ubuntu package and offer your help
Contact the maintainer of the Debian package and offer your help
If the package is not in Debian, you can also try to maintain the package. If you get the package in Debian sid (unstable) it usually will be part of the next major version of Ubuntu. This will take of course some time as the new maintaincer process can be time-consuming. See also http://mentors.debian.net/intro-maintainers and http://mentors.debian.net/


converting djvu to pdf trouble with this OCR preserving code

I fixed the file /home/steven/Documents/djvu2pdf/1/Intro.djvu. Turns out all my djvu files had no extensions, but linux was opening them anyways.

Testing with a single page document

I first ran cd /home/steven/Documents/djvu2pdf/1/

Then ran:  djvu2hocr -p 1 1.djvu

  DjVu hidden text layer

- Page #1
Traceback (most recent call last):
  File "/usr/bin/djvu2hocr", line 7, in
    _.main(sys.argv)
  File "/usr/share/ocrodjvu/lib/cli/djvu2hocr.py", line 323, in main
    process_page(page_zone, options)
  File "/usr/share/ocrodjvu/lib/cli/djvu2hocr.py", line 263, in process_page
    result = process_zone(None, page_text, last=True, options=options)
  File "/usr/share/ocrodjvu/lib/cli/djvu2hocr.py", line 238, in process_zone
    parent.append(child)
AttributeError: 'NoneType' object has no attribute 'append'

The command:
djvu2hocr -p 1 1.djvu > tmp.html did the same thing

Converting '1.djvu':
- Page #1
Traceback (most recent call last):
  File "/usr/bin/djvu2hocr", line 7, in
    _.main(sys.argv)
  File "/usr/share/ocrodjvu/lib/cli/djvu2hocr.py", line 323, in main
    process_page(page_zone, options)
  File "/usr/share/ocrodjvu/lib/cli/djvu2hocr.py", line 263, in process_page
    result = process_zone(None, page_text, last=True, options=options)
  File "/usr/share/ocrodjvu/lib/cli/djvu2hocr.py", line 238, in process_zone
    parent.append(child)
AttributeError: 'NoneType' object has no attribute 'append'

sed 's/ocrx/ocr/g' tmp.html > pg1.html

I got a html & tmp.html saying this

http://pastebin.com/APwUPwk4

Had to post it there b/c for whatever absurdd reason this site won't allow me to post that code, using html, code, pre tags none worked
Also what exactly is a pipe, more so where did I miss it in that post? I am new to the terminal in linux, just learning by google searches


The short answer is that any of these sorts of APIs which are usable, are exposed at higher level via the QML SDK. Not all APIs are usable in production apps which you wish to ship in the store, however, due to security and privacy concerns and restrictions in the system.

If you aren't planning to release your app into the Ubuntu Store, then you can basically use any of the APIs you wish, but you may need to install additional packages in the build environment, in order to build your app. You will also need to declare the security profile as unconfined (this will result in your app being flagged for manual review if you attempt to upload it to the Ubuntu Store site, and it's unlikely such an app would be approved).


gzip_http_version 1.1; in Nginx, when using HTTP/2

gzip_http_version is the minimum version of the HTTP protocol of the request (coming from client) needed to compress the response from server. It defaults to 1.1.

So, any user agent that is sending request using protocol version 1.0, won't get the response compressed from server; the response would go as-is. Note that, setting the value to 1.1 would probably hurt very very tiny subset of crowd (probably someone with Win XP, which is unsupported now BTW), if any.

To answer your question:

  Can this make some conflict with some packets sent in HTTP/2?

No, as nginx would handle requests differently based on the value of $server_protocol variable (one of HTTP/1.0, HTTP/1.1, HTTP/2.0).

As a side note, as Transfer-Encoding header is not supported in HTTP/1.0 you should not set gzip_http_version to 1.0. Otherwise, you would not get keepalives as Content-Length header is not set when gzip_http_version is used; HTTP/1.1 tackles this using Transfer-Encoding: chunked header.


Unnoticingly I deleted a directory. Is there a way to recover it?

You CAN'T unmount the root partition, while it's in use, that's impossible.
The only way to give it a try is to boot the LIVE-CD and try to fix it from there.

It would be best, if you don't use the system any longer, because the blocks are set to "unused" by the system. The longer you use this system, the bigger the chances are, that you override your data with other stuff.

Get out of the system now, boot a live cd, open up the link and follw the instructions.

I wish you all the luck in the world, you'll need it.

Better backup your data in the future ;-)


For libraries and header files, you have to install the developer packages, often the package name with the -dev prefix appended.

The termcap library and headers are part of the libncurses5-dev package, which can be installed using:

sudo apt-get install libncurses5-dev

Additionally, if you just want to build a newer version of a package, consider using the build-dep command to fetch all known dependencies for the package that is currently in the repositories. For instance:

sudo apt-get build-dep nmon

Would install the following packages (if not already installed):

debhelper libncurses5-dev hardening-wrapper


What upgrade options for non-PAE machine?

This is Xubuntu 12.04.4 LTS, still supported and ok for any non-PAE machine. By the way, speaking of PAE, I am using right now some PAE version of ubuntu on my non-pae machine. It is Ubuntu LTS but still, it is working. I even managed to upgrade the kernel, no harm done so far.


If you've been starting graphic applications from the terminal using sudo, that's what probably caused your problem. Always use sudo -H.

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type:

 - sudo mount -o remount,rw / # remount the disk as rw

 - cd /home/your_username # change directory

 - ls -al .*thority* # list some files

You should see something like this...

-rw------- 1 your_username your_username 407910 Nov  2 08:56 .ICEauthority
-rw------- 1 your_username your_username     58 Jun 23  2017 .Xauthority

If it DOES NOT show -rw------- then...

sudo chmod 600 .*thority* # change file protection

If it DOES SHOW root root then...

sudo chown your_username:your_username .*thority* # change file ownership
reboot # reboot the computer

Reboot and see if you can log in.


How to find out ip address of AP im connected to? Not Router

Your Trendnet WiFi AP should get an ip from your router dhcp on his ethernet adapter.

So if you want to know this ip address, check the dhcp server

But it seems that there is no web server on the Trendnet AP, configuration must be done with a setup utility you can find on the Trendnet support website : Trendnet support for TEW-637AP


Trying to install 3 different versions of Ubuntu for triple-boot (no Windows)

No problem.
That is normal when you have 2 or more operating systems.
Pretty simple. Assume you have an empty disk and boot into the installation and are at the partitioning setup.

create 4 partitions. Ubuntu OS needs a root of about 25Gb that can include a /home/. 25Gb is more than enough if you keep your own data outside of the system (ie. out of / and out of /home).
mount the 1st of those 4 as /
mount the bottom one as /data/ or whatever name you want. Make it ext4.
install system 1.

when done install system 2.
mount the 2nd partition as /
mount the bottom one as /data/ -without- formatting.

when done install system 3
mount the 3rd partition as /
mount the bottom one as /data/ -without- formatting.

Some extras:

Try to avoid sharing /home/.* and just stick to the subdirectories. This will avoid any kind of conflict between releases.
if you want you can expand each of these with a boot.
Opt for adding a partition for /opt. If you install 3rd party software that is the most ideal directory to use and there is a good chance you can then use the software on all 3.
use the same usernames and userIDs on all systems.
copy from 1 system all the directories in /home/ to /data/.
When done remove all the -directories- in each of the /home/'s and edit .config/user-dirs.dirs in each of the systems to point to /data/.

And you are done.

I do believe though there is an easier method nowadays.

Install 16.04 as explained at the 1st part with a /data/ disk. It is the latest LTS so has a long support.
Install virtualBox or VM Ware. Install 2 systems into that.
Install guestadditions for VBOX or WM Ware tools for VM Ware and mount the /data/ in the 2 systems.

Big plus for this: you can start all 3 systems at the same time. No picking a system at boot time. Adding more other operating systems is a lot easier an removing a system it also a lot easier. Backup means creating a copy of your container. And you can even multiply containers.


Why does static IP in Ubuntu 16 work only like this?

"Can anyone explain this please?" Yes, your interfaces file is seriously deficient. You have not specified a gateway nor the very important DNS nameservers.

I suggest that you amend the file to:

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.18
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 192.168.1.1

allow-hotplug eth0

Please be certain that the specified static IP address is outside the DHCP range in the router to avoid collisions.

Restart the interface:

sudo ifdown eth0 && sudo ifup -v eth0

Confirm that you are connected:

ping -c3 www.ubuntu.com


How can I install netbook edition without losing Windows?

Check this out http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfect-harmony

Also, I think you could try the ubuntu-desktop image, install it and then in Ubuntu install unity package (the netbook-edition environment).


How to install extra packages -want Konsole

There are many ways that you can install applications under Ubuntu, some of the ways that you can use are:

Use the Ubuntu Software Center

Use Synaptic

To install synaptic, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install synaptic

For more information check out Installing Software


If the default kill command doesn't work, try it with the -9 option (as root):

sudo kill -9 21106

More info about kill can be found in: man kill

The -9 option means SIGKILL (see below table taken from man signal for details)

Signal     Value     Action   Comment
──────────────────────────────────────────────────────────────────────
SIGHUP        1       Term    Hangup detected on controlling terminal
                              or death of controlling process
SIGINT        2       Term    Interrupt from keyboard
SIGQUIT       3       Core    Quit from keyboard
SIGILL        4       Core    Illegal Instruction
SIGABRT       6       Core    Abort signal from abort(3)
SIGFPE        8       Core    Floating point exception
SIGKILL       9       Term    Kill signal


Two NICs and routing between the interfaces

You state in comments that you don't want subnet traversal.  You've already got this, then, with the not being able to reach eth0 from eth1 and vice versa, so your issue is already resolved.

If you have some other question, though, you need to be more specific with what you're asking.  (The reverse proxying happens transparently, you won't be able to reach eth0 from eth1 or vice versa, not without going through nginx on the reverse proxy server).

  The below is kept for historical reasons.

I'm curious why this is tagged nginx, because this is not an NGINX issue, it's a case of you trying to go from inside (eth1 and the internal subnet) to outside (eth0, and the public Internet) without a router (or a system configured as a router) in place or a rule to let your 'server' act as a proxy from inside->out (which is NOT a reverse proxy).

NGINX is not a proxy or router.  A reverse proxy will say "OK, so send this request to the backend, abc."  Then, it'll say "ABC: Send me the response", which will send the initial request made from outside to the internal server.  That then gets you the response from backend 'abc' at the nginx server.  That is returned by nginx to the requesting client.

A reverse proxy also only works outside -> in.  This diagram shows basically how that looks from outside going in:

The reverse path works, but only because the Reverse Proxy System (nginx) is waiting for response from the backends, and then hands that data back to the Web Browser or remote client making the request for information and expecting a response back.

The reverse path, however, does NOT permit you to go from eth1 on the Reverse Proxy to eth0 on the Reverse Proxy via the Remote Proxy system - that's not how IP routing works, and to achieve what you're looking to achieve, you need a real router in place that can handle network traversal from the Internal IPs to the outside, and then back to the Public IP address of eth0 on the reverse proxy box, so it'd look like this:

The data traversal here, then, would be from the internal boxes, through the router box they're connected to, out to the Internet, and then from the Internet back to your eth0 box. (The most basic way of explaining this of course).

However, your Reverse Proxy box does not double as a router, so it doesn't work in the way you're thinking it does.

On another note:

You don't get to ping from internal (which goes to eth1) to eth0 directly, which is on a completely different subnet unless you go through an actual router and go outside then back in.  Unless you set up your server that also has nginx on it to be a router, which from your comments appears to not be the case.  So, this "not able to ping across interfaces and subnets" is expected behavior.


The easiest way to do this would be to ensure "Hidden Files" is selected, so that you can see those dot-directories:

This will give you something like:

If you don't want the hidden directories and files to be visible all the time, uncheck "Show Hidden Files". Nice and simple


How to copy data between different instances of vim?

First you must install a clipboard-enabled version of vim. To accommodate users with non-graphical environments (eg Ubuntu Server users), vim and vim-tiny do not hook into this capability. You'll want to install GVim , which be launched either graphically or in your terminal. GVim will replace the vim command.

You can yank the text into the 'cut buffer' from the first vim, and then paste the text into the second vim. To copy to the global cut buffer, use the + register. The " key allows you to specify which register to use when doing a yank or paste operation.

In the first vim, yank a line into the + register:

"+yy

then, to paste from the + register in the second vim:

"+p

For more information on the registers available, check out :help registers. You can also use "+p to paste text copied from any other source on your system.


How to create a deb package when upstream developer has not a release a tarball

Actually, Github provides a way to export zip source archive, check right side of repository home:

https://github.com/manojgudi/sandhi/archive/master.zip
Another way is to make it yourself from git clone, using CMake & Make:

mkdir build
cd build
cmake ..
make dist

Reference: CMake and “make dist”


NOTE: You will need root/sudo privileges for this.

The GUI Method:

Assuming you're using Unity, click the gear in the top right and click "System Settings".

You should then be presented with this window:

Then, in the bottom row, click "Software and Updates".

You'll then be presented with this window:

Now, check/uncheck the sources that you want to enable/disable. You'll be asked for YOUR password on the first click.

The CLI (Command Line Interface) Method:

With your favorite editor, open the file /etc/apt/sources.list.

It'll look something like this:

# deb cdrom:[Ubuntu 14.10 _Utopic Unicorn_ - Release amd64 (20141022.1)]/ utopic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ utopic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ utopic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ utopic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic universe
deb http://us.archive.ubuntu.com/ubuntu/ utopic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ utopic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ utopic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu utopic-security main restricted
deb-src http://security.ubuntu.com/ubuntu utopic-security main restricted
deb http://security.ubuntu.com/ubuntu utopic-security universe
deb-src http://security.ubuntu.com/ubuntu utopic-security universe
deb http://security.ubuntu.com/ubuntu utopic-security multiverse
deb-src http://security.ubuntu.com/ubuntu utopic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu utopic partner
deb-src http://archive.canonical.com/ubuntu utopic partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu utopic main
deb-src http://extras.ubuntu.com/ubuntu utopic main
## Depôt MultiSystem
## Depôt MultiSystem
deb http://liveusb.info/multisystem/depot all main

This file is well documented (commented). To enable a source, remove the # in front of the line. To disable it, add a #.

That's it! :)


How do I set up a PPTP VPN on my own Ubuntu Server?

The Absolute Minimum Server Setup

What follows are the absolute minimum instructions that you need to get a basic PPTP VPN server running under Ubuntu. Clients will then be able to VPN into the server and route  their internet traffic so that it goes through the server to the internet. As always, consult the full documentation to understand what everything is doing.

First, install the required software:

sudo apt-get install pptpd

Second, enable ip_forward in the kernel for IPv4 by uncommenting the associated line in /etc/sysctl.conf:

sudo sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' /etc/sysctl.conf
# Reload the config file to have the change take effect immediately.
sudo -i sysctl -p

Third, enable NAT (if it isn't enabled already) so that users on the private VPN network can have their packets routed out to the internet:

OUTIF=`/sbin/ip route show to exact 0/0 | sed -r 's/.*dev\s+(\S+).*/\1/'`
sudo -i iptables --table nat --append POSTROUTING --out-interface $OUTIF --jump MASQUERADE
# Enable NAT on boot from the rc.local script.
CMD="iptables --table nat --append POSTROUTING --out-interface $OUTIF --jump MASQUERADE"
sudo sed -i "\$i$CMD\n" /etc/rc.local

Note: This guide assumes you have no firewall configured on the server. If you have a firewall on the server, such as UFW, consult the relevant documentation instead.

Fourth, for each VPN user, create an account in the file /etc/ppp/chap-secrets. Replace $USER with the actual username you want to use for that VPN user.

KEY=`head -c 20 /dev/urandom | sha1sum | nawk '{print $1}'`
echo "$USER pptpd $KEY *" | sudo tee -a /etc/ppp/chap-secrets

Finally, you are ready to...

Configure the Client

In the Network Manager applet, select VPN Connections → Configure VPN, then click Add. On the next screen select PPTP for the VPN type, then click Create.

In this window, enter your server's hostname or IP along with the username and key that you added to the /etc/ppp/chap-secrets file on the server.

Now click Advanced.

In this window, enable "Use Point-to-Point encryption (MPPE)" and select 128-bit security. Disable the use of MSCHAP authentication (leave MSCHAPv2 enabled).

Finally, click Ok and then Save to close out the previous window.

You can now test the VPN connection by going to the Network Manager applet → VPN Connections and selecting the connection that you just created. Make sure you get a message saying that the VPN connection was successful, then browse to an IP checking website to verify that your IP now shows up as the server's IP.

If you get a message saying that the VPN connection to the server failed: first verify that you correctly entered the client settings; second, check that the client has network connectivity to TCP port 1723 on the server; finally, check the log file /var/log/messages on the server for further clues. If your VPN connection succeeds, but you subsequently are unable to browse to any websites from the client, consult this incredibly helpful diagnostic guide on the pptpd website.

Notes

If the local network you are connected to is using the 192.168.0.0/24 and 192.168.1.0/24 subnets, you are going to run into issues because that is what the PPTP server uses by default. You will have to configure PPTP to use different subnets in pptpd.conf.

There are numerous other configuration changes you may want to make. For example, all your domain name lookups will still be queried using your local DNS server instead of going through the PPTP server. Take the time to read over the full documentation to find out how to change this setting and many others.


How to Install Ubuntu server inside Windows

If you need it to be specifically Ubuntu server, and you want to run it in Windows, the best way would be to run it inside a virtual machine.

That way, Windows stays running and Ubuntu will run in a box inside Windows as if it's another Windows program.

My choice of virtual machine software (particularly on Windows) is Virtualbox.

Here is a step by step guide if you want it.  Hopefully it's not too out of date.

Note that you'll probably need/want the i386 version of Ubuntu server - and you install it from the ISO (you don't have to burn the ISO to a CD).  And you'll probably want to give it at least 300MB of RAM.

Also if you want a network connection to your Ubuntu server from Windows, you may run into the issue I describe here unless you set up "bridged" networking mode in Virtualbox.


How to connect via SSH from VirtualBox to Windows

In order to connect via SSH from A to B you'll need a SSH server running in B. To connect to an Ubuntu machine, it's just a matter of installing openssh-server and make sure the service is started. For a Windows machine, you'll have to pick one of the third-party servers available and install it.

This question is a good starting point to select a Windows SSH server; Wikipedia also has a comparison of servers. OpenSSH for Windows, mentioned in @FatPopDoWop's answer, has not had a release in years AFAIK (last one in Sourceforge was in 2004). I've used freeSSHd in Win XP and it works well, but I can't say if it does in Win 7.

The server (your host) must be able to receive TCP connections in the SSH listening port (22 by default); check the Windows Firewall, as already mentioned.

The IP you have to connect to will depend on how the network is set up in the VM. For example, in a VM that's using NAT network mode, the host is reachable from the guest with the IP 10.0.2.2. In any case, check that SSH is listening on the interface the client will use to connect. In NAT mode, the connections are made through localhost (at least in Linux; I suppose VirtualBox in Windows works that way too).


Dual boot not available after upgrading to Windows 8.1

The Windows upgrade reset some things which you do not want.  Under the power settings, turn off "fast boot".  That might be all that's needed, but Windows does keep putting itself first in the boot order, so you might have to reorder with some tool like efibootmgr (from Ubuntu) or maybe (not sure about this) bcdedit from Windows.


Fix permissions of server after accidental chmod

Fixing Permission Error

How to restore root directory permission to default?

Rule #1: If you are not comfortable with command lines, do not run any command as root.

Running chmod -R 777 / as root will break your system.

Running rm -rf / as root will result in a disaster!.

If you've ran chmod -R 777 / as root, follow these steps to restore it back:

Step 1:

Copy the following script, paste it on your console to generate fixpermission script

echo '
chmod -R 755 /bin /boot /dev /etc/ /home /lib /lib64 \
/media /mnt /opt /run /sbin /srv /usr /var

chmod -R 777 /initrd.img /vmlinuz
chmod -R 1777 /tmp
chmod -R 555 /sys
chmod -R 555 /proc
chmod -R 700 /root

' > fixpermission

chmod +x fixpermission

./fixpermission

The above will create a script named fixpermission and run it by ./fixpermission if not already invoked.

Step 2:

Run stat -c '%A %a %n' /* to show your proper directory and their permission as restored.

Example: Your directory permission structure should look similar to the following:

root@plab:~# stat -c '%A %a %n' /*
drwxr-xr-x 755 /bin
drwxr-xr-x 755 /boot
drwxr-xr-x 755 /dev
drwxr-xr-x 755 /etc
drwxr-xr-x 755 /home
lrwxrwxrwx 777 /initrd.img
lrwxrwxrwx 777 /initrd.img.old
drwxr-xr-x 755 /lib
drwxr-xr-x 755 /lib64
drwx------ 700 /lost+found
drwxr-xr-x 755 /media
drwxr-xr-x 755 /mnt
drwxr-xr-x 755 /opt
dr-xr-xr-x 555 /proc
drwx------ 700 /root
drwxr-xr-x 755 /run
drwxr-xr-x 755 /sbin
drwxr-xr-x 755 /srv
dr-xr-xr-x 555 /sys
drwxrwxrwt 1777 /tmp
drwxr-xr-x 755 /usr
drwxr-xr-x 755 /var
lrwxrwxrwx 777 /vmlinuz
lrwxrwxrwx 777 /vmlinuz.old

Step 3:

Reboot your system!

Hope this helps.


B/ try changing ownership to user running php

A/ add sdcard to /etc/fstab https://help.ubuntu.com/community/Fstab


After a while, I finally tried this way:

sudo apt-get install nautilus-menu-checksum

and now the menu is available for writing checksum.
Thank you for your response.


While this might be a bug... to work around it I have found that if you click on "switch user" then select the guest account you will get back in with no problems


Based on this link nvidia-361 is the driver for Nvidia GTX 970

First uninstall the currently installed NVIDIA drivers. Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key. Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1. Enter your user name and the password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Now install the latest official stable NVIDIA drivers. Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key. Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1. Enter your user name and the password, then execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361
sudo reboot

Note : Maybe it is explicitly necessary to select the NVIDIA adapter in BIOS. When you want to use drivers 361, adding the PPA is not necessary. In this case the terminal commands you have to perform are these :

sudo apt-get update
sudo apt-get install nvidia-361
sudo reboot

In case you have installed the nvidia driver from their site then uninstall it as per that instructions.Uninstall that driver by running, as root, sh ./NVIDIA-Linux-x86_64-361.28.run and follow the on screen instructions

Note : The solution I have provide has been tested on Ubuntu 14.04 LTS and Ubuntu 15.10 for two GPUs.


Ubuntu 16.04 does not wake up from sleep on ASUS Laptop

Maybe this will work: shutdown your laptop from the ubuntu gui. It worked for me.
Source: https://bbs.archlinux.org/viewtopic.php?id=221224


I found the solution.

sudo gedit /etc/modprobe.d/alsa-base.conf

Add the following line to the end of this file:

options snd-hda-intel dmic_detect=0

Save and close the file and reboot your system. You should have the audio back.

Reboot

Regards


How to get [TAB] to work with arguments of aliases to autocomplete as can be done with the actual command

Great question! If your allinfo command was the same as just apt-cache, (ie, without the show) then we could look at the completion for apt-cache, and apply that to your allinfo alias.

However, you want a subset of the apt-cache completion, so we have a little more work to do.

If we look in the completion definition for apt-cache - in /usr/share/bash-completion/completions/apt-cache, we see the following is used for the show subcommand:

        COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" 2> /dev/null ) )

- this is just setting the COMPREPLY variable to the list of matching packages.

So, we can borrow this and write our own function, and bind it to your allinfo alias:

# define a function to print the possible completions for
# an allinfo invocation
_allinfo()
{
    _init_completion || return
    COMPREPLY=($(apt-cache --no-generate pkgnames "$cur" 2>/dev/null))
    return 0
}

# bind the above completion function to the 'allinfo' alias
complete -F _allinfo allinfo

If you add that fragement to your .bashrc file, you should get the completions working as you expect.


Sublime Text 3 not available from Dash despite posessing a .desktop file

What to do if an application does not show up in Dash, or cannot be launched from Dash after you installed it?

It can happen that you installed an application, you are sure the application is represented by a .desktop file in /usr/share/applications, but it either does not show up or the icon in the launcher doesn't do what it is supposed to do.

Log out and back in
Although an application should show up immediately after installation, incidentally, new .desktop files are not found immediately. Logging out and back in makes sure Unity is forced to re- read the directories ~/.local/share/applications and /usr/share/applications for valid launchers.
Test- check the global desktop file
If that does not solve the issue, browse to /usr/share/applications and drag the corresponding .desktop file on to the launcher and click on it.
If the application is launched correctly, you can be pretty sure you have a local .desktop file, representing the application, in ~/.local/share/applications.
Since local .desktop files overrule their global version, the local one is most likely incorrect or outdated.
To find it, open a terminal and run:

grep -iR <application> ~/.local/share/applications/

where <application> is (of course) the name of the application.

Remove possible local versions, log out and back in.

If the application does not launch correctly, your global .desktop file is incorrect, which is highly unlikely, but if so, it can have several causes.

Explanation

If you have duplicated launchers (.desktop files), representing the same application, Unity picks the local one on log in. During a session, this does not change normally, unless you force Unity to use a specific launcher by dragging it on to the Unity Launcher.

This is usually the fastest and most reliable way to both check the validity of the global .desktop file, and detect the existence of local versions, rather then digging through ~/.local/share/applications.


How do you "compile" something in Ubuntu?

When you cloned the git it made a folder called GfxTablet in your home folder.

Inside this is driver-uinput, change to it like this

cd GfxTablet/driver-uinput

Then

make

This makes a file binary called networktablet in GfxTablet/driver-uinput

Now keep following your instructions.


An error occurred during the signature verification. GPG error: http://deb.i2p2

The error message is self explanatory.

Apt security uses gpg signed release files to maintain the integrity of the packages you are downloading.

For details on apt security see - https://wiki.debian.org/SecureApt

Even though it is a Debian page, Ubuntu uses the same features.

So lets look at the error

  An error occurred during the signature verification

there is a problem with gpg signature verification

  The repository is not updated and the previous index files will be used.

Because of this problem, apt (apt-get) is no longer using the package list from this repository and old lists will be used. Basically update failed for this repo.

  GPG error: http://deb.i2p2.no unstable InRelease: The following signatures were invalid: KEYEXPIRED 1506878164  KEYEXPIRED 1506878180  KEYEXPIRED 1506878164  KEYEXPIRED 1506878164  KEYEXPIRED 1506878180

That is the gpg error. The keys have expired.

See https://www.gnupg.org/gph/en/manual/c235.html , specifically the bottom section "Updating a key's expiration time"

So you will not be able to use this repository until the maintainers update their key. You can not do this yourself. Contact the people who maintain that repo and ask them to update the gpg keys they use to sign the packages / repository release file.

UPDATE: If you go to  the site http://deb.i2p2.no/

  For Ubuntu, we recommend our PPA instead, and instructions are on geti2p.net

So you should be using the ppa

https://launchpad.net/~i2p-maintainers/+archive/ubuntu/i2p

  Adding this PPA to your system
  You can update your system with unsupported packages from this untrusted PPA by adding ppa:i2p-maintainers/i2p to your system's Software Sources. (Read about installing)

sudo add-apt-repository ppa:i2p-maintainers/i2p
sudo apt-get update

And also on the home page

  Please report any problems with the I2P packages on the I2P Bug Tracker

So report the expired keys on their bug trancker - https://trac.i2p2.de/newticket?component=package/debian&owner=killyourtv&cc=killyourtv@mail.i2p


What you want to do is set up a Samba username map file.

In the [Global] section of your /etc/samba/smb.conf file, you can set the "username map" option to the location of the map file.

[global]
    username map = /pathToMapFile/usermap.txt

The usermap.txt (or whatever you want to call it) contains lines formatted in the style of mapTo = mapFrom.  For example, if I wanted to make sure that my user on my Windows box could hit my Samba share on my Ubuntu machine, my usermap.txt file would have a line like this:

myUbuntuUserName = myWindowsUserName

Of course, to see these changes you'll need to restart the Samba service.

sudo service smbd restart

If you need extra help, check out the docs below.  The official Samba documentation (below) demonstrates how to map multiple usernames to a single user, or even groups to users.

username map (G)

Username Maps - Administration


Is there a quick way to open command window

Yes indeed, just install nautilus-open-terminal:

sudo apt-get install nautilus-open-terminal

Then, log out and log back in and you'll have a new option when you right-click in any nautilus directory.


As i understand it, if you own both accounts, you could, in theory, just open up two xchat sessions, have one nickname in each, and access them that way.

Alternately set up two network profiles, uncheck use global information and set information for each seperately - this will let you use two different passwords, and autojoin both

However you will want to check if the server/network has a connection limit.

If you do not own these nicknames, and they are registered by someone else, you are out of luck.Nickserv will force change your name, as part of nick protection, if you do not authenticate with a password for that account.


You could install indicator-script-runner and create a "script" which tails the relevant log file.  To run the script, select from the indicator menu and a terminal is launched, executing your script.

For each log file you want to tail, create a separate script.


Ubuntu 13.10 won't wake up after suspend

If the problem is that the system isn't turning your LCD backlight back on, then you can probably turn it back on manually..

Alt+F1 (go to a text virtual console) and then Alt+F7 (go back to the graphical X display)

The Alt+F1 should cause the backlight to come on, and then you can get back to your session with the Alt+F7

You might need to adjust the screen brightness with function keys on a laptop. This is if it is turning on the backlight but just at the lowest brightness.

There are multiple cases of this, not related to this card directly.