Environment variables are not accessible in bash script

That's because the HADOOP_HOME variable isn't exported:

$ cat foo.sh
#!/bin/bash
echo "HADOOP_HOME: $HADOOP_HOME"

$ HADOOP_HOME=/home/me/dist/hadoop
$ echo $HADOOP_HOME
/home/me/dist/hadoop

$ foo.sh
HADOOP_HOME:

$ export HADOOP_HOME
$ foo.sh
HADOOP_HOME: /home/me/dist/hadoop

When you run a shell script, that script will run in its own bash instance (that's what the #!/bin/bash does) that is a child shell of the current one. Variables are not passed to child shells by default, only if they are exported. Think of each bash session as independent (they largely are). You usually don't want variables defined in one to pollute the environment of another. For those cases where that is necessary, use export.


Can I map some key combination to the suspend function (it should also work for waking up the machine from the suspended state)?

When the computer suspends, Ubuntu is no longer running until you resume, so there is no way for Ubuntu to set a keyboard shortcut that will work while the computer is suspended.

Many PC's have an option in the BIOS to trigger a resume from suspend if any key is pressed. That may be your best bet, combined with setting a specific shortcut inside Ubuntu for suspending.


From terminal(Ctrl+Alt+T) this will add $USER to the dialout group:

sudo adduser $USER dialout

$USER is the name you used to log in with (echo $USER on command line will show your name) so you can use that command 'as is' and do not need to change anything.


All the sudden, RTL8812AU wifi USB adapter stop working

After @Jeremy31 had given me an advice, I found this trouble was caused by the kernel update. So, I researched around. Then, I found the thread talking about the same issue last year. I was surprised that @Jeremy31 helped this person back then, too.

WiFi module 8812AU not working with kernel version >= 4.4.0-28-generic

Thanks a lot :)


How do I move window buttons from left to right using command line or by editing a specific file?

You can move buttons to the right with:

gsettings set org.gnome.desktop.wm.preferences button-layout ':close,minimize,maximize'

or, maybe better to twitch "close" button with "maximize" button:

gsettings set org.gnome.desktop.wm.preferences button-layout ':maximize,minimize, close'

And move them back to the left with:

gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'

To get the current settings, use:

gsettings get org.gnome.desktop.wm.preferences button-layout

See man gsettings for more info, and, as a bonus:

In this case the changes are made in ~/.config/dconf/user file which is expected to be in the binary dconf (GVDB) database format.  Only programs like dconf Editor or gsettings can  safely edit this file.

More about:

dconf System Administrator Guide
Do dconf use EXI binary XML?
What is dconf, what is its function, and how do I use it?
What are the differences between gconf and dconf?


Ubuntu 14.04: language switch between first/last source

Has there really been a feature for switching between first and last source? To be honest I doubt it.

IBus has a feature for triggering and 'untriggering' the set input method, but it's disabled in later Ubuntu versions. Possibly that's what you are referring to.

As far as I know, in Ubuntu 14.04 you need to use some other IM framework, e.g. fcitx, to achieve exactly the behavior you describe.


How do I remap CTRL-Q and CTRL-W to custom actions in TexMaker?

If you do stty -a, you'll see that ^Q is assigned to "Start" (undoes ^S "Stop"), and ^W is "werase" (word erase).

You can use the stty command (see man stty) to unset these, or set them to different values. Once you've done that, TexMaker should stop complaining.


1 - install flash plugin for videos

$ sudo apt-get install flashplugin-installer

2 - how to reset chrome
Click the Chrome menu Chrome menu on the browser toolbar

Select Settings.Click Show advanced settings and find the "Reset browser settings” section.Click Reset browser settings.In the dialog that appears, click Reset.


Does ubuntu-13.04-desktop-amd64 supports Intel(R) Core(TM) i5-2320

Yes you can.  The i5 is a 64 bit capable processor and runs Ubuntu 64 bit very well.  We have several in the office all working perfectly.


How can I configure wired network connection on 64-bit Ubuntu 12.04 LTS?

You should first check your DSL modem settings.
According to the model, type:
http://192.168.2.1 on your web browser and get in to the modem settings.
You should disable MAc Filtering if it is enabled.
You should enable LAN connection if it is disabled

Save the latest settings and restart DSL modem.

Finaly,
press win button on the keyboad or open the dash with mouse and write "network"
You will see a directory picture with a cable. Click and open it.
You can see WIRED option there. Check. it must be "ON" and at the options side, choose Automatic DHCP.


How do I remove Ubuntu 12.04 LTS from my Windows 7 computer?

You need: A Windows Installation or Recovery Medium

This restores the MasterBootRecord. Grub will be gone (or at least not useable anymore) only Windows boots up.

boot from that Windows Disk
select "Repair my Computer"
select your Windows Installation
select "Command Prompt"
now execute following command each at a time:

bootrec.exe /FixBoot

bootrec.exe /FixMbr
reboot

To remove ubuntu (this steps may be a bit fuzzy, since I do not have win7 machine right in front of me right now):

Boot to Windows
click "start" and search for "Disk Management"
start Disk Management
now you should see an overview of your Harddrives and partitions.
determine the ubuntu partitions (usually, the ones with "unknown" file system)
delete those partitions
finally append the freed disk space to a windows partition (if wished)

you should be good now.

Good Luck.


Ubuntu 12.04 - Not recognizing Atheros AR8161 Gigabit Ethernet

When did you download the CD image? If this was over a week ago, then downloading and installing the latest 12.04 point release (12.04.2, released on Feb 14) is probably the simplest solution in your situation.

From 12.04.2 onward, the LTS releases will run on more recent kernels. Their LTS Enablement Stack will keep the kernel and X stack in sync with stable versions from newer releases (Quantal, Raring, S). Quantal's kernel (3.5.0) has built-in support for the alx driver, which is what you need.

For those  currently on 12.04 LTS: updating from 12.04.1 or 12.04 will not enable the LTS Enablement Stack. To do this, install the linux-generic-lts-quantal and/or xserver-xorg-lts-quantal packages.

apt-get update
apt-get install linux-generic-lts-quantal

... was all I needed to do to get my Atheros AR8162 working.


Touchpad stops working after a while in Ubuntu 16.04.2

This always works for me to bring it back.

In terminal:

sudo modprobe -r psmouse
sudo modprobe psmouse

As far as I can tell, xorg kills the touchbad (see DebuggingTouchpadDetection) because it is buggy. Still investigating how to avoid this from happening.


How to programatically fetch the download status of Google Chrome?

I don't believe you can. To get the Chromium progress bar to work in Unity launcher, the flow of information is in reverse. Chromium is telling Unity about the progress rather than Unity asking. You can see the API used for that here.


Can't select anything in the Input Method tab

This is a bug causes by oxygen-gtk theme. Changing it will make it works again. Go to System Settings → Application Appearence → GTK → change the GTK3 theme to whatever you like.


Ubuntu 18.04 doesn't shutdown ,reboot on laptop

Your laptop has newer hardware but there is a solution for this.

Open a terminal, type:

sudo nano /etc/default/grub

then on this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

add nomodeset, like this :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Ctrl+X and then type Y and Enter, you'll be back in the terminal with the file saved, now you can type :

sudo update-grub

this will solve the issue.


Commenting out unwanted users in /etc/passwd file

You can start by getting the essential information out of /etc/passwd, with the following command:

cut -d : -f 1 /etc/passwd > result.txt

This way you have a txt file only with the usernames. Then I suggest you use an easy python or bash script to compare those two files together and do what you want.

However I would not mess with the /etc/passwd file in a sense of editing it by yourself.


Why is unzip in the file explorer so slow?

There's more activity going on in the GUI File Explorer. For each of your "thousands of files", the File Explorer has to determine which icon to use.
Then, it has to position the icon on the screen, and set the "screen refresh" flag.
Not much additional processing for 1 file, but "thousands"?

After you've extracted these "thousands of files", if you restart your File Explorer, and then open the directory with the files, you'll notice a large delay.

Processing "thousands of files" with a GUI File Explorer just seems wrong. perl, for example will let one read ZIP files and access the files within the ZIP.


Unable to Delete/Modify files in the USB

Assuming you don't have a flash drive with a hardware write-protect switch...

If you can access your flash drive's location (where the contents of it are), remember it and open up a terminal session and type mount. Then find your mount point (that location you remembered earlier), and check the options. If it's ro and NOT rw, you can try remounting it.

It will list stuff like this (this is a example of my output, running under a live USB setup, although the process for installed, non-live systems are very similar):

/cow on / type overlayfs (rw)

/dev/sdb1 on /media/ki2ne/FLASHDRIVE type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed)

(the rest of the mount points are cut for brevity)

I would identify /dev/sdb1 to be the device for my flash drive (although yours might be different). So I would do mount -t vfat -o rw,remount /dev/sdb1 /media/ki2ne/FLASHDRIVE.


dual booting ubuntu without affecting recovery disk

one of the the larger partition contains the Windows 8 software. Whatever your computer came with day 1 is in that partition ready to install. Depending on your laptop that may include all of the bloatware installed by the manufacture (some have their stuff on a separate partition). The 500MB partition is kind of like a small write buffer, it. During recovery operations and factory resets it provides a minimum swap area for certain operations. At least this is my understanding of the purpose of the 500 MB section. Whenever I dual boot a computer I always make a small fat32 partition between the two OS's to prevent the file system of one from inadvertently corrupting the other. It is possible that this small partition serves that purpose as well. I hope that helps. If you want to keep windows 8 I would not touch either of those partitions to be on the safe side.


I don't know how old your Ubuntu installation is, but in just this past year, Ubuntu has radically changed how it handles device drivers, and things have gotten SO GOOD I've taken to uninstalling the proprietary drivers I'd installed, as now Ubuntu often runs my graphics better this way.  I recommend you try uninstalling your AMD drivers (either by command line or using the Synaptic Package Manager), and then if things don't improve, then returning to the System Settings, "additional drivers" icon to load new AMD drivers.

Before posting this "answer" I bothered to look up your laptop and it seems that some or all of that model had a touch screen.  I have Ubuntu on a rather old and heavy tablet and it operates it just fine without having installed any special drivers.

Please clarify what functionality you aren't seeing.  As for switching between the two monitors, that's handled in the System Settings under "Displays".


Something is probably wrong with your graphics card driver.
Had the same problem with ubuntu 14.04 and geforce gtx 860M.
Updated driver and added prime-indicator to make sure that I was using the desired card all the time. (runs the same card for all processes)
You can use bumblebee to choose card for each process separately.
For updating Driver:
How do I install the Nvidia driver for a GeForce GT 630
For installing prime-indicator:
http://www.webupd8.org/2014/01/prime-indicator-lets-you-quickly-switch.html


Uninstall actual android-sdk:

sudo apt-get purge android-sdk

Download the latest android-sdk using:

wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz

Unpack downloaded package to your HOME directory:

tar -xvf android-sdk_r24.2-linux.tgz

Set ANDROID_HOME path

Open .bashrc file

nano ~/..bashrc

Put these lines in the end of file

export PATH=${PATH}:$HOME/android-sdk-linux/platform-tools:$HOME/android-sdk-linux/tools:$HOME/android-sdk-linux/build-tools

Restart your computer to make changes

Check also: https://stackoverflow.com/questions/26256279/how-to-set-android-home-path-in-ubuntu-please-provide-the-steps

Now you should able to use android command.

Try to update your sdk using:

android update sdk --no-ui

Hope it will help


The .iso file may not have burned properly to the drive. You can try to fromat the drive and create the starup disk again and reboot.


How trusty is partial LVM formatting during installation?

You can trust the installer to format what you tell it to format and to not format what you don't tell it to format. For best results, don't use the ubuntu-vg-home for anything, and add it to /etc/fstab once you have the new system up and running.


GNOME - How do you remove the power, sound, and internet panel indicator?

Try this Gnome Extension:
https://extensions.gnome.org/extension/351/icon-hider/

If you go into the settings for it you can disabling "aggregateMenu" will remove those three icons and in the next tab disabling "show extension's indicator" will remove the extension's own icon


Landscape OpenStack Installation Requirements Checklist

Not a 100% complete answer since I may need more details.  Please comment here if you have anything updated you need me to look at.  But, I think this could be your issue.

The checklist is dynamic, it will compute again when you reload the page.  You will not need to re-install landscape.  I suspect you probably did try to reload the page already -- I'm just putting this here so it's clear.
The red X is letting you know that landscape or MAAS thinks the machine doesn't have enough disks.  This information is parsed from the lshw tool.
Since I've hit this before, I suspect you are running into: https://bugs.launchpad.net/maas/+bug/1355309

Could you please make sure your disks are not using the virtio driver and try again?  You will need to re-commission in MAAS, perhaps re-enlist (delete, re-add).  This is just a setting in the VM, so changing it there at least is easy, but in MAAS the hardware information needs to be refreshed.

The good news is: if you have landscape installed and at the checklist, you should not need to go through that process again.


Gnome terminal is not running `source ~/.bashrc` when opened?

Sounds like a double to this question. It might be that the bash in your terminal is a login shell what means .bashrc is not sourced.


Wacom Tablet not showing up on Ubuntu 15.10

You do not mention which tablet you bought (output of lsusb), but most likely you need to update your kernel driver and your libwacom library. Follow the instructions at [1] for those two components.

[1] http://linuxwacom.sourceforge.net/wiki/index.php/Downloads


Spotify not in launcher and shows as question mark in dock

I just installed spotify from the Ubuntu Software Center to replicate your issue, and in fact, when I open it, there is no icon, just a question mark as you can see in my 1st image.

To solve this issue I did the following:

Edit this file ~/.local/share/applications/spotify.desktop with any Text Editor (e.g. gedit, nano, vim), I used gedit, so the command was:
gedit ~/.local/share/applications/spotify.desktop

Search for the line that says Icon and put the following text:
Icon=/home/<yourUsername>/.cache/gnome-software/3.20/snap-icons/4e763d64d7d04a3b072fcb90e3798530916c6b8a-spotify-linux-256.png

It is possible that in your system the name of the icon could be different, in that case just go to that folder and check for the name of the icon.

About searching the app, it works perfectly for me, try to uninstall and install again to see if it works.

Hope it helps, good luck and enjoy your music!


How to deploy: ubuntu | apache | python | C++ | mysql

Options:

Option 1 -> LAMP-C++ with web.py

That's a rather simple deployment option, ideal for the case when you're writing a web service with little or no GUI.

web.py 0.37 (pip list | grep web.py)
web.py info on stackoverflow -> link

Option 2 -> LAMP-C++ with Django and Mezzanine

That's an option if you want to make a web site, maybe still with a service part. Framework web.py can still be used for auxiliary tasks, but the bulk of frontend job will be managed by Django and a CMS Mezzanine based on it. Mezzanine has a reputation of being a good CMS Framework built on top of Django for building content-driven sites rapidly.

Django 1.6.1 (pip list | grep Django)
Mezzanine 3.1.10 (pip list | grep Mezzanine)


Unknown artist / unknown album in Banshee & Rhythmbox for all music

Banshee (and probably Rhythmbox) automatically gets metadata for CDs from MusicBrainz.org.  Some recent changes with MusicBrainz broke CD metadata lookup in Banshee.  Since then, Banshee has been fixed to work with the new MusicBrainz API, but unfortunately, no stable releases have been made since the fixes were committed.

You can get these updates by switching to the daily builds of Banshee, but unless you're interested in testing pre-beta-quality software and reporting bugs, you probably want to stay away from daily builds.  The next stable version of Banshee will be released in September.

For more information, see this answer.


How to remove a package providing a service without stopping the service?

The prerm of uwsgi script contains this:
#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/uwsgi" ] || [ -e "/etc/init/uwsgi.conf" ]; then
    invoke-rc.d uwsgi stop || exit $?
fi
# End automatically added section

You have a few options:
Edit the prerm script.
The script is usually located at /var/lib/dpkg/uwsgi.prerm.
Do:
sudo sed -i '/invoke-rc.d/ s/^/#/' /var/lib/dpkg/uwsgi.prerm

to comment out the command that stops the service.
Use the conditions in the script to your advantage
Either:
sudo chmod -x /etc/init.d/uwsgi

since the script checks for execute permissions of this script,
Or:
mv /etc/init/uwsgi.conf /etc/init/uwsgi.conf.bak

since the script checks for existence of this Upstart service file.
According to the list of files, the package has /etc/init.d/uwsgi and not the Upstart script.
(Mis)Use policy-rc.d
invoke-rc.d is controlled by policy-rc.d. However, using it directly has a problem. The prerm script is has exit $?, and dpkg doesn't like non-zero exit codes. Hence, this will still require changing the prerm script:
echo 'exit 101' > /usr/sbin/invoke-rc.d
chmod +x /usr/sbin/invoke-rc.d
sed 's/exit/echo/' -i /var/lib/dpkg/uwsgi.prerm

Why did I even answer?
There are some brilliant answers already available: Install packages without starting background processes and services (possibly with some slight adaptation required).


Block certain websites on Ubuntu for main user

One possible solution could be, as it is written here: Block Websites with Nonsudo Password, to use Net Responsibility.


login loop: systemd-udevd[713]: failed to execute '/bin/systemctl start --no-block nvidia-persistenced.service': No such file or directory

In case someone else has this problem, this is what worked for me:

Press Ctrl+Alt+F1 to open a terminal and log in.
Run sudo apt-get install nvidia-current, then sudo reboot

It downgraded to nvidia-304 and everything was fine after reboot


Why did Adobe stop Flash Player for Linux?

Eventually they will stop developing Flash at all, for all platforms. They only stopped releasing new releases of Flash for Linux, but they still ship bug fixes.

I have flash from Adobe on Ubuntu and it run's just fine, no glitches at all. If you don't like flash there are open alternatives like Gnash or Lightspark.

There's no need to install Flash through Wine (not sure if it would work), what you need to do is to install Adobe Flash for Linux version 11 something.

Also Google Chrome ships it's own Flash version, so there's another alternative right there.

Offical note from Adobe about dropping Flash

"The last version of a separate Flash Player for Linux, 11.2, will be released this quarter, Adobe announced in the roadmap document. After that, Linux users who require browser-based Flash must switch to Chrome, Google's three-year-old browser.
...

Adobe has been collaborating with Google, the former said, on Pepper implementation for Flash, which will let it create a single plug-in for all systems that Chrome supports. In other words, the same Flash Player plug-in will run in Chrome on Windows, Mac OS X and Linux."

Source


Oddly enough, using sudo with the username was the answer:

$ sudo chsh ubuntu -s /bin/zsh


Why "remove Ubuntu 12.04 and replace it with Ubuntu 13.10" means to use all of the disk and lose all data?

To reuse the ext4 and SWAP partition you need to specify them manually using the advance install (select the "something else" option).

(source: linuxbsdos.com)

Now you just need to unmark the ntfs partiton and mark down the partitions you will be formating for the install (you don't need to format the SWAP partition).

Please note that unless you have a separate home partition, formating will also delete the files you had on the ext4 partition. Consider moving your home to it's own partiton or create a separate home partition while installing Ubuntu.


ubuntu-device-flash not working with BQ Aquaris E5

your phone, I’m afraid, has the wrong chip set, see also my statement here:
https://askubuntu.com/questions/843973/attention-dont-buy-bq-aquaris-e5-with-a-wrong-chip-set

Volker


What does the "-ng" suffix mean in package names?

NG stands for "Next Generation".

In the context of software, "generation" is the successor of the previous version. I've seen it being used with forked software, either because someone decides that the original work had a messy codebase or if the original maintainer does not want to continue development on a software project under the current name.

I haven't seen authors renaming their projects to *-ng as they would rather increment their project's version number.

Examples of *-ng applications with their history:

util-linux-ng - A fork, util-linux-ng—with ng meaning "next generation"—was created when development stalled
aircrack-ng - Aircrack-ng is a fork of the original Aircrack project.


As can be seen in the output of type -a node, you have an alias defined for node. Remove it:

unalias node

Look for the alias definition in your .bashrc, .bash_aliases and other such files, and remove it.


how can I know if a binary is malicious?

While I cannot attest to how well it actually works, there is an open-sourced virus scanner in the Ubuntu repositories: ClamAV . Once installed, run clamtk and it can scan the file.

There aren't very many AV scanners for Linux in general, but if you're willing to install non-free software you could also have a look at BitDefender Scanner for Unices

Get a free key for private use here.
Follow the instructions here to add the DEB repo to your /etc/apt/sources.list
sudo apt-get install bitdefender-scanner-gui or sudo apt-get install bitdefender-scanner for the CLI version.
Run these commands to get rid of the segfaulting behavior:

sudo bdscan --update

Read the license and, at the end, type "accept" if you agree, then (as root):

# cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* | \
  awk '/bdcore.so.linux/ {print $3}' | \
  while read bdcore_so; do
      touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
      bdscan --update;
      mv /opt/BitDefender-scanner/var/lib/scan/bdcore.so \
          /opt/BitDefender-scanner/var/lib/scan/bdcore.so.old;
      ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
          /opt/BitDefender-scanner/var/lib/scan/bdcore.so;
      chown bitdefender:bitdefender \
          /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
  done

Run the gui via the command bdgui (it should also show up in the launcher)


I hope one of these will be helpful for you:
lingot

Accurate and easy to use musical instrument tuner

gtkguitune

Guitar and other instruments tuner


The Wikipedia article about Ubuntu says the following:

  Ubuntu 4.10 (Warty Warthog), released on 20 October 2004, was
  Canonical's first release of Ubuntu, building upon Debian, with plans
  for a new release every six months and eighteen months of support
  thereafter.2 Ubuntu 4.10's support ended on 30 April 2006.[10]
  Ubuntu 4.10 was offered as a free download and, through Canonical's
  ShipIt [11] service, was also mailed to users free of charge in CD
  format.[12]

This seems to be the first release, as there is no 4.04 entry and Google does not find it, it would seem 4.10 is the first version, same for Ubuntu 1.0, I find no evidence of its existence.

Here is a comprehensive list of all versions of Ubuntu:


Having Problem with ipython notebook on ubuntu 14.04

It looks like you are missing a dependency for IPython Notebook.  If you don't already have pip installed, I would recommend installing it for the ease of installing python packages:

sudo apt-get install python-pip python-dev build-essential

Once pip has been installed, you can install the IPython Notebook and all its dependencies by entering at the command line:

pip install "ipython[notebook]"

You may have to run that one with sudo as well if you get an error.


If you use wubi if you have installed it from windows, removing windows would be too advanced.
Your best option in this case would be to copy your home folder on a USB drive, And install it proper way using live installer on DVD or pen drive.

IF you want to play and keep the old setting:
after installing do not reboot yet if you if you have created same users as before,
check their user ids in new home folder (usually 500 for first user)

simply copy the old ones from USB key where you have backed them up into your new /home and change the  user ids on them including their subdirectories

If you get access permission problems, you haven't set the ids right or only set it for main folder not inside. go back to liveDVD and change uids... on all directories in home folder including inside

make sure windows stays on a first partition!!!

If you have installed it proper way, removing windows wont speed computer up except if you are running out of space

first check which of the grub entries is the ubuntu
open your favorite editor using sudo

gksu mousepad

gksu gedit

Open /etc/default/grub:

Change the

GRUB_DEFAULT=0

number  to  the number of entry for Ubuntu.
run sudo update-grub


Why does the Live-CD see `sda' but the grub-installer doesn't?

It sounds like sdb is the hard drive in this instance. sda is just the first drive it sees, which in this system sounds like the USB stick is detected as a hard drive. Boot the live USB into Try mode, then fire up "Disk Utility" and it will list both disks, see which one the hard drive is. I'd bet it's sdb. Then just fire up the installer from the desktop.


How to log on to a Ubuntu server; from windows with a plain gui

Assumptions:

This "server" is a desktop install (ie the ubuntu-desktop meta package is installed)
Server sits behind a router which connects to the internet and shares it out through NAT
Your user is set to auto-login
You're trying to connect from outside your home network. I had rather assumed you were trying to do this from work but now realise that may not be the case.

Step one: Make your internet connection locatable.
Most ISPs give their users dynamic IPs. This is as much (try to) stop people hosting things as it is protecting them from people who find out their IP and want to attack their computer directly. Either way, it makes things hard if you want to connect to your home network.
We fix this with one of many services that fall under the category "dynamic DNS". In short your computer (or router) tells a third party service what your current internet IP is and they store it as a DNS entry. You end up with a domain name that you can connect to your home network through.
DynDNS is probably the biggest but there are hundreds of companies providing very similar sets of services for free. The good ones have Linux clients available. But check your router as lots come with clients built in and that could save you some time.
I won't mention this again but it's an essential thing to do.
Step two: SSH
Rather than connecting directly to a VNC (or other) server, I strongly suggest you install a SSH server and connect to your desktop over SSH and tunnel the VNC port back to your computer. Sounds like a pain in the bottom and.. Well.. It is. But it provides you strong authentication and should keep bad people out. VNC has in the past had quite a few security issues so it's best (IMO) not to give people direct access to it.
Installing the server is pretty simple: sudo apt-get install openssh-server
However, I would move it to a non-standard port (mine are all in the 4xxxx range). This helps stop people detecting it by port scanning and therefore helps stop people try and brute force their way in. You can read more about ports here:
https://help.ubuntu.com/12.04/serverguide/openssh-server.html
Additionally, you can login over SSH via a key. This is much stronger than password authentication but it requires you have your keyfile with you all the time. Pretty trivial if you're used to taking a USB key around with you or you're happy leaving your key on the Windows computer.
We'll stick with password auth for now.
One more thing, we need to make it so people outside the network can access the SSH server. This part is called port-forwarding. Simple but it varies from router to router. You should be able to find a guide here if you need one: http://portforward.com/
Step three: VNC
I hate VNC but it serves a purpose. It's slow, falls over all the time but it's by far the most simple way to connect to your computer.
Rather than installing a SSH server that runs all the time, I use x11vnc.
Step four: Putty
You need something to connect to SSH from Windows. Putty is that application. Getting and installing the app is simple enough (there are even portable versions if you just want to carry it around on a USB stick).
We need to tell Putty to make the remote VNC server available over SSH. This is known as tunnelling. Fortunately it's dead simple. It's graphical so look here for a screenshot guide: http://oldsite.precedence.co.uk/nc/putty.html (Just use port 5900 instead of whatever port they're using!)
At this point you should be able to connect to your server over SSH. Test it out. When you're logged in, run x11vnc, it'll detect the display and eventually say something along the lines of "awaiting connections".
At this point you can run your VNC client (sorry, having not used Windows properly for years, I've no idea what the best client is). When it asks, connect to localhost (yes, localhost), port 5900 (should be default).
Bish bash bosh. You should have full control of your home desktop.
You can streamline this with various run-on-connect commands. I'm no Putty expert so I'll leave this to you.


Wifi ( Realtek device) disconnects every few minutes

See this post on medium.com
The comments on this page indicate that the issue resolves after following the steps. One person claims to have the same laptop as well. It will update your drivers with the newest available.

The model of the device (RTL8821AE) is very important, we will come back to this later.
For some reason, realtek adapters have a history of disconnects and signal drops, but, lucky for us there is an answer.
sudo apt-get install linux-headers-generic build-essential git
git clone http://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install

These commands build and install the drivers for rtl8192ce, rtl8192se, rtl8192de, rtl8188ee, rtl8192ee, rtl8723ae, rtl8723be, and rtl8821ae all in one go.
Just in case the system doesn’t load the appropriate kernel module, you can execute the following command from within your rtlwifi_new directory
sudo modprobe rtl8821ae

and reboot your system.


Why am I experiencing super slow Internet browsing & downloads?

MAybe it is usefull for you to see this previous post:

WiFi too slow with an Atheros AR928X

(I don't know if it is your case (it's usefull if you can post here your wich drivers do you use... or which type of internet conection u use, ethernet or Wlan?)

for that you should run on terminal this command:

iwconfig


Login Password not accepted after Killall command on logged in user

Let's compare this to a real life example:

You went to the local government to change your name
you filled in the forms, but did the change yourself (logged in as yourself, IDE user management)
you went behind the counter and filed all documents yourself as well (logged in as yourself: usernmode -l oldusername newusername)
then you shot yourself in the head (kill all for the currently logged in user)
And now, being dead, you're trying to operate on yourself at home without a doctor?

Nah, that one won't work...

You can recover using the root password see this answer but the easiest thing to do now is to read this Q&A (you're user type 4) and re-install and do it right the first time, and create 2 users while you're at it!


Google`s Chrome won't reopen prior windows with "continue where I left off" checked

Looks like a bug in Cloud printing maybe the culprit.

Disable in in Cloud print...

To disable "Cloud Print"

Open "Settings" from Google wrench icon...
- Make sure Setting is selected on left panel , not history or extensions. &c
- - Select "Show advanced settings" at bottom of window if shown...
- - - Near at at the bottom click in "Disable Google Cloud ..."
- - - - Some have reported Background apps/  Continue running...  Should also be unchecked


Reboot error after changing desktop environment

Try this:
sudo apt-get remove lightdm
sudo apt-get install lightdm

The idea is that the reinstallation should rewrite all the config files and hopefully appropriate variables with right values.
Update:
Since, reinstalling didn't help, reconfigure the post login setup.  As root, try:
sudo mdmsetup

Under Options, check the selected value.  First try
Run Xclient script
and reboot.  If that doesn't work then change it to
XFCE Session
.


Find files with same name in different folders

If filenames of the movies and subtitles files match and only the extensions differ, something like this should work.

#!/bin/bash

movie_dir=~/Movies
subtitle_dir=~/Subtitles
log=~/log.txt

for i in "$movie_dir"/*;do
    filname="${i%.*}"
    if [ ! -e "$subtitle_dir/$filename.srt" ];then
        echo "$filename" >> "$log"
    fi
done

EDIT
For when each movie file is in it's own folder then try:

#!/bin/bash

movie_dir=~/Movies
subtitle_dir=~/Subtitles
log=~/log.txt

find "$movie_dir" -type f -name "*.mp4" -o -name "*.mkv" | while read i;do
    filename="$(basename "${i%.*}")"
    if [ ! -e "$subtitle_dir/$filename.srt" ];then
        echo "$filename" >> "$log"
    fi
done

This second way should work regardless of the movie folder structure, again as long as the filenames are the same.


How to stop Chromium from reloading pages (upgrade to 14.04 from 13.10)?

Yes, there are two flags to fine-tune this behaviour. See also this issue and this blog post.

In Chrome/Chromium, enter the following address chrome://flags/#enable-offline-auto-reload (or just chrome://flags and scroll down).  You should see the following two options:

You can set Enable Offline Auto-Reload Mode to Disabled, which will completely prevent tabs from reloading. I haven't tested Only Auto-Reload Visible Tabs option yet (it's available since Chrome 37), but I guess that tab reloading must be enabled otherwise it will have no effect.

Restart Chromium for the changes to take effect.


wifi adapter not found after installing Ubuntu 18.04 on acer v5

That is a real problem without an Ethernet connection.

gcc, build-essential, etc. are not installed by default in bionic. This makes it very difficult to install a dkms package, or build anything from source without any network connection.

It is possible to download and install many packages manually, but it really a hard work for an ordinary user.

I suggest installing the 16.04 release. It is possible to upgrade it to 18.04 later.

Also I consider it a serious bug, that should be reported to the developers.

I asked this question. I hope someone will find a better solution.

I looked into the 18.04 LiveUSB and found that it seems that the required dependencies are included to pool. It is possible to download them manually the same way as dkms and bcmwl-kernel-source.


I can't use my Huawei modem in Ubuntu 16.10

I'm using Ubuntu Gnome 16.10, tried lots of suggestions found over the web on forums but the only thing that did work was upgrading usb-modeswitch package found on Debian Sid repositories, links bellow chose according to your architecture.

usb-modeswitch_2.4.0+repack0-1_amd64.deb
usb-modeswitch_2.4.0+repack0-1_i386.deb
usb-modeswitch-data_20160803-1_all.deb

If your USB dongle is activated via PIN than disable it otherwise you'll have to run nm-applet on console in order to have a PIN request dialog box, due to changes on network-manager, you can close it afterward.


Nvm, I figured it out. Turns out a USB SD card reader that I had plugged in was causing that delay. It was also causing the delay in Ubuntu detecting my keyboard upon startup. I unplugged it and it works fine now.


Ctrl+Shift+C = Copy from terminal.

Ctrl+Shift+V = Paste to terminal.

Remove Shift for non-terminal windows.


The URL in the curl command should be changed to https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh

Correct command:

curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh

Source: Hyperledger Composer Docs


ap-hotspot cannot connect to android devices

I just fix the same problem, try this:

sudo nano /etc/NetworkManager/NetworkManager.conf

Change the line that says:

dns=dnsmasq

To:

#dns=dnsmasq

Restart Network Manager:

sudo service network-manager restart


Your script should look like this:

#!/bin/bash
echo -e "enter the filename: \c"
something_to_add=/path/to/something_to_add/file
read -r file_content
if [ -f "$file_content" ]
then
        if [ -w "$file_content" ]
        then
                echo "Please Press Ctrl+c to exit"
                cat "$something_to_add" >> "$file_content"
        else
                echo "You dont have permission to write"
        fi
else
        echo "You have file name $file_content"
fi

Errors noted:

Shebang: wrong (#!/bash/bin/bash) right (#!/bin/bash), better (#!/usr/bin/env bash).
Inner if statement has a wrong else segment.
Added double quotes where necessary.
Rather than echo cat >> do cat >>

Use this online service to check your script:

https://www.shellcheck.net/


Forbid Linux live usb to mount swap and other partitions from broken HDD

Portable installed system in an external drive

I don't know a solution with a live system based on Ubuntu. But I suggest a work-around. Boot into a portable installed system in an external drive (for example a USB pendrive). You can install the system yourself according to the following link,

Boot Ubuntu from external drive.

or use a pre-made system by cloning from a compressed image file according to the following link,

help.ubuntu.com/community/Installation/UEFI-and-BIOS

Such a system (installed like into an internal drive, but in this case installed into an external drive) will not try to use swap partitions in the internal drives of your server. It will only use what is specified in its /etc/fstab file.

I think it is possible to install the repair tools, that you need, and perform the repair tasks with this kind of portable installed system.

Edit: You can also try with a Debian live system. I tested with a Debian [persistent] live system, made from the following iso file,

debian-live-9.0.1-amd64-cinnamon.iso

and it does not use any swap (when booted in a computer where Ubuntu and Ubuntu family live drives grab the swap partitions they find). Sorry to make the Ubuntu fans unhappy ;-)


What is causing the "mount: /etc/fstab: parse error at line 16 -- ignored" error?

Your spaces should be replaced with \040 in the fstab so it aught to look like:

//10.0.0.23/Documents home/alex/Network\040Shares/Documents cifs credentials=/home/alex/.smbcredentials,uid=user,gid=group 0 0
//10.0.0.23/Family\040Pictures /home/alex/Network\040Shares/Family\040Pictures cifs credentials=/home/alex/.smbcredentials,uid=user,gid=group 0 0
//10.0.0.23/Scripts /home/alex/Network\040Shares/Scripts cifs credentials=/home/alex/.smbcredentials,uid=user,gid=group 0 0
//10.0.0.23/Shared /home/alex/Network\040Shares/Shared cifs credentials=/home/alex/.smbcredentials,uid=user,gid=group 0 0
//10.0.0.23/Torrents /home/alex/Network\040Shares/Torrents cifs credentials=/home/alex/.smbcredentials,uid=user,gid=group 0 0

See:

https://www.linuxquestions.org/questions/linux-newbie-8/fstab-space-in-mount-point-directory-names-846362/


Ubuntu 14 installing phpmyadmin newbie question

The installation process will not ask you for the root password nor for your personal user password but for the password of the database user root. This is, if you dont changed it, initaly empty.

You should run

mysql_secure_installation

and set a mysql root password when asked for it. Then restart installation of phpmyadmin with the now well known mysql root password.


I use Avery Design pro a lot, but its has been giving me problems using wine.  Lockup, crashes, and other things.  I found gLables, and for me and what I do is doing OK, so go ahead, and try gLables.

  gLabels is a lightweight program for creating labels, barcodes,
  business cards and media covers for the GNOME desktop environment. It
  is designed to work with various laser/ink-jet peel-off label and
  business card sheets that you'll find at most office supply stores.

  gLabels also supports mail merge from sources such as CSV files,
  vCards and Evolution data servers.

To Install gLables

Now I have downloaded multiple templates from Avery's site, and have been working with them using Libreoffice Writer, with no problems.  So you can use the templates.  See image below.


What does the -r option do when using wget?

In a simplified way -r will retrieve your page first, then it will parse your page, extract the links and retrieve them one by one "level 1". Then it will extract all links from the "level 1" pages and will download those as well ("level 2"), but it will not download again the pages already downloaded. And so on and so forth. I usually use it with -np option, which prevents downloading from parent pages.


Cannot see windows 7 in boot menu after installing ubuntu

Try:

sudo update-grub2

and have the OS prober attempt to place Win7 back in your grub.cfg

Reboot


How do I install lubuntu? (kernel panic)

Im not sure this would be any help, but, I fought with my older machine trying to install 12.04, Couldnt get the cd's to work period. But, when I put the i386 on a flash drive and booted from that, it worked peachy. http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/


Problem solved! The factory settings for device like BQ Ubuntu touch pad doesn't allow to run manual updates. All is required is to enable the device. You can do that with the following command (enable/disable): $ android-gadget-service enable writable Just remember that you cannot update your apps with device being enabled. Turn it off for auto update.


How to add a GRUB2 menu entry for booting multiple Linux OS?

Normally Red Hat and related distributions use an LVM configuration in which there's an LVM partition (which you've got) with at least a couple of logical volumes (which you've got) and a separate /boot partition (which you don't seem to have). Without the /boot partition, you won't be able to boot RHEL, since your system won't have a kernel, which is absolutely essential for booting. My suspicion is that you accidentally deleted your RHEL /boot partition when you installed Ubuntu, which I suspect exists on your /dev/sda1. I can't be 100% positive of this diagnosis, though.

There is one small glimmer of hope: Your /dev/sda1 starts at sector 314,574,848, which means there's about 150 GiB of unallocated space at the start of the disk. If /boot was originally in that space, then it may be possible to recover it with TestDisk. You may want to look into that possibility:

A caveat: If I'm right, changing your disk's partition layout runs the risk of creating new problems or making your current problem worse. Doing a low-level backup of the entire disk is a wise precaution. You'd do that with something like:

sudo dd if=/dev/sda of=/path/to/lots/of/space/sda-backup/img

This command is likely to take several hours to complete. You'll need another disk that's at least a little bit larger than your current /dev/sda, mounted somewhere so that /path/to/lots/of/space will reside on that larger disk.


lxc error: saving config file for the container failed

ok so for info for anyone who gets, this it might be because in the ppa for 2.20 i was offered the snap release instead, and installed.
however on the snap relase it changes the directory to be /var/snap
e.g /var/snap/lxd/common/lxd/storage-pool/ is the new /var/lib/lxd/storage-pool

this is probably ok if you dont symlink the pool and containers like i do.
So the /var/lib/lxd/containers breaks in the snap as its trying to point to /var/snap/lxd/common/lxd/storage-pools/default/containers.

I have since backported the lxd to 16.04 and then changed the symlinks to be as they were without the snap, but i think they would work equally well in the snap.
for info for the backport to 16.04:
apt install -t xenial-backports lxd lxd-client


Ubuntu 14.04 Infinite log in after installing nvidia drivers

I am referring to this answer from my other answers. I had a login loop issue as mentioned here

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.

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


Got it to work! Kind of an ID10T Error but I did find the saucy to raring very helpful as I did not know about that being an issue. I had it trying to install a version I didn't have. The following allowed me to download it successfully:

sudo sed -i 's/saucy/raring/g' /etc/apt/sources.list.d/*pcsx2*

sudo apt-get update

sudo apt-get install pcsx2-unstable

Hope this helps others! And thank you so much mmstick for the help!


How to decrease sensitivity of the Launcher?

You can press the "Windows" button on the lower left of your keyboard to bring up the Dash without complication, although it can take a couple of seconds to come up sometimes on my computer.

You can use the gear at the top right of your screen, go to settings, appearance, and then the behavior tab. From there you can turn off "Autohide". If you want to keep autohide on you can also press Alt-F1 to bring the Launcher up.

Keyboard shortcuts can be very helpful when using Unity. Please see What are Unity's keyboard and mouse shortcuts?.


Pinyin input for traditional Chinese characters?

I just managed to find a solution to my own question. I still haven't been able to get chewing to work the way I want, but here is a fix using the pinyin input method.

First of all, set "Show language panel" to always in the ibus preferences. At the moment, I cannot get the panel to integrate well with unity, so it does not seem to show unless forced to. Next, one of the buttons reads "traditional" and it toggles between simplified and traditional input. Voila!

One suggestion -- since the traditional characters tend to have more strokes, they can be tricky to read to an untrained eye (such as mine). For these purposes, increase the font size in the ibus preferences dialog (14+ looks best to me).


Gnome-Shell top panel over fullscreen games

I've been trying to figure this out as well, and so far the only work around I've found is that you can get rid of the top panel by minimizing any open windows in the background.  For instances if you have a web browser open, then start a full screen game like trine2 or minecraft, minimize the browser, then start it.

It should get rid of the top panel.


How to update a running instance on ec2 without losing data?

Create an amazon image (AMI) of the server and then perform the upgrade. If it fails, replace the server from the image and come back here and ask again. If it works, be happy.


How can one copy the entire contents of a Linux Terminal / "man" pages to a a text editor (gedit in this instance)?

The default terminal emulator on Ubuntu, gnome-terminal should have a "Select all" option in its "Edit" menu.

Once everything is selected, you can copy it with Ctrl+Shift+C, or right-click and selecting "Copy", or "Copy" from the "Edit" menu.

Note however that the terminal buffer is limited by default to a few thousand lines. If your session accumulates more lines, those will be truncated and you only get the most recent part. If you need more, you can change the size of the scrollback buffer in the menu "Edit" > "Profile preferences" > "Scrolling" > "Limit scrollback to ___".

Update based on your clarification in comments:

man uses a pager (should be less by default) which uses a different terminal mode to provide scrollable text on a single screen, instead of relying on the terminal emulator to let you scroll through the backlog.

To get the whole content of a man page in your terminal at once, so that you can select and copy it all, you can tell it to not use any pager by adding the argument --pager=, like:

man --pager= find

If you want this behaviour to be the default, you can append the line below to your ~/.bashrc file:

export MANPAGER=""

Alternatively, the pages is also disabled if you pipe the output through any other command, like e.g. cat, which just reproduces it as it is:

man find | cat

Or if your actual goal is to save the manual to a text file, you can redirect the command output to a file directly:

man find > find.txt


How to create a native application from a Shell Script?

About the first part:
To start with, I would make the script executable and remove .sh extension from both the script and the .desktop file. If you want to use it system wide, then copy the whole directory, except the .desktop file, to /opt. The .desktop file would then be:

[Desktop Entry]
Version=1.0
Type=Application
Name=GTeaKup
Comment=The perfect GTK tea timer!
Exec=/bin/bash gteakup
Icon=gteacup.png
Path=/opt/GTeaKup/
Terminal=false
StartupNotify=false

...and copy that to /usr/share/applications

About the second half of your question: take a look here, especially this one is nice to start with if you never created Debian packages before. You will then get an installer like this. When you install it via the software center, it will complain, because the usual files like changelog, copyright etc. files are not included, but it works fine.

btw you do know that your script acts differently on double-click and when the ok button is chosen? ;)


Steam won't launch in Ubuntu 18.04 after switching to nvidia graphics

The thing here is that Nvidia deprecated 32-bits libraries in the .deb driver packages and the steam client is a 32-bits binary so it depends on the 32-bits libraries (just to be clear, the problem is not with the driver but with the libraries). There are several ways to fix this, the "theoretically" must recommended solution would be to download the .run driver and enable the 32-bits libraries when install, but IMHO install the .run is tedious (and I have not done that since several years ago so I really don't know how it will work today).

My empirical-based recommendation is to install the graphics-drivers ppa (https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa) with sudo add-apt-repository ppa:graphics-drivers/ppa, this ppa includes the nvidia drivers and also the 64-bits & 32-bits version of the libraries. It is supposed to be experimental but it really works fine for me.

The only thing you may need to be focus is that once you install the ppa:graphics-drivers, since you already have the nvidia drivers, you will need to "force version" in order to install the ppa:graphics-drivers (even if it is the same nvidia-390 you are already using). I recommend to use the synaptic package manager since you can tell synaptic everything you want to do before applying (since you might want to change several libraries in the process). also in synaptic you may go to the architecture filter and search for nvidia filtering to i386 so you may install every 32-bits nvidia library (which are not going to be installed by default and you need to install them).


It could be a lot of different things.

At this point, it's probably easiest to try some more experiments to see if you can figure out which part of the stack is not working for you:

Can you install with a text-only mode?
has this computer worked running other operating systems?
can you swap monitors?
can you use a video card other than the integrated graphics?

Another idea is to gather more data: you may be able to connect a serial cable to the mothboard and see if there is a serial log. (I haven't tried this on a physical machine in years, though.)


Clearly you could avoid the cd by doing
echo data/* > results.txt

however this will result in the filenames in results.txt being prepended with the pathname data/.
In zsh, you could use the :t (tail) modifier to strip off the pathname:
echo data/*(:t) > results.txt            # zsh only


Older versions of ls(1) have a different description of the -k option, which I find more accurate:

-k     like --block-size=1K

--block-size=SIZE
          scale   sizes   by   SIZE   before   printing    them.     E.g.,
          `--block-size=M'  prints sizes in units of 1,048,576 bytes.  See
          SIZE format below.

That means -k will lead to ls displaying all file sizes divided by 1024. This may be overridden by other (implicit) options like -h (which displays file sizes “human readable”, i. e. scaled depending on their size and with a scale suffix (K, M, G, T, …)).

You can determine, whether ls is an alias with default command line arguments with alias ls. You can circumvent the alias and run the command directly with command ls -l.


How to launch Firefox browser in Kubuntu?

Here are three ways to install firefox on Kubuntu 12.04. Make sure you enabled all the repositories and do an sudo apt-get update in the konsole program.

Install from the konsole with sudo apt-get install firefox.
Alternatively you can install the Firefox by clicking on the
Firefox installer icon in the start menu (or Kickoff menu). Search for it by typing "Firefox" in the start menu.
Another alternative, (which the OP followed to solve his issue) is
using Muon software center. Open it, Go to Get software →
Internet → Web Browsers and select FireFox Web browser and click on the Install button next to it's label.


Just a thought: the battery charge settings usually are stored in the BIOS, and since you updated your BIOS it is possible that the settings maybe got overwritten (BIOS chips aren't the smartest things).

Sadly currently there doesn't seem to exist any Linux/Ubuntu tool that can manipulate that sort of information (unlike on Windows), which is kinda disappointing.
Still, could you go poking around in your BIOS? You should look for something named "Power Management" or "Battery Optimizer" or "Battery Saver" or something similar as the exact location and name changes from BIOS to BIOS and I'm unable to find a manual for your BIOS.
There should be a setting that controls the maximum allowed battery charge as a percentage - maybe it somehow got set to a horrible default 0% when you updated.

I wanted to post this as a comment, but ran out of space. :/


Problems running Unity and graphical applications with Nvidia Optimus

Got the same error:

Error: couldn't get an RGB, Double-buffered visual

But optirun glxgear works now. I've done it like this: How to install nvidia optimus driver?


Ubuntu 16.04 LTS occasional slow restart and shutdown

In my experience it is because there are applications that have open files. A sure-fire way to test this is for you to close all applications before shutting down and restarting.


I've had similar issues before and found aptitude fixes the problem:
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude upgrade
Aptitude will give you a list of options to choose from to fix your system.


Please keep in mind that adding PPA can be dangerous.

I figured that the two keys were:

The one key was for shutter, which I fixed by adding:

sudo add-apt-repository ppa:shutter/ppa
The other one was the chris lea node.js repository, which I replaced with a different one:

curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -

it autmoatically remove the old chris lea one, and let me proceed with the installation.


I thought all Macs were intel, not amd... anyway follow the guide here:

https://help.ubuntu.com/community/MacBook

Please try and ask only concise, specific questions and not open ended questions.


There exists a library called libunity which is a native wrapper over unity dbus api. Since c++ can link to native libraries, so you can write your apps in C++.

Also check kamstrup's ubuntu develop week session on libunity. I can't search for it since I am on phone with pretty slow network speed.

UPDATE: Here is the link. Thanks to ris
https://wiki.ubuntu.com/MeetingLogs/devweek1103/RockingOutwithlibunity


Can anyone tell me why Gnome 3 looks like as if it were a gnome fallback session in my virtualbox?

This sounds like a graphical error. Running gnome-shell on a machine (in this case virtualbox) that doesnt meet the requirements will fall back on the classic/fallback session.

Try:

open a terminal ( Ctrl+Alt+T )
replacing the current session with the shell ( gnome-shell --replace )

This will try replace fallback session with the shell, if it fails at least you will be able to see why because the errors will be output in the terminal.

Updating the question with any errors will help us to help you.

UPDATE: Workaround...

I believe that gnome-shell is failing an accelerated hardware check which takes place when the session is loaded. A workaround would be to load the gnome-shell when you log into the gnome-classic session.

You can do this by creating a file called gnome-shell.desktop, save it to ~/.config/autostart/
Inside it put the following:

[Desktop Entry]
Type=Application
Exec=gnome-shell --replace
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en]=Gnome Shell Startup
Name=Gnome Shell Startup
Comment[en]=
Comment=
OnlyShowIn=GNOME
AutostartCondition=GNOME3 if-session gnome-classic

There is a difference between gnome-classic and gnome-fallback (classic loads with some effects), if you don't have classic installed change gnome-classic on the last line to gnome-fallback

you will know if its installed if you have 2 Gnome Classic options in your session menu - one will have "(no effects)" written next to it


php-dompdf

It is available only in Trusty

Can be installed with:

sudo apt-get install php-dompdf fonts-dejavu php-font-lib php5 sdop


if you run Windows now, Here is guides.
Website

How to burn a DVD
How to create a bootable USB stick on Windows
Installing Ubuntu 12.04 LTS with the Windows installer


Browsing folders with more than 100000 images

Automatically divide your files into a (recursive) directory with an arbitrary number of files per (sub) folder / folders per superior folder

The easiest and IMHO most efficient way is to have a script reorganize the files into folders, if necessary even different layers of directory levels. This will make your files browsable without choking nautilus.

The script below will do that for you. It will create folders with an arbitrary number of files. These folders will be organized into sub folders if they exceed an (the same) arbitrary number, etc. In other words; each (sub-) level will have the same maximum number of files / sub directories, making browsing easily possible.

Each of the created folders shows the folder number + the number of created sub levels (where e.g. 22_1 only contains files):

The test

I tested in on a directory of 300.000 files, to be reorganized in chunks of (max) 100 files, to be organized into superior directories of (max) 100 folders etc.
It took less then a minute on my system. A test of 100.000 files into smaller chunks was a matter of seconds.

The script

#!/usr/bin/env python3
import subprocess
import os
import shutil

#--- set the directory to reorganize below
dr = "/path/to/directory"
#--- set the number of files/folders per level
size = 100

level = 0
def move(fn, drn, level):
    folder = dr+"/"+str(drn)+"_"+str(level)
    if not os.path.exists(folder):
        os.mkdir(folder)
    shutil.move(dr+"/"+f, folder+"/"+f)

while len(os.listdir(dr)) > size:
    level += 1
    fn = 0; drn = 1
    for f in os.listdir(dr):
        if fn < size:
            move(fn, drn, level)
        else:
            fn = 0
            drn += 1
            move(fn, drn, level)
        fn += 1

How to use

Copy the script into an empty folder, save it as reorganize.py
In the head section, set the path to your directory, the desired number of files per subdirectory (= equal to folders per containing directory).
Run it by the command:

python3 /path/to/reorganize.py

Note

The script (as it is) just creates a directory structure where each level has a defined number of files/folders. It does not take into account any kind of organisation by name, date or whatever.

EDIT

As requested in a comment, a script to move the files back into one flat directory after having processed the files.
The usage is pretty much the same. As directory, set the same directory as the first script, but that seems obvious.

#!/usr/bin/env python3
import shutil
import os

#--- set the directory, the same as the first script
dr = "/path/to/directory"
#---

# move the files back
for root, dirs, files in os.walk(dr):
    for file in files:
        shutil.move(root+"/"+file, dr+"/"+file)
# remove the (now empty) subdirectories
for d in os.listdir(dr):
    folder = dr+"/"+d
    if os.path.isdir(folder):
        shutil.rmtree(folder)

Note

As mentioned in a comment, the script assumes there is not risk of name clashes, since all files initially came from the same (flat) directory.


What does "Disk is OK, one attribute failed in the past" mean?

From here it says:

  You're reading the SMART data. Disk is ok means no bad sectors. One issue in the past is usually an overtemp and it's no big deal.

So run sudo smartctl -a /dev/sdX, where X is your device letter which I think should be a, so that would be /dev/sda. Look through that to see if any issues had occurred that is worth noting, but I doubt.


ubuntu 12.04 doesn't support b110i/b120i/b320i raid controller yet.

http://h18004.www1.hp.com/products/servers/linux/supportmatrix/ubuntu/exceptions/ubuntu-exceptions.html


What is the risk of destroying working software by upgrading from natty narwhal to oneric ocelot?

I wouldn't suggest to stay on 11.10: After upgrading to oneiric ocelot, you should be aware that support (security updates) for 11.10 will be ended in April 2013. You could upgrade to 12.04 after that and have support until 2017: https://wiki.ubuntu.com/Releases
If you use gnome desktop 2.x, you should consider installing gnome-session-fallback (which is a gnome 2.x look-alike and you can select it upon logging in). You could also try out other desktop managers like cinnamon desktop from a ppa.
When you upgrade, the system disables any third party repositories, even launchpad PPA archives. You can always re-enable them.
Before trying upgrade you should backup your data (and/or partitions to another disk), at least the important stuff, so that in the small chance of something going wrong you have them stored in a safe place.
As a personal note, always keep your changes in a text file, e.g. "I installed these packages: (names of packages)" or "I use this ppa for this reason (link to ppa)" or "I changed file (path to file) to be like this (paste the contents of the file". This way you always know what you changed and you can format the root partition of ubuntu and re-apply your changes.


How do I drag a file into an open application?

There has been a bug filed https://bugs.launchpad.net/unity/+bug/995039.

Another workaround in Evolution is to copy the files to the clipboard and then pasting it into the message, but seems that Evolution only accepts this once then greys out the paste function in the right-click menu.

Changing DE should not be necessary unless they mark the bug as a "will not fix" as the bug breaks desktop paradigm.

Good luck.


The following commands are used in the .gif below:

time sudo updatedb # See 8 CPUs run at 3.5 GHz. Then set 800 MHz Below
echo 800000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
time sudo updatedb # See 8 CPUs run at 800 Mhz. Then set 3.5 GHz Below
echo 3500000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
time sudo updatedb # Time is 3.5 seconds instead of 13.8 seconds

To make a long visual short first find out maximum CPU speed before it is throttled:

rick@alien:~$ cd /sys/devices/system/cpu/cpu0/cpufreq/
───────────────────────────────────────────────────────────────────────────────────────────
rick@alien:/sys/devices/system/cpu/cpu0/cpufreq$ grep -r .
energy_performance_available_preferences:default performance balance_performance balance_power power
scaling_min_freq:800000
scaling_available_governors:performance powersave
scaling_governor:performance
cpuinfo_max_freq:3500000
related_cpus:0
scaling_cur_freq:3218768
scaling_setspeed:<unsupported>
affected_cpus:0
scaling_max_freq:3500000
cpuinfo_transition_latency:0
energy_performance_preference:performance
scaling_driver:intel_pstate
cpuinfo_min_freq:800000

Notice the line: cpuinfo_max_freq:3500000 above. 3,500.000 MHz is my processors max speed. So to restore maximum speed I use:

echo 3500000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

Most people do it one by one and some say it's not possible to do them all at once but I've never had a problem doing all 8 CPUs at once. If you want to do one at a time you can use:

echo 3500000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 3500000 | sudo tee /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
         ( etc., etc., etc. )
echo 3500000 | sudo tee /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq

This will restore your CPUs to maximum speed but we still need to find out what package is setting your CPUs to 800 MHz.


execute a script for each line of an input file

It's hard to be definitive without a real example from you, but you can use the array form of the bash shell's built-in read function something like:

while read -ra arr; do cmd "${arr[@]}"; done < file

Ex. given a file

$ cat file
foo some arg 3
bar otherarg 5 -o bar
baz "arg with spaces" -99

then

$ while read -ra arr; do echo cmd "${arr[@]}"; done < file
cmd foo some arg 3
cmd bar otherarg 5 -o bar
cmd baz "arg with spaces" -99

Alternatively, if your command arguments are simple (no quoted spaces for example) then you could try xargs e.g.

xargs -L1 -a file cmd


Trailing windows after installing gnome shell!

Try removing:

sudo apt-get purge gnome-shell gnome-shell-extensions gnome-tweak-tool
sudo apt-get autoremove
sudo add-apt-repository --remove ppa:gnome3-team/gnome3
sudo add-apt-repository --remove ppa:gnome3-team/gnome3-staging
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

Restart you computer. And now, if you want Gnome Shell back, just install it from the official repositories (no need to add nonofficial repositories):

sudo apt-get install gnome-shell gnome-shell-extensions gnome-tweak-tool

If this does not solve it, try remembering if you tweaked something with Gnome Tweak Tool and add that to your question.

[Edit]

Try

sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade
sudo apt-get install --fix-broken
sudo apt-get install gnome-control-center-unity

in Appearance change your theme from Adwaita to Ambiance. If this goes fine you should be able to install Gnome Shell from the official repository.


Change default home folder location to a NAS in Linux Ubuntu 14.04 LTS

I think you are looking linux Group policy which can be controlled from Windows 2012 R2 server. If so, then IMHO, no free solution is available yet.

Some commercial solution is available.
http://www.beyondtrust.com/Products/...vicesADBridge/

http://www.centrify.com/directcontrol/grouppolicy.asp

cheers
--harry


use :

sudo gedit eclipse.desktop

instead of

gedit eclipse.desktop

A standard user cannot alter most of the files or directories except those which are in home folder. In your question you want to modify a file located at /usr/bin. Thus super user privilege are required for modifying the file.

Hence using sudo before gedit solves the problem.

sudo means superuser do, i.e. the user can do superuser operations for an interactive shell


How do I change the menu clock formatting to say "Mon, 18 Dec" instead of "Mon Dec 18"?

You need to set %a, %d %b in the "custom-time-format" entry.

%a:   Weekday as locale’s abbreviated name. (Mon)
%d:   Day of the month as a zero-padded decimal number. (18)
%b:   Month as locale’s abbreviated name. (Dec)

You must also set time-format to custom.


which one is the best windows program loader for Ubuntu11.10?

Play on linux is like a frontend to wine. It will select the best wine version for your apps. (I prefer Play on Linux)


Installing Ubuntu on a harddrive that is already partitioned with Vista and win10

I suggest you read about some dual booting tutorials about Ubuntu. Well, I guess that when asking you about partitions, you should choose the 'something else' option and pick the vista partition there. Set it as root ( / ) and pick the ext4 file system.


Keyboard not working at login screen Ubuntu 14.04

Maybe try working through these solutions? They are for problems after coming back from suspend, but maybe a start.

14.04 - Keyboard does not work in login screen after sleep

Keyboard and mouse unresponsive after suspend


I have the same model (and similar HW parameters) and installed Ubuntu 13.10 with use of external display. Then, I upgraded it to 14.04, but the display on laptop had been still turned off.

In System settings -> Colors, I'd noticed that my laptop display had assigned no color profile, while my external (working) display had some. So, I had assigned a right color profile to the laptop display and rebooted the laptop.

Finally the laptop display has turned on and is still working.


Filter tab-completion per application by extension

List only *.abc files:

compctl -g '*.abc' someprogram

List folders, too:

compctl -/ -g '*.abc' someprogram


The x1550 is no longer supported by the standard driver. You will need to either:

Use the open source driver.
Use this PPA to downgrade your X server and install the driver.
Wait for an update to the legacy driver.

For the PPA option:

Run:

sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx-legacy

Then restart your computer.

To Undo

Install ppa-purge:

sudo apt-get install ppa-purge

Then run:

sudo ppa-purge ppa:makson96/fglrx

P.S. unless AMD wises up, quits being silly, and changes their ways, no driver above 13.1 will support older cards such as the x1550 or HD 3450.


Permanently set the resolution for my second monitor

I don't think you need to use sudo here, in fact you shouldn't if it is unnecessary.

Simply create a small script:

#!/bin/bash

xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
xrandr --addmode VGA-0 "1600x900_60.00"

Copy it into an empty file, save it as set_resolution.sh
Add it to your startup applications: Dash > Startup Applications > Add the command:

/bin/bash /path/to/set_resolution.sh

NB

You might have to add a small break to wait for the desktop to be fully loaded, e.g.:

#!/bin/bash

sleep 10
xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
xrandr --addmode VGA-0 "1600x900_60.00"


How do I know what version of Firefox I have?

Also, you can obtain firefox version through command line

firefox --version

or equivalently

firefox -v


Prevent writing any changes to bootable USB

It is possible to do what you want using a modified Guest User account

Guest User Accounts for 16.04 and prior, are controlled by lightdm.conf, so a minimal graphical interface is required:

sudo apt install xorg
sudo apt install --no-install-recommends lightdm-gtk-greeter
sudo apt install --no-install-recommends lightdm
sudo apt install --no-install-recommends openbox

Once logged in as guest Ctrl-Alt-F2 takes you to text mode.

If Guest Session is not already enabled, open /etc/lightdm/lightdm.conf and change:

allow-guest=true

Now there will be a Guest account.

Modifying the Guest Account

You may use an existing User Account, or create a new User Account, to use as a Live basis for customizing the Guest Session.

Make a directory for guest session, if one does not already exist:

sudo mkdir /etc/guest-session

Create a symbolic link:

sudo ln -s /home/{NAME} /etc/guest-session/skel

Where {NAME} is the name of the User Account you wish to use as a basis.

Any changes made to the user account will appear in the guest account.

Any changes to the guest account will be deleted at end of the session.


My Ubuntu Live CD will only connect to my wired internet on one computer

There is no driver loaded for your wired ethernet adapter, however you can load it by executing:

modprobe alx

If it's working, tell the system to load this driver on every boot:

echo alx >> /etc/modules

The wireless adapter seems to have the appropriate driver loaded.


How to remove Wireshark from my Ubuntu 16.04 LTS?

The following procedure should wipe wireshark from your system:
First uninstall the wireshark package and all related configuration files:

sudo apt-get remove --purge wireshark

Then remove all dependencies that are no longer needed:

sudo apt-get autoremove


There is really no need for a guide.  Just Download the 32Bit or the 64Bit version of Ubuntu Alternate CD, Burn the ISO to a CD, boot from the newly created CD, and follow on screen instructions.  All you have to do is answer a few questions, enter your full name, user mane, and password, then set back and let the installation finish.

To burn the ISO, just look at Burning ISO How to.


How can i tell if a window is in fullscreen from command line

Something like

xprop -name TitleGoesHere _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN

should do it.  Note that the window title used by xprop is the legacy ISO8859/1 title, so Unicode characters won't work; it may also need to be the full title and not just a substring.  xprop itself can be used in interactive mode to get the right string; run

xprop WM_NAME

and wait for the cursor to change to a crosshair, then click on the window.


I kind of change the nautilus and window theme

Run the following in a terminal -

  gsettings set org.gnome.desktop.interface gtk-theme "Ambiance"

  gsettings set org.gnome.desktop.wm.preferences theme "Ambiance"


How to recover data from a failing hard drive?


Can't move desktop icons on ubuntu 19.10 -- How can I re-arrange them?

In Pop OS 20.04 which will match Ubuntu 20.04 you need to right click on the desktop, select customize and turn off Auto-Arrange. Also to get desktop icons to work at all you will need to use the Nemo file manager as your desktop file manager and turn off Extensions > Desktop Icons in Gnome Tweaks. Hope this helps someone.


Massive filesystem corruption after latest update on LUKS encrypted drive

Answer from OP:

Solved by letting fsck run for about an hour of random output. I thought it might be glitched out but it was doing its job properly. Imagine my excitement when it completed and all my files were back :)


Can using PCManFM rather than Nautilus/Files in 18.04 cause problems?

It will not cause problems.  PCManFM and other similar lightweight file managers (Thunar etc) do not integrate into the OS.  They keep to themselves and store their own separate settings and configuration files.

The link you posted talks about "Full blown file managers", which I believe is talking about something like Nautilus or Dolphin.  These are much larger file managers which do much more with the OS.

I have installed Dolphin before on a system that used Nautilus.  While it didn't really cause problem, it did make of mess of package installs because installing Dolphin on a Gnome system also installs many many KDE and Qt packages.  These files could conflict with Gnome and may cause problems if they both try to accomplish the same task, like mounting inserted devices.  It's also more difficult to remove because of the large amount of dependencies that comes with it.  Lightweight file managers like PCManFM have very few dependencies from desktops.

The worst conflicts of the past were installing both Gnome and Unity, which is no longer an issue.  It's best to keep the 3 major desktops and their dependencies apart if possible.


You can open the first menu of the menu bar using F10, so the first it'll open is the file menu.

You can navigate to other menus using the right and left arrow keys.


How to install swi-prolog as a shared library?

sudo apt-get update && sudo apt-get install swi-prolog swi-prolog-nox

Provides

.
/usr/lib/libswipl.a
/usr/lib/libswipl.so
/usr/lib/libswipl.so.7.2
/usr/lib/libswipl.so.7.2.3
/usr/lib/pkgconfig/swipl.pc
.

You can read the complete file list here http://packages.ubuntu.com/xenial/amd64/swi-prolog-nox/filelist


Before installing the development version of OpenCV, I'd suggest to use this code to set the capture size (from the link you posted I assume you're using python):

import cv2

cap = cv2.VideoCapture(device_no)
cap.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width)
cap.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height)

To install the development version of opencv (3.0.0-dev today) please follow the steps below:

cd $HOME
mkdir opencv_src
cd opencv_src/
git clone https://github.com/Itseez/opencv.git
cd opencv/
mkdir release
cd release/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install


Can I share my internet connection with my nintendo switch over USB?

Unfortunately USB A -> A cables aren't really a thing

They are a thing.
Here's one example: https://www.startech.com/Networking-IO/USB-PS2/usb-file-transfer-cable-windows-mac~USB3LINK
Here's another:  https://www.datapro.net/products/usb-3-0-super-speed-a-a-debugging-cable.html
The first cable is an active cable that "pretends" to be two ethernet or serial adapters back to back.  The benefit of this is that it's a single cable that should not require any special drivers on either host, but since it's not actually two adapters then it can "cheat" in providing 5 Gbps data throughput.
The second cable is a passive cable.  As the description of the cable states on the web page this is a cable with limited support for data transfer.  Both ends have to be set up for this specific kind of cable for this to work.  As far as I can see there has not been much in development in making this an easy to set up connection.  For something like a Nintendo Switch there isn't a whole lot an end user can do to make this work.  There's a limited number of devices the Nintendo Switch will recognize and support.  The active transfer cable may work.  Given the cost and high possibility of it not working it is likely easier, and cheaper, to buy a couple USB to Ethernet adapters and connect them with a short Ethernet cable from your spare parts drawer.
When it comes to the setting up the sharing of the internet connection there's been advice covering this before here:  Share wireless Internet connection through ethernet


How to mount all partitions at system startup

You should add the partitions in question to your /etc/fstab. The following line will automatically mount /dev/hda2 at boot (that's hidden in the flag default).

/dev/hda2   /   ext2    defaults    1 1

If you don't want to mount, you would issue noauto amongst your options. In your question you appear to be using uuids to address your partitions. You should probably write something like:

UUID=A2E6A54AE6A52011   /mnt/somedisk  auto   defaults 0 0

Using man fstab  you can learn the specifics of the file's syntax.

Update after you posted your fstab and so on.

You really did screw up the mounting. I am surprised you can boot with four devices mounted into the same mount point /. Presumably, it mounts the first (your all important root partiation /dev/sda8) and then fails with mount point not empty when it tries the others (or some other error dependent on the type of file systems involved)

At any rate, you need to learn about fstab. Have a look at some of the first google hits for understanding fstab.

So here is what you should do:

First create the mountpoints:

sudo mkdir /mnt/sda2 /mnt/sda3 /mnt/sda5 /mnt/sda7

If you wish you can be more creative with the names. You can also put them somewhere other than /mnt. Your choice.

Next edit your /etc/fstab and put in lines for each of them

/dev/sda2 /mnt/sda2 auto defaults 0 0
/dev/sda3 /mnt/sda3 auto defaults 0 0
/dev/sda5 /mnt/sda5 auto defaults 0 0
/dev/sda7 /mnt/sda7 auto defaults 0 0

I think you had a spare whitespace between the slash and the mnt/sda. These things matter since you broke the mount point into two.

Then, do not reboot. You should be able to test it saying:

sudo mount /mnt/sda2 # and so on for the other partitions

If that works, on next boot they should all come up. If you wish you can replace /dev/sda2 and so on with their respective UUID

footnote instead of screenshots, simple text would have made it possible for me to copy and paste your fstab. As it is, it's pretty but uses more bandwidth and conveys less usable information.


Tried updating from 11.10 to 12.04, gets stuck at boot screen

You cannot easily back up your files on Linux from Windows, as Windows can't read the ext4 filesystem.  You will need to boot into a LiveUSB / LiveCD environment and mount your Linux partition, and copy off data from your Linux partition to your Windows partition that you want to keep via the LiveUSB/LiveCD environment.

From there, if your upgrade failed and gets you stuck in a boot screen, I suggest a clean install of 12.04, then restore your files which you backed up afterwards.

This is just my suggestion, though, there may be better suggestions from others if you wait a bit more.


Why do only some of my logs get rotated?

It looks like the problem comes down to you specifying a directory for file rotation, instead of actual file names. The configuration files for logrotate accept wildcards for globbing (pattern matching).

To rotate all files with a .log extension in your /home/rails/myproject/log directory you could use the following line in place of the first line of your configuration:

/home/rails/myproject/log/*.log {

and similarly in the postgres directory configuration

/var/log/postgresql/*.log {

It's possible to use the * wildcard without the .log extension, to rotate all files (except hidden ones starting with a .) in your postgresql directory, but I prefer the added control of specifying .log files only:

/var/log/postgresql/* {

As a side note, be aware of how you create new versions of the log file with logrotate, if you create the new postgresql log with 644 octal permissions, owned by the root user, then the postgres user will not be able to write into the new log file.


GRUB is now the default bootloader and i cant boot without a flashdrive with grub so i can select windows 7

You will need a recovery disk for your version of windows. Once you have this you can boot to it and click the 'advanced repair' option (if it doesn't fix itself). Under 'Advanced Repair' you can select 'Recovery Console' and issue the following commands:

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildBCD

This will wipe the MBR, the partition boot record, and install the default Windows bootloader. You will be unable to boot Ubuntu if you have it on your desktop. Your USB drives will be unaffected and they will continue to work as expected.


csh and tcsh both are available in the universe repository in precise (Ubuntu 12.04).

You need to:

Enable the universe repository
Update local package list for repositories:

sudo apt-get update

Install csh, tcsh:

sudo apt-get install csh tcsh


How do I find out which ports I need to open in my firewall to get Samba working?

this ports tcp 445
if you plan to use netbios/name resolution this ports: 137 138 udp 137 139 tcp

Greethings bernd


How to detect if an OpenVPN connection has disconnected?

Just ping a host inside your network that is normally always available and if the ping returns anything except 0, run the script...

while :
do
  ping -c 1 -n -W 2 HostName
  iPingReturn=$?
  if [[ $iPingReturn != 0 ]] ; then
    ScriptToRunInCaseOfFailure.sh
  fi
done

The disadvantage of this system is that if that specific host goes down, your script thinks the network is down, therefore I normally do a send-notify, not run a script...


I cant install ubuntu tweak on ubuntu 17.04 can anybody help me?

Ubuntu Tweak is dead, Jim. It is no longer maintained.

The often-used cruft cleaning functions have been forked into Ubuntu Cleaner. There is a ppa (ppa:gerardpuig/ppa) or you can download it from here.

Reference: http://www.omgubuntu.co.uk/2016/12/free-space-ubuntu-cleaner-janitor-app

The answer to this question talks about a repackaged version of the full app for 16.04.  I do not know if it is available for 17.04


Is there any way I can prevent Ubuntu 16 from freezing under heavy CPU load?

The linux kernel is really good at managing the CPU, so I think your problem is IO related. It is totally normal that the CPU is used 100% when you're compiling, and this is what you've paid for.

However, I agree with you, the UI should not be so badly affected.

About your unresponsiveness of your system

I think you should try ionice to lower the IO priority of android studio.

Memory

It's also possible that your system is low on RAM, and start using swap. top can be used to see the swap usage. This can be fixed either by reducing RAM usage, by adding RAM or eventually tuning the swappiness of your system.

Unfortunately, I'm not a user of Android Studio, and I can't help with it's configuration.

About the complete freeze

This should really not happen, this is a bug and you should fill a bug on the ubuntu bugtracker.

But before filling a bug, I think you should update your system, including installing the latest HWE kernel and Xorg (see here).


How to set proxy settings to view YouTube from China in Ubuntu?

The specific proxy, there are many.

Personally, I would recommend Tor for firewall jumping

https://www.torproject.org/

https://www.torproject.org/download/download-easy.html.en

Download the proper version that suits you (32bit or 64bit). I recommend using this link first.
Enjoy proxyjumping!


LiveCD mounts the partitions, but it doesn't see any

"I can access the partitions already created" -- does that mean you mounted them?

The installer doesn't like your volumes mounted - gparted will error.

I suggest setting up a new partition table with the installer, as long as it not gonna mess up your Windows partition.


Could be broken keyboard/hardware. I'd try swapping the keyboard first.
There is a possibility that this is a symptom of a keylogger. I definitively wouldn't type in any passwords until you're absolutely sure your system is clean, also be on the lookout for strange activity in the syslog (/var/log/syslog) and any of your online accounts.


Why is Update Manager non-responsive and why is my wireless off?

With the help of rfkill list i have managed to figure out that the hard unblocker was the combo of Fn + F8.
As for the other problem, still not solved. I mean that when i have updates ready i can't load the interface with them listed. I click it but it doesn't load. But I am able to right click it and then click the option install all updates. Ideas anyone?


wlan0 disappeared after update for intel 8260 - help me recover?

modprobe: ERROR: could not insert 'iwlwifi': Required key not
  available

This is a new issue in Ubuntu. I suggest that you register and file a bug report: https://help.ubuntu.com/community/ReportingBugs

It appears that the only solution so far is to enter the computer's BIOS and turn off Secure Boot.

To do so, look around the options after booting your computer in the setup utility mode; look for a Secure Boot switch and turn it off. Then exit and boot Ubuntu normally

Secure Boot is a security standard developed by the PC industry to help make sure that your PC boots using only software that is trusted by the PC manufacturer

Reboot. Your wireless should now be working.


Is there a way to automatically rollback a snap if the service fails to start?

There is indeed a mechanism to deal with this. You might find this article/walkthough helpful. The basic idea (from the article):

  Snapd won't check the health of your snap for you, as it doesn't know
  enough about your snap to perform a decent health check. However, it's
  pretty easy to check the health yourself.

  Snapd recently gained support for hooks, which is a way for snapd to
  notify individual snaps about various events. There's one hook in
  particular that supports configuration. It's beyond the scope of this
  post to walk through configuration itself, but there's something
  important about this hook that's worth knowing: it runs upon initial
  install, and it runs when the snap is updated, after the snap's services are started. This makes it a decent
  place to perform a health check.


19.04 boots to flashing cursor after windows memory management bsod

This is more ongoing debugging session than an answer

Your Linux is up

If c-a-f2 gives you a login... Which means if

logout (ctrl-d) followed by again login works
ls works
apt/apt-get work

Then

shell is working
basic utilities are ok
kernel is ok
grub is ok

Currently it looks like

Apt (data) is not fine
X (lightdm)
is not starting ok
Efi issue

I'm not up to recent Ubuntu...Here's the older solutions. You may want to open new focussed questions

apt-get update... apt-get -f
service lightdm restart...check X logs
Image/text-copy/photograph efi message


Just desing your interface in Qt-Designer and convert it to python file executing pyuic4.

Eg:

pyuic4 editorFrame.ui -o editorFrame.py

then you can import it from your main class, in this case i'm using a QMainWindow:

import sys
from PyQt4 import QtGui
from editorFrame import Ui_MainWindow

class Editor(QtGui.QMainWindow):

    def __init__(self):
        super(Editor, self).__init__()
        self.ui=Ui_MainWindow()
        self.ui.setupUi(self)
        self.show()

def main():
    app = QtGui.QApplication(sys.argv)
    ex = Editor()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()


You are downloading Windows software and attempting to install it on Linux. Windows installation packages will not work (without installing the Windows compatibility layer, Wine) ; but it's usually best to find a native Linux program for a given task.

Installing software in Ubuntu is usually done through the software centre, or the Synaptic package manager, or using the command line apt-get utility. You can download .deb packages, or even download sources and compile them, but it's usually best to use a package manager if you can.

For media playback, try the default Movie Player (Totem) or VLC
If you want to download YouTube content, check out this thread, especially the complete comments section.


It looks like the problem isn't that the script isn't running, but that it is running too soon, before the system has finished setting everything up, and therefore fails because your machine isn't ready to run it yet. So a simple solution is to add a delay to the script so that it waits a bit before launching.
Edit your reboot.sh script, and add a sleep call:
#!/bin/sh

## wait for 60 seconds
sleep 60

/usr/bin/screen -AmdS world /home/[user]/azerothcore-wotlk/acore.sh run-worldserver
/usr/bin/screen -AmdS auth /home/[user]/azerothcore-wotlk/acore.sh run-authserver

You can experiment with the sleep value to find something that works and doesn't feel slow.


Laptop switches off during the installation process

Get the .iso image ONLY from www.ubuntu.com/download/ Use a torrent [available at http://www.ubuntu.com/download/desktop/alternative-downloads ] if you're using a slow connection. Burn onto a new DVD at a slow speed using a system different fro the previous one.

If it still fails, you can try installing on your HDD using another machine. For eg, I failed many ties while installing FreeBSD on my laptop (and on a friend's laptop of same make & model), but it went smooth on both HDDs when I used them in my Desktop!

Good luck!


Gnome Xmonad broken after upgraded to 14.10

Here's a more detailed solution based on Jianingy answer. It fixes a few issues I was having after upgrading to Ubuntu 14.10. The issues it's fixing include:

Multimedia keys not working
Display settings in Gnome-control-center not working

You need to add DesktopName=Unity to /usr/share/gnome-session/sessions/xmonad.session.

[GNOME Session]
Name=Xmonad/GNOME
RequiredComponents=gnome-settings-daemon;gnome-panel;xmonad
DesktopName=Unity

Also, regarding dbus-send changes in Ubuntu 14.10, you have to use --print-reply=literal instead of --print-reply=string. I have added that to my xmonad.hs and I define main as main = xmonad $ gnomeConfig2.

import XMonad.Config.Desktop
import XMonad.Util.Run (safeSpawn)

import qualified Data.Map as M

import System.Environment (getEnvironment)

data RescreenToggleState = RescreenToggleState Bool deriving Typeable
instance ExtensionClass RescreenToggleState where
  initialValue = RescreenToggleState True

gnomeConfig2 = desktopConfig
    { terminal = "gnome-terminal"
    , keys     = gnomeKeys <+> keys desktopConfig
    , startupHook = gnomeRegister2 >> startupHook desktopConfig }

gnomeKeys (XConfig {modMask = modm}) = M.fromList $
    [ ((modm, xK_p), gnomeRun)
    , ((modm .|. shiftMask, xK_q), spawn "gnome-session-save --kill") ]

-- | Register xmonad with gnome. 'dbus-send' must be in the $PATH with which
-- xmonad is started.
--
-- This action reduces a delay on startup only only if you have configured
-- gnome-session>=2.26: to start xmonad with a command as such:
--
-- > gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string
gnomeRegister2 :: MonadIO m => m ()
gnomeRegister2 = io $ do
    x <- lookup "DESKTOP_AUTOSTART_ID" `fmap` getEnvironment
    whenJust x $ \sessionId -> safeSpawn "dbus-send"
            ["--session"
            ,"--print-reply=literal"
            ,"--dest=org.gnome.SessionManager"
            ,"/org/gnome/SessionManager"
            ,"org.gnome.SessionManager.RegisterClient"
            ,"string:xmonad"
            ,"string:"++sessionId]


This question is from 2014, but probably someone still have this problem, so I wanted to share my solution. Before getting to my single line of code, please note, that xbindkeys supports a guile configuration (http://www.nongnu.org/xbindkeys/xbindkeysrc.scm.html) where you can add advanced functionality. I didn't check it out, but probably this will be the best solution for it.

When you want to stick with your old configuration, I wrote a small 'hack' to archive a double action:

"if ls ~/.xbk_double_caps; then [YOUR COMMAND]; else touch ~/.xbk_double_caps; sleep .5; rm ~/.xbindkeys_doubleclick; fi"

    Caps_Lock

This script will activate [YOUR COMMAND] when Caps_Lock key is pressed two times in 0.5 seconds. It checkes if a temporary file exists. If not, it'll touch this file but delete it after 0.5 seconds. Between touching and deleting, [YOUR COMMAND] can be triggered.

It works great for me.


Will Ubuntu 12.10 run on intel core 2 duo 2.00GHz?

You can take a look at this site:
https://help.ubuntu.com/community/Installation/SystemRequirements
There you find the minimum Requirements for Ubuntu.

I think it should run, it also runs on my Intel Core2Duo (2x 3.0GHz) machine ;-)


Link a directory(with its own files and folders) to another directory

So it turns out I needed to give the full path. Instead of ln -s hello/ /var/www/, you should write the full path of hello. In my case, it was the following:

ln -s /test/hello/ /var/www/

The folder inside /var/www/ should be a blue color now with no errors when trying to open it.


How to install Tamil language in Ubuntu touch?

I had faced same issue and I got it resolved. Steps are below,
First run :

sudo mount -o remount,rw /

and then run

sudo apt-get install ttf-tamil-fonts.


403 forbidden access apache on ubuntu full access

Check the permission of parent folders. All the folders in the chain must have +x (execute privileges) available to the www-data user (usually via other permission).


Use  BleachBit. I guess this is default in Ubuntu.