How to hide a code from myself until a specified time

A physical measure may be easier to implement and cumbersome enough to circumvent.

For instance, a proposal would be: Plug in your router and modem into a power strip, plug said power strip into a timer device , then lock the entire setup in either a closet or a cupboard, such that only a power and network cable come out (by "network" I mean what you'd plug into the modem, be it a phone line or a coaxial cable). Have someone else (neighbor, relative) keep the key, in case you need to fix things. The timer will control when you have access to the internet. Again, this is possible to circumvent, but cumbersome: unless you have extra equipment, or go into such a rage that you thrash the closet or cupboard to gain access, you should be well-covered and need not mess with the computer itself (which is a good idea since you need it to work).

To implement this entirely on the computer,  first I'd do some research to locate the most low-level component you need to disable in order to remove all internet access (perhaps the network card driver? the ifconfig and ip commands?). Then you could gpg encrypt that component with a randomly-generated symmetric key, and schedule an e-mail to be sent to you later with the key, so you can reenable things. You need some sort of service where once you schedule the e-mail, you have NO way of looking at it or changing it (so something like a calendar reminder may be out of the question). Perhaps one of those e-card services where you can schedule card sending.


BIND9 server not responding to external queries

After doing a good amount of testing I found that the firewall was still blocking the UDP port. I got the data center to do some more checks and they did a refresh of the firewall rules, which unblocked the port.

Things to note...

nmap -sU [IP] -p 53 was returning open/filtered. After making sure it wasn't anything wrong with my server I concluded there was a problem with the data center firewall.


Can't find Windows after installing Ubuntu

Indeed your question is different. If you really installed Ubuntu over your Windows partition then your Windows has been overwritten and is deleted.

In case you had non-backuped data on this partition you may be able to restore them (at least partly) with data recovery tools.


How do I show the full folder path of open Nemo file browser windows when I right-click the Launcher in Ubuntu?

I figured it out myself. It's way easier than I expected. I just needed to learn the best view settings to use for the Nemo file manager.

Question 1. The answer to the first part of my question: How do I see the full path when I right-click on the nemo icon in the launcher bar?

Answer: go to Edit --> Preferences --> click the Display tab --> check the box for "Show the full path in the title bar and tab bars". (See screenshot below). Close all of your nemo file manager windows, and re-open them to make this take effect. Done!

Here's what it looks like now when I right click. Notice it shows the full folder path!:

Question 2. The second part of my question: are there alternative (and better) ways to choose the File Manager window I want (ex: when I have 10+ windows open)?

Answer: YES! Use Tabs instead of new Windows! Open a new tab with File --> New Tab or just Ctrl + T. Now, use Ctrl + Page Up to navigate to the tab to your LEFT and Ctrl + Page Down to navigate to the tab to your RIGHT.

The tabs work just like they do in the terminal now, except that in a terminal you have to use Ctrl + Shift + T (note you must also use the Shift key) to open up a new Tab.

You can also use F3 (View --> Extra Pane) to split your window when you'd like to view two folders simultaneously side-by-side.

Yaaaay! Solved!---(after about 5 years of being bothered by this).


How to enable the Ubuntu Tweak login settings section?

Look at the next picture. Do you see a Unlock button. That's it!


ip address of the printer is going to be the same as the server it is connected to.

ifconfig
iwconfig

If it is a network printer, not connected to another computer, but directly to your LAN, either it will display on the printer menu (menus vary by printer/model) or you can get the ip address from your router.


How do I see my name in the panel in Gnome Shell?

I think the username is no longer displayed in the top panel (that dconf key only applies to the menu now, as the description shows). If you do wish to have it shown there, install this extension.

Unfortunately, that extension lists compatibility for only a single version of GNOME Shell (3.10.4). So we'll need to update the list for it to work:

wget https://extensions.gnome.org/download-extension/simple-name@rmariano.github.com.shell-extension.zip?version_tag=3835 -O simple-name@rmariano.github.com.shell-extension.zip
mkdir simple-name@rmariano.github.com
cd simple-name@rmariano.github.com
unzip simple-name@rmariano.github.com.shell-extension.zip
sed -i 's/"3.10.4"/&, "'$(gnome-shell --version | awk '{print $3}')'"/' metadata.json
cd -
mv simple-name@rmariano.github.com .local/share/gnome-shell/extensions

(You could also manually obtain the version using gnome-shell --version, then update the metadata.json file using an editor.)

Then restart GNOME Shell (press AltF2, type r, press Enter). Then use gnome-tweak-tool to enable the extension:

$ gnome-shell --version
GNOME Shell 3.12.2

An explanation:

The Extensions website doesn't offer a way to download the extension directly. So we have to manually fish the download link and download it.
The zip file so downloaded doesn't have a top level directory, so I create one, following the convention I saw in .local/share/gnome-shell/extensions: name@website. Then unzip the file.
metadata.json is a JSON file. This attribute is what we're looking for:

"shell-version": [
  "3.10.4"
],

I used sed to look for "3.10.4", then append the current version obtained via $(gnome-shell --version | awk '{print $3}') to it. gnome-shell --version usually prints GNOME Shell x.y.z, so I use awk to get the third field (x.y.z). JSON arrays take the form [a,b,c,...], so all I need to do is add ,"x.y.z" to the existing entry.
Move the extension to the proper directory, then restart the shell for it to be noticed, since this wasn't done through the GNOME Shell interface.


Not able to boot after installing ubuntu 14.04 on a brand new dell precision tower 5810

I had this same issue with a Dell 5810. Turns out it was related to installing Ubuntu in UEFI mode. I was able to fix it by following the excellent advice from Ubuntu here and here. To summarize the advice from those two links, I did the below after I encountered the screen the OP mentions.

Reboot the PC using the Ubuntu install disk and selecting the "Try Ubuntu" option.
Once the live cd has loaded to the desktop installed and launched the Boot Repair tool in a terminal by doing:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Select the "Recommended Repair" option.
Rebooted.

There's probably a more elegant way of doing the install. However, this was pretty easy so I didn't investigate it further.


Have 8.10 (ibex?) I made a 12.10 DVD, how do I install?

Take a look at Ubuntu's official guide for installing the latest version. Now that you have the DVD, you will

Insert it into the drive,
Reboot the computer,
Choose a different boot device (usually by pressing F12 during the initial startup; your computer should display a message about how to access the boot menu when it is booting),
Select the DVD as the boot device,
Follow the prompts to "Install Ubuntu by Itself"

It is far more likely that you will get a clean, working installation if you don't try to upgrade: instead, choose the option for a fresh installation that erases the hard disk.


VirtualBox Ubuntu Server 16.04.3 Running on Windows 7: Can't access web app running on port 8080 from host

When you use a bridged connection in Virtualbox, a direct connection is made between your VM and the network. Your VM will be assigned a diffrent IP address from you host and therefore you should use that IP address.
The command ifconfig should output the IP address of your VM.
E.g. If the output of ifconfig for eth0 includes 'inet addr: 172.16.1.72' then you should connect to 172.16.1.72:8080.


How I can change background color of query editor in Workbench?

From bug #1:

  Several areas of the workbench seem to be hard coded to having a white background. This basically makes a really good looking tool like MySQL Workbench virtually inaccessible and unusable for me.

(from the bug report)

http://forums.mysql.com/read.php?153,368243,368346
http://forums.mysql.com/read.php?152,398334,398512#msg-398512
Bug #1: http://bugs.mysql.com/bug.php?id=52485
Bug #2: http://bugs.mysql.com/bug.php?id=64013

But now why Linux owns Windows... bug 2 has this comment:

  Fixed as of the upcoming Workbench 5.2.43, and here's the changelog entry:

  On Linux, the "WB_FORCE_SYSTEM_COLORS" environment variable was
   added. Enabling this variable (with a value of 1) will disable
   MySQL Workbench from using its own color scheme.
   Example usage: export WB_FORCE_SYSTEM_COLORS=1.
   This is useful for certain conditions, like when using the
   HighContrastInverse or GnomishDark system themes.


Without 3rd party applications, terminal cannot display graphics. It's only resolution is the text block.


Take an image of a physical machine using VMWare Converter Standalone - options are disabled

I don't expect the exe version to work like you expect since they run in wine.

You absolutely should have a second disk in your PC and you should boot a live or backup system in order to create an image from your system. Booting a live system should never be dangerous to your current OS.

The most straight forward approach is this. It won't give you any software related problems:

Use dd (disk dump) to create an image from your disk, something like:

sudo dd if=/dev/sda of=/media/hdd/disk.img bs=1M

(if is input file, of is output file, bs is block size and 1M will speed up the transfer.)

After that convert the image using qemu-img:

qemu-img convert -f raw -O vmdk /media/hdd/disk.img /media/hdd/disk.vmdk

That's it.

You may delete /media/hdd/disk.img as soon as your VMWare works.

Be aware that you temporarily need up to twice the disk space of the size of your source disk, which means you cannot dump the system without a second hard drive.

Be careful with dd, if you output to disk (of=/dev/...) instead of a file, you will destroy your data on that disk. Apart from this it's totally safe. I did this a thousand times without backup ;)

Afterwards you can simply create a new virtual machine with similar specs as your real system. Then instead of creating a new disk choose the one we created using qemu-img.

Another idea: probably you can convert directly from disk

sudo qemu-img convert -f raw -O vmdk /dev/sda /media/hdd/disk.vmdk

but I haven't tried this yet. Would speed up the process by 90%

Note: you should boot a live CD for execution of DD else some data on the disk.img might be corrupt. This should not be a problem since most data that is modified (logs, temp) is not vital to a system. But eg. databases will be broken (in theory).

If you cannot boot a live CD, please run your system with as few processes as possible. Usually you can achieve this in Linux by calling sudo init 1. This will shutdown your GUI session and bring you to a text mode login.


dpkg opporations fail: Failed to run depmod, error processing linux-image-generic

Run these commands to remove unconfigured  packages,

sudo dpkg -P linux-image-3.11.0-18-generic
sudo dpkg -P linux-image-extra-3.11.0-18-generic
sudo dpkg -P linux-image-generic
sudo dpkg -P linux-generic

Then finally run the below command to fix the package dependencies,

sudo apt-get install -f


Problem to connect to a wireless router in Ubuntu 12.10

So, if you try to connect, enter right network key, and after that it asks for key again, that means something is with network settings. I am not sure what settings you use but to change them go to System Settings -> Network -> Wireless and choose that wireless network you want to connect. After that edit it, go to Settings -> Wireless Security and set there wireless security right options.

So for your network it will be something like this:


How to install the latest versions of NodeJS and NPM?

Fresh installation

Use the NodeSource PPA. For details look at the installation instructions. First, choose the Node.js version you need and add the sources for it:

v=8   # set to 4, 5, 6, ... as needed
curl -sL https://deb.nodesource.com/setup_$v.x | sudo -E bash -

Then install the Node.js package.

sudo apt-get install -y nodejs

P.S.: curl package must be installed on server for these code lines.

Upgrading

If you have nodejs already installed and want to update, then first remove current instalation and install it again using scripts above.

sudo apt-get purge nodejs npm


If the corresponding Virtual Machine is running then the options under acceleration tab(Settings->System->Acceleration) would be grayed out.

So poweroff the virtual machine in-order to enable Hardware Virtualization(intel vt-x).


Can you make a script pass a command inside of an application?

In the case of mysql, you can pass commands as arguments using the -e command-line option, or via standard input - using a here-document for example. So either

mysql -u dbUser -pdbPass -e 'use mydb; show tables;'

or

mysql -u dbUser -pdbPass << EOF
use mydb;
show tables;
EOF

(where dbUser, dbPass, mydb are replaced as appropriate).


Can I get online support from Canonical for improving performance?

Related to support ,

They have lot of subject based IRC Chat channels here as Chat support IRC

  There are several Internet relay chat (IRC) channels on the freenode
  network (irc.freenode.net) used for Ubuntu support and development.

  The best place to start for general help with Ubuntu or just to meet
  other Ubuntu users is #ubuntu or one of the many local language
  channels.

  Specific channels are available for Ubuntu derivatives: #kubuntu,
  edubuntu, #lubuntu and #xubuntu and separate channels relate to development, bugs,local community (LoCo) teams, accessibility and
  documentation. Choose from the current list of channels .

  When participating in Ubuntu IRC channels, please follow the code of
  conduct.

Plus - Gain enough Reputation to Chat on AU Chatroom itself.

Ubuntu also provides Paid support service, refer the Canonical Profesional Desktop Support Service page.

As far as PC performance goes , you can try asking the question in detail description as required. Example

How can I improve Ubuntu overall system performance?


How to compare the output of the "head" command applied to two different files?

diff is meant to print different lines only. The fact that you got those lines printed means they're different. Take these two as example:

# lines different, have output
$ diff <(head -n 1 /etc/passwd) <(head -n1 input.txt)
1c1
< root:x:0:0:root:/root:/bin/bash
---
> hello world
# same file, first lines aren't different, no output
$ diff <(head -n 1 /etc/passwd) <(head -n1 passwd.copy)
$

Note that even slightest change should be detected by diff, so for example if I add a single trailing space in passwd.copy those two first lines are not the same anymore, even though at first sight they look so:

$ diff <(head -n 1 /etc/passwd) <(head -n1 passwd.copy)
1c1
< root:x:0:0:root:/root:/bin/bash
---
> root:x:0:0:root:/root:/bin/bash

See also Understanding diff output


Try:

sudo apt-get remove thunderbird
sudo apt-get update
sudo-apt-get install thunderbird=17.0.11 (OR thunderbird=17.0.11ers)

Not sure if it would work.


Can't remove or install kerio-control-vpnclient

This is my first run with pkill to find my system's path for pkill, then edit your /lib/systemd/system/kerio-kvc.service and use the full path on ExecReload for pkill.

At the end it should look like this:

[Unit]
Description=Kerio Control VPN Client
After=network.target
[Service]
Type=forking
Restart=always
RestartSec=5
ExecStart=/usr/sbin/kvpncsvc /var/lib/kerio-control-vpn 2>&1 | logger -p daemon.err -t kerio-control-vpnclient 2>/dev/null
ExecReload=/usr/bin/pkill -SIGHUP kvpncsvc
[Install]
Alias=kerio-vpn
Alias=kerio-control-vpn
Alias=kerio-control-vpnclient
WantedBy=multi-user.target


What are the security support statuses of derivatives?

Security is the same across all supported derivatives of Ubuntu (Kubuntu, Xubuntu, Lubuntu, etc.).

See also:

http://www.ubuntu.com/usn/

https://wiki.ubuntu.com/BasicSecurity

https://wiki.ubuntu.com/Security/Features


Make Folder a symbolic link to two folders?

Scripted solution(s)

1. Automatically updated library view

With the background script below, you can set up a directory, virtually showing the combined content of an arbitrary number of other folders.

The content of the folder (existing of symlinks) is dynamically synchronized with the (combined) sources.

How it works

The script periodically lists the content of the source folders as well as the targeted folder for the "library" -view.

If there are items in any of the source folders, not existing in the library, a symlink will be created in the library.
if there are items in the library, not existing in any of the source folders (actually a broken link), the item is removed from the library.

Comparing lists is extremely light weight (programmatically)  and low on resources. I tested the script with a much faster loop then in the script below, with a number of items of about 500 in a single directory level, with no additional (noticable) load whatsoever.

The script and how to use

#!/usr/bin/env python3
import os
import sys
import time

# --- set loop time below (or leave it as it is)
loop = 5
# ---
# don't change anything below

target = sys.argv[1]
sources = sys.argv[2:]

while True:
    currlinks = os.listdir(target)
    compare = []
    for dr in sources:
        for f in os.listdir(dr):
            compare.append(f)
            if not f in currlinks:
                # create link
                os.symlink(dr+"/"+f, target+"/"+f)
    # clean up possible broken links
    for link in currlinks:
        if not link in compare:
            os.remove(target+"/"+link)
    # loop time
    time.sleep(loop)

Copy the script into an empty file, save it as library_view.py
Test- run the script with the targeted directory, to view the combined directories in, as first argument, the source directories as next arguments, e.g.:

python3 /path/to/library_view.py /path/to/virtual_library /path/to/source1 /path/to/source2

This command will show the content of the folders source1 and source2 in virtual_library.
If all works fine, add it to startup applications: Dash > Startup Applications > Add. Add the command:

python3 /path/to/library_view.py /path/to/virtual_library /path/to/source1 /path/to/source2

Note

As mentioned, you can add more than two soure directories if you like.

2. Manual version

If you would prefer not to use a background script for some reason, you can manually update (synchronize) the library folder, with exactly the same command under a shortcut key, using the script below:

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

target = sys.argv[1]
sources = sys.argv[2:]

currlinks = os.listdir(target)
compare = []
for dr in sources:
    for f in os.listdir(dr):
        compare.append(f)
        if not f in currlinks:
            # create link
            os.symlink(dr+"/"+f, target+"/"+f)
# clean up possible broken links
for link in currlinks:
    if not link in compare:
        os.remove(target+"/"+link)

Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command yo a key combination of your choice:

python3 /path/to/library_view.py /path/to/virtual_library /path/to/source1 /path/to/source2


This command works in the terminal, but not in a shell script

Because the default Terminal interpreter is Dash, where you are running the script in Bash. Bash features things that Dash doesn't.

Anyway you can fix Steam like this:

Before running Steam:

ln -sf /usr/lib/libstdc++.so.6.0.20 ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

After running Steam:

rm $HOME/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
rm $HOME/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6


Find process id by command used by the process and kill it

This will give you the process id(s) of ffmpeg command:

pgrep -x ffmpeg

But you can directly kill it using pkill:

pkill -x ffmpeg

Specify the signal (default is SIGTERM), e.g.

pkill -x -9 ffmpeg

Why -x:
pgrep/pkill matches a pattern, so unless you add -x option (exact match), it will match also thisisnotffmpeg.

You might need -f to match the full command instead of the process name only, e.g. if you have multiple ffmpeg command running from which you only want to kill specific ones ending with blabla:

pkill -f '^ffmpeg.*blabla$'


How to display page number in Bangla Language in LibreOffice Writer?

You could try to modify the Page Number character style, setting its CTL language to Bengali. To do so:

Open "Styles and Formatting" (F11 or Menu Format);
Select the Character Styles (using the second button from the left, the one showing an a);
Select the Page Number style with a single left click;
Right-click, select Modify... select the Font tab. Now you can set the CTL language for that character style.


fapws3 server restart gives warning and service is unavailable

I spent hours on this problem until I found out, with the following command:

sudo netstat -anp -p | grep 80

that there are many processes waiting on close on the port. After killing them by hand it was possible to initialize a new instance of pound.


Is it possible to to take screenshot and paste it using keyboard only?

Yes there is. Below I listed some shortcuts which are on Ubuntu 14.04 by default. Screenshots will be copied to clipboard automatically.

Ctrl + Alt + PrintScreen = Active window

Ctrl + Shift + PrintScreen = Selected area

Ctrl + PrintScreen = The whole screen


Add the following line to your ~/.bashrc:

alias sudo='sudo '

From the bash manual:

  Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may be set and unset with the alias and unalias builtin commands.

  The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. The characters ‘/’, ‘$’, ‘`’, ‘=’ and any of the shell metacharacters or quoting characters listed above may not appear in an alias name. The replacement text may contain any valid shell input, including shell metacharacters. The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded is not expanded a second time. This means that one may alias ls to "ls -F", for instance, and Bash does not try to recursively expand the replacement text. If the last character of the alias value is a space or tab character, then the next command word following the alias is also checked for alias expansion.

(Emphasis mine).
Bash only checks the first word of a command for an alias, any words after that are not checked. That means in a command like sudo ll, only the first word (sudo) is checked by bash for an alias, ll is ignored. We can tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.


Installing Ubuntu 17.04 (in dual boot with Windows 10): Bootloader failed to install

I have found on some systems, that the error isn't actually the install but grub update that fails. the file /etc/grub.d/30_uefi-firmware errors breaking the creation of grubs config file.

edit it to read:

set -e

gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2

cat << EOF

menuentry 'uefi-firmware' {

fwsetup

}

EOF

and the grub install should complete. the last line of the installer menu should be a command line, nano is the editor.
if not then complete install without the bootloader and make the corections via a live cd. then update grub for the installation.


I run my Windows version of Steam under wine with the following script

cd /home/[your-user-name]/.wine/drive_c/"Program Files (x86)"/Steam
export WINEPREFIX=$HOME/.steam
export WINEDEBUG=-all
nice -n 19 wine Steam.exe

Perhaps it will work for you as well.


How to change the background of the default Ubuntu splash screen in 19.04?

Open the file with below command

sudo -H gedit /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.script

look for the content at line no. 192 (Please note that I have already changed line no. 192)

logo.image = Image (logo.jpg);
logo.sprite = Sprite ();
logo.sprite.SetImage (logo.image);
logo.width = logo.image.GetWidth ();
logo.height = logo.image.GetHeight ();
logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width  / 2;
logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height;
logo.z = 1000;
logo.sprite.SetX (logo.x);
logo.sprite.SetY (logo.y);
logo.sprite.SetZ (logo.z);
logo.sprite.SetOpacity (1);

at line no. 192 logo.jpg is the Image of my interest and its location must be /usr/share/plymouth/themes/ubuntu-logo/ as described in this file /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth

[Plymouth Theme]
Name=Ubuntu Logo
Description=A theme that features a blank background with a logo.
ModuleName=script

[script]
ImageDir=/usr/share/plymouth/themes/ubuntu-logo
ScriptFile=/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.script

After saving the file, run sudo update-initramfs -u and the changes will be effective after a reboot.


WindowsXP Guest OS runs only when its Virtual HDD is in the home folder of Ubuntu

Where is Partition B mounted? And how is VirtualBox pointed to it?

I have a similar setup as yours, except my host is 11.04 (Natty) and XP runs fine as a guest OS.

I have 2 drives, instead of 2 partitions. My 2nd drive is mounted at /mnt/shared, and the storage/disk in VB points to /mnt/shared/VirtualBox/VDI/WinXP.vdi.


Unmet dependencies. Try 'apt-get -f install'

I deleted the repositories related to cuda

$ rm /etc/apt/sources.list.d/cuda*

updated the repositories using apt-get update

Purged all the files related to cuda

$ sudo apt-get --purge remove cuda*
$ sudo apt-get autoremove

Problem solved.


'starting version 219' bug after the 15.04 update

I had some similar errors with my system, and I found that it was an error with some fstab entries (external drives that were no longer physically connected). I just commented them out and the system booted as usual. Or you can try to reattach missing external devices.


How can I extract content from a Nokia E5-00?

Comment modified to answer

While you can access stored media files on your device's extended memory (Memory Card) in Ubuntu directly when you connect your device to your PC in "Mass Storage" mode, there are no Linux alternatives to Nokia PC Suite or Nokia Suite which allow you to contacts and messages.


Separate X Screens with Unity and nvidia-current on 8600GTM

Have the same problem. It's not possible with Ubuntu 11.10 anymore, sorry. You can use TwinView which is the only option that partially works (unless you have screens with different refresh rates, for example, or if you need hardware acceleration on the second screen).


Look into using rsync to perform the actual backup to your other server:

man rsync

You will need to know exactly what data you would like to backup, though. Just from the list of programs (if you are using the vanilla directories), you will want to at least backup:

/var/lib/apache2
/var/log/apache2
/var/www
/etc/apache2
/var/lib/mysql

For scheduling the backup process, you can look into crontab:

man crontab

Tips:

Try to isolate the backup process to a specific user, then give it read access to the backup directories. I would highly recommend not using the root user to backup your data.
Make sure that your backup script is executable (chmod +x /my/backupscript)
rsync runs over SSH, so whatever is initiating the backup will need SSH access (man ssh-keygen).
Depending on what kind of data you are hosting, you will want to make sure and stop all processes that are using the backup directories. I would definitely recommend stopping MySQL at a minimum (service mysqld stop).
It's more efficient to make a local, compressed (man tar) backup of the data (for example, to /backups/mydata_$(date +%s).tgz), then rsync the local backup to your other server. Actively rsyncing the actual directories could lead to extended downtime on your db as your dataset grows.


How to watch Apple keynote videos from the website

Where there is a will, there is a way.  Apple changes links and their website around frequently, but in general, what you have to do is this:  open the page source.  Look for urls or javascripts that seem like they will open the video stream.  They used to have bare urls, but now there is usually some javascript that does the job.  I would look for something with edgesuite.net (or events.apple.com) in it.  I found http://events.apple.com.edgesuite.net/1210pibasdfvoihbadsv/event/url.js

I opened the js file and found:

/*snowLeopard url*/
var slURL = "http://qthttp.apple.com.edgesuite.net/1210pibasdfvoihbadsv/sl_vod_mvp.m3u8";

/* non-snowLeopard url*/
var nonSlURL = 'http://stream.qtv.apple.com/events/oct/1210pibasdfvoihbadsv/12poibnasfdvpiajbafvpihjbasfvpiubfsv10_350_vod_ref.mov';

etc.

I took the Snow Leopard URL and tried opening it in VLC (using "open network stream") and it didn't work initially.  So I tried running it via command line, got some libav error, googled around a bit, and finally tried:

vlc --ffmpeg-threads=1 'http://qthttp.apple.com.edgesuite.net/1210pibasdfvoihbadsv/sl_vod_mvp.m3u8'

which worked perfectly.


See the solutions in these questions (I've included some of the top suggestions, where they are packages):

How do I limit internet bandwidth?

wondershaper
trickle

How to limit internet speed?

wondershaper with mastershaper front-end

Monitoring of Network

snmpd
cacti

How can you monitor internet data usage?

ntop

How do I find out which process is eating up my bandwidth?

iptraf
nethogs
iftop


How can I copy and rename the same file with a list of names?

I'll presume that you have the list of names in a file at /path/to/target_names.

To make the copies, open an terminal and cd to the directory containing this file. Then run

for i in $( </path/to/target_names tr -d ',' ); do cp grey.png ${i}; done

Instead of copying, which will multiply the size required by the number of new files, you could use using symlinks instead, where each new file references the original file, without copying it.

for i in $( </path/to/target_names tr -d ',' ); do ln -s grey.png ${i}; done

N.B. that if you use symlinks, you won't be able to change the relative paths of the original and the targets later. i.e. they will have to stay in the same directory. (You can make the symlink for an alternative directory with the original command if you like.)


I ended up using gparted and using the create new partition table option in the menus. The disk now works.


The issue was that the package xserver-xorg-legacy was missing. Additionally /etc/X11/Xwrapper.conf had to include:

allowed_users=anybody
needs_root_rights=yes

Finally I needed to delete ~/.XAuthority for the »kioskuser«.


How can I set up Zotero to use Ubuntu one's storage instead of zotero.org's?

Absolutely, positively do not move your Zotero folder into the Ubuntu One sync folder. The Zotero folder contains the Zotero database - zotero.sqlite - and syncing that via sync services like Ubuntu One, Dropbox etc. will very likely lead to database corruption. There are dozens of threads on the Zotero forums of people who wanted to save a couple of bucks by doing this with dropbox and ended up with a hopelessly corrupted database.

Ubuntu One does not support WebDAV, so that's out.

You can put just the storage folder within the Zotero data folder into Ubuntu One. I believe it's possible to designate that folder to be synced by Ubuntu One, otherwise create a symlink to it in the Ubuntu One sync folder. This will allow you to back-up files online and sync them between different computers, but as opposed to syncing through Zotero storage, you won't be able to access the files through your library at zotero.org, nor will you be able to share files in groups.


The error you are facing has nothing to do with the choice 32bit / 64 bit - its more that the ubuntu installer overrides the Windows Boatloader - you have to manually take care of it. There are plenty guides out there who deal with that topic. e.g https://help.ubuntu.com/community/WindowsDualBoot

I'd recommended for you though to use 64 bit ubuntu, since the i5 core allows you to and the amount of ram you're currently running is enough.


I could solve it by simply adding

setenv('LC_ALL','C')

to the Matlab code.


conjure-up kubernetes on 4 local servers

The localhost cloud type in Conjure-Up will install all the units in LXD containers locally on the host you run conjure-up on. This is one of the easiest ways to install Kubernetes with Conjure-Up but you do need a server that's powerful enough to run all these containers.

If you want to install Kubernetes with Conjure-Up on multiple servers (bare metal deployment), you should look at the MAAS cloud type. Refer to the MAAS documentation[1] for configuration instructions.

Once you have MAAS running, you'll be able to point Conjure-Up to your MAAS cloud and install Kubernetes on the servers. But looking at the The Canonical Distribution Of Kubernetes Juju bundle[2], it looks like you'll need at least 10 machines to deploy CDK on MAAS.

The Kubernetes Core bundle[3] deploys less units. It looks like it would run on 4 machines.

You could also tweak the Juju charm bundles to deploy in LXD containers on your servers instead of directly on the physical servers but that is probably outside the scope of this question.

One other thing you can do if you just want to get started with Kubernetes is look at microk8s[4]. microk8s is:

Fast and Secure upstream Kubernetes
Designed for developing Kubernetes Workloads locally
Get a full Upstream Kubernetes system running in under 60 seconds

[1]https://docs.maas.io/2.4/en/

[2]https://api.jujucharms.com/charmstore/v5/canonical-kubernetes/archive/bundle.yaml

[3]https://jujucharms.com/kubernetes-core/

[4]https://microk8s.io/


The move to other cube face - causes a "flash" is registered as a bug at Ubuntu's launchpad:
https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/874862

You can subscribe - to get mails on the subject, including when the bug will be fixed, at the above link.
As for the "move window to other cube face" - which doesn't move the window - looking for a solution to that myself - a really useful feature.


How to configure the Browser View in Banshee?

You cannot change this. There is a coming feature in Banshee that will make it possible to use another view (IIRC).


Maximum simultaneous connections on desktop vs server Ubuntu

This is copied form Ubuntu's own wiki page:

What's the difference between desktop and server?

The first difference is in the CD contents. The "Server" CD avoids including what Ubuntu considers desktop packages (packages like X, Gnome or KDE), but does include server related packages (Apache2, Bind9 and so on). Using a Desktop CD with a minimal installation and installing, for example, apache2 from the network, one can obtain the exact same result that can be obtained by inserting the Server CD and installing apache2 from the CD-ROM.

The Ubuntu Server Edition installation process is slightly different from the Desktop Edition. Since by default Ubuntu Server doesn't have a GUI, the process is menu driven, very similar to the Alternate CD installation process.

Before 12.04, Ubuntu server installs a server-optimized kernel by default. Since 12.04, there is no difference in kernel between Ubuntu Desktop and Ubuntu Server since linux-image-server is merged into linux-image-generic.

For Ubuntu LTS releases before 12.04, the Ubuntu Desktop Edition only receives 3 years of support. This was increased to 5 years in Ubuntu LTS 12.04 In contrast, all Ubuntu LTS Server Edition releases are supported for 5 years.


Cross-compiler on Ubuntu 14.04.5 LTS under Linux Subsystem for Windows

https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13377507-please-add-32-bit-elf-support-to-the-kernel

and here is the answer. 32-bit precompiled binaries do not work under the linux subsystem for Linux.


You need to utilize "startup services" to disable those specific processes.

See this link for more information How to enable or disable services?

It gives you some options as "how to".

Go to System -> Preferences -> Startup Applications. Un-check things which you want to disable on startup.


Short Answer:

Run the Live environment, and DO NOT INSTALL: https://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install

Otherwise, follow the links Eliah provided.

Long Answer:

Installing an OS can be a big deal; you can easily run into trouble either by your own mistake or by getting unlucky and the installer fails or messes something up. Then you may have to get into some really geeky troubleshooting, depending on how bad it is.

Ubuntu has been refined and is an attempt to make Linux easy and accessible for anyone. If you're willing to try that, then go ahead and install as they guide you to.

However, if you are this concerned already, and the many mistakes you made using technical terms were in fact from your best effort of explaining your problem, I warn you that you do not sound experienced enough to handle any issues that may come up, and I even fear you being prone to making an accident that can make you lose things.

Recommendation: If this is your only / main PC, don't install it; just run the Live environment to try it out. If you want to install it, do it on an older computer you don't care about.

If you're willing to risk it on your main PC, then simply follow instructions carefully, exactly, and go ahead! You SHOULD be fine, Ubuntu is pretty good, and you will never learn if you don't try! BUT, always be safe: back up your files, know how to re-install all the programs you want, etc., in case everything gets - or needs to be - wiped.


why Ubuntu-4.15.0-76.86 which is based on 4.15.18 have some extra git commits from 5.0

Ubuntu back-ports security patches/fixes from later kernels to supported kernels.

The 4.15 kernel is used by Ubuntu 18.04 LTS (plus 16.04 LTS with HWE enabled etc) so it'll thus have security fixes back-ported to it during it's supported life.  This applies to other supported kernels, however generally not to new features - only security fixes/patches.


Show notify-send content in Gnome's lockscreen

Thanks to Chris Williams (chrisawi) from the Gnome IRC Channel the following solution was found:

Create a script called notifier in /.local/bin/ with this content:

#!/usr/bin/python3

# License: MIT
# Author: Chris Williams

APP_ID = "com.example.Notifier"

import sys
from gi.repository import GLib, GObject, Gio

class Notifier(Gio.Application):
    def __init__(self):
        Gio.Application.__init__(self, application_id=APP_ID, flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
        self.set_option_context_parameter_string ("ID TITLE [MESSAGE...]")
        self.add_main_option("icon", ord('i'), GLib.OptionFlags.NONE, GLib.OptionArg.STRING, "Icon name or file", None)
        #self.add_main_option("quit", ord('q'), GLib.OptionFlags.NONE, GLib.OptionArg.NONE, "Quit", None)
        self.add_main_option(GLib.OPTION_REMAINING, 0, GLib.OptionFlags.NONE, GLib.OptionArg.STRING_ARRAY, "", None)

    def do_command_line(self, cl):
        Gio.Application.do_command_line(self, cl)
        opts = cl.get_options_dict().end().unpack()

        #if opts.get("quit"):
        #    self.quit()

        args = opts.get(GLib.OPTION_REMAINING, [])
        if len(args) >= 2:
            notification = Gio.Notification()
            notification.set_title(args[1])

            if len(args) >= 3:
                notification.set_body(" ".join(args[2:]))

            icon_str = opts.get("icon")
            if icon_str:
                try:
                    icon = Gio.Icon.new_for_string(icon_str)
                except GLib.Error as e:
                    if not e.matches(Gio.io_error_quark(), Gio.IOErrorEnum.INVALID_ARGUMENT):
                        raise
                else:
                    notification.set_icon(icon)

            self.send_notification(args[0], notification)
        else:
            print ("not enough arguments")

        return 0

if __name__ == '__main__':
    app = Notifier()
    app.run(sys.argv)

Mention it in the original notify-send script, that also lies in /.local/bin/:

#!/bin/bash
while : ; do
    notifier -i emote-love-symbolic idxyz "$(sort -R ~/Sonstiges/Affirmationen/Affirmationen.txt | head -n 1)"
    sleep 30m   # time in minutes
done

You also have to create a .desktop file, either in /.local/share/applications/ or in /.config/autostart/ if you want this script to be executed at startup. My /affirmationen.desktop in /.config/autostart/ looks like this:

[Desktop Entry]
Name=Affirmationen
Exec=affirmationen
Icon=emote-love-symbolic
Type=Application
StartupNotify=true
Hidden=false
NoDisplay=false
Terminal=false
X-GNOME-UsesNotifications=true
X-GNOME-Autostart-enabled=true

Enjoy!


Running 32-bit Firefox with sun-jre in 64-bit Ubuntu

Note: The description below is valid if you encounter Juniper <7.3 VPN logins. Juniper/Junos 7.3 and upwards should work out of the box with an up to date Ubuntu install.

I am running Ubuntu 12.04/64bits and also stumbled into this problem. For logging into the Juniper VPN via the web-interface at my Clients site I have to supply user/pass/sms-code. So the mad scientists scripts don't work for me either.

I have crafted a slightly different solution for running a 32bit-browser + 32bit Java compared to what psypher246 writes. I have installed a second Firefox browser, a 32 bit version, besides the main 64 bits version installed by package management.
Other solutions describe completely removing the 64 bit browser and replacing it with the 32 bit one, but I don't want to do that. Too much time spent getting that browser the way I want it.

This is what I did.

Download a recent java-32 bit tarball from Oracle and unpack it where you want it to be (/opt/java or /usr/lib/jvm whatever). You don't need to do the update-alternatives stuff. Just a JRE should be sufficient.
Download a recent pre-compiled 32 bit version of Firefox. Unpack the tarball where you want it. (unpacked mine just in my home folder).
In the resulting firefox folder, there is a browser folder. Create a plugins folder in there and create a link to libnpjp2.so in the plugins folder. (like ln -s <your-32bit-jre>/lib/i386/libnpjp2.so <your-firefox32bit-location>/firefox/browser/plugins/ )
Now start the 32 bit Firefox version from the shell with -p forcing a profile choice. (cd <your-firefox32bit-location>/firefox and ./firefox -p). Create a new profile to be used with this 32 Firefox. Make sure Firefox will ask for the profile to be used at every startup.
Now with about:plugins in the Firefox address bar you should only see the 32-bit java plugin. With this browser instance, go to the Juniper login page and you should be able to start the VPN session.
You can still start the 64 bit version of Firefox but then select the original (default) profile and the full session with 64 bit plugin's is still there and can be used side by side with the 32 bit Firefox.

The downside of this is that you have to select the correct profile each time you start Firefox, but this can be solved setting default parameters on the command line.


Likelihood that I can install Ubuntu on a given desktop

Inexpensive Dell laptops that come with Ubuntu preinstalled are widely available, including offline at stores, and you also save money by not buying a laptop that comes with Windows preinstalled. Dell laptops that come with Ubuntu preinstalled have customized hardware that is selected to be compatible with Linux.

Dell laptops that come with Windows preinstalled often require running some additional commands in the terminal to get all the hardware devices to work properly, but the probability of a successful installation is high, although I don't know how to provide an exact numerical value for the probability of a successful installation short of asking Dell. In general, Dell uses the Ubuntu community for supporting the Ubuntu operating system including providing drivers in the repositories, etc.


the following package have unmet depnedencies?

What did you tried to install it broke dependencies?

to remove a package misconfigured or improperly installed can run the following

sudo aptitude purge $(dpkg -l|grep ^rc|awk '{ print $2 }')


Must execute "sudo su" and then do apt-get update/upgrade/install, prefacing with sudo doesn't work

This is expected behaviour - sudo resets the environment by default. Starting a root shell with sudo su is one workaround. You can also modify the sudo behaviour (see the linked page).


I suggest you right-click the Network Manager icon and select Edit Connections. Under IPv4 settings, change the method to Automatic (DHCP) addresses only. Then fill in your preferred DNS nameservers. Please see:


ecryptfs-mount-private failure in Ubuntu 18.04: mount: No such file or directory

Update 2019 Sept:

This bug is now appearing for me in Debian 10 (buster).
After some additional investigation, the problem seems to be a missing entry in /etc/pam.d/lightdm

I believe there should be a line:

# Create a new session keyring.
session    optional   pam_keyinit.so force revoke

before:

@include common-account

Original, 2018 Sept post, the following work-around still works, but the fix above might be more correct:

With Ubunutu 18.04 and lightdm / systemd (the GUI login screen) there is something broken wrt Kernel keyring (as of 2018 Sept). This breaks some functionality in the
ecryptfs scripts, which make use of the session key-ring.

After logging into your account via the GUI (lightdm), you will notice that your session keyring is not initialized correctly:

keyctl show

There are several work-arounds to this. One was noted by @serg-tt which uses a Linux Console login.

To fix this bug, and get the default user session keyring applied after a GUI login,
I put a (temporary) fix by adding a file:

/etc/X11/Xsession.d/98fix-keyring

The contents of this file:

# Work around a bug in lightdm and/or systemd that leaves
# an incorrect session keyring (a root owned keyring)
# applied. I think this supposed to be fixed in pam
# by pam_keyinit.so, however, it does not seem to be
# working.

# Try and use the default session keyring for the user:
[ "$UID" ] || UID=`id -u`
keyringname=_uid_ses.$UID
## keyctl show > /tmp/fix-keyring$$ #DEBUG

STARTUP="keyctl session $keyringname $STARTUP"

After applying this fix, you would need to log out and log back in again.


Is it possible to run files with .vbe extension on Ubuntu?

No. "vbe" stands for Visual Basic Editor and is a script language Ubuntu does not support.

From wine you would need microsoft office and use the office part this file is made for (likely Excel).

Or you could install virtualbox, windows in that, office in that and run it from there.

Mind that "setup.vbe" on google more than once refers to malware.


As SpamapS said in comments, mysql-server and mysql-client are meta packages. This meta packages are empty and normally depends of packages that can change name regularly with version changes, or a large amount of packages that do the same function (ie ubuntu-desktop). As you can see:

braiam@bt:~$ apt-cache depends mysql-client
mysql-client
  Depends: mysql-client-5.5
braiam@bt:~$ apt-cache depends mysql-server
mysql-server
  Depends: mysql-server-5.5

Both packages depends of others, so you must check those to see the actual version apt is installing:

braiam@bt:~$ apt-cache policy mysql-server-5.5 | grep Installed
  Installed: 5.5.31+dfsg-1
braiam@bt:~$ apt-cache policy mysql-client-5.5 | grep Installed
  Installed: 5.5.31+dfsg-1

You should run apt-cache policy mysql-server-5.5 mysql-client-5.5 | grep Installed to check out the installed version on your system.


Ubuntu 20.04: Switching Virtual Desktops (Workspaces) with Shortcut Keys while Using 'Workspace Matrix'

You can change the keybindings with dconf-editor.

Install:

sudo apt install dconf-editor

Run dconf-editor and go to /org/gnome/desktop/wm/keybindings/

Search "switch" and change the settings to your needs:

E.g.:

['<Super><Control>Right']


Ubuntu 16.04 64 bit ISO image not downloading

Try downloading the ISO image via torrent. Here Alternative downloads.


Installed postgres 9.6 'successfully' from source but not available

By default a postgresql service built from the stock sources (from https://www.postgresql.org/ftp/source)  will be installed into /usr/local/pgsql, and your Ubuntu system will totally ignore it, it's not part of what it knows about.

Part of the reasons why packages are used is not just to avoid compilation, it's to have proper integration into the system concerning starting/stopping/logging the service, and consistency in where all the programs and files reside.

If you manage yourself all these aspects,  it's entirely possible to use postgresql from /usr/local/pgsql

If you were using a recent version of Ubuntu, an easier option would be to grab the pre-compiled packages in the form of .deb files and install then manually with dpkg, if you have to pick them up individually rather than having apt-get update do it for you. The precompiled binaries made available by PGDG are
https://apt.postgresql.org/pub/repos/apt/pool/9.6/p/postgresql-9.6/

However as you have Ubuntu 12.04, your next problem is that it's no longer supported, so I don't think these packages would work, in the sense that they would probably depend on other packages that 12.04 doesn't have.


Permission denied creating directory after switching user

You switched to a new user but you are still under the user safi home directory. safi_test4 does not have permission to create files in the safi home directory.

Run the following command to switch to the safi_test4 home directory:

cd


Touchpad requires you to press really hard on MacBook 2.1

A lot of people with Macbook varieties have installed alternate drivers for the trackpad so they can modify them to their hearts' content.  In my case, I installed xf86-input-mtrack driver.  To install it, at the terminal type:

sudo apt-get install xserver-xorg-input-mtrack

Put in password as usual when prompted.

Now you need to actually switch from the old driver (called "multitouch") to this one.  You will need to put some entries in /etc/X11/xorg.conf

sudo nano /etc/X11/xorg.conf

Put in:

    Section "InputClass"
        MatchIsTouchpad          "on"
        Identifier               "Touchpads"
        Driver                   "mtrack"
    EndSection

This is the bare minimum you need in the conf file.  You will undoubtedly want to now experiment and tweak it until the driver gets to the Goldilocks "just right" stage.

Here is the readme by the author of the driver:  https://github.com/BlueDragonX/xf86-input-mtrack/blob/master/README.md

It explains the different options.  Here's an example, using my conf:

     Section "InputClass"
          MatchIsTouchpad    "on"
          Identifier         "Touchpads"
          Driver             "mtrack"
          Option             "Sensitivity"           ".67"
          Option             "TapButton1"            "0"
          Option             "TapButton2"            "0"
          Option             "TapButton3"            "0"
          Option             "ScrollDistance"        "100"
          Option             "FingerHigh"            "8"
          Option             "FingerLow"             "8"
      EndSection

I don't like any of the tapping business, so I turned them off.  FingerHigh is what you are most interested in.  Default value is 5.  It defines the minimum pressure the touchpad will recognize as a touch.  As you can see, I found it very sensitive, so I set it to 8.

Now reboot.  If all goes well, you've fixed your problem.  It's that easy (or at least, it should be -- knock on wood).

Finally, a discussion thread started by the driver author is here:  http://ubuntuforums.org/showthread.php?t=1730361

A fair amount of the info in there is outdated, not applicable, or in some cases wrong (some examples of the xorg.conf files mistakenly have "multitouch" where "mtrack" should be).  But the initial post is worth reading as it explains the author created dispad to work with the driver, for those who accidentally touch trackpad a lot while typing.  I don't have that problem, so I didn't install dispad, but maybe you will need it.


All you need to do is to add redirect line to /etc/apache2/sites-available/domainname.vhost file for example:

<VirtualHost *:80>
    ServerName example.com
    Redirect permanent / http://www.example.com/
</VirtualHost>


What happens if I delete the default folders in my home folder?

Those folders are "well known" user folders defined by Freedesktop (check here: http://freedesktop.org/wiki/Software/xdg-user-dirs).

In Ubuntu 10.04 you can edit the file ~/.config/user-dirs.dirs to change the location of those folders. When you've change the file you need to restart nautilus (run 'nautilus -q' in a terminal or log out an in again).

/N


Is Ubuntu suitable for an embedded system?

It doesn’t make sense to run an embedded distribution on a work station, nor a workstation distribution on an embedded device. A PC running Ubuntu desktop would work great as a work station for programming your micro-controllers.

The Ubuntu Software center has loads of software you can start with like Arduino IDE (integrated development environment), or programs that could help you with circuit simulation and or circuit board design. I prefer synaptic to view available packages. If you find something on the net that isnt available through either the software center or synaptic but runs on linux, its often easy to install anyways.


PulseEffects
Audio effects for Pulseaudio applications

Effects Available
Applications Output

Limiter
Auto Gain
Expander
Compressor
Multiband Compressor
Equalizer
Bass Enhancer
Exciter
Crystalizer
Reverberation
Crossfeed
Filter (Lowpass, Highpass, Bandpass and Bandreject modes)
Stereo Tools
Loudness
Maximizer
Gate
Multiband Gate
Deesser
Convolver

Applications input

Gate
Multiband Gate
Webrtc
Limiter
Compressor
Multiband Compressor
Equalizer
Reverberation
Pitch
Filter (Lowpass, Highpass, Bandpass and Bandreject modes)
Deesser

The user has full control over the effects order. Just use the up/down arrows
next to the plugin label at the left side. To be able to use all plugins you
must have the following installed in your system:

GStreamer Plugins Good.
Version 1.12.5 or higher
GStreamer Plugins Bad.
Version 1.12.5 or higher
Calf Studio Plugins. Version 0.90 or higher.
ZamAudio Plugins
MDA.LV2
libsamplerate
libsndfile
zita-convolver
libebur128
Audio effects for Pulseaudio applications

Install
To install  PulseEffects on Ubuntu >= 18.04 (18.04, 18.10 etc.)  do:
sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
sudo apt update
sudo apt install pulseeffects pulseaudio --install-recommends

PulseAudio >=12 is recommended (see issue #99). It will be installed from this PPA. Ubuntu's patches are ported from Ubuntu 18.10 to 18.04.
These package should, but probably won't be compatible with recent releases of Debian/Deepin and other Debian-based distributions. To try installing PulseEffects on Debian/Deepin:
echo "deb http://ppa.launchpad.net/mikhailnov/pulseeffects/ubuntu bionic main" | sudo tee /etc/apt/sources.list.d/mikhailnov-ubuntu-pulseeffects-bionic.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FE3AE55CF74041EAA3F0AD10D5B19A73A8ECB754
echo -e "Package: * \nPin: release o=LP-PPA-mikhailnov-pulseeffects \nPin-Priority: 1" | sudo tee /etc/preferences.d/mikhailnov-ubuntu-pulseeffects-ppa
sudo apt update
sudo apt install pulseeffects


If you choose to use proprietary binary drivers (as the nvidia-* drivers are) then you really need to approach NVIDIA to get support for them. The drivers are completely outside of the Linux kernel, and so kernel developers and Linux distributions like Ubuntu shouldn't provide end-user support for them.

That said, if you want to go down this path, you'll need to ensure the version of nvidia-* binary drivers which you install provides support for the Linux 5.4 kernel shipped in Ubuntu 20.04.

To install the latest NVIDIA proprietary drivers, you may need to disable the open source drivers first on boot:

Boot the computer and hit the Shift key to bring up the GRUB boot menu. Highlight the Ubuntu entry in the GRUB boot menu and press the E key.

Add nouveau.modeset=0 (you should use this instead of instead of nouveau.nomodeset=0) to the end of the linux line - press F10 to boot.

On the login screen press Ctrl+Alt+F1

Enter user name and password - execute:

sudo apt-get update
sudo apt-get install nvidia-driver-440
sudo reboot

Generally it is recommended to use the NVIDIA drivers from the restricted Ubuntu repositories. This package was only updated for Ubuntu 20.04 two days ago (22 April 2020), so it's quite bleeding edge, and might be why your prior testing with a nvidia 440+ series did not work.

Alternative

As you have to find NVIDIA drivers (440.31+) which support the Linux 5.4 kernel shipped by Ubuntu, you could also install the latest official NVIDIA drivers.
The xorg-edgers PPA does not provide the drivers anymore and was replaced by GPU Drivers PPA.

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

After the installation adding the kernel parameter nouveau.modeset=0 is not necessary anymore.


it is very hard saying what happened to your computer right now. Please try providing more logs. Anyway, Ubuntu's default is pulseaudio and not alsa.
So please check your PulseAudio settings (from GUI) whether the pulseaudio sees your hardware and whether it's enabled (and the volume).

1.) You may also try following very basic steps:

sudo dpkg --configure --pending
sudo apt-get install aptitude
sudo aptitude reinstall pulseaudio
sudo apt-get reconfigure pulseaudio
pulseaudio --start

And this should be not necessary, but the output would be nice to see:

sudo service pulseaudio start

Pulseaudio's configuration files are located in /etc/pulse.
Here is a link how to restore (missing) config files: https://unix.stackexchange.com/questions/27762/restore-etc-configuration-files-from-the-default

2.) You can also check /var/log/syslog to see whether there are some bad log messages about your hardware...

3.) BTW: Upgrading entire distribution just because of an audio. Next time, please try using this site (askubuntu), stackoverflow site and similar well-known and trusted sources...

4.) You may also try installing alsaplayer and trying playing the sound using this application (it should be using alsa and not pulseaudio).


Just reinstalled my 12.04 - I want to have back the option to choose between unity, gnome, gnome-classic & gnome classic-no effects - help?

You should get it all by installing gnome. Run this in the terminal:

sudo apt-get install gnome

This should install Gnome 3, Gnome Classic/Fallback, and Gnome Classic (No effects).

If the problem is that the option to chose desktop environment is not yet present, I assume you have turned automatic login on. Turn this off. There is a tutorial here.


How to create bash file and allow it to accept an argument from the terminal?

Try this:

#!/bin/bash
phpdoc -o HTML:frames:earthli -d public_html/"$1"/application/ \
    -t public_html/"$1"/docs/

Call it as sudo ./script.sh yoursite.


"'Mega' object has no attribute 'get_name_from_file'" when writing files to Mega

This is one of those wisdom of the ancients sorts of situations.

So, ummm...

Dear people of the future, here's what we've figured out so far:

It seems the code for the Python module has been deprecated. There's a link on the page that says there's something newer, but that link 404s.

I'm using Debian Jessie, but I'm assuming it should be similar for Ubuntu. You need to edit the file /usr/local/lib/python2.7/dist-packages/mega/mega.py as root in whatever text editor you use. Then add the following code just under class Mega(object)::

def get_name_from_file(self, file):
    for key, value in file.items():
        if 'a' in value and 'n' in value['a']:
             return value['a']['n']
    raise RequestError("Could not find the file attribute.")

It seems to make it so duplicity can actually restore the files that it backs up on Mega... which might be a bit important if you need it.


Music players (except Banshee) capable of saving scrobbles while being offline?

Clementine (sudo apt-get install clementine)
Musique Player (sudo apt-get install musique)
Amarok (sudo apt-get install amarok)
Rythmbox  (sudo apt-get install rhythmbox)
VLC (sudo apt-get install VLC)
Qmmp (sudo apt-get install qmmp)


This is messed up very badly.

For starters:

cd /
chown root:root -R bin boot cdrom etc initrd.img* lib lib64 lost+found mnt opt root  run sbin srv tmp usr var vmlinuz*
# essentially everything except home and media
chown root:root home media # we don't want to recursively chown here.

I assume you have a root shell open somewhere. If not, try pkexec chown, since sudo won't work when /etc/sudoers has incorrect permissions/owners.

Then there are various folders in /var whose correct owners you'll have to set, but that depends on which programs you have installed and which services you need to run.

If you're not able to run a command, or some other errors happen, try this from a bootable live USB (after mounting the root partition somewhere and replacing cd / with the path of the mount point).

Note that I have skipped a few directories, such as sys, proc, as these are directories populated by the kernel.


Try this very simple command:

echo '"name": "_acme-challenge",' | cut -d'"' -f4

this is the output:

_acme-challenge

I divided the string using " as field separator and using only the 4th field.

...and that's all! :)

PS: if you have the "name": "_acme-challenge", as a Shell variable, then you can use the following one:

NEW_VARIABLE=$(echo "$YOUR_VARIABLE" | cut -d'"' -f4)


How did it happen that one user can access files of another user's account on the same computer?

The most likely cause of this is permissions.  The command
ls -l
will show permissions on a file.  It's not unusual for default permissions to include the ability of everybody being able to read.  It's also very easy to change those default permissions. This is an important topic in the unix world and much has been written on "linux permissions". Specific questions about permissions can be answered here.


No sound through HDMI after trying other options

If the drivers and hardware are setup correctly, you may just need to configure the settings to route the sound through HDMI. For this, I use Pulseaudio Volume Control.

Once installed, search for Pulseaudio Volume Control, or just run pavucontrol in terminal.
Then look for this:

Yes, this is a duplicate of my previous answer here


How can I fix terminator? It doesn't work

I fixed it by editing /usr/bin/terminator and changing the python version. First, open the file with:

sudo nano /usr/bin/terminator

Then, change the first line from this:

#!/usr/bin/python

To this:

#!/usr/bin/python2

Finally, save the file and you're ready to go!


juju bootstrap fails with connection timed out errors

If, in maas, 10.10.10.102 is set as your gateway, this would be expected behavior.  At least it would be by me, having been bitten by this king of thing. I renamed the machine I was use for juju bootstrap to jujuBS, so try this, which bring everything you need local to the maas server:

mkdir ~./.juju/sync-tools
juju sync-tools –e maas –destination=”~/.juju/sync-tools”
juju bootstrap –e maas –-upload-tools=true –-metadata-source=”.juju/sync-tools” -–to jujuBS.local
mkdir –p ~/.juju/charms/trusty
juju charm get juju-gui .juju/charms/trusty
juju deploy –repository=”~/.juju/charms” local:juju-gui


Dual Boot: Ubuntu using 3 times more battery than Leopard?

I would say battery life issues are not uncommon with specialized hardware.  Particularly with Apple laptops, you will find many such issues in the Ubuntu forums.  But the good news is usually you can tweak and adjust your laptop performance until it gets to pretty normal.

For example, with my Macbook Air, currently I get about 5 hours in OS X.  With similar usage, I found I got about one hour of battery life on 11.10.

But it turns out 11.10 has some power management issues due to the 3.0 kernel.  Supposedly 12.04 would fix that and I had a couple other issues anyway, so I upgraded to the alpha version.  After that, I got about 2 - 2.5 hours.  Then I learned about laptop-mode-tools (given how useful people find this, it's amazing this is not part of the default install for laptops...).  Now I find I get about 4 hours.  So I'm satisfied.

I've made a comparison of watts used and clearly Ubuntu is just using more than OS X.  At idle, OS X is using 9-10 watts, while 12.04 is using 12-13.  Part of it is due to this mysterious "display backlight" issue I'm running into, which takes about 2-2.5 watts.

Update: Here's more info about laptop-mode-tools.  This is the website for it.  From its FAQ, if you want to check if it's running, type cat /proc/sys/vm/laptop_mode at the command line; nonzero value means its running.  Also, the configuration file is at /etc/laptop-mode/laptop-mode.conf.  To read the manual for it, type man laptop-mode.conf at the command line.  To alter the config file you will need to do it as root, e.g. gksu gedit /etc/laptop-mode/laptop-mode.conf.  Be careful doing that!  If you want to disable it, to test your system, near the beginning of the file, you should see the option ENABLE_LAPTOP_MODE_TOOLS with the value of 1 -- change it to 0 and shutdown/restart.


How to make unity launcher apps not bundle together when you have lots of them or to speed up the bar when scrolling down to apps?

If you don't mind installing a PPA, you may consider Drawers. There's a nice video by quidsup on Drawers along with installation instructions and a more recent video, also by quidsup, in which Drawers gets a mention: http://youtu.be/3jZTTp8nefw?t=4m29s at the time specified in the link. And version 13.2 has a review here.

  Stack your applications under one icon with this great new Drawers feature for Unity Launcher.
  I reckon this is one of the best new features for Unity desktop.

  Each Drawer can be customised with size, icon size, colour,
  transparency, and whether to show text. Feature is available for
  Ubuntu 12.04, 12.10, and 13.04.

  Install instructions:

  Open Terminal

sudo add-apt-repository ppa:ian-berke/ppa-drawers
sudo apt-get update
sudo apt-get install drawers

The image (stolen from quidsup's video) shows a couple of browsers stacked horizontally. (Apologies if reproducing it here is a violation in any manner.)

Caveat: I have no personal experience of Drawers.

As far as speeding up scrolling goes, it may be an issue of resources and may be related to the "special effects" enabled. If you have limited resources, in terms of, for example, CPU, GPU, or RAM, you could try disabling some of the visual effects associated with the Launcher. Many of them are described here in the section appropriate to your version.


How do I tell locate to keep the index of an external HDD?

It seems to me you have multiple options here:

Clearly the best way to do exactly what you want would be to tell cron to wait until the drive is mounted before updating the database. I imagine someone much more familiar with cron and/or bash then I am could tell you how.
What you could definitely do, although it isn't exactly what you want, is to create a new database just for the removable drive. See this closely related question for detailed instructions on how to do that. Then you can just have to manually update the database when the drive is mounted.
If the contents of the drive don't change often, there are a lot of alternatives. For me, I have many different external drives so for each one I will often pipe a command like ls -RD1 to a text file, and then I can just use grep and other tools whenever I want.


In general, the answer is yes. For most people the update process will work seamlessly.

There are however always risks. A driver in the new version could be not working as good with your hardware as the previous version. Or something in the upgrade process could be going wrong.

For package conflicts you don't have to worry. If they occur, the upgrade will just stop and restore your system.

If you are talking about a great number of pc's (so, in a company) it is off course smart to test it on your hardware configurations and in your environment instead of blindly updating the first day.


How to Install Ubuntu 12.04 on an HP netbook with Ubuntu-based MI operating system

You should be able to install the Startup Disk Creator in 8.04.  Look in Synaptic Package Manager for usb-creator-gtk and usb-creator-common and install them.

Alternatively, you could download and install UNetbootin.  See

http://unetbootin.sourceforge.net/


How can I add "root" privileges in LxPanel launcher?

You can achieve this without needing to install any extra packages.

Add your application (synaptic) to the panel
Open a lxterminal and navigate to ~/.config/lxpanel/Lubuntu/panels
type the following to open the file leafpad panel
find the line id=/usr/share/applications/synaptic.desktop
change this line to id=synaptic.desktop
save and exit leafpad
create a local applications menu folder mkdir -p ~/.local/share/applications
copy the master synaptic.desktop file: cp /usr/share/applications/synaptic.desktop ~/.local/share/applications
edit the newly copied file: leafpad ~/.local/share/applications/synaptic.desktop
find the line Exec=synaptic-pkexec
change this to Exec=gksudo synaptic-pkexec
save, exit leafpad, logout and login.


Terminator Bash - How to create shortcut to folders

You can use the following command from the bash

alias yourAlias='cd /var/www/html'

Here is /var/www/html is the location you want. It could be anything else.

Then you have only to type

yourAlias

from your terminal to go to the desired location what you have already defined.

If you want to make your aliases permanent, add them to the .bash_aliases file in your home directory (create it if necessary), the changes apply for every terminal you open after changing the file.


"System problem detected" in Ubuntu 14.04 LTS

Try running sudo rm /var/crash/* in a terminal

Answer source


Why can't I access my desktop after installing Lubuntu?

For some reason you got into a shell instead of getting the desktop

sumit@sumit-hp-mini:~$

Try typing startx in order to start your X desktop. If that doesn't work - please add the command's output to your post (Since it is currently hard to know what is the specific reason you didn't get a desktop environment)


Proxy setttings not working in Ubuntu 11.10

I was having this problem when I first installed Ubuntu 11.10.  I don't know which of the following steps solved it, but this is what I did:

Open a terminal

Run export HTTP_PROXY=http://<myproxy>:<port> to set up the proxy server for that terminal session

Run sudo apt-get update

At this point, the update manager popped up and asked if I'd like to install c. 300 updates, which I did

Restart

Install dconf with sudo apt-get install dconf-tools
or Using Software Center

Run dconf-editor, select system > proxy > http and click enable (as per the tutorial in teleblog's answer)

And now it all seems to work :)


Unable to transfer files from laptop to USB due to permission error

What's the format of you USB drive e.g vfat, ext*? and are you trying to paste into a particular folder (you might not have write permission on that folder).

To do the following tasks, you will need to open a xterm window (usually Ctrl+Alt+T starts the terminal).

You can check your file permissions of that usb drive using:
ls -l /media/usb_drive/. Look for the folder you want to paste into to see if you have write permission i.e rwx-rwx-rwx username groupname /media/usb_drive/folder.

To change a folder's permission thus adding write permissions use:

sudo chmod +w /media/usb_drive/folder

Try to copy and paste files into you usb_drive/folder again.


How to know the Server's Public IP Address on Wireless Interface?

To find your public IP Address, either search google.com: https://www.google.dk/search?q=find+public+ip+address or use http://www.whatismypublicip.com/ or similar service.


Ubuntu 14.04.1, Steam crashes on first login

Update your GPU driver https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=13815 and then try again.


nmcli not working on Ubuntu 16.04 for Huawei E3372

If e3372 is hilink it works as a router, not a modem. You can easily define it by trying to find the e3372 web interface (192.168.1.1 as I remember). It you have a login page for the e3372 then it's the hilink version.


It's not a great work-around, but if you press alt-space, the submenu allowing resize and moving windows appears.  You could then resize the window vertically, to be able to access the whole window and get to the buttons.


Unless you've changed the default file manager in your Ubuntu:

Files or File Manager are terms that are more easily understood by new users then the actual package name of nautilus.

For that you find this new naming but in deed they are both same.

Files is nautilus.

To get sure of what I'm talking about open your terminal and run the command nautilus from your desktop Pc. You'll notice that Files will open which means they are same.

You can think of Files as an alias for nautilus


Making websites visible to outside networks with Ubuntu Server 12.04

Almost completely unrelated to Ubuntu but there you go...

Forward port 80 to your Ubuntu's internal IP, using your router and this guide.
Tell Ubuntu to unblock port 80 (might not be needed):

sudo ufw allow tcp/80

By this point people outside your network should be able to put your IP in their browser and see the site. This won't work internally due to routers' routing restrictions so don't consider that a fault. Test with something outside the network.

For bonus points (and if your legal IP is dynamic):

Use a service like DynDNS to point a domain name at your IP
CNAME a real domain onto your DynDNS name with a short TTL.
Make sure the Apache config expects these domains (or you're using a wildcard/default host)
Set your /etc/hosts to shortcut the DNS so it looks locally rather than your legal IP:

127.0.0.1    mydomain.com

If you have a truly static IP assigned to you by your ISP (some residential ISPs still do this), you can just point your domain at it with a long TTL.


I'll be glad if someone can provide a solution.
I am facing a similar challenge on ubuntu 20.10
:~/anbox-modules$ sudo dkms install anbox-binder/1
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.8.0-43-generic all KERNEL_SRC=/lib/modules/5.8.0-43-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for anbox-binder: 1 not found
Error! Bad return status for module build on kernel: 5.8.0-43-generic (x86_64)
Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.

Note that I am running the latest edge version of anbox.


sudo sh -c ‘echo “deb http://archive.canonical.com/ubuntu trusty partner” >> /etc/apt/sources.list.d/canonical_partner.list’ not woking

The problem here has nothing to do with redirection, it's that you've copied curly quote characters. They are not the same as straight quotes (which the terminal understands as special characters) so the command does not mean the same thing at all.

This is largely the fault of the website you've copy-pasted the commands from (you should let them know).

To fix, simply replace the curly version with their straight counterparts:

sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu trusty partner" >> /etc/apt/sources.list.d/canonical_partner.list'

Yes, tee might look nicer but there's nothing wrong with redirection.

There was some question about whether this really was the cause. It is, but I'll prove it. The redirect in the original command is being interpreted first. Bash attempts to open a write handle (as the current user) on the output file first and fails.

$ sudo afoijaf2 > /rawr
-bash: /rawr: Permission denied

That's why we don't see a command not found. afoijaf2 here is clearly non-existent and ‘echo is also clearly an invalid command. Neither are being executed —sudo hasn't even run— because Bash failed to get a write handle. That errors out first.


why a modules is loaded into kernel even if the config option is m

Looking up the information about a module does not mean it is loaded. modinfo will look in /lib/modules/version for it also.
If you want to know if it is loaded then use lsmod. Example:
doug@s18:/boot$ lsmod | grep udp
xt_tcpudp              20480  9
x_tables               45056  9 xt_conntrack,iptable_filter,xt_tcpudp,xt_CHECKSUM,ip6_tables,ipt_REJECT,ip_tables,xt_MASQUERADE,iptable_mangle

Now if the module is force loaded:
doug@s18:/boot$ sudo modprobe udp_tunnel
[sudo] password for doug:
doug@s18:/boot$ lsmod | grep udp
udp_tunnel             16384  0
xt_tcpudp              20480  9
x_tables               45056  9 xt_conntrack,iptable_filter,xt_tcpudp,xt_CHECKSUM,ip6_tables,ipt_REJECT,ip_tables,xt_MASQUERADE,iptable_mangle


Take screenshots at random intervals with Python?

#!/usr/bin/env python

import gtk.gdk
import time
import random

while 1 :
    # generate a random time between 120 and 300 sec
    random_time = random.randrange(120,300)

    # wait between 120 and 300 seconds (or between 2 and 5 minutes)
    print "Next picture in: %.2f minutes" % (float(random_time) / 60)
    time.sleep(random_time)

    w = gtk.gdk.get_default_root_window()
    sz = w.get_size()
    print "The size of the window is %d x %d" % sz
    pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])
    pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])

    ts = time.time()
    filename = "screenshot"
    filename += str(ts)
    filename += ".png"

    if (pb != None):
        pb.save(filename,"png")
        print "Screenshot saved to "+filename
    else:
        print "Unable to get the screenshot."


Installing cuda toolkit Ubuntu 14.04 causes dpkg error

Make sure that you're in the same directory as the .deb file and that you're using the right file name for the dpkg command.


How to connect to another computer through the Internet using ssh?

Start by checking to see that you can ssh into the desktop from the desktop.

ssh 127.0.0.1

If that works, I would check to see if the outside IP and internal IP are different.


I installed the driver (B1160w_Linux_v1.04_Driver from the dell site) on a fresh 14.04 machine. The printer worked without a problem.

Hope that helps.


In order to get Ubuntu onto this machine (and my machine is exactly the same specs as above and I was having exactly the same issue) the following guide will help solve the problem:

Live CD won't boot on Lenovo ThinkPad E525

Once you have installed the alternate install 11.10, it will get stuck whilst starting up, at which point press Ctrl+Alt+F1 taking you to the TTY console.

At this point you'll need to type the following:

sudo apt-get update
sudo apt-get install fglrx

Once that is finished, reboot the machine (easiest way is to type):

sudo reboot

When Ubuntu starts you might have a greyed box in the bottom right hand corner that says "AMD Unsupported Hardware", simply use the following guide to resolve that:

http://ubuntuforums.org/showthread.php?t=1904997

From this point I upgraded Ubuntu, since 11.10 is no longer supported (Ubuntu will tell you this), to 12.04. I will probably follow the upgrade path to 13.04 at some stage, but for now, I have a working Ubuntu installation on the machine.


What is the command that PgDn / PgUp executes?

I'm looking for one that is metaphorically 'deeper' in the way Linux / general OSs works

Metaphor be damned, this is how it actually works:

You mash the keyboard
An evdev driver/keymap/etc converts that into an X11 event
The display server sends the event to the application (and optionally bubbles that up the stack)
The application (or its framework) determines what to do with the input

There is no "paging" metaphor built into X; it's just a behaviour common to many applications and their frameworks.

So in terms of emulating an event that looks like somebody hit the Page Down key, your best bet is actually generating that X11 event and sending it to the window.

Your only other option is to add an alternative interface for your running application that it intercepts and internally makes the change to the window. That's very possible but it's also a metric buttload of work.


When you start the update-manager go to the preferences and change on the third tab to check for every new version (not only long term support).


16.04 Kubuntu shut down overnight, want to find reason

On my system, the first message logged (in /var/log/kern.log*) when the system comes up is ... [    0.000000] Initializing cgroup subsys cpuset. The number in [ ] is "microseconds since boot", the time the entry was logged. The entries just BEFORE this line are the last log entries the system made before it went down. Power failures may not get logged.


what does each runlevel number stand for

Try man telinit

However, the runlevels in Ubuntu are:

Code        Description
0           Halt
1           Single-user mode
2           Graphical multi-user with networking
3-5         Unused but configured the same as runlevel 2
6           Reboot


vim/gedit delete words between character

You can use the following in vim to do what you want.

:%s/<[^>]*>\([^<]*\).*/\1/g

Here I use the s command,
This is the complete syntax, you can check by typing :help :s

:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]

% for range means the whole file, {pattern} is an regular rexpression
{string} means the string that has to be replaced. That can contain backreferences, i.e a part of the matched pattern enclosed within braces.
[flags] are some extra options. g for global, i.e all the patterns in a line needs to be replaced. Other useful flag is c which asks for confirmation before changing.
[count] must be the number of times, I guess.

So this can be read as, search for
a lessthan<
followed by any number or not a greaterthan> characters
then a >
then select any number of not a lessthan< characters into first group \1
then any number or any characters
And replace this with the first group \1
globally.

Check this link to learn more about vim specific regular expression details http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml


Gnome grouping of windows for minimization and focus

Try these:

gsettings set org.gnome.shell.overrides attach-modal-dialogs false
gsettings set org.gnome.mutter attach-modal-dialogs false


This command installs the recent version for your distribution:

sudo apt-get install postgresql

postgresql-9.4 is available since Utopic.

Source

Here is a step by step guide to install Postgesql 9.4 for your Ubuntu (Utopic, Trusty, Precise, Lucid) version.

sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt YOUR_UBUNTU_VERSION_HERE-pgdg main"

For trusty:

sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"

To get your ubuntu version:

lsb_release -sc

Now import the public key and install:

wget --quiet -O - https://postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.4


Cannot install anything from the Ubuntu Software Center

There is something called as a repository. The things you want to download (apps) are stored in this repository. These repositories have links to them. So when you say sudo apt install pkgname, your system searches for pkgname in all the repository links which you have added. But obviously not all the repositories are added to your system. So you need to add repository links to your system in order to be able to search in those repositories.
Eg, sudo apt install g++ will run just fine out of the box linux, as the link to the repository containing g++ is already added. But sudo apt install gimp won't work out of the box. For that you will need to add the gimp repository to your system with sudo add-apt-repository ppa:otto-kesselgulasch/gimp. After this you can run sudo apt update (this will update the repository links if needed) and then sudo apt install gimp to install gimp.
Similarly the repository link to Matterhorn might not be added to your system by default. Remember, it can only be added if its repository link exists. There are other ways to install Matterhron. You could try to install it with snap store. Just run sudo snap install matterhorn if snap is enabled on your system. If not then first run sudo apt update && sudo apt install snapd and then sudo snap install matterhorn. Visit here for more info.
You could try reinstalling the software-centre with sudo apt autoremove --purge gnome-software && sudo apt install gnome-software.


How do you use both Pulse Audio and Alsa?

There are four layers in this abridged explanation of the audio stack.

The hardware.
ALSA.
Pulseaudio
Applications.

ALSA has all the hardware support. It's great at talking to a whole load of different stuff but it's relatively rubbish at talking to more than one application or providing network-aware features like Pulseaudio.

In this sort of stack, PulseAudio is the only thing that interfaces with the main ALSA devices so if you want to make a sound, you either have to kick PulseAudio off, or interface with it.

PulseAudio can accept connections from clients that only speak ALSA (it pretends to be an ALSA device) for legacy reasons which allows things like Wine, Skype, et al to work (most of the time).

Theoretically you could remove PulseAudio. In practice this would probably completely knacker your system if you're using more than one application that wants to make a noise at once. Our media centre box here only uses ALSA for this reason (plus I need raw HD over HDMI access that old PulseAudio used to interfere with - it might not now).

I would suggest you keep both. You need ALSA and PulseAudio, for all its alleged sins, does a pretty good job these days.


How can light sensor be enabled for control brightness and keyboard back-light automatically?

There is currently no automatic method that I am aware of built into Ubuntu. However, take a look at lightum

It works fine on my mac but I have my lgiht senser in /sys/devices/platform/applesmc.768/light

You can check out the code and make the modifications or use it to write your own app.

The principal is sound, and I have seen other scripts do the same thing. If you don't want to tackle lightum try this or take a look at this mac info.

I know you have a sony but the process should be the same, read the sensor, set some values to a file in /sys/


Ubuntu 16.04 external monitor lags and won't rotate

Following this guide solved the problem. I did all of it: updated GRUB settings, BIOS settings, and the kernel. I haven't tested whether all of these are necessary but at least the full package did the trick for me.

It works on the P50's mini-DisplayPort. However, when my external monitor is connected to either of the Lenovo Dock's Displayports, it simply doesn't detect the external monitor in the Ubuntu's Displays dialogue or xrandr.

I'm using nvidia-361.


Timestamp, year 2038 problem for 64 bit Ubuntu system

Well if there's an option to literally buy a "bit", ie transfer from a signed 32bit integer to an unsigned 32bit integer, things keep working into 2106.

Transferring to 64bit is "somewhat better". You get hundreds billions of years of resolution.

And Ubuntu does this:

$ uname -p
x86_64

$ date --date=9090-01-01 +%s
224685532800

However, that's the OS level. Just because Ubuntu uses a 64bit integer for its times doesn't mean that MySQL/MariaDB will use it to store its timestamps. If dates past 2038 are important to your now, start testing immediately.

Actually, I can save you some time. It's still broken. This bug was reported over a decade ago but its main test still fails with a 64bit int.

mysql> select from_unixtime(2548990800);
+---------------------------+
| from_unixtime(2548990800) |
+---------------------------+
| NULL                      |
+---------------------------+
1 row in set (0.00 sec)

This isn't even storage. It's slightly pathetic.

(And yes, that was run on MariaDB, version 10.1)


You state: "Also, I installed the 32bit architecture manually so as to be able to use skype" If you need full compatibility with 32 bit code you should install the i386 version. Regardless you can solve this problem by carefully editing /etc/apt/sources.list

sudo gedit /etc/apt/sources.list

make sure every repository appears once and only once.

or copy the original sources.list file from a live cd/dvd/usb at the same location. Or even better consult this: How to fix Duplicate sources.list entry?
A closer look at your warnings make it clear. Look closely at this example and you'll see you have dusplicate sources for differing architectures:

W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-amd64_Packages)
W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-i386_Packages)


You can create a custom dash icon:

How to create custom dash icons?

In your case, you should use:

[Desktop Entry]
Type=Application
Version=1.0
Name=Geary
GenericName=Generic name you want
Comment=Your comments about this file
Exec=geary
Icon=geary
Terminal=false
Categories=Email;Geary;
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
StartupNotify=true

If you want to launch it from the terminal, just type:

geary &


JDownloader 2 getting sun.java2d.d3d=false error on startup in Debian Linux

Go to JDownloader directory (usually ~/jd2) and open the file JDownloader2.vmoptions in a editor. The content of the file should be:

-Xms64m
-Dsun.java2d.d3d=false

(Notice the missing prefix -D in the original file).


How do I get my VGA monitor to stick to 1280 x 1024 resolution?

This thread may help you : How can I make xrandr customization permanent? . Basiquely, if you are using lighdm, follow the following steps:

Step 1: Create the script

Create a script like this:

sudo mkdir -p /opt/screen_config/
sudo touch /opt/screen_config/mycustomdesktopvideo.sh
sudo chmod +x /opt/screen_config/mycustomdesktopvideo.sh
# I don't remember xfce editor, replace maybe gedit with leafpad
sudo gedit /opt/screen_config/mycustomdesktopvideo.sh

and put in this file :

#!/usr/bin/env bash
xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VGA1 --mode 1280x1024_60.00

Then, test it:

/opt/screen_config/mycustomdesktopvideo.sh

This should resize your desktop.

Step 2: Load it at startup,

Now, edit the file /etc/lightdm/lightdm.conf with the following code, and put in the [SeatDefaults] section the line

session-setup-script=/usr/share/mycustomdesktopvideo.sh

At the end it should looks like something like this:

[SeatDefaults]
session-setup-script=/usr/share/mycustomdesktopvideo.sh

Reboot, it should work.

If it fails

If you have a bug at startup, don't re-install: press Ctrl+Alt+F2, login, and with

sudo nano /etc/lightdm/lightdm.conf

remove the line session-setup-script=.... Then press Ctrl+Alt+F7 and try to login.


Why does Fluendo which I bought not work any more?

Install the Ubuntu Restricted Extras package.

sudo apt-get install ubuntu-restricted-extras

If you are running Kubuntu or Xubuntu then install kubuntu-restricted-extras or xubuntu-restricted-extras instead.

And then run this script.

sudo /usr/share/doc/libdvdread4/install-css.sh

Source: Ubuntu Restricted Formats


Any linux version of clipboardfusion with macros

Take a look at ClipIt.

  Execute actions with clipboard items


How can I ssh over wifi when connected to ethernet too?

As it can be seen on the screenshot you provided, when you connect the Ethernet cable, the router on the Ethernet connection (192.168.1.1) becomes your default gateway with metric 100, which is lower than the metric assigned to the router on WiFi connection (10.167.136.1). So all connections to addresses that are not in any of your local networks (192.168.1.0/255.255.255.0 and 10.167.136.0/255.255.248.0) go via that router.
If 10.167.98.212 is the address of your Pi, it does not belong to any of these networks, so your computer attempts to connect to Pi via the router 192.168.1.1, but it is not reachable over that router. You need to connect to your Pi via the router 10.167.136.1, so you need to add an appropriate route to your routing table. You can for example add a route to 10.0.0.0/255.0.0.0 via 10.167.136.1. You can add it in the network settings, in the "IPv4" tab, by typing the network address, mask and gateway into the fields below "Routes" header (see screenshot below).


Open your favorite editor and create a script file similar to this:

#!/usr/local/bin/zsh  ### I use zsh, enter your shell here.
sudo apt-get -qq update
sudo apt-get -y -qq upgrade
exit                  ### Be sure to include this exit line

Make your Your_Script_File.sh executable.

chmod +x <your_script_file.sh>

Next, edit the sudoers file.

Open a terminal and enter

    sudo visudo

At the end of the file (really, the last line) add the following lines.

<user_name>  ALL=(ALL) NOPASSWD: /home/<user_name>/script_name.sh
<user_name>  ALL=(ALL) NOPASSWD: /usr/bin/apt-get -qq update
<user_name>  ALL=(ALL) NOPASSWD: /usr/bin/apt-get -y -qq upgrade

After that you won't be prompted for a password for the commands listed.  These lines should include the exact commands used in your script.  You will no longer be prompted for a password, and the -qq eliminates the scrolling output in the terminal window.  Please understand this is a very risky solution, there is a reason why you need to type a password for some commands, the use of these commands without password can leave your system open for some dangers. Use with caution.  I like the -qq option because it is rarely used by most users and if they run

sudo apt-get update

The system will require a password.

Next, ALT + F2 open Startup Applications.

This will run the Startup Applications Preferences dialog window.
Click Add.  Give it a name, I used "startUpdate".  In the Command box enter the command

    xterm -e ./<your_script_name

Xterm recognizes the exit from the script and will close the window, when execution is complete.

The user will see a blank xterm window for a couple of minutes, then it closes.

Hope this works for you.


cannot transfer binary files to mbed controller NXP LPC1768 connected via USB

I had the same issue with an ARCH GPRS V2, which has NXP LPC11U37 Controller. It would copy new firmware on Windows but not Ubuntu.

By running dd if={new_firmware.bin} of={mnt_dir}/firmware.bin conv=notrunc I got it working. I found that the notrunc flag is crucial.


Shortcut for switching between applications

This feature is already available. Pressing Super+1-9 has the same effect as clicking on the icons in launcher (numbered 1-9 from top to bottom). Since clicking on the icon goes to the window, you can use that. The Super for you is likely the Windows key. You can long-press on the Super for a list of shortcuts.


Accidentally deleted Ubuntu partition, Windows 8 hibernated, cannot access bios to boot from USB. Help?

In your bios try to tell your computer that you have another hard disk (witch is your USB drive), and then add it to boot devices. That depends on  your bios. During bootup you may need to press Del or F2 or F1, Again this depends on your bios.

In order to make a flash bootable you have some options including using a tool named "unetbootin" witch I believe is the best tool to do so.


403: Forbidden error when trying to install oracle-java8-installer

This is caused by the fact that the PPA maintainer hasn't updated their scripts yet and older updates of Java 8 are no longer available from Oracle.

To quickly resolve this, you can do the following and install 8u151. (This will only work so long as 8u151 is available from Oracle)

1) Install as normal:

echo debconf shared/accepted-oracle-license-v1-1 select true | sudo
debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo add-apt-repository ppa:webupd8team/java
sudo apt update

Once that is done and you get the error:

Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:

oracle-java8-installer
    E: Sub-process /usr/bin/dpkg returned an error code (1)

2) You will then have to do the following for 8u151 to be installed:

cd /var/lib/dpkg/info
sudo sed -i 's|SHA256SUM_TGZ="e8a341ce566f32c3d06f6d0f0eeea9a0f434f538d22af949ae58bc86f2eeaae4"|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|' oracle-java8-installer.*
sudo sed -i 's|JAVA_VERSION=8u144|JAVA_VERSION=8u151|' oracle-java8-installer.*
sudo sed -i 's|J_DIR=jdk1.8.0_144|J_DIR=jdk1.8.0_151|' oracle-java8-installer.*
sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/$FILENAME|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/$FILENAME|' oracle-java8-installer.*

3) Once you complete the above, you can run the install again and it will succeed.

sudo apt install -y oracle-java8-installer