pssh

PSSH provides parallel versions of OpenSSH and related tools. Included are pssh, pscp, prsync, pnuke, and pslurp. The project includes psshlib which can be used within custom applications. The source code is written in Python and can be cloned from:

git clone http://code.google.com/p/parallel-ssh/

PSSH is supported on Python 2.4 and greater (including Python 3.1 and greater). It was originally written and maintained by Brent N. Chun. Due to his busy schedule, Brent handed over maintenance to Andrew McNabb in October 2009.

Usage: pssh [OPTIONS] command [...]

Options:
  --version             show program's version number and exit
  --help                show this help message and exit
  -h HOST_FILE, --hosts=HOST_FILE
                        hosts file (each line "[user@]host[:port]")
  -H HOST_STRING, --host=HOST_STRING
                        additional host entries ("[user@]host[:port]")
  -l USER, --user=USER  username (OPTIONAL)
  -p PAR, --par=PAR     max number of parallel threads (OPTIONAL)
  -o OUTDIR, --outdir=OUTDIR
                        output directory for stdout files (OPTIONAL)
  -e ERRDIR, --errdir=ERRDIR
                        output directory for stderr files (OPTIONAL)
  -t TIMEOUT, --timeout=TIMEOUT
                        timeout (secs) (0 = no timeout) per host (OPTIONAL)
  -O OPTION, --option=OPTION
                        SSH option (OPTIONAL)
  -v, --verbose         turn on warning and diagnostic messages (OPTIONAL)
  -A, --askpass         Ask for a password (OPTIONAL)
  -x ARGS, --extra-args=ARGS
                        Extra command-line arguments, with processing for
                        spaces, quotes, and backslashes
  -X ARG, --extra-arg=ARG
                        Extra command-line argument
  -i, --inline          inline aggregated output and error for each server
  --inline-stdout       inline standard output for each server
  -I, --send-input      read from standard input and send as input to ssh
  -P, --print           print output as we get it

https://code.google.com/archive/p/parallel-ssh/

example usage:

 pssh -i -h hosts.txt echo "hello, world"


Error in libreoffice directory after "sudo apt-get -f install"

I've found the problem. I installed aptitude, so I just need to upgrade the system.

  sudo aptitude dist-upgrade

After that, the dependecies were resolved.


How do I configure Ubuntu for a 21:9 screen?

Along the lines of this, I was able to find some information:

  This link helped me.

  In short: run xrandr and cvt like you did, then create the following file:

/usr/share/X11/xorg.conf.d/10-monitor.conf

  In the file change the parameters in < > according to your specs:

Section "Monitor"
  Identifier "Monitor0"
  <INSERT MODELINE HERE>
EndSection
Section "Screen"
  Identifier "Screen0"
  Device "<INSERT DEVICE HERE>"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "<INSERT MODENAME HERE>"
  EndSubSection
EndSection

Here's what you should do:

For the modeline, first run this command:

cvt <X> <Y> <R>

Where XxY is your resolution and R is your refresh rate.

To test the resolution, first do this:

xrandr --newmode <MODELINE>

Be sure to remove the Modeline keyword.

Then, copy the output and replace the placeholder with it.

For the device, run xrandr|tail -n+2|head -n1|cut -d\  -f1, and replace the placeholder with its output. Keep the quotes.

For the modename, run cvt <X> <Y> <R>|cut -d\  -f2, replacing the last placeholder with the output of this command. As before, keep the quotes.

After that, do this:

xrandr --addmode <DEVICE> <MODENAME>

Replace <DEVICE> and <MODENAME> appropriately. Then, to test your resolution, do this:

xrandr --output <DEVICE> --mode <MODENAME>

If you encounter problems with the new resolution, please log out and then back in (worst case scenario: press Ctrl+Alt+Delete and then Enter to sign out.)

If you didn't encounter problems, save the file, then restart X. To do this, first press Ctrl+Alt+F1, login as an 'Administrator' account, then run these commands:

killall Xorg
X


What is the default keybinding to Close Windows etc Files in Ubuntu 14.04?

It is Alt + F4. Hold the Super key to see a list of commonly used keyboard shortcuts.


If above command doesnot work try this(it saved me a week ago):
`Ctrl+Alt+F1´

sudo service lightdm stop
rm ~/.config/dconf/user
sudo service lightdm start

Further look here:
14.04 LTS No Dash / Launcher after update through Software Updater


Coding own applicaion for Gnome-shell Calendar

Evolution Data Server 3.6 can be accessed with Python using gobject introspection.  For this, gir1.2-edataserver-1.2 and gir1-2-ecalendar-1.2 also need to be installed.

For example, the following script will list all the events in all calendars in evolution-data-server.

#! /usr/bin/python
# -*- coding: utf-8 -*-

from gi.repository import ECalendar
from gi.repository import EDataServer

# Open a registry and get a list of all the calendars in EDS
registry = EDataServer.SourceRegistry.new_sync(None)
sources = EDataServer.SourceRegistry.list_sources(registry, EDataServer.SOURCE_EXTENSION_CALENDAR)

# Open each calendar containing events and get a list of all objects in them
for source in sources:
    client = ECalendar.CalClient.new(source, ECalendar.CalSourceType.EVENT)
    client.open_sync(False, None)

    # ret is true or false depending if events are found or not
    # values is a list of events
    ret, values = client.get_object_list_as_comps_sync("#t", None)
    if ret:
        for value in values:
            event = value.get_as_string()
            print event


I found the solution to mimic the original behavior under screen (only including relevant parts of the config as the rest is just window dressing):

# set prefix key to ctrl+a until I have time to adapt
unbind C-b
set -g prefix C-a

# send the prefix to client inside window (ala nested sessions)
bind-key a send-prefix

# toggle last window like screen
bind-key C-a last-window

# navigate through windows like screen
bind-key C-a-n next
bind-key C-a-p prev

Chaining together the key sequence directly was the solution. I didn't realize that you could actually do that, but it works perfectly, and I can still keep the send-prefix option (which I was concerned was part of the problem).


Perhaps the trigger of the custom hosts file entry can be NetworkManager when it connects to your home access point.


How can Clang static analyzer (scan-build) be installed on Ubuntu 18.04?

Based on a search at packages.ubuntu.com, it appears that scan-build has been split into a separate clang-tools package.

More precisely, clang is a dependency package that, on 18.04, installs clang-6.0, while clang-tools depends on the corresponding clang-tools-6.0 - which is the actual package that provides scan-tools for the current version of clang.


The / folder of Ubuntu should be ext, it can be ext, ext2, ext3, or ext4, but better off stick with ext4.

However, you will be able to read and write data to FAT32 or NTFS or ext partitions, so you just need your / partitions(analogous to the C: drive for windows) to be ext.


How to filter content in the currently opened folder?

I think Nautilus should allow the user to filter the contents of a folder as much as wanted, but here's something that might be of use for you:

Press Control+S (or Edit > Select items matching) and you can filter contents with basic REGEX.


I managed to fix it myself, due to a previous post on askubuntu the things you need to do is:
install lxappearance (sudo apt-get install lxappearance)
then just set it to your desired icons and theme!.
(note: when you set the theme, set it to a gtk theme, not the qt one or things will go wrong.)


OK so...

32-bit (depending on your hardware - check by uname -a):

cd && wget -O wps-office.deb http://kdl.cc.ksosoft.com/wps-community/download/a21/wps-office_10.1.0.5672~a21_i386.deb
sudo dpkg -i wps-office.deb
sudo apt-get -f install && rm wps-office.deb
wget -O web-office-fonts.deb http://kdl.cc.ksosoft.com/wps-community/download/a15/wps-office-fonts_1.0_all.deb
sudo dpkg -i web-office-fonts.deb

For 64-bit:

cd && wget -O wps-office.deb http://kdl1.cache.wps.com/ksodl/download/linux/a21//wps-office_10.1.0.5707~a21_amd64.deb
sudo dpkg -i wps-office.deb
sudo apt-get -f install && rm wps-office.deb
wget -O web-office-fonts.deb http://kdl.cc.ksosoft.com/wps-community/download/fonts/wps-office-fonts_1.0_all.deb
sudo dpkg -i web-office-fonts.deb

And that's it.

Edit: As the wget links are likely to break at every version change, you can also visit the download page here as noted by JonasCZ in this comment


xfce loading desktop only on guest session


Ubuntu 12.10 installer doesn't recognize Windows 7

If you're getting this message, you might have to use a tool such as gparted to solve the problem (assuming you know what you're doing). This basically gives you the ability to view your disk partitions and delete or modify existing ones.

Worst case scenario, you will need to reformat into NTFS again for Windows, and then install windows again as well as Ubuntu. However, search askubuntu for more answers that might be simpler than mine.

Here is the link

http://gparted.sourceforge.net/


Dual boot with Windows 7 stopped working

FYI, I fixed my problem by fixing the boot sector of the drive on which Windows was installed (sdb). For that I used a "Windows repair disk".

I guess that the issue came from Grub having changed something on my Windows drive (maybe during grub update) but not sure...

Step by step instructions:

I got a repair disk for my version of Windows (in my case 7, 64 bits). If you have one, use it. If you don't, you can use any Windows 7 computer to burn one (see e.g. https://www.lifewire.com/how-to-create-a-windows-7-system-repair-disc-2626301)
I disconnected my Linux drive (sda), to prevent any writing on it during the process.
I configured the BIOS to start on the CD drive.
I booted on the repair disk, and chose the option to start a "dos" command prompt.
I ran the two commands:

bootrec /fixmbr
bootrec /fixboot

I checked the BIOS to make sure that the computer would boot on sda first (linux drive with Grub), and sdb with lower priority (windows).

After that, I reconnected the Linux drive. Now I can use Grub to boot on the two systems. I also configured Linux to mount /dev/sdb read only to prevent Linux from writing the windows drive in the future.


SSH failed to start - Missing privilege separation directory: /var/run/sshd

According to the bug report here, the problem can be worked around by adding the directory creation code to /etc/rc.local.

I've done some research and I still can't figure out what is supposed to create that directory on a normal server startup - there're a couple of scripts under /etc that do this, but they appear to be deprecated as they relate to the old SysV startup and I can't find anything in the SystemD init setup to create that directory.

[Update]: Just noticed @pa4080 comment, and this seems to be it - the file /usr/lib/tmpfiles.d/sshd.conf exists and contains the line d /var/run/sshd 0755 root root, in openssh-server version 1:7.2p2-4ubuntu2.6.

The tmpfiles.d directory is part of the systemd-tmpfiles service and is documented here .

The could be an update anomaly as I've seen relevant bug reports that discuss this as a failed update, and updating the openssh-server to the latest version might fix it.


Netgear A7000 worked in 18.10, not 19.04?

Ditto to above , except my system is 18.04.2, worked fine until update in week 3 of April. Adapter works fine on a win10 laptop, possible kernel problem ?? I fixed it by using the following:

sudo dkms remove rtl8814au/4.3.21 -–all

then repeating the install lines:

sudo dkms add ./rtl8814au
sudo dkms build -m rtl8814au -v 4.3.21
sudo dkms install -m rtl8814au -v 4.3.21

Hope this helps.


Thanks user535733 and karel.
It worked eventually :) by using Rufus to build the USB.
The steps were picked up from the tutorial: https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-windows#1-overview

another page that really helped is here:
https://forums.lenovo.com/t5/Lenovo-U-and-S-Series-Notebooks/S340-15IWL-Can-t-Legacy-Boot-from-USB/m-p/4477110
 its about changing settings in the ROM during startup.


You can use mimeopen .doc at the terminal to see for example which applications are associated with the .doc file extension and then go to $HOME/.local/share/applications/ directory and remove the extensions associated with uninstalled applications.

You can then apply a similar approach to other file extensions.


Could not find command-not-found database

So in the end, it was because /usr/lib/python3/dist-packages/CommandNotFound/db/db.py has import apt_pkg which was not properly installed on my machine. So this answer solved it, by:
cd /usr/lib/python3/dist-packages/
sudo ln -s apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so


Move Ubuntu from one drive with dual boot to a new drive with single boot

The best practice is to clone Ubuntu in such the case - it's pretty simple.

Create Live CD/USB and load your system from this live drive. Choose Ubuntu version same as your old system, for example, 16.04. Create backups of all important data!
Install Ubuntu to your new drive - DON'T INVOLVE your old drives into the new installation. During installation create /, /home and swap partitions on new drive like it has been done on you old Ubuntu drive. Reboot your computer at the end of installation and check if new Ubuntu is loading well.
Load computer from live CD/USB again. Mount your root "/" partitions on both old and new drives from terminal or Nautilus. Become root:

sudo -i

Check CAREFULLY where are your old and new root "/" partitions mounted:

mount -l

Let's assume your old root "/" partition mounted to

/media/ubuntu/old/

and new old partition available at

/media/ubuntu/new/

Create in the root's home directory empty plain text file with name "exclude-list":

touch /root/exclude-list

Edit the newly created file, open it in your favorite text editor - let it be nano for instance:

nano /root/exclude-list

Insert into the file the following text:

+ */proc/
+ */sys/
+ */dev/
+ */mnt/
+ */media/
+ */tmp/
+ */run/
- etc/fstab
- boot/grub/grub.cfg
- proc/
- sys/
- dev/
- mnt/
- media/
- tmp/
- run/
- lost+found/

Please check carefully the text file for absence of additional spaces - the spaces must be absent everywhere including end of every line!
If the rsync utility isn't installed in your live system, install it before partition cloning:

sudo apt install rsync

Copy your old root "/" partition to the new one using the following command in terminal:

rsync -xrlptgoEvv --progress --exclude-from=/root/exclude-list /media/ubuntu/old/ /media/ubuntu/new/

Reboot your computer and check if everything is right with your cloned Ubuntu.
Repeat steps 3 and 4 for your /home partitions or just copy files from old to new /home partition inside your new installed Ubuntu instead.


Issue the command: sudo apt-get install software-center

Configure Opera the same way the other tutorials suggested and it worked fine.


Paging standard out using 'more', and piping to syslog

It seems that using tee to redirect to a file and paging stdout would be more appropriate than paging in the middle of a pipeline:

printf "%s\n" this is a test | tee /tmp/some.file | more -3


How to get rid of terminal window when application was launched from command line?

"nohup" is the way to start a program in a terminal and still keep it running when the terminal quits. To do this, run your command as below:

nohup ./Application/bin/myApp &

Then exit the terminal:

exit

The process would still be running.
To stop the process, you'll have to open another terminal and find the pid of the process with pgrep myApp and kill it.

More details on this wikipedia.


TeamSpeak only launches when I run the script through the terminal

Try this

Create a new file name it "Teamspeak3.desktop" and edit the file and add this

[Desktop Entry]
Name=Teamspeak 3 Client
Exec=/<RouteTo>/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Type=Application
Icon=/route/to/icon.png
Version=3

Simpler Solution

Save and Try opening it
Source
http://codetunnel.com/how-to-add-teamspeak-3-to-the-unity-launcher-in-ubuntu/


24H time format not applied on other locations

That is controlled by Regional Formats.

If the default for your locale is to show the time on 12h, then that's what you will see.

So if your your Regional Formats are set to English (United States).

Selecting English (Australia) keeps all the American settings but shows the time on 24H.

New settings will apply on your next login.


WIFI problem - it says firmware missing - Ubuntu version 12.04 desktop

The solution is quite simple. Connect your computer to the internet via an ethernet cable. If you don't have an extra one, you can use the cable between your wireless router and your cable/DSL modem. Then, open up the program Additional Drivers by searching it in the dash. Select your driver from the list, and click "Activate". Supply your password, sit back, relax, let it install, and then reboot when prompted.


Cannot boot into Ubuntu after installing Ubuntu 12.04 (with Windows 7 on another partition)

Download easy bcd, go to the add entry tab on the left side, then click the linux tab and wubi selection, enter the name you want it to apear as in boot menu (Ubuntu) and click add (sometimes doesnt work just click add 3 times to be sure), then reboot. :)


solved it T_T just used apt-get install perl-base=5.14.2-6ubuntu2.4 then everything else follows


The mini.iso version of Ubuntu is a cut-down version of the Ubuntu distribution recommended for virtual installs. I'd recommend going back to www.ubuntu.com and downloading the latest 32-bit version of the Desktop ISO.

As for your comment on PAE, that suggests that you tried downloading Ubuntu on a computer with more than 4Gb of RAM - I believe that PAE (Physical Address Extension) is required in this case.

If you do have more than 4Gb of RAM, perhaps you could try downloading the 64-bit version of Ubuntu instead of the "recommended" 32-bit.


Multiple Problems while installing VMware Player with Kernel Headers

The installed kernel was obsolete. Its headers is not any more in the repository. So the best thing to do is to update the kernel to last version in the repository.

To enable auto update for the kernel, install linux-generic which is a meta package to keep current version of the kernel & its headers:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-generic

For some reason this meta wasn't installed while upgrade for you. If it didn't work, then use Synaptic to install its headers or upgrade/install to the last kernel release (search for "linux").


use "universal usb installer"(uui) to create a bootable usb with your iso (you can download uui online)

boot up to live usb and complete installation

i assume you're using windows


Wine should not interfere with any mono stuff, they are completely separed packages as far as I know. What may change upon wine installation are file association in the filemanager. If mono was the only option, all windows-like apps were executed through mono.
After wine installation, that could be the default way to run win apps.
Right click on the exe you want to run and select "mono" from the "Open with..." menu.
It this still does not work, try executing the app from the terminal,

mono /path/to/app

And post here errors.

To install apps in sandbox I usually make use of schroot and debootstrap (follow this Guide). Use this as a last resort: it's better to understand why your system stopped working!


NetworkManager segfault every time I disconnect

A crash is a bug. Make sure to use the latest version provided by your distribution. Please report the bug against your distribution.


Ubuntu server refused my SSH key, what might I be missing?

I suspect the problem may be your authorized_keys file is owned by root:root and I believe this should be owned by the username of the user who will be connecting (username:username).

SSH checks ownership and permissions of the .ssh folder and the files within it for security reasons.  While not every deviation from the normal ownership and permissions may result in a security hole, there are some ways to create a security hole this way, and SSH errs on the side of being pedantic.  Furthermore, while the SSH server daemon needs to run as root, it's possible that it forks and drops to the regular user account before it starts verifying the key, meaning that the authorized_keys file wouldn't be visible to it.


As @SadaharuWakisaka explained his/her comment:

Sir, the system understands when Fn+F5 is pressed X86MonBrightnessDown, so it should be 'bindsym XF86MonBrightnessDown exec xbacklight -10 # decrease screen brightness' and 'killall -SIGUSR1 i3status' to take effect immediately. I am not sure because I don't have the exact same laptop.

My keybinding wasn't completly correct as well so this worked for me:
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%  # volume increase
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
  #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle  # mute sound
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle  # mute mic


In a terminal type

ibus-setup

click the input method tab, and add Korean - Hangul.

go to System Settings -> Text Entry and add Korean - Hangul


how to access the putty to ubuntu server

How are you connecting to your ubuntu machine using putty ? Can you please share the steps or command if its via cmd.

Anyways putty uses .ppk key. So make sure you have your pem converted to ppk and also no security/network blockage on machine access.

To login using cmd :

C:\Users\dmittal\Downloads\Keys>putty.exe user@hostip -i key
eg:
C:\Users\dmittal\Downloads\Keys>putty.exe dmittal@51.62.157.133 -i syd.ppk

By option -i we need to pass the path of key.


MIME types are not actually stored on the filesystem. They are merely a convenient way of knowing how to process a file. To get the MIME type, you have to run a program.

Some programs will detect the mime type of a file solely by looking at the file extension, while others will check the file for a magic number or a special magic pattern(essentially a regex).

As an example, run touch test.html, which creates an empty file.

Then run xdg-mime query filetype test.html or mimetype test.html. Both of them will return the type text/html.

However, if you run file --mime-type -b test.html, it will return inode/x-empty.

So, if you want all programs to act the same way on your file, the file should have the proper format (data) along with the correct extension.

  What is a magic number?

  Running xxd image | head -1 on my profile image creates an output as
  follows:

  00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452  .PNG........IHDR

  According to
  Wikipedia,
  89 50 4E 47 0D 0A 1A 0A is the standard header for all image/png
  files.

How does the file command work?

From the file(1) man page:

  There are three sets of tests, performed in this order: filesystem tests, magic tests, and language tests.
  ...

  The filesystem tests are based on examining the return from a stat(2) system call. The program checks to see if the file is empty, or if it's some sort of special file.
  ...

  The magic tests are used to check for files with data in particular fixed formats.
  ...
  These files have a 'magic number' stored in a particular place near the beginning of the file that tells the UNIX operating system that the file is a binary executable, and which of several types thereof.
  ...
  If a file does not match any of the entries in the magic file, it is examined to see if it seems to be a text file.
  ...

  Any file that cannot be identified as having been written in any of the character sets listed...is simply said to be 'data'.

How does file know what magic patterns to use?

Again, from the file(1) man page:

  The information identifying these files is read from the compiled magic file /usr/share/misc/magic.mgc, or the files in the directory /usr/share/misc/magic if the compiled file does not exist. In addition, if $HOME/.magic.mgc or $HOME/.magic exists, it will be used in preference to the system magic files. If /etc/magic exists, it will be used together with other magic files.

If I run strace file image |& grep magic we can see that file command looks for these files:

  /usr/lib/x86_64-linux-gnu/libmagic.so.1  => libmagic(3)
  ~/.magic.mgc
  ~/.magic
  /etc/magic.mgc
  /etc/magic
  /usr/share/misc/magic.mgc

There are other files like /etc/mime.types which other programs use. This file assigns an extension to a mime type. For example, grep -i text/html /etc/mime.types produces:

text/html                   html htm shtml


Ubuntu mutes speaker every time I insert something in the phone jack

I found a way to do this!

Start alsamixer:

$ alsamixer

Hit F5 to show all devices.
Scroll to the right until you find Auto-Mute Mode. Set it to disabled.

Done! My sound no longer mutes whenever I insert a plug in the phone jack!


Bash implements this functionality via a command_not_found_handle function:
$ declare -f -p command_not_found_handle
command_not_found_handle ()
{
    if [ -x /usr/lib/command-not-found ]; then
        /usr/lib/command-not-found -- "$1";
        return $?;
    else
        if [ -x /usr/share/command-not-found/command-not-found ]; then
            /usr/share/command-not-found/command-not-found -- "$1";
            return $?;
        else
            printf "%s: command not found\n" "$1" 1>&2;
            return 127;
        fi;
    fi
}

As you can see, the function attempts to call /usr/lib/command-not-found - which is a python script:
$ file /usr/lib/command-not-found
/usr/lib/command-not-found: Python script, ASCII text executable

with the function name (in this case a) as argument. However the shell has already redirected standard input from / - so it's effectively calling python3 with the input redirection:
$ python3 </
Fatal Python error: init_sys_streams: <stdin> is a directory, cannot continue
Python runtime state: core initialized

Current thread 0x00007f16b0ab0740 (most recent call first):
<no Python frame>

You can see the sequence more clearly if you run your command with set -x:
$ set -x
$
$ a </
+ a
+ '[' -x /usr/lib/command-not-found ']'
+ /usr/lib/command-not-found -- a
Fatal Python error: init_sys_streams: <stdin> is a directory, cannot continue
Python runtime state: core initialized

Current thread 0x00007feb94250740 (most recent call first):
<no Python frame>
+ return 1


How to remove NTFS partition in Ubuntu Launcher?

Try this commad on terminal,

gksu nautilus

Then unmount the /dev/sda1 ntfs drive which was appeared on the devices list.

OR

Try this command on terminal

sudo umount /dev/sda1


The problem was solved by commenting out the contents of /etc/apt/sources.list.d/geogebra.list


Cannot make purchases from ubuntu software center

There is a bug and steam cannot be installed from software center in 64 bit systems. You need either to search and install steam:i386 (you can also install it via terminal by executing sudo apt-get install steam) or better download and install the deb package from the site http://store.steampowered.com/about/ (this will give you the latest package and automatically add a ppa to your system for later updates).


easily you can just use cp command:

cp -rn /path-to-first-pepe-dire/* /apth-to-second-pepe-dir

PS: I use -r in case you have directories inside so if you don't have you can get rid of

use -n to not  overwrite  an  existing  file

example:

first dir pepe in your home

second dir pepe in your desktop

then command would be

cp -rn ~/pepe/* ~/Desktop/pepe


How to switch preinstalled Ubuntu from Windows 8?

You might have to give more details on how exactly are you unable to access your ubuntu. One of the problems might be with your grub loader. A grub menu basically lists all the available operating systems installed in your computer. You might have to install a custom grub so that you can get the access to grub menu.

"When you install Windows, Windows assumes it is the only operating system (OS) on the machine, or at least it does not account for Linux. So it replaces GRUB with its own boot loader. What you have to do is replace the Windows boot loader with GRUB. I've seen various instructions for replacing GRUB by mucking around with GRUB commands or some such, but to me the easiest way is to simply chroot into your install and run update-grub. chroot is great because it allows you to work on your actual install, instead of trying to redirect things here and there. It is really clean.

Here's how:

Boot from the live CD or live USB, in "Try Ubuntu" mode.
Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

Mount your partition:

sudo mount /dev/sda2 /mnt  #Replace sda2 with your partition number

Bind mount some other necessary stuff:

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

chroot into your Ubuntu install:

sudo chroot /mnt

At this point, you're in your install, not the live session, and running as root. Update grub:

update-grub

If you get errors, go to step 7. (Otherwise, it is optional.)

Depending on your situation, you might have to reinstall grub:

grub-install /dev/sda
update-grub # I'm not sure if this is necessary, but it doesn't hurt.

If everything worked without errors, then you're all set:

exit
sudo reboot

At this point, you should be able to boot normally.

If you cannot boot normally, and didn't do step 7 because there were no error messages, try again with step 7.

Sometimes giving GRUB2 the correct configuration for your partitions is not enough, and you must actually install it (or reinstall it) to the Master Boot Record, which step 7 does. Experience helping users in chat has shown that step 7 is sometimes necessary even when no error messages are shown."

-This ain't my answer.


It is and it isn't. Some data will be lost, so it is sensible to do a full backup anyway.
If you install Kubuntu / Xubuntu you won't have unity. You will have Plasma / XFCE. It will remove the current DE though, yes.
I would suggest you backup /home/USER and also run the command dpkg --get-selections | grep -v deinstall. That will give you a list of the programs currently installed. Don't just copy them immediately. That could break it because of hidden files.
I would advise new install, it is less likely to have recurring problems (like mutations in DNA get worse over time, so do bugs sometimes). However, installing all from the list isn't always the best idea, it can cause dependency left over if you uninstall.


How to see when I performed the upgrade to 19.04

You can get the date by looking in /var/log/dist-upgrade/history.log. But a more "behind-the-scenes" and informative file is /var/log/dist-upgrade/main.log.


How to find programs that are appropriate to open a file?

Three such programs that identify the file type and run or give a list of suggestions:

mimeopen
xdg-open
see

All of these can be run on the command line.  Their behavior can be modified by various options.  For example:

mimeopen -a filename

With the -a option, mimeopen will show a text menu of available programs and prompt you to choose one.  Running mimeopen -a on a mp3 file, for example, might produce:

$ mimeopen -a somemusic.mp3
Please choose an application

        1) VLC media player  (vlc)
        2) Enqueue in SMPlayer  (smplayer_enqueue)
        3) GNOME MPlayer  (gnome-mplayer)
        4) SMPlayer  (smplayer)
        5) Audacious  (audacious)

use application #

The last line above is a prompt.  If you enter 1,2,3,4 or 5, the associated program will start.  Enter anything else and mimeopen will terminate.

In contrast:

mimeopen -n filename

The above will not ask.  It will just run the default program on filename.  To choose/set the default for a file, run:

mimeopen -d filename


Why does my MySQL remote-connection fail (VLAN)?

I got it!
The service psa-firewall, which is activated and configured by Plesk, was running. It refused every incoming MySQL request.
I reconfigured it via Plesk, allowing it to let MySQL requests to go through. I don't know if I could also have done it in the shell, but deactivating it definitely helped! Yet I think that might be kind of dangerous.


What is the system monitor actually showing in terms of space used?

Snaps are squashfs images that are mounted into place, which is what you're seeing there. They are presented as disks which are 100% full, since each image is only as large as necessary to hold its data.

What it ~/snap used for?

Snaps are (typically) confined, by default limited to a few areas when it comes to reading/writing. ~/snap holds snaps' user data (e.g. config files, etc.) since they can't by default write to $HOME.

What are the /dev/loopX files used for?

Loop devices are what are used to make files accessible as a block device, such as when mounting the snap (squashfs) files. So when you install a snap, it's mounted, and a loop device is used. When a snap is updated, it keeps three revisions around (current and two old ones) in case you want to revert, so these old ones are using loop devices as well.


Error: No such partition when trying to boot Windows

Boot with the USB drive for Ubuntu installation
Select the option Try Ubuntu without installing.
Open the file manager, and if you see that all files which were there in your Windows are intact, then immediately take a backup of all those folders (if you cannot manage to get a lot of space, go for using only important files) Also check for files in the user's folder and copy them to another USB or external hard drive, not the USB which you are booting from which will not retain any data.
Use boot-repair and Testdisk as mentioned above in the comments and reboot your system.
If the above fails, install lilo and reboot your system.

Voila! You get your computer in a brand new state, but use the hard drive to install software. And please feel free to correct me if anywhere I have been wrong in this process; there are really good people out there who can solve your problem better than me.

P.S. Backup is really important.


I think your system were shut-down while system update in process.
so I suggest you to login in terminal by using Ctrl+Alt+F2, login to you shell
and execute following command:

sudo dpkg --configure -a

it will repair your packages and get your system back.


Installation type step of installation process doesn't display any options

Turns out I'd missed one or more step(s), I think the key one being switching from SATA from RAID to AHCI, as described here: http://jkssweetlife.com/dual-boot-windows-10-ubuntu/.

I guess this counts as my first successful use of StackExchange, although I'm slightly disappointed that I solved the problem myself!


12.04 wired network doesn't work RTL8111/8168B


This is my bash script for xdotool. You can set it with a keyboard shortcut. It stops when you move the mouse. Of course you can make your own script to fit your tastes.

#!/bin/bash
eval $(xdotool getmouselocation --shell)
echo $X $Y
x1=$X
y1=$Y
COUNTER=1
COUNTEND=100000
#REPEAT= 0.09s
while [ $COUNTER -lt $COUNTEND ]; do
  echo the counter is $COUNTER
  xdotool click 1
  eval $(xdotool getmouselocation --shell)
  # cancel if mouse moved
  if [ $x1 != $X ] || [ $y1 != $Y ]; then
    echo Mouse moved - script terminated
    exit 1
  fi
  #this sleep works for repetition rate
  sleep 0.01s
  let COUNTER=COUNTER+1
#  xdotool click --delay 90 --repeat 1000 1
done


Where does ISPConfig store its per-website SSL config files?

That could be anywhere on your system. During setup of the SSL you provided a directory where to install them. If you followed a how-to the most likely directory would be /etc/apache2/ssl.

To make it easier to find the: the files are

ca.pem
private.key
sub.class1.server.ca.pem
ssl.crt

Beside that: your virtual host in /etc/apache2/sites-enabled/ will also have alterations to point to port 443 and have something like this:

SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM

SSLCertificateFile /etc/apache2/ssl/ssl.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem

(this is all based on the assumption you used apache and the often used /etc/apache/ssl/ in how-to's).

General searching for files in a tar.gz:

tar tvfz {tarfile}.tar.gz /etc/apache2/ssl/ /etc/apache2/sites-*/

will find it. tar xvfz to extract files.


Unable to log into encrypted root drive after running virtual machine

The only way I can think your Kali guest would have had any impact on your host HD is if somehow you have shared folders configured. But even so, sounds a bit far fetched.

Was there anything else happening recently? A system upgrade?

As for VBox and your Kali guest, the "HD" of the guest itself is only a file (or several, depends, irrelevant ATM) and whatever you do to that "HD" should have no impact on the host's partitions.

With more info maybe more people can help. Good luck!


Ubuntu 14.04 on laptop : is there a way to not see my fixed ethernet adapter?

In increasing order of medievalness:

tell network-manager to ignore the device by unmanaging it based on its MAC address
blacklist the kernel module for the device, so that the kernel won't load the driver
disable the device in the computer's BIOS


How do I get a Brother MFC 230c Printer working?

You should try this http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html

it tells you what to do and what to install

I suggest you remove your old printer installation before it.


Problems while switching IP and MAC adresses

What you're trying to do is not impossible, but not optimal neither...
Back in the XXth century, we used to do exactly what you're trying to do now, but now in the XXIst century, we use bonding which gives you both reliability and higher throughput when both cards are up.
So forget about 2 IP addresses on 2 NICS, go for 1 IP address on both NICS and take advantage of double the throughput!
:-)


Install ubuntu-desktop dependencies problem

Type these commands:

sudo apt-get autoclean
sudo apt-get clean
sudo dpkg --configure -a
sudo apt-get update

If it doesn't solve the issue, type sudo apt-get dist-upgrade as the 5th step from the above. I hope it can rectify the issue.


Ubuntu 14.04 can't move files from phone storage to computer

1) Close Shotwell

2) Open Nautilus

3) Select your source device from the left column

4) click File, then New Tab

5) Select your target directory from the left column

6) Go to the original tab. Select all the files you wish to move. right click on one of the highlighted files and choose cut.

7) Go to the target tab. Right click in an empty space in the folder and choose paste.


Is it possible to retire packages that don't stand up to modern usability standards?

Both of the packages you mentioned, are simply synchronized from the upstream Debian repository.

If one of the packages supersedes the other, from upstream of Debian, then it might be worthwhile to contact the maintainers of the Debian packages, and handle the deprecation and replacement of the superseded package appropriately. Then, once fixed in Debian, those changes can be synced back to the development build of Ubuntu, and then backported to stable releases if necessary.


PHP 7.2 / MySQL Issue after upgrading to 18.04

Ubuntu 18.04 Bionic Beaver upgrades PHP to version 7.2, but does not always seem to update the modules.  I've had the same issue in previous upgrades.

In my case, libapache2-mod-php7.2 was missing, so to fix that problem:

sudo apt install php7.2 php7.2-common php7.2-cli
sudo a2enmod php7.2

The issue of not being able to connect to mysql was resolved with:

apt install php7.2-mysql

And the issue of missing curl functionality was resolved with:

apt install php7.2-curl


How to use kde connect with a android qemu vm

Found a easy script to set up tap interface.credits

First find the logical name of your network device In my case enp3s0.(run the command ifconfig and ls -la /sys/class/net/ to find out the logical name ignore the device with the name lo it is a loop back device)

Then run these remember to replace eth0 with the logical name of your network device name.

sudo brctl addbr br0
sudo ip addr flush dev eth0
sudo brctl addif br0 eth0
sudo tunctl -t tap0 -u `whoami`
sudo brctl addif br0 tap0
sudo ifconfig eth0 up
sudo ifconfig tap0 up
sudo ifconfig br0 up
sudo dhclient -v br0

Launch vm with -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no -device e1000,netdev=mynet0,mac=52:55:00:d1:55:01

To make this changes permanent you have to save these changes to /etc/network/interfaces but i am not sure how.Any help on doing that would be appreciated


I've had this problem too. I don't know exactly the solution, but it had something to do with some microphone settings. (yeah, really!)

Try to mess around with the microphone settings via System settings > Sound > Input


How to fix W2KSP4EN.EXE - atmlib installation error in Ubuntu 16.10 64bit to install PhotoShop CS6?

The winetricks in the repositories is out of date, and doesn't know where many files have moved to. It's easiest to use the latest winetricks from github which knows where to look instead.

So, based on part of @kenorb's answer to a related question, run:

curl -o winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
sh winetricks -q atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 fontsmooth-rgb gecko


how to list files in a folder using bash scripting

This is a typical use case for shell globbing (pathname expansion):

/home/user012/Desktop/folder2Start/*/

Here i have used */ which will match any file (*) under /home/user012/Desktop/folder2Start/, that is a directory (trailing /).

If you want to operate on these later, better put the result of expansion in an array (works in a similar manner to Python list, both are 0-indexed too):

directories=( /home/user012/Desktop/folder2Start/*/ )

then you can reference the array and it's elements using usual array manipulation operators.

OTOH, if you want the list, use echo/printf/ls -- whatever suits you the best:

printf '%s\n' /home/user012/Desktop/folder2Start/*/
echo /home/user012/Desktop/folder2Start/*/
ls -ld /home/user012/Desktop/folder2Start/*/

for any directory name with embedded newline, lookout for tailing / as name ending marker.


Is there a way to launch Unity Dash outside of Unity?

Unity 2D's dash can be used independently but there is a little trick: it starts invisible.

To launch it type:

unity-2d-places

To make it visible, there is a D-Bus API:

bool com.canonical.Unity2d.Dash.active

From the command line:

qdbus com.canonical.Unity2d.Dash /Dash active true


Unable to reach internal network. What am i doing wrong here?

The use of on-link: true here is incorrect; these are routes via a gateway, not ones on your local segment.  Dropping this is likely sufficient to get your configuration working.


hostapd gives error nl80211: Register Action command failed: ret=-19

Removing a space character after the "interface=wlan0 " line solved the issue.

I had copied the hostapd.conf from a website: hostapd is due to a bad implementation very sensitive to whitespaces.


How to use GPU acceleration in FFmpeg with AMD Radeon?

I'll provide instructions for both Windows and Linux, as you've not indicated what platform  you're on. Use these instructions that are applicable to your case.

If you're on Windows, you can access the related encoders via AMF, aptly named h264_amf and hevc_amf, whose usage can be viewed via:

ffmpeg -h encoder=h264_amf

ffmpeg -h encoder=hevc_amf

You'd need to build an FFmpeg binary for Windows, either natively, or as recommended, cross-compiling. This project is a great start on that subject.

If you use the cross-compile option, pass the arguments below for a build with the features you'll need:

./cross_compile_ffmpeg.sh --gcc-cpu-count=12  --build-libmxf=n --disable-nonfree=n --prefer-stable=y --compiler-flavors=multi

Note that the resulting build above is non-redistributable, and is only for personal use.

On Linux, using the opensource mesa amdgpu driver (not the proprietary package installed from AMD), you can access VAAPI-based encoders, aptly named h264_vaapi and hevc_vaapi, whose usage can be viewed via:

ffmpeg -h encoder=h264_vaapi

ffmpeg -h encoder=hevc_vaapi

To the best of my knowledge (correct me if I'm wrong), VP8 and VP9 encoding isn't exposed on AMD's side via VAAPI. You can confirm this by running:

vainfo | grep Slice

On your system and confirming what encoders are supported.
It's most likely that FFmpeg with VAAPI enabled is the default on the likes of Ubuntu.
However, you can also build a copy from source, if so needed. See the compilation guide on the FFmpeg Wiki, and adapt as needed. You may also find helpers, such as this, useful.

There's  a possibility that the AMD AMF-based encoders will eventually land on Linux, using a Vulkan-based interop. Take this as a work in progress.


android update project --path . --target android-25 on ubuntu 16.04

I was getting error unsupported command "update project" because I was using sdk with tools version 26.0.1. As this command is deprecated now so it is already removed from tools version 25.3.0

I found this in documentation

https://developer.android.com/studio/releases/sdk-tools.html

So, if still want to fire this command then you have you downgrade your sdk tools to version 25.2.5 or less.

For that rename your sdk/tools folder to tool1 or else to keep it as a backup and download required sdk tools and paste that [tools] folder inside sdk folder. I have followed this link to download sdk tools or platform-tools :

https://stackoverflow.com/a/11514698/6795090

In the same way you can also upgrade your tools or platform-tools. But if you are using android-studio then I recommend to update them from SDK Manager.

One last thing, to update project using "update project" command you need to set environment variables like this:

export ANDROID_HOME=<PATH_TO_SDK>
export PATH=$PATH:<PATH_TO_PLATFORM_TOOLS>:<PATH_TO_TOOLS>

This solved my problem.


"Files" file manager utility 3.10.1, How do I uninstall it?

Some update has changed something involving that program showing "Files" as it's name; The name is very unspecific, and used by multiple different programs. After finding out which programs can be run under this name, the rest of the problem may be easy to solve.

Find out which programs show up with the name "Files" when run

We need to look into all *.desktop files for the name. There, we find the command in the Exec line:

locate -b '.desktop' | xargs grep -ls '^Name.*=Files$' | xargs grep '^Exec.*'

lists desktop file names and commands for the GUI program File - replace that with the exact name you look for - even it it's multiple words (for substring search, leave out the = and $).

With the command, I find Files may be nautilus, dolphin or active-filebrowser:

/etc/xdg/autostart/nautilus-autostart.desktop:Exec=nautilus -n
/usr/share/app-install/desktop/nemo:nemo.desktop:Exec=nemo %U
/usr/share/app-install/desktop/plasma-active:kde4__active-filebrowser.desktop:Exec=active-filebrowser -graphicssystem raster %u
/usr/share/applications/nautilus-folder-handler.desktop:Exec=nautilus %U
/usr/share/applications/nautilus.desktop:Exec=nautilus --new-window %U
/usr/share/applications/nautilus.desktop:Exec=nautilus --new-window


How to delete backup files using a bash script?

Use find instead:

find /some/path -name '*~' -type f -delete

-name '*~' for filenames ending in ~
-type f for regular files (skipping directories, etc.)
-delete ... well?


Boot issues with Windows 8 after installing Ubuntu, how to fix from terminal?

Uninstalling an operating system is rather a misconception. You seem to have a computer that is set up to use UEFI. Apart from deleting the partition that contains the OS you want to remove, you should delete the UEFI boot entries, which can be done using efibootmgr in Linux running in UEFI mode or the UEFI Shell running from a USB stick, as well as removing the corresponding files from the EFI system partition.

EFI's intention was to make things easier, instead it added another layer of complexity.

If you don't want to use UEFI and you don't plan on using a harddrive greater than 2TB, the easiest way would be to disable UEFI funtionality, partiton your harddrive with a legacy MBR/MS-DOS partition table and reinstall your prefered operating systems, after you have made your backups of course.

Going the other route, I would recommend reading the UEFI related articles on the Arch Linux Wiki and the Ubuntu documentation as you can break many things when fuzzing with the wrong EFI entries.


Unable to receive mail from outside on ubuntu webmin postfix mail server

First problem, I guess, is that name servers for your domain are:

darya1.irandns.com.   ['31.25.89.27']
darya2.irandns.com.   ['31.25.89.27']

as far as I see from DNS. And I guess that's not your system?

So, if you want to configure your domain on your system (with your webmin) you have to delegate domain properly to your system - so DNS knows where to look for your domain's configuration. Now apparently it doesn't - hence it doesn't see your MX server.

Then, if I didn't miss something looking briefly - you define your MX as mail.karshenasan-nezam.com, but you don't have type A record for mail.karshenasan-nezam.com.

And also - if you're trying to run the mail server on your home broadband, even more - as virtual guest, you'll have to make sure that port 25 is properly forwarded from your public IP to your internal private IP (192.168.something.something) - (adsl and/or virtual switch of your hypervisor)

I think that would be anyway a good start for you with investigating the issue.


first you need to uninstall the present libjansson4.

sudo apt-get remove libjansson4

If you are having a problem removing it, run:

sudo dpkg -r libjansson4

If it is succeeded or not, then run:

gksudo gedit /var/lib/dpkg/status

In the resulting Gedit , remove the whole section starts with

Package : libjansson4

Then save the file and close.

Then try to install it with the repository.


Can't see files on Nautilus without sudo

Restarting the system worked. Must've had something to do with refreshing log in credentials?


Can I get a workspace manager that shows a "panner" that I can manipulate?

When logging in you can select a different window manager, such as Gnome. I think it has the feature you're looking for.

At the login screen, click the cog wheel and select the window manager of your preference.

If the manger you're looking for isn't there, just search for it in the software center. Some options: "gnome", "lxde".

Edit: Or in case you like to stick to Unity, you can install the CompizConfig Settings Manager and you can change some settings there.

Edit2: You can also install a "workspace indicator" which kind of fulfills a similar purpose as the "panner" you're talking about. See the answer to this question.


Did a re-install after installing windows and now I am getting a kernel panic

Thank you Danatela, Braiam, I just did a clean install. earlier I had re-installed. this time I re-installed while erasing the previous installation.
This helped me solve my problem although my data is now lost. But atleast I do have the system up again.

Thanks,

P.S.- Also Braiam I dont really see any solution in the link that you have attached.


I think I solved the issue (after MANY MANY more hours searching google):
$ sudo nano /var/lib/dpkg/info/mysql-server-core-8.0.prerm
comment out the if statement around the invoke.d command (or whatever it was), save, and exit nano.
$ sudo apt remove mysql-server-core-8.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  mysql-server-8.0 mysql-server-core-8.0
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 124 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 307573 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.21-0ubuntu0.20.04.3) ...
Removing mysql-server-core-8.0 (8.0.21-0ubuntu0.20.04.3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...

Seems to have done the trick...


How can I tell if I am no longer using beta?

Try with update-manager -d and find out if you see an Upgrade button. Or run System Monitor and check out the System tab and read the text under Ubuntu.
If there shows Release 12.04 (precise) 32-bit you are out of beta.

Enjoy the new LTS release and have fun with Ubuntu ;)


I had the same issue for 1 month, finally today I found how to resolve it.
what I did was installing gdb and gimp-dbg:

sudo apt-get install gdb gimp-dbg

after that I ran:

gdb gimp
(gdb) run

it shows that segmentation fault happens from

/usr/lib/libamdocl64.so

I'm using a proprietary video driver from AMD so this debug message shows that something is wrong with my video driver (opencl sources). I installed latest Ubuntu driver from AMD and everything works again.

P.S. I added debugging steps for you to check if your issue is same or not, but in short if your issue is same, you can only go for installing the latest driver for your video card.


vpn client routing when "use this connection only for resources on its network" is checked

You can add default gateway with command

by the ip address

sudo ip route add default via xxx.xxx.xxx.xxx

xxx.xxx.xxx.xxx - represent ip of vpn server

or by interface

sudo ip route add default dev ppp0

This can be done manually from terminal when you are connected to vpn.

Second solution is to make script to chance default gw when vpn is connected

Then create script witch will be executed when interface ppp0 go up.

Create script for ppp0 interface

sudo nano /etc/ppp/if-up.d/script

put in script this

    # Check for specific interface if desired
    [ "$IFACE" != "ppp0" ] || exit 0
    # trigger vpn connection
    ip route add default dev ppp0

Save and exit.

Make script called script with execute permissions 755

sudo chmod 755 /etc/network/if-up.d/script

Explanation

When vpn connection will established and ppp0 interface is up script will run and set default device to ppp0

Also you can manually add route to resource on vpn site

sudo ip route add xxx.xxx.xxx.xxx/yy dev ppp0

xxx.xxx.xxx.xxx - represent host/network

yy - represent network mask

example:

add route to host 10.35.5.181 trough ppp0

 sudo ip route add 10.35.5.181/32 dev ppp0

add route to network range 10.35.5.0 with mask 255.255.255.0 trough ppp0

 sudo ip route add 10.35.5.0/24 dev ppp0

This also can be done in Network Manager. On same places where is use this connection only for resources on its network you can add route.


A rookie's mistake. Failing to just play a DVD within vlc or smplayer I realized I was missing libdvdread4, so

sudo apt-get install libdvdread4 && sudo /usr/share/doc/libdvdread4/install-css.sh

fixed the problem.


Second Display is not detected ubuntu 12.04 on Dell Precision 390 desktop

I had a same problem on one computer.. after some time of trying to solve problem I decided to return to native driver and then everything works fine - Deactivate Nvidia driver and native driver will be activated, then go to monitor preferences and setup dual monitor. If you realy need 3D try with different conigurations.


How to see the details which Ubuntu shows at the time of login anytime?

Looks like it changed. With Ubuntu 16.04 there is no /etc/motd but you can cat /var/run/motd.dynamic instead.


Why does apt-get upgrade give ELF file warning?

You might have a corrupted file, so try removing and reinstalling the libf2c2 and libf2c2-dev packages:

sudo apt-get purge libf2c2-dev
sudo apt-get purge libf2c2
sudo apt-get install libf2c2
sudo apt-get install libf2c2-dev

The question you refer to has another problem, their file is a python script, so of course it is not an ELF file.

Fixed the package names.


Impossible to detect or retrieve files from this external HDD

[11078.910649] buffer_io_error: 498 callbacks suppressed
[11078.910650] Buffer I/O error on dev sdc1, logical block 814254, async page read

That is in indication it is a hardware failure. The only way to get this fixed is to of to a hardware repair shop and see if they can replace the broken part.


'Run command as login shell' in LXTerminal

According to man lxterminal:

-l --loginshell
       Executes login shell.

You have to start the terminal manually with the -l option.

But that is pointless, since you can always run a login shell easily using:

bash -l

from a terminal which is not running a login shell. So everytime you open a new shell while installing, start a login shell using bash -l. This is only needed until you logout or restart.


Network unreachable, but Google is reachable

Try disabling the ipv6 address. Go to network settings and uncheck the "IPv6".

https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-18-04-bionic-beaver-linux

Google is probably reachable with IP v6. You do not seem to have an ipv4 assigned.


Workaround

Ok, Instead of Turning the Hotspot on via GUI Every time.. you can add a Startup Applications Preference for your Hotspot Connection..

to add the command to Startup Applications Preferences, you need to know your connection name..

to know the connection name..

either run nm-connection-editor and look for the required connection

or once the Hotspot is on, run nmcli device show | grep GENERAL.CONNECTION:

Example:

parrot@i7-4770U:~$ nmcli device show | grep GENERAL.CONNECTION:
GENERAL.CONNECTION:                     MyHotSpot
GENERAL.CONNECTION:                     --
GENERAL.CONNECTION:                     --
parrot@i7-4770U:~$

So the required connection name is MyHOtSpot

to turn on and off this connection, the below commands are used..

nmcli connection up MyHotSpot
nmcli connection down MyHotSpot

So to turn on the HotSpot at every boot..

add the command nmcli connection up MyHotSpot to Startup Application Preferences like this

the below pic is a automatic gnome-screenshot with delay of 10 secs after a reboot which shows Hotspot is On.


Cannot log in automatically, that is, without asking for the password. Ubuntu 20.04

Thanks for answering.

Yes, I have a GeForce GTX 1050 Ti and the Nvidia driver version installed by ubuntu 20.04 is 440.64. I have chosen one of the solutions indicated in the post you refer to:

Remove the splash parameter from the grub so that the line of the file will be: GRUB_CMDLINE_LINUX_DEFAULT="quiet" and then update, the commands have been:

sudo nano/etc/default/grub
sudo update-grub

Solved. A greeting.


How to revert: Alt suddenly stopped to help special char creation?

I have accidentally switched text entry settings to other language by following key combination:

Super + Space

Pressed that again and Alt is back co-creating special chars.


mount -t cifs results in 'cannot mount readonly' error

Solved. I just had to install cifs-utils package.


How can I create an environment variable that contains the IP address of an adapter that is set via DHCP?

Add the following to /etc/bash.bashrc

The adapter in question is: enp0s3, so change that accordingly

IP="$(ip addr show enp0s3  | awk '$1 == "inet" { print $2 }' | cut -d/ -f1)"
export SERVER_IP=${IP}


What is the two-character language code for the Latin American keyboard layout?

ES

There is not one-to-one correlation between languages, countries, and keyboard layouts.

Some languages are associated with multiple keyboard layouts, e.g. English: USA and United Kingdom. Some keyboard layouts are associated with multiple languages, e.g. Kazakhstan: Kazakh and Russian. Many keyboard layouts are associated with multiple countries, e.g. Latin American…

The Latin American (latam) keyboard layout is associated with all of the following countries:

AR, BO, CL, CO, CR, CU, DO, EC, GT, HN, HT, MX, NI, PA, PE, PR, PY, SV, US, UY, VE

and the following languages:

spa

So in this case, you are lucky. Latin American is only associated with one language. "es" is your two-letter language code.

That aside, I would recommend against using language codes to indicate keyboard layouts. There is a separate system already in place for abbreviating the names of the layouts themselves. See shortDescription in xkb-data's base.xml.


I actually JUST redid this and got it working with snyaptics.  Went smooth as could be. Make sure you select not only the driver itself but also the management console as well.

Packages are
nvidia-experimental-310-dev
nvidia-settings-experimental-310

Give that a shot.


Can I enable a universal minimise-on-close?

No, it is not possible.

You can configure GNOME to not show the close button in the standard title bar, but this will not apply to all apps on the system. "Quit" in the application's menu, is an internal function.


I am still researching details, but this should work for you with Ubuntu 20.04, though you don't even need Gnome.
Please note I did this for browser (Chromium) and not Steam, so you may need to install additional packages if you start with Server image. You can still do this with Desktop image, just seems like an overkill for kiosk (you'd need to uninstall bunch of packages).
# I started with just Ubuntu Server, so I first installed basic Xorg packages
apt-get install xserver-xorg-core -y
# next install openbox, it is pretty basic window manager
apt-get install openbox -y
# install xinit and Steam
apt-get install xinit -y
apt-get install steam -y
# setup autologin so it acts as a kiosk
mkdir /etc/systemd/system/getty@tty1.service.d/
nano /etc/systemd/system/getty@tty1.service.d/override.conf
    [Service]
    Type=simple
    ExecStart=
    ExecStart=-/sbin/agetty --autologin YourUsername --noclear %I 38400 linux
# create or modify .profile script in your /home/YopurUsername to start X on login
nano .profile
    #Startx Automatically
    if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
        . startx
        logout
    fi
# in same location create or edit .xinitrc which will start your app, eg, Steam
nano .xinitrc
    #!/bin/sh
    xset -dpms
    xset s off
    xset s noblank
    # the following starts Steam, you may look up if you can start it in Big Screen mode automatically
    steam
reboot

What I've found is:

This will autologin as YourUser
Will start Xorg and initialize openbox with almost zero bells and whistles
Will start your app (Steam)
If someone closes app it will restart immediately (will see short shell, but not enough to interact)
Use unclutter if you want to remove the mouse cursor from screen (or hide it after idle=x seconds)

This is hardly a full blown solution, but it's a good start. Since you didn't say which game you are starting, I can just mention that maybe you can start Steam with some flags, starting game directly in fullscreen, couldn't find official article for Linux client, but this is link for Windows :
https://support.steampowered.com/kb_article.php?ref=5623-QOSV-5250


Ubuntu Server by design does not have a graphical user interface. It's a server, and servers very rarely have monitors connected to them.

That, and graphics are actually a huge load to the system, and therefore aren't used in places where performance matters (ie, servers).

Now, if you still want a GUI, you have two options:

Install Ubuntu Desktop and VNC over SSH in
To do this, you'd essentially just install and set up Ubuntu Desktop like you would anywhere else, and then just set up a VNC connection. You'd also need to set up an SSH tunnel for VNC, which covered in that Q&A
Install the ubuntu-desktop package
Following this, you'd need to set up the same tunneling.

From there, you can just use a VNC client on your Mac to get in.

However, a GUI on a server is, as mentioned before, a bad idea. Just get used to the console, as it can do everything a graphical interface can do, if not more.


Grub repaired after W10 update, but now W10 won't boot

Boot repair states:

=================== Suggested repair

The default repair of the Boot-Repair utility would reinstall the grub2 of
sda6 into the MBR of sda.

Additional repair would be performed: unhide-bootmenu-10s fix-windows-boot

Select the Recommended Repair option to fix Windows boot:


Maybe is best solution Owncloud.

You can upload, download files from any location using web browser.
Also you can create users ...

Manual for instalation is here

Owncloud is well documented and if you wish you can use owncloud cilent ...

Admini guide is here


Installing Ubuntu 16.04 alongside Windows 10, legacy BIOS non-UEFI

I ran into a similar issue when attempting to dual boot Ubuntu 18.04 on a machine running Windows 10 with legacy BIOS. This process might help:

https://askubuntu.com/a/1069984/616171


How to start ubuntu without executing rc.local

Booting into recovery mode - select 'network' to enable editing stuff:

This is for versions later than 12.04....

Then selecting 'root', and running chmod -x /etc/rc.local might work...

Hope this helps


How to install X11 development libraries on Ubuntu 19.04

It depends what the author means by "X11 development libraries". Probably it will be sufficient to install the libx11-dev package:

sudo apt install libx11-dev


How to get GTK3 checkboxes in certain themes?

"Is there a program to switch GTK3 themes (NOT gnome-tweak-tool, which
  grabs the whole gnome-shell as dependency)?"

I use Lubuntu 11.10. To set a GTK3 theme :

sudo ln -s /usr/share/theme/GTK3Theme/gtk-3.0 ~/.config/gtk-3.0


How to enlarge Ubuntu system partition to the left?

Follow these steps to get things done:

Backup all your data in sda7
Boot into Ubuntu via LiveUSB (by clicking on Try Ubuntu)
Open GParted
Delete partition sda7 and New Partition #1
Extend partition sda6
Apply changes and reboot

Detailed procedure of partitioning can be found in this question How to resize partitions?
Alternatively you can let sda7 be separate partition and move your /home to that. You might like to read How to create a separate home partition after installing Ubuntu under single / partition.
Original Answer:
I believe B is in between A and C. Although you can merge C and D but it is impossible to merge A and C, since partitions need to be in contiguous form to be extended or merged or you can say, partitions need to be exactly above or below the unallocated space to get resized. Moreover unlike Windows Ubuntu can't work on dynamic disks, so it is impossible to extend the partition using the partition which is very far. So it is better to merge C and D (and have 65 GB) and keep partition A as a separate partition.


Found the answer I guess.
This can be done using dconf-editor or gsettings cli utility.

Please be careful when using both the tools as they are really powerful to ruin your system.

https://howto8165.wordpress.com/2015/11/25/how-to-change-hidden-preferences-for-gedit/

This is what I did

I created two aliases/functions. One sets the default font when I type gedit the second called geditb (b for Balochi, the language I speak).

function gedit()
{

    gsettings set org.gnome.gedit.preferences.editor editor-font 'Monospace 12'
    /usr/bin/gedit

}

function geditb()
{
    gsettings set org.gnome.gedit.preferences.editor editor-font 'Nafees 18'
    /usr/bin/gedit
}


Problemas de resolucion de juegos en Wine / Game resolution problems in Wine

SPANISH

Hola David, lo que mencionas es un problema con WINE muy pero muy viejo. Tiene que ver con que no detecte el modo actual de resolucion sino que lo sustituya con el que estaba usando el juego. Esto pasa por dejar que wine utilice la actual resolution como base para la del juego o aplicacion. Para estos problemas te tengo 3 opciones.

OPCION 1 - Abrir winecfq, luego haz click en el tab de Graficos/Graphics y la 4ta opcion que dice sobre "Emular un Escritorio Virtual" / "Emulate a Virtual Desktop" haz click alli para activar esa opcion y luego colocas una resolucion igual o menor a la que estas utilizando en tu escritorio real. Por ejemplo en mi caso tengo 1920x1080 pero la resolucion que le coloco a winehq es 1280x1024. De esta forma evito el problema del cambio de resolucion ya que aislo la resolucion de wine de la resolucion real.

OPCION 2 - Agregas al atajo de wine del juego una resolucion especifica. Por ejemplo para NEED 4 SPEED MOST WANTED yo tengo un icono en el escritorio con la siguiente data:

env WINEPREFIX="/home/cyrex/.wine" wine explorer /desktop=MostWanted,1280x1024 "/home/cyrex/.wine/drive_c/Program Files/EA GAMES/Need for Speed Most Wanted/speed.exe"

la parte que te importa es explorer /desktop=WoW,1280x1024 en donde mencionas 2 elementos, el nombre de la ventana MostWanted y la resolucion de dicha ventana 1280x1024. Que ganas con esta opcion. Que la resolucion sea ESPECIFICA para este juego o programa en vez de afectar a todos los juegos o programas como en la opcion 1.

OPCION 3 - Crear un atajo/shortcut que al ocurrir el problema de resolucion simplemente presionas una combinacion de teclas y tiene la resolucion que querias. Para realizar esto debes seguir los siguientes pasos:

Abre una consola/terminal y escribes xrandr
Te saldran varias opciones de resolucion. Comenzando con la primera en la lista se enumeran del 0 hasta donde llegue la ultima mostrada.

    cyrex@cyrex:~$ xrandr
    xrandr: Failed to get size of gamma for output default
    Screen 0: minimum 320 x 240, current 1920 x 1080, maximum 1920 x 1080
    default connected 1920x1080+0+0 0mm x 0mm
       1920x1080      50.0*    51.0
       1680x1050      52.0     53.0
       1440x900       54.0
       1400x1050      55.0
       1360x768       56.0     57.0
       1280x1024      58.0     59.0
       1280x960       60.0
       1280x720       61.0
       1152x864       62.0
       1024x768       63.0     64.0
       960x600        65.0
       960x540        66.0
       840x525        67.0     68.0
       800x600        69.0     70.0     71.0     72.0
       720x450        73.0
       700x525        74.0
       680x384        75.0     76.0
       640x480        77.0     78.0
       512x384        79.0
       320x240        80.0

Como puedes ver mi primera opcion es 1920x1080. La segunda es 1680*1050 y asi sucesivamente. La primera opcion tiene el valor 0, la siguiente 1, la siguiente 2 y ya imagino que tienes la idea. Estos valores, 0, 1, 2... son para el comando xrandr.

Si algo llega a pasar y quieres regresar a la resolucion que tenias antes, asumiendo que sea la 0 (O sea 1920x1080 en mi caso). Simplemente escribes xrandr -s 0 en consola. Ahora bien, no TODO el tiempo podras hacerlo ya que la resolucion estara TAN MALA que no podras ver nada o en algunos casos ni siquiera la consola. Asi que para eso vamos a crear el atajo. Ya con la resolucion que quieres nos vamos a la ventana del TECLADO (Esto lo buscas en el menu o a traves del Dash. De una u otroa forma debes llegar a la ventana donde uno configura el teclado). Sigue las imagenes para tener una idea:

Ventana del Teclado

Tab de Atajos/Shortcuts

Seleccion de Atajos/Shortcuts CUSTOMIZADOS

Seleccion del simbolo + para agregar un Atajo/Shortcut Customizado

Ventana para agregar Atajo/Shortcut Customizado

En esta parte es donde le colocaremos un atajo que al ejecutarlo nos solucionara el problema de la resolucion cuando nos pase. Agregamos nu nombre al atajo que nos sea familiar a la funciona que tendra y abajo el comando que se ejecutara.

Hacemos doble click en donde dice Disable/Desactivado para colocar la nueva combinacion de teclas que ejecutaran el comando.

Aqui puedes ver una que invente como ejemplo.

Estas son las 3 opciones mas comunes para resolver este problema.

ENGLISH

Hello David, what you mention here is an old problem related to WINE. It has to do with how wine detects the actual desktop resolution and substitutes it with the game resolution. This happens because we let wine take the resolution we are using in that moment as base for the one it will use inside the game or app. For this problem there are 3 possible options:

OPTION 1 - Open winecfq, click on the Graphics tab and on the 4th option that says "Emulate a Virtual Desktop" click on it to activate it and the input the resolution you want WINE to open future games. For example, in my case, I have a 1920x1080 desktop resolution but I a smaller 1280x1024 for the WINE resolution. This way I avoide the problem of wine changing the real resolution for the wine resolution used in a game..

OPTION 2 - Add to the game shortcut in the desktop a specific resolution. For example for NEED 4 SPEED MOST WANTED I have an icon in the desktop with the following shortcut:

env WINEPREFIX="/home/cyrex/.wine" wine explorer /desktop=MostWanted,1280x1024 "/home/cyrex/.wine/drive_c/Program Files/EA GAMES/Need for Speed Most Wanted/speed.exe"

The section that matters is explorer /desktop=WoW,1280x1024 in which you tell WINE 2 things, the name of the window the game will run MostWanted and the resolution that window will run on 1280x1024. What do you gain with this option, you gain the fact that the specific resolution will only affect that game and not all games runned, asi in the case of Option 1 which will affect all games/apps runned in wine.

OPCION 3 - Create a shortcut that when the resolution problem appears you simply execute the shortcut combination and it will fix the problem right then and there. To do this we follow a simple set of steps:

Open console/terminal and type xrandr
You will a list of resolutions. Starting from the first in the list they will enumerate from 0 to the last resolution shown (0,1,2,3...10)

    cyrex@cyrex:~$ xrandr
    xrandr: Failed to get size of gamma for output default
    Screen 0: minimum 320 x 240, current 1920 x 1080, maximum 1920 x 1080
    default connected 1920x1080+0+0 0mm x 0mm
       1920x1080      50.0*    51.0
       1680x1050      52.0     53.0
       1440x900       54.0
       1400x1050      55.0
       1360x768       56.0     57.0
       1280x1024      58.0     59.0
       1280x960       60.0
       1280x720       61.0
       1152x864       62.0
       1024x768       63.0     64.0
       960x600        65.0
       960x540        66.0
       840x525        67.0     68.0
       800x600        69.0     70.0     71.0     72.0
       720x450        73.0
       700x525        74.0
       680x384        75.0     76.0
       640x480        77.0     78.0
       512x384        79.0
       320x240        80.0

As you can see my first option is 1920x1080. The second is 1680*1050 and so forth and so on.. The first option has a value of 0, the next one 1, and the one after that 2. This continues for all resolutions in the list. This 0,1,2... values are for the xrandr command.

If the problem happens and you want to go back to the resolution you had before, assuming it is 0 (0 in my case been 1920x1080), you simply type xrandr -s 0 in the terminal. Now, the problem sometimes is that the resolution WINE creates after the problem is not visible/all black/too small. In this cases you will not know what you are doing. This is the reason to create a shortcut for the xrandr command. After knowing what resolution you want (0,1,2..) we go to the Keyboard Shortcut Window (Search for it in the menu, dash, terminal..) and then follow the next images to configure it:

Keyboard Shortcut Window

Shortcut Tab

Shortcut Selection (Customized)

Select + Symbol to add a Shortcut

Shortcut Add Windows

In this part we will add the shortcut that when executed will solve the resolution problem caused by wine. We add the shortcut name related to the action the shortcut will do and then the actual command the shortcut will execute.

Double Click on the word Disable to add the key combination to execute the shortcut.

Here you can see one that I made up.

This are the 3 options you have to solve this problem.


At the time of Gnome desktop installation ubuntu software center removed, unable to install anymore

Press ctrl +alt+t to open terminal and run sudo apt-get install software-center

If python is also removed from your system, It is difficult to recover


Open files limit not reflecting config changes

After a long time, I found out you need to add

DefaultLimitNOFILE=65535

to /etc/systemd/system.conf and /etc/systemd/user.conf as well.


You probably have tried this one but, since you haven't mentioned that - try sudo reboot?


Banshee syncs to ipod but then there are no songs/playlists on the ipod

Banshee 1.6's support for newer ipods can be hit and miss. However the Banshee team have been working pretty hard to make this work on newer versions by porting it to gio/udev. This improves ipod support, but unfortunately is not out in stable form yet.

However you can use the following PPA if you want to use the current 1.7.x development release:

ppa:banshee-team/banshee-unstable

If you want to follow the stable releases of Banshee (which will have 1.8 when it comes out) you can use this PPA:

ppa:banshee-team/ppa

I recommend using the 1.7 PPA for now, and when 1.8 is released switching to that PPA and you should be good. I've been using 1.7 for a while now and I haven't had problems. From your question it looks like you're running the stable PPA already, so switching to the unstable one for now should do  the trick.

If it doesn't work in 1.7, then you've found a bug, you should report that to the Banshee developers.


Kubuntu 20.04 language support configuration not saved

Language Support is not included in Kubuntu, and AFAIK it's not advisable to use it for language configuration on Kubuntu, which uses the KDE approach.
If you have previously used Language Support with your user, you may have the file ~/.pam_environment, which you'd better remove on Kubuntu.
So I would suggest:

Uninstall the language-selector-gnome package
 sudo apt purge language-selector-gnome

Remove ~/.pam_environment
 rm ~/.pam_environment

Use the KDE tools for configuring languages


Log proccesses activities for later analysis

For logging the data, you can use sysstat package from ubuntu repositories.

Install it by

sudo apt-get install sysstat

After installing you need to enable logging of data. For this, change in the file /etc/default/sysstat

sudo vim /etc/default/sysstat

from

ENABLED="false"

to

ENABLED="true"

Once everything setup, it will start logging the events like disk usage, cpu usage etc.

Use following command to know more

man sar

Hope this helps...


Erase disk and install Ubuntu after having lost .vbox file and willing to use the existing .vdi to recover the former one

To distil Ben Hiller's link:

Don't install at all to the disk you want to recover.

Create a new VM with a lightweight Ubuntu (eg. lubuntu)
Create a new VDI for that VM
Install to the new VDI
Through the Storage tab of your new VM's settings add(+) a new harddrive
select 'use existing disk'
navigate to your difficult VDI and select it
In your new VM, Ctl-Alt T to open a terminal and issue

$ sudo mkdir /mnt/difficultdrive
$ sudo mount /dev/sdb1 /mnt/difficultdrive

You should be able then to access your difficult drive.

To confirm that your added drive is at /dev/sdb1 :

ls -l /dev | grep sd

You should see something like

brw-rw----  1 root    disk      8,   0 Oct  3 06:06 sda
brw-rw----  1 root    disk      8,   1 Oct  3 06:06 sda1
brw-rw----  1 root    disk      8,   0 Oct  3 06:06 sdb
brw-rw----  1 root    disk      8,   1 Oct  3 06:06 sdb1

Note that last line.


Firefox installation error in Kubuntu 12.10

Thus is an issue with the Kubuntu Firefox installer. The easiest way to fix this is to use Muon package manager to remove the package called kubuntu-firefox-installer.

Then you should be able to install Firefox without a problem. If it still doesn't work, use Muon to install the package firefox-globalmenu.

That took care of my problems.


Sage notebook server error when not logged in to host

Answer was provided on Unix SE.

I had moved the notebook dir out of my home dir, but Sage was still accessing its config in ~/.sage.  Setting export HOME=/var/sage worked.


A simple tunnel is more usually done as

ssh -L 8080:localhost:80 myUsername@remoteserver.com

-L = local port forward, ie from where I am to where I'm going
8080 = port on this machine to forward. The port my browser will connect to as http://localhost:8080
localhost = The destination on the remote server, in this case itself.
80 = Port on the remote (target) machine to connect to, the port where the service is running.

This would allow you to access the web server on the remote server, when you have ssh access to it, but do not have web access to it.

ssh'ing to your localhost is usually pointless. It is only done to check your ssh server is running properly or keys are correct.

The connection refused error you see is because ssh server is not running on your local machine.  sudo apt-get install openssh-server    Then you can ssh to your local machine from localhost, or anywhere else you can get a port 22 connection to this machine from (typically behind your local network firewall)

-D (dynamic application forwarding) is a different case, and would more apply if some tricky fat client application (eg mysql) on your local machine needs to access a server on a remote machine. It is less often used.

The message about privileged ports occurs when you try to redirect a local port less than 1024.  Hence the use of port 8080 in the above example, to avoid the priviledged port 80.  For the example above, your browser would use
    http://localhost:8080


Problem in connecting to Atmel Corp. AVR ISP mkII and FT232 USB-Serial (UART) IC

Add your user to the appropriate group - dialout with the command below:

sudo usermod -a -G dialout $USER

then logout and login back.


Unable to boot Windows 8 after Ubuntu installation

My solution to fix the problem is as follows:

Go to bios menu by selecting system setup. Press right arrow to change tabs until you come across secure boot. if it is enabled then disable it. If this works then you might want to disable fast startup as well once you're in Windows.

However disabling fast startup is completely optional. Windows will boot properly even if it is enabled. fast startup should be disabled for those who use files on both Windows and Ubuntu. Or else you might get an Unable to mount the drive error.


Windows snapping no longer works on 14.04.3 after upgrading to Gnome 3.12.1

I figured it out. I had to enable windows tiling in dconf editor.

select gnome > mutter:check "windows tiling"

scroll down

select shell > overrides:check "windows tiling"

close dconf editor

restart machine

worked for me.


Ubuntu 16.04 LTS and 17.04 frame rate issues

Try installing sudo apt install nvidia-prime (you may have to first sudo add-apt-repository ppa:graphics-drivers/ppa) and then go to nvidia-settings and turn on your graphics card. (You're likely using Intel via an Optimus configuration)


non system disk or disk error when installing Lubuntu on an old HP laptop

Using fdsik I figured out that there was no bootable partition so I did this:

fdisk  /dev/sda

Command (m for help): m

Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition's system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): a

I only had one partition so it was automatically set to that one. After that everything worked fine.


I don't use xfce but I think that is a program that saves your last desktop session state and offers to restore it or start a new one. It's part of the xfce desktop setup if I am not mistaken.


Are there any credible alternatives to XBMC as a media server that can also be used to stream video to a tablet or other Android device?

DISCLAIMER: I HAVE NO EXPERIENCE IN RASPBERRY PI, SO I CAN'T GUARANTEE THAT THIS WILL WORK.

I can highly recommend using this guide from the xbmc wiki: http://wiki.xbmc.org/index.php?title=HOW-TO:Share_libraries_using_MySQL

  If you have more than one XBMC device on your local network then you might want to synchronize them using a MySQL library. Using a MySQL library allows you to store information about your whole video library in a central database, sfewo that multiple XBMC devices can access the same information at the same time.

  This gives you the ability to do things like:

  Share watched and unwatched status for your media on all devices
      Stop watching a movie or TV show in one room then finish watching it in another room automatically
      Only one library to maintain for all devices

I use this myself at home at it works really well. I installed the xbmc android app on my phone and tablet and I have no complaints with using it over wifi.  The best part is that I can start a film in the lounge and then resume it on my phone somewhere else.

The only thing that you will have to do is find a pc to run a mysql server.


Running multiple web services on one website

Turned out to be that this is the way to do it :) The issue was somewhere else, it was actually MySQL taking timeout after 8 hours of inactivity. So put a cron jobs like
0 0,8.16 * * * systemctl restart myfirst-server.service and its working well for now.


How to install Ubuntu 15 with Windows 8.1

Boot into your Ubuntu LiveUSB/CD. In the setup, choose Something Else when prompted where to install Ubuntu. Next, double-click your partition meant for Ubuntu. For the Type option (or something similar), select the ext4 option from the dropdown. Select to format it and write / as the mount point. Click OK and then Next. Ubuntu will install to that partition.


I see that this is an old question but there are no answers.

The solution for me, on Ubunutu 14.04, all I had to do was go into the unity tweak tool and change the icons to default.


Apt-get not working after attempting to install kde desktop

Run this:

sudo dpkg -r  account-plugin-google unity-scope-gdrive
sudo apt-get -f install


How do you prevent snapcraft stage including the absolute path with the python3 plugin?

This is just a bug and fixed in snapcraft 2.17

thanks @sergiusens

available from this ppa:

sudo add-apt-repository ppa:snappy-dev/snapcraft-daily


There's an active bug for this issue at https://bugs.launchpad.net/ubuntu/+bug/720912


How can I get statistics, how line count has changed over time?

There is also bzr-diffstat:

$ bzr diffstat -r 55..57
 foo/bar.py |  2 +-
 po/foo.pot | 56 ++++++++++++++++++---------
 2 files changed, 38 insertions(+), 20 deletions(-)


Ubuntu 18.04 lags and mouse doesn't respond for a few seconds

You killed Ubuntu's performance by creating a 32GB swap partition. New installations of Ubuntu 17.04 and later create a swap file by default instead of a swap partition. My computer has 32 GB RAM and it usually uses about 1-2 GB of swap maximum. I don't know why you think you need a separate /home partition either. A separate /home partition is a waste of valuable disk space on the SSD if your computer has an SSD.

If your files take up a lot of disk space, you need somewhere to store them, but it doesn't have to be a separate /home partition. It can be on another drive, on a data partition or wherever it is most convenient to store the files, and leave your /home folder on the root partition for files that you want to be stored in the /home folder. That way you won't run out of space on the root partition.

At this point I think it would be most convenient to reinstall Ubuntu 18.04 with only one partition. It would also be possible to resize the root partition by adding disk space from the unneeded partitions, but you haven't put much on Ubuntu yet, so reinstalling Ubuntu would be a quicker and easier way of doing it.


Set Mouse Cursor to Left Center of Currently Active Display With Command/Script

This approach uses utilities for X servers, it presumably won't work with Wayland.
Here's a little bash function for you:

line_up ()
{
  vc=$(( $(xwininfo -root|sed '/Height/!d;s/.* //') / 2 ));
  [[ -n $2 ]] && vc=$(( -$2 + vc ));
  xdotool mousemove $(( $1 )) $vc
}

As a oneliner:

line_up(){ vc=$(($(xwininfo -root|sed '/Height/!d;s/.* //')/2));[[ $2 ]]&&vc=$((-$2+vc));xdotool mousemove $(($1)) $vc;}

This uses the output of xwininfo to get the current display's height, divides it in half and saves it as variable cv. If $2 exists, it is subtracted. xdotool then moves the cursor to the coordinates $1,$vc. I take advantage of the fact that bash's arithmetic expression just returns 0 if $1 is not set, a plain xdotool mousemove $1 … would just throw an error in that case. As above you can call the function with as much arguments as you like, if there are none it will just move the cursor to 0,totalheight/2, if there's one to $1,totalheight/2 and if there are two or more to $1,totalheight/2-$2.

Example run

$ xwininfo -root|sed '/Height/!d' # display height is 1024 px
  Height: 1024
$ xdotool getmouselocation # current mouse location: 469,875
x:469 y:875 screen:0 window:15294612
$ line_up
$ xdotool getmouselocation # current mouse location: 0,512
x:0 y:512 screen:0 window:14680366
$ line_up 10
$ xdotool getmouselocation # current mouse location: 10,512
x:10 y:512 screen:0 window:14680366
$ line_up 20 -10
$ xdotool getmouselocation # current mouse location: 20,522
x:20 y:522 screen:0 window:14680366

Sources

How do I find out my screen resolution from a shell script?
The Bash Hackers Wiki
man xdotool
the usual try & error


I am using the drivers downloaded from here on xp-pen.com for my XP-Pen star 3 product.
Select your device, and download the Linux driver (the zip file) from the page that comes up.
Then just extract the files in a folder with a simple name and execute the Pentablet_Driver.sh file to install.


How to use Livepatch to keep my computer more secure between restarts?

You do not need to restart now or it would say to do so.
Livepatch is a service that allows you to apply security patches to a running kernel, without having to reboot.
By using this service, you are better able to keep that server safe from vulnerabilities--without having to take that server offline for a reboot.
It is doing what it is supposed to do.
It is offering to have you use this service.
If you have not done so already you need a Ubuntu One account.
Here are some step by step instructions on how to do that. https://ubunlog.com/en/como-hacerse-una-cuenta-de-ubuntu-one/


Alien deletes the .deb generated before I can install it

solved by using a x86_64 instead of i586 mandriva rpm


GUI tool for viewing and managing print queue?

In addition to the "Printers" application, there is a CUPS web interface that can be used to view and manage printers and print jobs on your computer. Open a web browser and point it to http://localhost:631 and the print interface should appear.


You are using an open source "radeon" driver for your video adapter.

It may not perform well. I suggest installing a proprietary AMD driver.

You can do it by running in terminal

sudo apt-get install fglrx

and reboot.

Same task can be done in GUI. You can go to

System Settings -> Software & Updates -> Additional Drivers

and find there drivers for your video adapter.


Install a 'recommended' package when user asks for corresponding action

If you're using python, python-aptdaemon-gtk is probably the way to go. For a good example of how to do this, look at /usr/share/doc/python-aptdaemon.gtk3widgets/examples/gtk3-demo.py.gz

You get nice install prompts like:

In the case of using C++, you could could use the AptDaemon D-Bus interface, but I don't know of any examples and you wouldn't get the widgets for free.

The D-Bus API of AptDaemon is documented here: http://packages.python.org/aptdaemon/dbus.html

I can't find much in the way of C++ DBus tutorials on the web, so your best bet is probably the documentation and examples in the libdbus-c++-doc  package.


After I installed 14.04 desktop, launcher on left side is missing

Can you check whether unity-panel-service is running? The path is /usr/lib/unity/unity-panel-service. The package that provides this is unity-services. Please check whether the package is installed.


What is ABecho command line in Teamviewer Package

Googling for "function abecho", I found this:

function ABecho()
{
  printf "\E[1m %-30s \E[0m %s \n" "$1" "$2"
}

It's formatted output. Bold first variable, up-to 30 spaces (depending on the length of the first variable) and the the second in normal. It's a method of keeping the second column a constant distance out, rather than using column. Here are some examples I ran through it to highlight the constant width of the first column.

 cheese                          string
 cheesey                         string
 cheesey poptart                 string
 cheesey poptart bananahammock   string


I don't understand why I'm getting a permission error

The following solved the problem:

<VirtualHost *:80>
   ServerAdmin myanme@myserver.net
   ServerName myserver.net
    DocumentRoot "/home/utils/rails/public"
    <Directory "/home/utils/rails/public">
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
        AllowOverride None
        Require all granted
   </Directory>
   LogLevel warn
   ErrorLog ${APACHE_LOG_DIR}/myserver.net_error.log
   CustomLog ${APACHE_LOG_DIR}/myserver.net_access.log combined
</VirtualHost>

The key is:

Require all granted

This is used since Apache 2.4. The other directives are not key to the access issue, but I have them to disallow .htaccess directives (ALlowOverride) and deal with Multiviews

Setting permissions to 0755 works and did not need to be changed


Minimize windows without them going black and white

The solution was to go to:

  System Settings > Application Appearance > Icons > Advanced

And under All Icons remove the effect for the Disabled icon.

Edit

Here's the respective KDE bug report https://bugs.kde.org/show_bug.cgi?id=311991


What Filesystem to use when working between Ubuntu & Mac?

You will get various opinions on this, but, unless you need to share large files ( > 4 gb) , FAT (vfat on Ubuntu) is a great option, supported on both OS out of the box.


It was zoom (in Universal access) enabled.


Installation failure on AMD Ryzen 3900X and Gigabyte Auros Master X570 motherboard

Try Ubuntu 18.04.

19 doesn't work.. . For now.

I've read on phoronix that it has an issue that should be fixed in the near future. They don't know exactly if it's a kernel or motherboard problem but it will surely be fixed in a patch someday

Edit: my friend had same issue and successfully booted Ubuntu 18.04 on his 3700x build (Asus x570 hero motherboard).

"While Ubuntu 18.04 LTS and older Linux distributions boot Zen 2, to date I have not been able to successfully boot the likes of Ubuntu 19.04, Manjaro Linux, and Fedora Workstation 31. On all newer Linux distributions I've tried on two different systems built around the Ryzen 7 3700X and Ryzen 9 3900X, each time early in the boot process as soon as trying to start systemd services, all systemd services fail to start."

Source :

https://www.phoronix.com/scan.php?page=article&item=ryzen-3700x-3900x-linux&num=1


Should we be upgrading away from ubuntu.components 0.1?

Ubuntu SDK promises to maintain backwards compatibility. As far as I can remember Ubuntu Components 1.1 was created with the introduction of new widgets like combo box, additional API changes, some performance tweaks etc.

Core Apps are the first wave of consumers of the Ubuntu SDK followed by other 3rd party. I personally feel that we should be striving to be as close as possible to upstream in this regard and encourage 3rd party app devs to do the same.

So yes, it is best to leave 0.1 behind and upgrade to Ubuntu Components 1.1.


The best way to install LibreOffice in Ubuntu is without any doubt by what you call the USC. The former USC has now been replaced by the "Snap Store", a customized version of Gnome Software. The Snap Store contains two different entries of LibreOffice. One of the entries is an install of the software through a novel approach for software packaging, i.e. "snap". The other entry is the version that comes by default with a full install of Ubuntu, and is distributed using the traditional APT software distribution system.
Just check in the Snap Store whether it is the APT or the snap version you are looking at: click on the entry, and on the page that appears, you will see the source. If that says "snapcraft", you are looking at the snap version.
From the command line, the two different versions are installed with following commands, for the APT and the snap version respectively:
sudo apt install libreoffice

and
sudo snap install libreoffice

Difference between the packages

APT packages are compiled and tested for a specific version of Ubuntu. During the lifetime of the Ubuntu version, the LibreOffice version will essentially remain the same. Only minor security updates are provided.
snap versions, on the other hand, are containerized and thus will run in a range of Linux distributions without change. That is a significant advantage of the latter packaging version. That also makes it much more manageable to regularly update the package. Therefore, you will typically see that the snap is a newer version. A disadvantage is that snaps use more disk space and, currently, still are somewhat slower during initial startup.

Which one of these two is the best? Both of these packages are officially available within Ubuntu and are installed with an established and tested framework: you will not break your system. Go for the APT version that comes with the distribution if you want maximum stability; go for the snap if you want the newest version.


My makefile results in: No rule to make target `arch/x86/tools/relocs.c', needed

In the make file, just change SUBDIRS=$(PWD) into M=$(shell pwd)...

Works like charm