Which Ubuntu repositories are totally safe and free from malware?

All of the official Ubuntu repositories (encompassing anything that you can find on archive.ubuntu.com or its mirrors, as well as some others) are entirely curated.  This means main, restricted, universe, multiverse, as well as -updates and -security.  All packages in there have either come from Debian (and so have been uploaded by a Debian Developer) or have been uploaded by an Ubuntu developer; in both cases the package that is uploaded is authenticated by the gpg signature of the uploader.

You can therefore trust that every package in the official archives has been uploaded by either a Debian or Ubuntu developer.  Furthermore, the packages you download can be verified by the gpg signatures on the files in the repository, so you can trust that each package you download has been built on the Ubuntu build farm from the source that was uploaded by an Ubuntu or Debian developer¹.

This makes outright malware unlikely - someone in a position of trust would need to upload it, and the upload would be easily tracable to them.

This leaves the question of more surreptitious nefariousness.  Upstream developers could put backdoors into otherwise useful software and these could make it into the archive - in universe or multiverse, depending on the license.  People do run security audits of the Debian archive, so if this software became popular it's likely that the backdoor would be discovered.

Packages in main have some extra checking and get more love from the Ubuntu security team.

PPAs have almost none of this.  The guarantee you get from a PPA is that the packages you download were built on the Ubuntu build infrastructure, and were uploaded by someone with access to one of the GPG keys of the Launchpad account of the listed uploader.  There's no guarantee that the uploader is who they say they are - anyone could make a “Google Chrome PPA”.  You need to determine trust in some other way for PPAs.

¹: This chain of trust could be broken by an extensive intrusion into the Ubuntu infrastructure, but that's true of any system.  The compromise of a developer's gpg key would also allow a black-hat to upload packages to the archive, but since the archive emails the uploader of each package this should be noticed quickly.


How do I change the final location of a compiled c program in the terminal

Depends on the compiler. For the GCC family (gcc, g++, etc.), you can use the -o option. The following creates an executable name blah:

gcc foo.c -o blah


Terminal used for SSH connection becomes unresponsive after I switch to and from other applications

I had the exact same problem, on the same OS: an old ssh session timed out and CTRL+C/D/Z had no effect, session just sits there.

The only way I managed to regain control of the console without closing it entirely was to send the ssh escape key (default ~), by typing: ~. and hitting .

Related: https://unix.stackexchange.com/questions/2919/kill-an-unresponsive-ssh-session-without-closing-the-terminal


Why superuser don't have global menu integration?

This is a bug, but it hasn't had a status update in awhile.

  This is not supported at the moment. There are 2 aspects to this bug.

  The first aspect is that we use standard dbus calls, and don't
  differentiate between the real and effective user id to connect to the
  session bus. As a result, sudo apps are sharing a /distinct/ bus.
  dbusmenu could workaround that potentially.

  The second aspect (more serious) is that the security implications
  would probably dictate that menus of sudo apps be exposed with some
  special color or rendering, to ensure the user is conscious that he is
  interacting with privileged apps. That's more a design aspect.

  On the latter, you can argue however that sudo apps are currently
  displayed as normal apps, so the solution for that design is actually
  a more general problem to address.

Via Launchpad Bug report


If you have trouble logging in, press ctrl + alt + F6 to switch to another tty. Log in as your main user.

Run sudo dpkg-reconfigure lightdm

Select [OK] and select lightdm as the default display manager.

Run sudo reboot

See if lightdm login screen loads properly now.


grep -l xyz file*

where xyz is the search pattern , and file* is the list of files to be searched in


Screen with ssh to overcome disconnection

If you have a modern version of ubuntu on the server, then you can use byobu, which is a more updated version of screen.

From your local:

ssh serv@domain
byobu
/path/to/script.whatever

Then if your session drops (or you just close the terminal), you can reconnect with the ssh command and be right back where you were.

You can also set byobu to always be running, which is what I do, by typing byobu-enable.


How to switch workspace with mouse wheel in Unity

You can achieve that with CompizConfig Settings Manager.

Install CompizConfig Settings Manager:

Hit Alt+Ctrl+T to open terminal and run following command:

sudo apt-get install compizconfig-settings-manager

Or search for "compizconfig-settings-manager" in Software Center and install it from there.

How to set it up?

Once installed, Hit Super key (Windows key) to open Unity dash and search for "ccsm" and open it.
Navigate to Desktop > Viewport Swicher

Goto "Desktop-based Viewport Switching"
Enable and set "Move Next" to button 5, And "Move Prev" to button 4.

That's It!


Ignoring BGRT Invalid status 0 (expected 1)

BGRT is the ACPI Boot Graphics Resource Table.  The error you see is because the status value in the table is zero, hence bit 0 (the display bit) is not turned on, so the boot graphic is not being displayed. The BGRT message is just reporting that this is disabled on your machine, and it is not a fatal error.

For more details, see the Linux driver: arch/x86/platform/efi/efi-bgrt.c, and ACPI BGRT description in the ACPI specification, http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf, section 5.2.22.


Not sure what solutions you tried as you did not link the post.

Looks like computer has HDMI, have you verified its not using that, rather than your Intel driver? I know on 14.10 its under Sounds. You just need to click the non-hdmi option, if HDMI is selected.

If you have

Try this:

 sudo killall pulseaudio
 sudo alsa force-reload


Should Nitro pull in manual changes to todo.txt?

I submitted a support request to the developer, and I received the following clarification by email:

  Hi,

  It's expected behaviour. We're currently working on mobile apps and
  the todo.txt was just a thing so you can view it on your phone. Sorry
  about that.

  Thanks, Jono


How TO create a BOOTABLE USB stick on Windows 8

You could also give an alternative tool like: http://www.linuxliveusb.com/ a try. Has worked like a charm for me loads of times.


Java no longer works after upgrading to 12.04

Oracle Java 7 on Ubuntu 12.04 x64:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-jdk7-installer

I think due to 12.04 still in Beta theres no source list or something. I don't really understand everything yet, still learning myself.

Are PPA's safe to add to my system and what are some "red flags" to watch out for?

Test if Java is Working:

http://java.com/en/download/testjava.jsp

From:

http://christiansons.net/mike/blog/2012/03/oracle-java-7-on-ubuntu-11-10-12-04/


I you know you will be expecting, say, /dev/ttyUSB0 to appear, you can use the inotify system to wait for it to appear, then do you command:

inotifywait -m -e create --format %f  /dev |
while read file
do      if [ "$file" = ttyUSB0 ]
        then  cat /dev/ttyUSB0
        fi
done

The above prints the basename of each new file (or device) created in the /dev directory, eg "ttyUSB0".

The create notification is so quick that udev has not yet had time to chgrp the device to group dialout. To wait until that is done, you need to also look for attribute change events as folllows:

inotifywait -m -e create,attrib --format %f  /dev |
while read file
do      if [ "$file" = ttyUSB0 ]
        then  ls -l /dev/ttyUSB0
              group=$(stat --format=%G /dev/ttyUSB0)
              if [ "$group" = dialout ]
              then  cat /dev/ttyUSB0
              fi
        fi
done


Ubuntu 14.04 installer insists on running in UEFI mode

How to get your laptop to boot the cd in bios mode is specific to your model of laptop: you will have to read the manual or contact the manufacturer about that.  However, when installing Ubuntu along side an existing bios booting Windows install, it will automatically stick with bios booting even though the installer itself is booted in UEFI mode.


Install ubuntu on Lenovo tab m8, m7 and use OTG host

Currently it's not possible to install Ubuntu Touch on those devices, because there's no port of Ubuntu Touch for them, and it's only possible to run Ubuntu Touch for devices that have received a port.
If you want to know the list of current ports, and their status, you should look at the Ubuntu Touch devices web page.


The first thing I would do is install the newer versions of FGLRX, as you have the version available at distro release.  you do not need to get a version from AMD, at this point, you can get the updates version from the repository.

First uninstall your current version.

sudo apt-get purge fglrx fglrx-amdcccle

Then install the newest version, available in the repository

sudo apt-get install fglrx-updates fglrx-amdcccle-updates

Restart your computer, Log back in your desktop, report your FPS results again.

I also want to mention, You will get very low framerates if you have "Wait for vertical refresh" set to any of the "ON" options.  Make sure it is set to "Off, unless application specifies"  You can find it in the Catalyst Control Center.  That is the only other reason, which I could think of, that would cause such low FPS on a correct configuration.  I'm 100% serious, you need to check on this setting. This is not a mere suggestion, it is that significant to the FPS scores.


Where do I find Bluetooth device Link Keys in 18.04?

/var/lib/bluetooth/[MAC Address of device] is the folder for the bluetooth device installed in your computer.

Inside this folder are many folders which correspond to each paired device. Each one if these folders have as name the corresponding id of the paired device. And inside each one of these folders exists the info file that you are looking for.

This link might help you if you want to pair a bluetooth device in a dual boot computer (Windows and Linux)
https://unix.stackexchange.com/questions/255509/bluetooth-pairing-on-dual-boot-of-windows-linux-mint-ubuntu-stop-having-to-p


Calculating the number of lines in a file?

Use the tool wc.

To count the number of lines: -l

wc -l myfile.sh

To count the number of words: -w

wc -w myfile.sh

See man wc for more options.


why does the ubuntu download page give me an AMD64 build when I choose 64b?

it's called amd64 because AMD developed it. Intel developed the old x86 base. This is primarily divided so none of the companies can rule the market and limit it's usage.

the amd64 will work any any cpu that is 64-bit capable.


I fixed it. I think it was:

sudo apt-get install ntfsfix
ntfsfix /dev/sda3

I think that's the one that did it.
Credit to https://linuxacademy.com/blog/linux/ntfs-partition-repair-and-recovery-in-linux/

https://www.thegeekstuff.com/2012/08/fsck-command-examples was of some help too, but fsck didn't get me there.


First, the CD with Windows 7 is not a CD.  Windows 7 does not fit on a CD, and neither does Ubuntu anymore.  You need a DVD.  Second, I wouldn't think that CD you got with Windows on it is writable, you may need to make another DVD.  Just burn the Ubuntu image to the DVD and you should be set.  If you don't have a DVD, you can do a crude hack that I came up with to install from USB really easily.  I'll put it here, but you will need some terminal knowledge.

Mount the EFI hidden partition.  mkdir mnt ; sudo mount -t msdos /dev/disk0s1 mnt
Extract the Ubuntu iso.  You can use "The Unarchiver" from the Mac App Store.
Grab the file called grubx64.efi or similar.  It may also be named bootx64.efi.  Put this in mnt/EFI/BOOT and name it BOOTX64.EFI
You need to copy the iso image to a flash drive.  This will delete all data on the flash drive.  dd if=ubuntu.iso of=/dev/disk<usbdisk> bs=4m.  You can find what disk is the flash drive by using diskutil list
When this finishes, take your drive out and put it back in.  It may take a while.  Using the rdisk variant of the device node may make it faster.
Restart the computer holding the option key.  Select EFI Boot
The EFI GRUB menu will load up if you did all this correctly, and you can boot Ubuntu.

Again, this is only needed if you want to do an installation from USB on your mac.  Even then I am sure there is another way, such as rEFIt.


Incorrect 'date modified' in Ubuntu 14.04

You can use the 'touch' utility to change the file date/time.

From the command line interface, short version explanation: $ touch --help
For long version explanation: $ info coreutils 'touch invocation'

To display the contents of a directory, sorted by date: $ ls -lS


show specific lines from all files with .txt extension

There are many ways. Here are a few:

awk

awk 'FNR==7 || FNR==15' *.txt

FNR is the line number of the current file. Because the default action in awk when an expression evaluates to true is to print the current line, this will print lines 7 and 15 of each .txt file.

Awk is the only tool I know that can easily (others can do it but not quite so simply) distinguish between the line number of all input and the line number of the current file. Therefore, the other suggestions involve shell loops:

sed

for f in *.txt; do sed -n '7p;15p' "$f"; done

Perl

for f in *.txt; do perl -ne 'print if $.==7 or $.==15' "$f"; done

Or, to avoid the shell loop:

perl -ne '$c++; print if $c==7 or $c==15; $c=0 if eof' *.txt


Is it bad practice to store applications in the users home directory?

Is it a bad idea to store applications in the home directory and if so where is a better place to store them?

It depends on the use-case and even then you can argue on it. Generally I would be in the "yes, bad idea"-camp.

  They either run on cronjobs, or as independent services using systemd.

This is screaming /opt/ to me. That is the directory intended for this.

The idea of /opt/ is to provide a tarball with all the permissions set as they should be (probably "root") and then have a service with a dedicated user/group for this service. The user unpacks the tarball, and you could direct them to a installer that would ask for user/group to use for the service.

From the link

  This directory is reserved for all the software and add-on packages that are not part of the default installation. To comply with the FSSTND, all third party applications should be installed in this directory. Any package to be installed here must locate its static files (ie. extra fonts, clipart, database files) must locate its static files in a separate /opt/'package' or /opt/'provider' directory tree.


How to add nvidia-current drivers into an iso file with remastersys?

I'm afraid you can't, at least there is no easy or official way to do so. Remastersys doesn't enable you to bundle proprietary drivers:

  You should start with a clean install of Ubuntu or variant and use a single user to make all changes.  You should not install any proprietary video drivers like the nvidia or ati drivers as they will not be used on the livecd and users will have to reinstall them after installation. (source)

However, you can add files to the installation. Any file that is put in /etc/skel will be copied to the home folder of each user on the installation. So you could potentially bundle the dependencies of nvidia-current and add the .deb installer.


How do I fix the glxinfo BadValue error on Ubuntu 18.04?

Well, I just had this issue in an updated 20.04 with NVidia, and this was the first search result. Later I found the solution in the old X-Plane forums: https://questions.x-plane.com/5090/linux-failed-request-badvalue-integer-parameter-operation?show=5146#c5146
Our user account must be included in the video group: sudo adduser $USER video


The easiest way is to create an udev rule in /etc/udev/rules.d/70-usb-modeswitch.rules .

For example with a USB LTE stick from another vendor:

# own udev rule USB LTE
# switch from mass storage mode to modem modem
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9bfe", RUN+="/usr/sbin/usb_modeswitch -v 1c9e -p 9bfe -M '55534243123456780000000000000606f50402527000000000000000000000'"
# load driver for modem mode
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9b01", RUN+="/bin/bash -c 'modprobe option && echo 1c9e 9b01 > /sys/bus/usb-serial/drivers/option1/new_id'"
# rule for modemmanager (example /lib/udev/rules.d/77-mm-longcheer-port-types.rules)
ACTION!="add|change", GOTO="mm_longcheer_port_types_end"
SUBSYSTEM!="tty", GOTO="mm_longcheer_port_types_end"

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c9e", GOTO="mm_longcheer_vendorcheck"
GOTO="mm_longcheer_port_types_end"

LABEL="mm_longcheer_vendorcheck"
SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}"

ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9b01", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_LONGCHEER_PORT_TYPE_MODEM}="1"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9b01", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_LONGCHEER_PORT_TYPE_AUX}="1"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9b01", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_LONGCHEER_PORT_TYPE_AUX}="1"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9b01", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_LONGCHEER_PORT_TYPE_AUX}="1"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9b01", ENV{ID_MM_LONGCHEER_TAGGED}="1"

GOTO="mm_longcheer_port_types_end"

After saving your rule do udevadm control --reload-rules.

see also this longer blog post https://bytefish.de/blog/huawei_e352s5/


Control mouse pointer with keyboard without a number pad

Since you don't have a NumPad, I don't think there is a way to get the normal Accessibility "mousekeys" that you're looking for.

You can use keynav instead (as suggested by sum2000) although that is a rather different experience.

You can configure it as follows (in ~/.keynavrc) to use the normal Arrowkeys, if that
s what you want:

Left cut-left
Down cut-down
Up cut-up
Right cut-right
control+Left move-left
control+Down move-down
control+Up move-up
control+Right move-right

It's in the repositories for Ubuntu 11.10, so

sudo apt-get install keynav

should work.


How to refresh Dconf Editor in Ubuntu 18.04?

you should not remove the files manually for unwanted gnome-shell-extensions..
you should remove it from Ubuntu Software or via command line

for example.. some extensions via Ubuntu Software.. some via command line..

even after removing via Ubuntu Software or Via Command Line.. if the schema is still showing on the dconf-editor.. you should manually click the key and earse the particual key/keys


Ubuntu boot stuck and GParted live not launching

Use ubuntu installation image and run Try Ubuntu without installing option
Crate mount point folder sudo mkdir /mnt/rootpartition
Mount your root partition sudo mount /dev/sdX /mnt/rootpartition -t ext4 -o rw
Clear /tmp folder by sudo rm -fr /mnt/rootpartition/tmp/*
Clear apt cached archives: sudo rm -fr /mnt/rootpartition/var/cache/apt/archives/*
Unmount your rootpartition sudo umount /mnt/rootpartition
Run gparted, shrink your swap file size and append it to your root partition.
Get your partitions new UUIDs if they changed by a command execution: blkid
Mount your root partition to /mnt/rootpartition
Modify your /mnt/rootpartition/etc/fstab replacing old UUIDs by new ones if they changed.


I was curious about this so I downloaded a source code tarball from the upstream DASH downloads and extracted the source files. I checked for a README file which should provide information on the program and its build options, but there wasn’t any, so I ran ./configure  --help and its output includes:

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-libedit          Compile with libedit support

So, it looks like the libedit library is used to provide line editing capabilities but this is not the default when building the source.  I also found this response to a mailing list message on set -o vi not working:

  I think this requires dash to be built with libedit support to work.

I checked what libraries were linked to the dash executable on my Ubuntu server and noted libedit wasn’t included:

$ ldd /bin/dash
        linux-vdso.so.1 =>  (0x00007fffcfbd6000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f013a0b7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f013a475000)

I imagine that when the Debian package maintainers are building the dash package, they omit this optional configuration as they would not want sh to have external dependencies on other libraries. They could probably link the library statically but the main reason for using dash as sh is to keep the shell as small and fast as possible so that the start-up scripts run quickly.

Edit: I just searched for “libedit dash” and the top result was a very similar question on this site which was well answered by muru.

Building Dash with line editing support

For those who might be interested, these are are steps required to build from source.

Download the most recent source tarball:

wget http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.9.tar.gz
wget http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.9.tar.gz.sha256sum

Verify the authenticity of the tarball:

sha256sum -c <( awk '/dash/{ print $1 "  "  $3}' dash-0.5.9.tar.gz.sha256sum )
gpg --verify --auto-key-retrieve dash-0.5.9.tar.gz.sha256sum

Extract the source files and change into the source directory:

tar -xf dash-0.5.9.tar.gz
cd dash-0.5.9

Run ./configure --with-libedit to create the Make files. However, this will fail quietly unless the development version of the libedit library is installed. It would be better if the configure script complained more verbosely as it wasn’t obvious that it was failing to find the required files.

sudo apt-get install libedit-dev
./configure --with-libedit

Build the program and (optionally) install it into /usr/local/bin:

make
sudo make install


How to Recover Songs From an Ipod in ubuntu?

Plugging in the iPod as a USB device, copy all folders/files to the hard drive. Scan this folder/Add to Library using a media manager - Rhythmbox for example. All artist/album info will be read correctly. I think you can Sync it back to your iPod


For me it posed problem when it asked for the console binary, maybe thats where you face the problem as well, so for that keep on clicking on 'next' button and when it asks for the console binary selecet any file from your file browser, 'any' means any.

Leave the arguments tab empty and click next and you're done.

This will work if you have the default wine setup and no guarantee if it works for sure, if doesn't you may download or create an empty *.cpp file and select it as the binary.


How would I make this bash script that displays certain system processes related features?

If you want to have a quick look at processes, use top and read the man page to learn how to sort by various columns

To find (most of) the information you want:

ps ax -o user,sz,pcpu |
awk '
    NR>1 {n[$1]++; sz[$1]+=$2; cpu[$1]+=$3}
    END {
        for (user in n)
            printf "%-8s  %4d  %12d  %.1f\n", user, n[user], sz[user], cpu[user]
    }
'


Does e2fsck command print process ID when it fails with the error "is in use" with verbose mode?

No. The "in use" refers to the device that is supposed to be checked.

It shows this somewhat like ...

# fsck -f /dev/sdX
...
/dev/sdX is in use.
e2fsck: Cannot continue, aborting.

If you need users and the process-IDs of processes from those users you can user fuser for that.


Change language in Ubuntu tty2 login mode

It seems you have configured your system locale incorrectly.

Using the next command we could get list of available locales:

locale -a

In my case I have:

C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX
uk_UA.utf8

To get your current locales configuration run locale:

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=uk_UA.UTF-8
LC_TIME=uk_UA.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=uk_UA.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=uk_UA.UTF-8
LC_NAME=uk_UA.UTF-8
LC_ADDRESS=uk_UA.UTF-8
LC_TELEPHONE=uk_UA.UTF-8
LC_MEASUREMENT=uk_UA.UTF-8
LC_IDENTIFICATION=uk_UA.UTF-8
LC_ALL=

Login as root in your gui terminal, where you could change to English and do:

update-locale LC_ALL=en_US.UTF-8 && . /etc/default/locale

Make sure, you have us the first keyboard layout in /etc/default/keyboard

$ cat /etc/default/keyboard
XKBLAYOUT=us,ua,ru
XKBVARIANT=,winkeys,
BACKSPACE=guess

If us not the first keyboard layout, make it the first and execute:

. /etc/default/keyboard

Also, try update-grub2 and update-initramfs -u after previous commands using.

If you could not get into your system because of wrong locales configuration, then

boot from Live CD (Try without installing option in Ubuntu installation image)
identify your root partition by sudo fdisk -l
mount your root partition in read/write mode
configure /etc/default/keyboard file as said previously
add into /etc/bash.bashrc the next at the end:

export LC_ALL= "en_US.UTF-8"
export LANG = "en_US.UTF-8"
export LANGUAGE = "en_US.UTF-8"

try to boot into your system


Remove garbage from Media/jw with command line

Generally you can change directory cd to anywhere you have permission to access (The x in directory listings).

However, once you reach somewhere you can't access, you will need to either sudo specifically, e.g.

me@mycomputer$ sudo rm /path/to/files/to/delete/*.h2w

or you can elevate to a shell that is another user

me@mycomputer$ sudo su root
root@mycomputer$ cd /path/to/files/to/delete
root@mycomputer$ rm *.h2w
root@mycomputer$ exit
me@mycomputer$

If you don't specify which user you are elevating to, then the system will assume you mean root.  So you can just do

me@mycomputer$ sudo su

and the rest is the same.

BE CAREFUL - When you are root you can do absolutely anything and that includes shooting yourself in the foot.  Hence this joke from Randall of xkcd:


Yes, the partition to resize needs to be unmounted. Most easy to use for you should be Gparted a grafical frontend for fdisk, is available during try live.

Yes. you shouldn't install windows after Linux or you have to reclaim the boot manager from windows.

Best is to run checkdisk (could be called slighty different, verifiy) and defrag on windows to make sure all windows file are in the begin of the partition, can be skiped on fresh windows install.

The Gparted documentaion can be found here for futher reference.


Is it safe to answer "erase disk and install Ubuntu" on a virtual machine?

Assuming you are installing on a virtual machine that is running on your host OSX system, the VM has no access to your host's hardware. It is running on a virtual drive that you created for it.

So no, it will not affect your host and the Ubuntu installer has absolutely no knowledge of the host system. It is safe to answer OK.


High CPU Temperature after switch to Ubuntu 16.04

I'm having the same problem. I ran the top command and the browser (vivaldi) is using the most cpu with up to 5 processes. The % range is between 1.5 to 7.0 without playing videos. The % range of the vivaldi browser playing videos is between 13.0 and 46.0. I'm not sure if has to do with ubuntu 16 or the vivaldi browser. I have no problems before with ubuntu 14.04.

I switched browsers (vivaldi, chromium, firefox) and the cpu's temperature incremented immediately within 90C.

#

I want to update this post. I couldn't find a solution running Ubuntu 16.04. I ended up reinstalling Ubuntu 14.04 and monitor the temperature. Firefox and Vivaldi still have problems raising the cpu temperature while playing videos. However, cpu temperature stays  between 60's and 70's playing videos with Chromium. I watched around one hour of a video tutorial and the cpu temperature was stable.
Looks like is a combination of OS and browser. The combination that works for me Ubuntu 14.04 and Chromium.
Hope Canonical developers gets notify about the problem and fix it.


Trying to install Ubuntu 20 on a PC without OS with USB stick. Laptop model ASUS VivoBook S15

Please check the integrity of the iso by comparing SHA256SUMS and allow the USB file system check before Try Ubuntu 20.04 to ensure that "no errors found".


python desktopcouch only works with root account

What version of Ubuntu are you using? Only being able to start desktopcouch as root sounds like this bug: 1-line "uri_file =" config fix for CouchDB 1.1.1 compatability

I proposed a fix for it, but looks like there was some issue with the unit tests (I don't think related to my fix).

Anyway, desktopcouch is now unmaintained and I recommend not building any new software upon it. If you're interested in Ubuntu sync as a service, look at U1DB, Canonical's replacement for desktopcouch.

If you're interested in using CouchDB in desktop apps, look at UserCouch and Microfiber (disclaimer: I'm the author and maintainer of both). These have both been developed as part of the Novacut project. We were originally using desktopcouch, but have since migrated away from it.


Install Teamspeak Client on Ubuntu Server

You can't install Team Speak on Ubuntu server, because Ubuntu server doesn't have a graphical interface, and the Team Speak client is only a graphical program.

  QXcbConnection: Could not connect to display

So, if you want to use the Team Speak client, you have to install Ubuntu desktop on your computer.


You're looking for nautilus /home/user/.


Keyboard dead after lid-close .. lid-open [18.10, Detachable Laptop]

I have felt your pain before and I'm going to assume you haven't modified your GRUB file yet. There are various options or combinations of options that seem to work, so you may have to experiment. This has been a recurring theme on my Toshiba L850D and here is what solved it for me:

In a terminal open GRUB:
sudo nano /etc/default/grub

Now find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT="

and replace it with

GRUB_CMDLINE_LINUX_DEFAULT="atkbd.reset i8042.reset i8042.nomux quiet splash"

Save and exit Ctrl+O and Ctrl+X then update GRUB.

sudo update-grub

Reboot and cross your fingers! You may not need i8042.nomux as that is apparently for very old hardware, but I experienced intermittent results without it.

If that doesn't work you can find other options (like dumbkbd) and more detail in this thread:

Ubuntu 17.04 keyboard not responding after suspend

Edit: In case you're wondering I meant to add that my experience with the lid versus the power button was the same.

Hope that helps.


I know this is an old post. It seems to me the question was about a loop backed ZFS pool. Check this.

Growing a loop backed ZFS pool

LXD doesn't let you directly grow a loop backed ZFS pool, but you can do so with:

 sudo truncate -s +5G /var/lib/lxd/disks/<POOL>.img
 sudo zpool set autoexpand=on lxd
 sudo zpool online -e lxd /var/lib/lxd/disks/<POOL>.img
 sudo zpool set autoexpand=off lxd


How to reinstall Ubuntu with a fresh start without removing files?

To avoid this problem in future, consider installing Ubuntu with a / partition and a /home partition. Then, when you upgrade, you can either overwrite / or make a new / partition for your new Ubuntu, leaving the /home partition intact to be accessed from whichever version of Ubuntu you choose to fire up from the grub menu. I have used this strategy for all my Ubuntu installs on several machines, and it has enabled me to upgrade relatively painlessly on numerous occasions without losing personal data files.

But, I always back things up first in any case. It really is worth getting a large usb external disk to back up your /home partition or directory. You never know when your hard drive is going to go ...


To disable gdm from booting automatically, you need to alter its upstart service file, /etc/init/gdm.conf

Look for the start on(...) lines, and comment them out with #.

It should look similar to this:

# gdm - GNOME Display Manager
#
# The display manager service manages the X servers running on the
# system, providing login and auto-login services

description "GNOME Display Manager"
author      "William Jon McCann <mccann@jhu.edu>"

#start on (filesystem
#          and started dbus
#          and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
#               or stopped udevtrigger))
stop on runlevel [016]
[~30 more lines]

You can still start the service manually by running service gdm start.

Not an elegant solution, but it will improve for natty.


You need to type in the path of your JDK / OpenJDK installation, to see in which path JDK / OpenJDK  is installed in you can run this command in a Terminal:

echo $JAVA_HOME


I have a Dell Inspiron 15 3543 with Ubuntu 15.04 as dual boot but wi-fi doesn't work and it doesn't detect the mobile broadband

Connect to internet by wire and run

sudo apt-get update
sudo apt-get install bcmwl-kernel-source


I removed gcc (4.7) and install gcc-4.6. I actually don't think that the first step is necessary here, you might just be able to have gcc 4.7 and 4.6 installed alongside.

 sudo apt-get remove gcc
 sudo apt-get install gcc-4.6 g++-4.6
 sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
 sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++


why i can't upgrade and manage my packages

Open a terminal and type as it says:

sudo dpkg --configure -a


Boot from live CD.

Mount the / partition.

Chroot to the mounted partition

Assign a password to your account to activate it.

Details:

You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.

Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:

sudo fdisk -l

This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.

Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.

sudo mkdir /media/sda1

The next command will mount the hard drive in the /media/sda1 folder.

sudo mount /dev/sda1 /media/sda1

Now it’s time for the command that actually does the magic: chroot.

sudo chroot /media/sda1

Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

passwd ADMINUSER

Note that you’ll have to type your username after the passwd command in order to change the right password.

Now you should be able to reboot your system and log yourself in with your new password.


When trying to install GRUB to the USB flash drive from full Linux, grub-install: error: failed to get canonical path of `/efi/boot'

After sleeping for a night, I thought about reading more references and rechecking my commands.
YouTube tutorial based on BIOS/MBR but the underlying steps are the same
GRUB/UEFI reference
After I deleted /boot from the grub-install command it worked:
grub-install --target=x86_64-efi --uefi-secure-boot --efi-directory=/efi --bootloader-id=GRUB --removable –verbose

This is the UEFI boot. To test it, I plugged in the USB and in the BIOS boot settings, disabled the boot entries from the NVMe. The green light in the USB was flashing and it booted okay. Restarted the computer without the USB, the computer was (correctly) unable to find a boot device.
I am going out and will post the complete command history once I have a chance to restore the system and repeat the process (I had the system backed up to test it repeatedly)


Will Ubuntu be releasing an update for Cedar Trail Processors?

I can't provide a specific answer to your question, but LTS-versions of Ubuntu will get newer kernels from time to time. I think the idea is that new installs will automatically use the newest kernel, while installing updates will not automatically switch. You'll then have to install the new kernel from the archives.

The first "dot release" (similar to service packs) of 12.04 is scheduled for August 23. I don't know if that will get a kernel upgrade or if that'll wait until 12.04.2 (January 31). I also don't know if your driver will be used.


What Hz should I put for my microphone and my speakers

Both options (41.1kHz, 48kHz) have advantages and disadvantages, so what is best is up to you or depends on other needs. The golden rule: the higher the sample-frequency is, the better is the sound-quality (although I think only a trained ear may able to resolve the difference). On the other side, a higher sample-frequency will lead to bigger audio-files in the case you perform records. This is a relevant point regarding your input-device (microphone). But you may need the signal from the microphone as input for an application and the signal should match the requirements of the application.

If we use the same sample-frequency for the input- and output-device, we avoid conversion from 41.1kHz to 48 kHz or back. This will use less resources. If the settings are different, it will work though, but use a bit more resources.


I have a basic Ubuntu (14.04 LTS) on my laptop, and I didn't need to install any drivers..

For bluetooth try rfkill list all.
check if the Bluetooth is Soft Block or Hard Block.
If it is Soft Block, enter rfkill unblock bluetooth.
If the latter, it means that there is a switch somwhere in your laptop for turning the Bluetooth on. Search for it and turn it on.


I am in the same situation, instead of using wine, i created my own desktop app using Nativeifier ( https://github.com/jiahaog/nativefier ). Works like a charm and took all of 5 mins (if that)!! Full native workplace desktop app :-) Enjoy


music/video files not playing after installing libcanberra-gtk*

I fixed the problem with killall pulseaudio; rm -r ~/.config/pulse/* and pulseaudio -k


Prevent pop up every time I plug in headphones in 16.04

If you are using new versions of Ubuntu, check out this Answer
How to disable "Select Audio Device" pop-up on Ubuntu 18.04
I'm not sure if it works on Ubuntu 16.


Repair package catalogue in ubuntu 12.04 due to Pidgin facebook chat Plugin

I just had the same problem. It helped for me to uninstall the plugin again. So open a terminal window and enter:

sudo apt-get remove pidgin-facebookchat

I hope this will help.


Shotwell can't export to Picasa -- 401 unauthorized

Deleting the "Online Accounts" settings and setting up a new account resolved the problem.


Do Not Have Permission to a Internal HardDrive

To me, it sounds like you aren't using the correct path to your drive. You need to find the mountpoint of your drive, and change the permissions of that folder.

To find the mountpoint, open a terminal and type mount. This will show you a list of all the partitions mounted, and where they are mounted. Find your device and remember where it's mounted. If you don't know the device name, it will usually be mounted someplace in /media. Then use sudo chmod -R 777 /media/your_mountpoint, and it should work.


Replace XFCE Power Manager with Gnome Power Manager

Just uninstall and replace. Both are perfectly interchangeable, since they support the same DBus interface and hook up with udev.


high performance with xen, vmware or virtualbox

Xen hypervisor allows you to run a Windows VM with direct access to your graphics card (hardware). This is called VGA passthrough. You can also directly access other PC hardware using PCI passthrough, for example USB host controllers, SATA controllers, etc., all of which will then be available under Windows, with Windows-native drivers.

BUT, as mentioned before, you need to carefully select your hardware. Here some basic guidelines to check if your hardware is compatible:

Your CPU must support VT-d (Intel) or AMD-Vi / IOMMU (AMD) !!! Don't confuse it with VT-x - these are two different things. For Intel, see ark.intel.com. Note: The 3930K with C2 stepping also supports VT-d, but it's not listed when using the VT-d filter.
Your motherboard (and motherboard BIOS) must have an option to enable VT-d (sometimes called IOMMU). Some BIOS implementations have been reported buggy, though. Still, if the option shows up, chances are good.
A VGA-passthrough compatible graphics adapter. Many (most?) AMD graphics cards are supported, and some Nvidia cards, namely the professional "multi-OS" Quadro series (starting from the Quadro 2000 upwards). The Intel onboard graphics is supposedly also compatible. Search for "Xen VGA passthrough tested adapters".
Note: It's best to have a another GPU (Intel onboard or separate graphics card) for your Linux, and pass-through the secondary GPU (the one NOT used by Linux).

If you got compatible hardware, it's definitely worth the effort. Search for "VGA passthrough" or "virtual gaming" to find tutorials, or try this here HOW-TO make dual-boot obsolete which is based on Linux Mint 13 (should be similar for Ubuntu).


I had a related problem, see "dist-upgrade wants to remove kubuntu_desktop". Based on some research (and help on this forum), I see two possible reasons for your problem.

1) Maybe the KDE gui is not listed as your preferred desktop environment and there is no other reason why it should be kept on your system. You can check this by issuing
ls /usr/share/xsessions and see what your system is currently using as your desktop. If this is not plasma.desktop, you might just want to manually install it by saying sudo apt install kubuntu-desktop. On the other hand, if you want to use gnome, it is maybe ok that your system wants to auto-remove kde?

2) In my case, there was a conflict between a graphics driver component and kde. This might happen if you have installed a proprietary graphics driver, such as fglrx.
You might want to check your /etc/apt/sources.list.d for any ppa sources you might have installed (in my case dokomix-ubuntu-fglrx-bionic-bionic.list). If this is the case, you might revert to the native driver and remove the ppa.

There might be other driver updates (or other package updates) that are not compatible with kde and come with another desktop environment - which could lead the the removal of kde. You can check this by doing a sudo apt dist-upgrade and see if there are any packages being held back. These might be the culprit.


taskset(1) may help you. It can set the core number for one process.
You can use ps(1) to get all the process of target user. For example,

housezet@arch: ~
$ ps aux | awk '/^housezet/{print $2}' | xargs -l taskset -p 0x00000001

This wil limit housezet's current process only use one core.
And if limiting cpu usage is also acceptable, you can also consider using cpulimit(1).


Printing Scale Is at %100 however It really prints at %15

Have you checked the scale in Chrome? The scale doesn't seem to display in my Chrome, so you probably should use the System print dialog instead (Shift+Ctrl+P). Also make sure the Margins, Page Size and Orientation are the same. For the PDF Viewer, try to use other viewer (maybe Evince or Okular?.

P/S: It's more like a workaround than a fix.


Problem getting oibaf installed correctly

With help from bridgman on the Phoronix Forums I managed to figure out that the problem was the kernel

[    32.211] (II) [KMS] drm report modesetting isn't supported.
[    32.211] (EE) open /dev/dri/card0: No such file or directory[/CODE]

"nomodeset" was set in grub stopping the kernel from figuring it out for it self. This is what I did:

sudo vi /etc/default/grub

Find the line "GRUB_CMDLINE_LINUX_DEFAULT" remove nomodeset and save.
Update grub and reboot.

sudo update-grub
sudo reboot


'mount: error while loading shared libraries: libudev.so.0 : no such file or directory'

I am guessing that you are running a 64bit system. If so, this dirty hack should work:

sudo ln -s /lib/x86_64-linux-gnu/libudev.so.0.13.0 /lib/x86_64-linux-gnu/libudev.so.0

That will crate a link named libudev.so.0 that points to /lib/x86_64-linux-gnu/libudev.so.0.13.0.


Have lampp use PHP code in a directory not under /opt/lampp

To actually answer your question although I believe using lampp is not a good thing:

Try to use a symbolic link. Change into your htdocs directory and do something like sudo ln -s /home/<your user name>/Documents/my_website my_website where ~/Documents/my_website is a directory in which you can put all your PHP scripts. Make sure this folder exists. This is now tested and it works for me.


New Ubuntu 17.04 problem: "Your connection was interrupted"

Disabling IPv6 seems to have durably resolved the symptoms for me.

(I suspected that IPv6 might be relevant based on this old post https://productforums.google.com/forum/#!topic/chrome/P7qEIWA1__M.)

To check if IPv6 is active, go to the NM panel (wifi symbol near clock) and select Connection Information, like this:

If IPv6 is already ignored or inactive, this answer doesn't apply to you.
If IPv6 is active, then disable ("ignore") it in System Settings > Network like so:

Please comment with success/failure so that we can confirm this workaround.

I suspect other network services were unaffected because they use IPv4.

Original post:

I have exactly the same symptoms, browser version, and upgrade path. Firefox does not exhibit similar symptoms. Furthermore, I routinely access other network services (e.g., pypi, mvnrepository) during builds and have no issues there.

The chrome symptoms seem to vary widely. The most frequent symptom (as the OP noted) is the "Your connection was interrupted" error. Other symptoms include missing graphics, incompletely styled pages, and empty content (presumably ajax failures).

That is, the issue is specific to chrome on 17.10, and it affects multiple content types.


I have just found this bug on launchpad: https://bugs.launchpad.net/ubuntu/+source/syncevolution/+bug/1440294

So to sync to a cloud task list:

syncevolution --configure database=https://xxx.memkit.com/calendars/yyy/zzz backend=caldavtodo target-config@memkit todo
syncevolution --configure sync=two-way backend=tasks database="Personal" memkit todo
syncevolution --sync slow memkit todo

Unfortunately the Ubuntu-touch task list only shows its own tasks, not the cloud tasks.


how to view the content of /dev/sda file?

Notice on usage
It is /dev/zero and not /dev/zeros so your command should be:
dd if=/dev/zero of=/dev/sda bs=512

And not:
dd if=/dev/zeros of=/dev/sda bs=512

How to verify?
There are many ways to verify the drive contains only zeros but opening the drive as a file and viewing it is not the most efficient method at all.
A simple method wold be to use cmp which will compare two files byte by byte and report the first difference. Basically, you would compare /dev/zero as a file ( all zeros ) to your drive as another file like so:
cmp /dev/zero /dev/sda

If you get something like this:
cmp: EOF on....

Then files are identical up to the end of the shorter file ( your drive in this case ) and all there are are zeros.
A difference would be reported by cmp with something like this:
... differ: byte 1, line 1


As I understand, Phpservermonitor is a web application. Which means it does not install in your system. It is installed in your web server root directory. If you want to completely remove it. Just delete the phpservermon folder from your www root directory.


Corsair Mouse Buttons Broken - Mouse Buttons Bound To Keys

Thanks to a random post about Logitech mice, I discovered it was the mouse's internal profiles that were causing the trouble.
Somewhere in the process, a profile with the side-buttons (Back and Forward) disabled or remapped was enabled.
The issue was resolved by switching profiles using the top buttons on the mouse until I found one that worked.


Ubuntu GNOME 16.04 autoupdates regardless of settings

try dconf editor.
in gnome and gnome software setting part uncheck auto update.


cache is where linux uses some of your RAM to keep a cache of data recently read from the disk.

It's a good thing. cache is as good as free RAM. No, it's better. free is wasted memory, it's RAM sitting there with zeroes or some other useless crap in it. cache is where you keep data recently read from the disk, where there would otherwise be useless garbage, in case the system wants to read that part of the disk again any time soon.

Whenever a process wants more memory, cache is given to it as readily as free. free is the money you spent on RAM being utterly useless, cache is Linux making some use of it (so long as nothing else wants it).

More info here: http://www.linuxatemyram.com/


I assume you somehow managed to change the keyboard settings. There are several methods to correct this depending on which desktop you use. I'll explain you the method involving the terminal (that's the black screen with white characters). So:Open a terminal (or konsole, depending on your desktop flavor). Then type this command in the terminalsudo dpkg-reconfigure keyboard-configuration and then press the enter key.
You'll be asked a few questions and be sure to choose the applicable answers. Most likely your keyboard is a generic type with a US layout. After answering the questions please restart the computer and then the keyboard should work correctly.


Problems resizing a Mac partition with gparted

This is a known problem with Mac OS X and it's hybrid partition table.  The solution is to synchronize the MBR and GPT partition tables.  For example:

sudo gptsync /path-to-disk-device

See GParted FAQ - How can I fix missing or lost partitions on Intel-based Mac OS X?


gnome-system-monitor error - Ubuntu 14.04

Unfortunately, I'm afraid that the answer is that there is no answer. It looks to be a known issue: bugs.launchpad.net/ubuntu/+source/. Here is the utopic page containing the issue. You should mark yourself as being affected by this bug so that it will prompt for priority and ranking from the dev team rather than remaining in the "undecided" state.


I see a couple things I would change, will try to explain my best:

path = /home/test1 <= With the default samba 'homes' configuration, you don't need to specify a path, since it will automatically map it to the corresponsing user's home.
valid users = test1 <= I would change this value to %S, it will automatically map 'test1' home to '\\server\username'.

This would give you a final [homes] section that looks like this:

[homes]
comment = SHARE THE HOME DIRECTORY
read only = no
valid users = %S
guest ok = no
browsable = yes

After doind theese changes, make sure to restart you services:

$sudo restart smbd
$sudo restart nmbd

Offcourse, you will also need to remove 'home' from your smbclient line, and will change to:

smbclient //172.31.31.48/test1 -U test1

Just tested this settings succesfully under Ubuntu 14.04.4 with the following samba version:

$smbstatus --version
Version 4.1.6-Ubuntu

=========================

You can also install a GUI for managing samba shares:

$sudo apt-get install system-config-samba

Regards,


shutdown logging in ubuntu 10.04 & 11.10

Shutdown operations are logged in /var/log/syslog.

  tail -f /var/log/syslog


Unable to start mysql in ubuntu 18.04.02

This is a "feature" of systemctl. There is a parameter in the file that limits the restart frequency in seconds. Lower this while testing.

Try waiting (rather than editing the actual service file) to see if the problem resolves itself after some time has passed.

If this doesn't work, a reboot should resolve it systemctl reboot


Changing Screenshot Directory for mpv Media Player in Ubuntu 17.10

Edit: Based on a comment by doug, who does a lot of work with mpv, one can simply edit ~/.config/mpv.conf to add screenshot-directory=~/Public/ if $HOME/Public is the desired destination.

The following works with mpv/xenial,now 2:0.28.0~xenial1 amd64 [installed] and with mpv/bionic,now 0.27.0-2ubuntu4 amd64 [installed]. I haven't tested with the version available on 17.10.

I copied over /usr/share/applications/mpv.desktop to $HOME/.local/share/applications.

I then modified the Exec line from

Exec=mpv --player-operation-mode=pseudo-gui -- %U

to

Exec=mpv --player-operation-mode=pseudo-gui --screenshot-directory=$HOME/Public/ -- %U

and saved SHOME/.local/share/applications/mpv.desktop. Now, when I open a video with mpv and take a screenshot, the screenshot is saved to $HOME/Public.

Read https://mpv.io/manual/master/ for adjusting the quality of screenshots, naming them, and the format desired.


selectively deactivate (power off) pcie slot?

Your Motherboard should have a Switch to ON/OFF the PCIE Slots on the motherboard. This should be used in conjunction with Lucid Virtu or some other software where your Monitor is connected to the onboard video output. Check out these links:-

http://www.xtremesystems.org/forums/showthread.php?277311-Disabling-PCI-E-slot-why-not

http://www.asrock.com/mb/Intel/Z87%20OC%20Formula/


How to enable shared folders on virtual box

Go to settings.  Click on General (on the right,) select the Advanced tab.  In there you can enable shared clipboard and drag and drop.

See this link to set up shared folders.


Below is an excerpt from http://people.duke.edu/~hpgavin/gnuplot.html:

  6. SCRIPT FILES

  Sometimes, several commands are typed to create a particular plot, and
  it is easy to make a typographical error when entering a command. To
  stream- line your plotting operations, several Gnuplot commands may be
  combined into a single script file. For example, the following file
  will create a customized display of the force-deflection data:

  # Gnuplot script file for plotting data in file "force.dat"
  # This file is called   force.p
  set   autoscale                        # scale axes automatically
  unset log                              # remove any log-scaling
  unset label                            # remove any previous labels
  set xtic auto                          # set xtics automatically
  set ytic auto                          # set ytics automatically
  set title "Force Deflection Data for a Beam and a Column"
  set xlabel "Deflection (meters)"
  set ylabel "Force (kN)"
  set key 0.01,100
  set label "Yield Point" at 0.003,260
  set arrow from 0.0028,250 to 0.003,280
  set xr [0.0:0.022]
  set yr [0:325]
  plot    "force.dat" using 1:2 title 'Column' with linespoints , \
        "force.dat" using 1:3 title 'Beam' with points

  Then the total plot can be generated with the command: gnuplot> load
  'force.p'

The file force.dat looks something like:

  # This file is called   force.dat
  # Force-Deflection data for a beam and a bar
  # Deflection    Col-Force       Beam-Force
  0.000              0              0
  0.001            104             51
  0.002            202            101
  0.003            298            148
  0.0031           290            149
  0.004            289            201
  0.0041           291            209
  0.005            310            250
  0.010            311            260
  0.020            280            240

Please look at the source for further information and a much better explanation.


Rsync not creating subfolders automatically within same origin and destination paths on different servers

Issue was permissions. I had not run the additional command to change ownership and group of /var/www even though permissions were coming up correct in my FTP client.


Where to put an header file for a git repository if it is missing during make?

In principle, you can place header files anywhere you like - so long as you tell the compilier where they are using an appropriate -I directive:

g++ -Ipath/to/include/ ...

If the compiler is being run via a make it's often possible to pass such options via the appropriate FLAGS variable rather than trying to modify the Makefile. For C++ that would typically be CXXFLAGS, so you could do something like:

make "CXXFLAGS=-Ipath/to/include/"

If the Makefile already specifies a location for the software's private header files, you could simply place it there. Or you could place it in one of the default search locations - which you can find for gcc/g++ by executing

: | gcc -E -v -

and scrolling down to the #include <...> search starts here section. For user-installed headers, probably you should avoid all of those locations except /usr/local/include, since system packages may overwrite files in the others.

However in your specific case, you should simply install the libsecp256k1-dev package, which will install the header file into /usr/include and will also install the libraries required to successfully link the application.


You could try removing your xorg.conf file:

press ctrl + alt + 1 to log in to a terminal.
After you've logged in, write

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.orig

now reboot

sudo reboot 0

if this doesn't work, you can switch back your xorg.conf by

sudo mv /etc/X11/xorg.conf.orig /etc/X11/xorg.conf

and reboot again.


NetworkManager cannot manage VPN connections on devices it doesn't also manage, so you have two options here

Use NetworkManager to manage your eth0 wired connection and the VPN
Don't use NetworkManager to manage either, manage them both manually

I'm afraid you cannot mix and match this.


Screen Resolution Problem with Ubuntu 14.04.02 and VirtualBox

It seems that other folks have had the same sort of issue. I found a thread with lots of workarounds and solutions on this very site. I hope this helps.

Same issues with fixes


Ubuntu 20.04 -- videos won't play in both Chrome and Firefox?

I have the same annoying problem, brand new Thinkpad T14. Ubuntu 20.04. Lots of trouble with bluetooth and sound. Instead of rebooting this last time I started settings and saw that Sound output was set to bluetooth speaker. After I changed it to usb audio (usb docking) then youtube etc started working again.
I have tried the 20.04 kernel (5.4) and following latest by ubuntu-mainline-kernel.sh - but they just offer different problems, either sound/bluetooth or monitors. Not a full solution but if it saves one from rebooting it helps somewhat.


tl;dr: Switch to X.Org X server driver and it should work.
Zoom seems to have trouble with the proprietary nvidia driver(s). I have a similiar error log. Maybe zoom will fix this sometime, but it seems to be that X.Org is better tested & supported.


In the terminal type:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-pip python-dev
pip install --user RPi.GPIO

The raspberry-gpio-python examples are worth reading. In the Inputs example there is this code snippet:

while GPIO.input(channel) == GPIO.LOW:
    time.sleep(0.01)

It waits 10 ms to give CPU a chance to do other things.


Hard disk using LVM shows "8% contiguous" on startup. How serious is it?

"Contiguous" is referring not to some kind of corruption or virus, but is actually a measure of the file fragmentation, the percentage of files that are not fragmented. This will be coming not from LVM, but probably from the filesystem on top of the logical volumes, likely to be ext4.

A simple explanation is that when may small files are allocated, and then another larger more permanent file is allocated after. At some point later, some of the smaller files are then released, leaving gaps. You may then end up with plenty of free space, but the gaps are small.

Files that are then created, and larger than the gaps, may be split across a number of gaps - fragmentation, and the more this happens, the slower operations on the volume will become. This number 8% is the percentage of non-fragmented files. The number going up is a good thing - but you may be low on disk space given that it was such a low number initially.


Change or disable Ubuntu global keyboard shortcut (Ctrl+Alt+Del) using terminal without using UI

There's a file under ~/.gconf/apps/metacity/global_keybindings (%gconf.xml). You should edit this file to describe the shortcut and what the shortcut should do. I will give you an example of my shortcut config which I have configured to switch between windows using ALT+TAB in the entry below.

<entry name="switch_windows" mtime="1363253626" type="string">
                <stringvalue>&lt;Alt&gt;Tab</stringvalue>
All the best.


How to make MacBook Air touchpad usable?

I'd suggest maybe looking at mtrack

I notice you have it configured, but a good idea to check :)

You can get it installed and configured like this:

sudo apt-get install xserver-xorg-input-mtrack
sudo nano /usr/share/X11/xorg.conf.d/50-synaptics.conf

Change the input section to be something similar to this:

Section "InputClass"
        MatchIsTouchpad "on"
        Identifier      "Touchpads"
        Driver          "mtrack"
        Option          "Sensitivity" "0.95"
        Option          "FingerHigh" "12"
        Option          "FingerLow" "1"
        Option          "IgnoreThumb" "true"
        Option          "IgnorePalm" "true"
        Option          "TapButton1" "0"
        Option          "TapButton2" "0"
        Option          "TapButton3" "0"
        Option          "TapButton4" "0"
        Option          "ClickFinger1" "1"
        Option          "ClickFinger2" "3"
        Option          "ClickFinger3" "3"
        Option          "ButtonMoveEmulate" "false"
        Option          "ButtonIntegrated" "true"
        Option          "ClickTime" "25"
        Option          "BottomEdge" "25"
        Option          "SwipeLeftButton" "8"
        Option          "SwipeRightButton" "9"
        Option          "SwipeUpButton" "0"
        Option          "SwipeDownButton" "0"
        Option          "ScrollDistance" "75"
        Option          "ScrollUpButton" "5"
        Option          "ScrollDownButton" "4"
EndSection

Save your config with ctrl+x and y to save and quit nano
Reboot

I hope that helps!

Good luck :)


Theming Telegram Panel Icon (ubuntu 15.10)

The icon used for the systemtray is stored under ~/.local/share/TelegramDesktop/tdata/ticons/*!

I produced icons fitting for the breeze theme:
https://www.dropbox.com/s/5gzfpu7zgwk2n1l/telegram.zip?dl=0
You can do this yourself, just use the script included in the .zip file :)

If you want telegram to autostart with a nice logo you have to delay it.
(sleep 2 was sufficient for me)

Some recommodations for telegram, icluding the ones above:

Download every file from: https://www.dropbox.com/sh/ed8aq9x756qq08o/AACw89mbvl4oHjd6zeuq1xVUa?dl=0 to your home folder
execute "sudo su"
execute "./telegram.sh /home/manu" <- to REPLACE
Settings -> Startup and Shutdown (under Workspace) -> Desktop Session ->
on Login -> Applications to be excluded from sessions: program.telegram


Warnings about cryptsetup on new Ubuntu 17.10 installation?

The first warning is due to conflicting settings in packages overlayroot and cryptsetup. (CRYPTSETUP is set by a hook, /usr/share/initramfs-tools/conf-hooks.d/overlayroot, that's why you did not find it in initramfs.conf.) I have opened a bug on this issue. Don't worry about it, it is purely cosmetic.

The second warning comes from the way the installer sets up swap space. If swapon -s shows that your swap space is active, then you can ignore it.


Ubuntu Server 20.04 install custom partitioning

If you want something the installer doesn't offer,  the easiest way would be to make the initial install to another device (some usb stick maybe) and then copy it from there.

install to additional device
live boot the system
make your partitioning scheme
rsync everything to the final installplace
update fstab with the correct mount points and uuids
chroot into the new system
create new initramfs
install grub

I did such kind of installs yet to test F2FS as system partition e.g.
L


Kill a process over SSH by finding Process ID

Parsing output of ps -ef is a bit tricky. I'd recommend you use pgrep as

pgrep -f `ssh -f -N -T -R32400:localhost:32400 remote@remote`

Or just reduce everything with pkill:

ssh user1@server1 -p22222 "pkill -f 'ssh -f -N -T -R32400:localhost:32400 remote@remote'"


As stated in https://wiki.archlinux.org/index.php/LXDE#Console

To use startx, you will need to define LXDE in your ~/.xinitrc file:

exec startlxde

If you want to run startx at boot automatically, take a look at the Starting X at boot guide.


as explained in the following post you can install dconf and configure some of the default options for mounting usb drives.

You can disable automount and mount manually the drives with nautilus and you can disable automount-open.


How do I get past the space in the name of the root directory on my mtp-mount cell phone?

Linux, in general, uses the backslash character \ to say, in efect "flip the next character's special meaning". You want to make space be a regular character, rather than a delimiter, so ls internal\ storage will do the trick.


Ubuntu 18 and 20 GUI/Mouse strange behaviour

You can try this command to install the Synaptics driver:
sudo apt-get update -y
sudo apt-get install -y xserver-xorg-input-synaptics

This command worked in my laptop.


Can I have a list of opened windows instead expo effect?

The only thing I've come across for configuring Unity 2D is dconf-tolls which is mentioned here (see the Unity 2D section) but unfortunately there doesn't seem to be any way to accomplish what you're trying to do. The options available to Unity 2D are very basic - essentially just things like when the panel should hide, whether or not the super key works with it, and so on. This is mostly due to the newness of Unity (in particular Unity 2D) and should get better as it matures.


This is a combined Windows-Ubuntu Question and Windows is off-topic here, so I would install the other OS first on its own hard drive in MBR mode and let the BIOS figure out how to do it:  when you want to switch from that other OS to installing Ubuntu:

reboot,
hit the F12 or whatever key the BIOS wants you to hit to boot from another drive drive, and let the BIOS then fail onto USB/DVD (whatever you're installing Ubuntu from).
install Ubuntu taking only as much as you need (take the "Something else" option while installing Ubuntu)
then boot back to that other OS and then allocate the free space on the second hard drive to it.

Especially: Install both OSes as bare as possible as you've never done this before as you're bound to make a mistake somewhere and you want to avoid losing anything valuable.


This command will download the installer file from this link: https://getcomposer.org/installer and save it as composer-setup.php in the location where you run this command.

So if you just open a terminal from dash or with ctrl + alt + t hotkey, this file should probably be found in your home directory. You can just delete it from your file manager  or try the following command in your terminal:

cd ~; rm -i composer-setup.php


Problem When connected through RDP to XRDP in ubuntu current windows open arent show

You might want to have a look at this location (http://c-nergy.be/blog/?p=4168), this post explains how you could configure you xrdp to try to reconnect to existing session

I hope that this would help you


You can install 64bit version, but if you don't want to do this, you can install PAE (Physical Address Extension) enabled kernel on the 32-bit version.

After 10.04, Ubuntu automatically installs the PAE enabled kernel if it detects more than 3 Gb of memory. But ubuntu wiki says:

  In the case of the liveCD, a working network connection is required, since the PAE enabled kernel packages are not present on the CD.

So I guess you installed Ubuntu using CD without an internet connection.

Try this:

sudo apt-get install linux-generic-pae linux-headers-generic-pae

What is PAE?

Physical Address Extension is a technology which allows 32 bit operating systems to use up to 64 Gb of memory (RAM), something which is normally achieved by switching to a 64 bit system. PAE is supported on the majority of computers today and it is an easy procedure to enable it in Ubuntu, if it is not already. To check if your processor supports PAE, try

grep --color=always -i PAE /proc/cpuinfo

In general, a proper 64 bit system is recommended if you have 4 Gb or more memory and/or want to get the full benefit of the 64 bit architecture (see 32bit_and_64bit), but in some cases making a complete switch to 64 bit is not desirable, and using PAE can be a viable compromise.

It should be noted that there is no Virtual Address Extension. i.e. The applications still get the same amount of virtual memory since the Virtual addresses are still 32 bits while the Physical Addresses are of 36 bits. Therefore PAE is not at all equivalent to a 64 bit system.


Mozilla Thunderbird spellcheck has too many listed languages

I finally found the solution: (close Mozilla Thunderbird then)

for the English and Spanish dictionaries: go to /usr/share/hunspell/ and remove everything but

en_US.aff
en_US.dic
es.dic
es_ES.aff
es_ES.dic

for the French dictionary: go to ~/.thunderbird/***.default/extensions/fr-dicollecte@dictionaries.addons.mozilla.org/dictionaries/ and remove everything but

fr-modern.aff
fr-modern.dic

Obviously, instead of actually removing those entries, you can create a folder named "hide" and put the entries you don't want in it.

Now when you write a email and right-click, it only shows up English (US), Spanish (Spain), French (modern)


I figured out what was wrong.

In the original site, I had changed everything to look for the IP address rather than "localhost" so everything (export.sql database, wordpress wp-config.php file, apache's httpd.conf file) were all trying to make sense of the hardcoded IP address which no longer existed.

I had done that due do something I had read about having other computers on the LAN not being able to connect to the wordpress server and that I needed to use the servers IP instead of localhost.

To fix it I just changed the IP of the new server to match the old one.  This got everything up and running at which point I was able to go in and switch everything back to "localhost".  and FWIW, testing LAN connections to the server seems fine using localhost now so I have no idea what was up initially - all I know is that I couldn't connect using localhost, but I could connect using the IP, but now that seems to not be the case.


If that nc process was started with exactly that command, and no other nc processes have exactly that command, you can do:

sudo pkill -fx 'nc -k -l 12345'

-f matches the entire command line
-x makes the match exact.


Software Installation Center Not Available

Starting from 17.04, Ubuntu no longer include "Software Center" in it's repositories, i.e. you will not find "Software Center" in a fresh install of Ubuntu 17.04.

There are many alternatives available, for example:

Synaptic Package Manager
Ubuntu Software
Debian Package Search

You can install them by using the terminal:

Open the terminal by pressing Ctrl+Alt+T.
In the terminal type:

sudo apt-get install synaptic if you want Synaptic Package Manager;
sudo apt-get install ubuntu-software if you want Ubuntu Software; or
sudo apt-get install packagesearch if you want Debian Package Search.

You can also install packages directly through apt-get if you know exactly the package names of the packages you want to install.

Hope you have a great time using Ubuntu.


Shut down when asked without terminal help

The shutdown and reboot options can only be used by a non-privileged user if they are the only user logged in to the system.  Chances are that your system thinks that there is another user on the system.

You can get a list of the active sessions using the ck-list-sessions command:

$ ck-list-sessions
Session2:
    unix-user = '1000'
    realname = 'James Henstridge'
    seat = 'Seat1'
    session-type = ''
    active = TRUE
    x11-display = ':0'
    x11-display-device = '/dev/tty7'
    display-device = ''
    remote-host-name = ''
    is-local = TRUE
    on-since = '2012-04-05T23:36:58.278097Z'
    login-session-id = '1234567890'

If you see more than one session listed, then this is the reason why the shutdown and reboot options fail and you get returned to the login screen instead.

I once had a problem where ConsoleKit believed that one of the daemons running on the system represented a user session and causing this problem, so that could be your problem.

Alternatively, if you've logged in multiple times consider logging out of your other sessions before trying to use the shutdown or reboot options.


Create a shortcut on desktop that opens and execute a command with root permission in a terminal

There are two ways on how to solve this problem:
Grant nethogs the required capabilities
I think the easiest and safest way to do this is to make nethogs able to run without root permissions. You can do this by giving it the permissions it is currently temporarily acquiring as root every time you launch it. You can do that with the following command:
sudo setcap "cap_net_admin,cap_net_raw=ep" /usr/sbin/nethogs
Once you have given nethogs these capabilities, it should be able to capture your network traffic without root permissions and you should therefore be able to use it with a shortcut, without having to fill out any credentials.
Edit /etc/sudoers
However, a more general way of solving this sort of problems can be found here How do I run specific sudo commands without a password? Which basically tells you how to safely add nethogs or any other command to /etc/sudoers to be able to execute it without manually having to type in a password.


Loading freezes after removing nvidia graphics card

You may have a problem with an older computer, with an older GPU. Try this...

boot to recovery mode
choose root access

type:

sudo mount -o remount,rw /      # to remount the disk r/w

sudo pico /etc/gdm3/custom.conf # edit this file

change:

#WaylandEnable=false

to:

WaylandEnable=false

Then reboot.

Update #1:

Edit your GRUB boot command, find "quiet splash" and change it to "nomodeset", and see if it boots. The resolution will be off. If it freezes, observe the text you'll see on the screen for clues as to why it's freezing.

Update #2:

Lets try and change the display manager.

Boot into Recovery Mode, root access.

sudo mount -o remount,rw /      # to remount the disk r/w

sudo dpkg-reconfigure lightdm # choose lightdm

reboot # reboot the computer

Note: later, if you need to switch back to gdm3 display manager...

sudo dpkg-reconfigure gdm3 # switch back to gdm3


Failed to control fan speed for Nvidia Geforce 1060 on Ubuntu 16.04

If you're using dell, use the following utility

sudo apt-get install i8kutils
i8kfan 1 2 # Set the left-fan at low speed(1); the right one at high speed(2).


How to customize/remove the home lens of the dash?

This is an answer to Question 1:

That's not customizable in 11.10. Well, of course, you could always change it in the source code, but I'm guessing that's not what you're looking for.

However, you might be glad to know that this has been changed in Precise (to become 12.04). We now have the most recently used apps that are not on your launcher, the most recently used files and the most recent downloads.


How to install php 7 to run beside php 5 on ubuntu with nginx

Firstly, you need to install php5-fpm and php7.0-fpm from Ondřej Surý's PPA for co-installable php5 and php7.0.:

sudo apt-get install python-software-properties
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php

We then, with nginx, suggest using the FPM packages.  So, install the packages accordingly:

sudo apt-get update

# We need to ***remove*** php5 packages, so we can use php5.6 packages
# from the PPA instead
sudo apt-get remove php5-common
sudo apt-get autoremove

# Now we install php5.6 packages.
sudo apt-get install php5.6-fpm

# Now, install php7.0-fpm.  You may need to install separate PHP plugins
# for databases, extensions, etc. later.
sudo apt-get install php7.0-fpm

Source: An answer on the "How to install php 7?" question, and custom comments and modifications from myself.

Secondly, nginx.  nginx is only able to be as good as your configurations.  You very likely have a PHP handling block on your nginx server block(s) similar to this (from the 'default' example config):

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

location ~ \.php$ {
    include snippets/fastcgi-php.conf;

    # With php5-fpm:
    fastcgi_pass unix:/var/run/php5-fpm.sock;
}

This configuration will only pass to php5-fpm.  In effect, this will apply for your entire server block.  The easiest way to go about this is to have a second server block (for, say, test.domain.tld), and provide instead the PHP 7.0 fastcgi_pass destination.  In php7.0 on Xenial, this is going to end up something like this (extracted from a fix recently uploaded to the Xenial nginx package), however I do not know the layout of Ondrej's package so I cannot give exact specifics there (check /etc/php7.0/fpm/pool.d/www.conf or similar to determine where it's listening):

location ~ \.php$ {
    include snippets/fastcgi-php.conf;

    # With php7.0-fpm:
    fastcgi_pass unix:/var/run/php7.0-fpm.sock;
}

You will have to do something similar for your php5 block, to validate that php5.6 sockets are used instead of the built-in php5 socket (which we just removed).

Then, use the second test domain to run the php7.0 testing.  Make sure, though, to make a copy of your site if you want to do this - it will likely be necessary to have a separate testing copy so that once you've finished getting it working with php7.0, you can just 'switch over' without issue.

There is, unfortunately, no easy way to make php5 and php7.0 work within the same server block, not without altering your paths for your site, applications, etc. to have one for php5 and one for php7.0; such reworking of sites can get nasty, hence the suggestion to run two separate copies of the site code, one for php7.0 migration and one for php5 in production.


Asking if it would be better to install Ubuntu and through virtualbox handle Windows 10 instead of dual booting my pc

The choice is lead by a basic decision

if your PC has better RAM and CPU, u'd want to go for virtualization as it uses more CPU and RAM because your basic OS will run, and in a virtual machine software, runs your other operating system which further runs any program you want. In short, it takes more RAM and CPU usage.

However, if you choose dual-boot, then CPU and RAM usage is less, but your computer memory (hard-disk) will be strictly divided, restricting your memory limits to each OS, as dedicated during installation.

Hope it helps. Cheers


APT-GET: Does APT-GET store its # updates somewhere?

I don't know of a file that it keeps that information in, but this may interest you:

sudo apt-get dist-upgrade -s | grep "not\ upgraded"

This will print:

1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

You can continue to get these down to what you want using the cut command:

sudo apt-get dist-upgrade -s | grep "not\ upgraded" | cut -c 1-1"

This will give you just 1, or the first character in that sequence. If this does not equal 0, then you have updates! Simple as that, you can continue expanding to put the following in a script in /usr/bin :

#!/bin/bash
NUMUPG=`sudo apt-get dist-upgrade -s | grep "not\ upgraded" | cut -c 1-1`
if [[ "$NUMUPG" == "0" ]]
then echo "SYSTEM UP-TO-DATE"
  else echo "SYSTEM OUT-OF-DATE"
fi
exit 0

If you create the script, be sure to do chmod +x [FILENAME] before attempting to run it.

Hope that helps! If it does, +1 me!


How to permanently remove unused/unwanted access points appear in the network menu item Ubuntu 14.04

This problem was so annoying that I decided to demolish the OS. But before that I decided to 'grep' the directories in doubt in the root. And surprise.... there they are in the bluetooth directory (/var/lib/bluetooth/-device_name-/names). After removing them from the bluetooth devices, the ghosts in the network indicator disappeared. Thus the peace restored.


What is the default VNC server included?

The default VNC server is called Vino. It's part of the GNOME project.
The Desktop Sharing app you see is vino-preferences. It doesn't have a man page that I can find, but the three programs of interest are:

vino-preferences
vino-passwd
/usr/lib/vino/vino-server (it's not in the PATH, in case you want to start it manually.)


It appears that your Internet connection, or at least your DNS servers are down (Impossibile risolvere "it.archive.ubuntu.com"). Please check that your Internet connection is working.


Issues when connecting to network on Ubuntu 18.04.3

Enter to Settings -> Network -> Proxy and assure that Proxy will be in Automatic


Ubuntu 20.04, simple scan does not detect scanner

I have found a workaround for this problem that has really annoyed me for three months now on my HP Envy 4500 with embedded scanner connected via USB (printing was affected too).
Several bug reports have linked this problem to a conflict between hplip (HP linux drivers) and ippusbxd (Daemon for IPP USB printer support)

Simple Scan stops working after upgrade to 20.04
USB scanning broken on focal --> hpmud and ippusbxd conflict
Printer cannot be set up as long as the package ippusbxd is installed

I tried uninstaling hplip and ippusbxd separately to see what was best, but the only working solution was really to uninstall ippusbxd as it solved all my problems of multiple printers being displayed and reappearing even if i deleted them.
> sudo apt purge ippusbxd

Note : I had to disconnect my printer from the USB port and to reinstall it after having purged ippusbxd and every printer definition that was left.
And so the scanning problem is solved too even if i still got the same annoying modal error pop up after each single page scan (but it's working)..


i can not get Ubuntu to install on my laptop

How did you make the USB? It sounds like the USB wasn't tagged as bootable, but that doesn't explain why it doesn't show up in your bootmenu.

Check your BIOS to see if USB booting is enabled.

Does your USB have a LED? Is it coming on when your computer boots up? If not, try setting a delay in your POST.


How can iget my Dell PC to recognize the Ubuntu live cd?

The Ubuntu disk is probably a DVD. Older computers can't play DVD's.You can try to burn a CD yourself:

https://help.ubuntu.com/community/Installation/MinimalCD

Or install it on a usb drive

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows


Is there any way to make the ubuntu icon launch Kupfer instead of the dash?

No, I'm pretty sure neither of those things are possible, sorry.


I ended up setting up a systemd timer as described here https://stackoverflow.com/a/52592734/340885
Create a timer file /lib/systemd/system/unattended-upgrades.timer:
[Unit]
Description=Delayed start of unattended-upgrades.service

[Install]
WantedBy=timers.target

[Timer]
OnBootSec=120min

Then disable the service and enable the timer:
systemctl disable unattended-upgrades.service
systemctl enable unattended-upgrades.timer


This is actually a bug as reported upstream in debian and various other places. It seems newer version of X caused this. A user reported a workaround for intel drivers and it worked for me.

First of all, do make sure that the appropriate drivers are actually installed: $ sudo apt install xorg xserver-xorg-video-intel

You need to create a xorg .conf file to force usage of intel drivers. Create a file /etc/X11/xorg.conf.d/20-intel.conf and put these lines there.

Section "Device"
  Identifier "Intel Graphics"
  Driver "intel"
EndSection

On Ubuntu 18.04 and newer, the file /etc/X11/xorg.conf should contain Driver "intel" under the Section "Device". The Identifier may be called differently.

Now reboot or restart X (sudo systemctl restart display-manager).


How to stop getting error messages in terminal

Try chrome 2>/dev/null

This will route all output on STDERR to a null file

Or to get rid of all standard output and error, use this

chrome >/dev/null 2>&1


How can I make an encrypted file / directory? (Ubuntu 20.04 LTS)

How to Make an Encrypted File / Directory

Install p7zip-full from universe repository

Right click file or folder and select Compress.

Confirm archive name and select .7z, then Create.

Right click .7z archive select open with Archive Manager.

Select three line icon upper right, click Password to create AES-256 encrypted archive.

Notes
You will need to install 7Zip to open archive on a Windows machine.
Selecting and remembering a strong password is an important part of encryption security. There are many good articles about this topic on the internet.
HDD's, SSD's and flash drives can all brick without notice. SLC, (Single Level Cell) SSD's and flash drives have the longest life spans. It is a good idea to keep a backup drive and copy of the password in your safety deposit box.
A full tutorial on P7Zip-Desktop can be found at: https://www.how2shout.com/linux/how-to-install-p7zip-gui-on-ubuntu-20-04-lts/


How to show (on iscsi target) which initiators (if any) are active?

You can use (tested in Ubuntu 18.04):

targetcli sessions detail

It will come out as :

alias:  sid: 8 type: Normal session-state: LOGGED_IN
   name: iqn.1991-05.com.microsoft:srvr01 (NOT AUTHENTICATED)
   mapped-lun: 0 backstore: block/storage01 mode: rw
   address: 10.0.0.11 (TCP)  cid: 1 connection-state: LOGGED_IN
alias:  sid: 9 type: Normal session-state: LOGGED_IN
   name: iqn.1991-05.com.microsoft:srvr02 (NOT AUTHENTICATED)
   mapped-lun: 0 backstore: block/storage01 mode: rw
   address: 10.0.0.12 (TCP)  cid: 1 connection-state: LOGGED_IN
alias:  sid: 10 type: Normal session-state: LOGGED_IN
   name: iqn.1991-05.com.microsoft:srvr03 (NOT AUTHENTICATED)
   mapped-lun: 0 backstore: block/storage01 mode: rw
   address: 10.0.0.13 (TCP)  cid: 1 connection-state: LOGGED_IN


Dual Boot - Transfer space from one partition (Ubuntu) to the other (Windows)

I would recommend making a backup of any important data on the Ubuntu partition, though all my experience with operations like this on partitions is more than 5 years old.
As you already mentioned this should be done while booting from a live disk. As far as I see GParted can move the start sector of a partition with the following steps: GParted - Moving Space Between Partitions.
As is mentioned over there, booting to the moved partition likely will stop working. They do however also have a section in the FAQ on fixing that: GParted Manual - Fixing GRUB boot problem.


escape special character using sed not working

Your regular expression is wrong. It looks like you are trying to use \( \) to define a character class. You can't. Those are capture groups, they let you refer to what was matched inside them as \1 (or \2, \3 for subsequent groups). A character class is defined using []. What you want to do is capture any match of the character class to replace it with itself escaped:

$ echo 'abm1c/def/sdfd/sync/sdff.jar/rtets.jar/fg/gdf/ggdg/dg/adg/TextParser$2.class,' |
    sed -e 's#\([]*^+.$[/]\)#\\\1#g'

Note that you aklso need the ] to be the first character in the character class. Otherwise, it is assumed to be the closing bracket. And you don't need to escape . or $ when they're within a character class.

Finally, you could do this sort of thing more simply by using perl's quotemeta:

$ echo 'abm1c/def/sdfd/sync/sdff.jar/rtets.jar/fg/gdf/ggdg/dg/adg/TextParser$2.class,' |
    perl -lne 'print quotemeta()'
abm1c\/def\/sdfd\/sync\/sdff\.jar\/rtets\.jar\/fg\/gdf\/ggdg\/dg\/adg\/TextParser\$2\.class\,


Gnome Terminal broken after upgrading 17.10 to 18.04

Got the exact same problem (Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached) but journalctl -xef gave this error:

/usr/lib/gnome-terminal/gnome-terminal-server: symbol lookup error: /usr/lib/gnome-terminal/gnome-terminal-server: undefined symbol: vte_text_blink_mode_get_type

It was due to the termite installation which depends on vte-ng.

I fixed the problem by installing termite again with this script and use make uninstall in both termite and vte-ng directories.

Maybe this can helps someone.


How to turn off automount in Ubuntu Server 10.04

I've never seen Ubuntu Server automount on default install. I expect that at some point you installed the automount package. If you remove that, it should stop the behavior. msw's instructions for adding the drive to fstab with the noauto mount option are good instructions, though i would add that i recommend using UUID in fstab to id the drive if it's hotpluggable, as the /dev/sdX address may change when you plug the drive in at different times.


How to open .webm video files in vlc(or any other media player) by default in 16.04?

Follow these steps:

Right click on the .webm file.
Goto properties.
Select Open With tab and choose vlc.
Click set as default.


Failure to Install Ubuntu 12.04 on USB Flash Drive

Use Unetbootin instead. It's fast, easy, and intuitive. Be sure to leave extra memory for the changes you make to your flashdrive. I would not recommend using a flash drive for regular computer use those. Flash drives only have so many reads and writes before they actually just stop working altogether.


chown subfolders with current folder's owner and group

You don't actually need to parse the output to remove the whitespace - you added that in your command! You can just format it as you like (with chown's colon syntax) in the first place:

$ stat -c "%U:%G" .
zanna:unicorns

So just pass that to chown with command substitution:

chown -R $(stat -c "%U:%G" .) .


Hibernate and Suspend do not exist anymore, help

Finally I was able to resolve the problem by installing acpi-support from the ubuntu software centre. Here is the thread that helped me http://ubuntuforums.org/showthread.php?t=1608752


Have a read here which should answer all your questions:
Authentication Plugin - Unix Socket
Basically, by default the root mysql account is secured using the unix_socket plugin so that only the root Ubuntu user can logon to the root database user. So sudo mysql -u root mysql should work but mysql -u root mysql as a non-root user will not.
It's possible to change this behaviour and use password authentication if you really need to (see linked article) but you may be making your database less secure. It really depends on your use-case and needs.


Can't expand Ubuntu VM's hard drive space

Running VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB as mentioned here How do I increase the hard disk size of the virtual machine? is the first step. The partition then has to be resized. Doing this wasn't very straightforward and the best instructions that I could find and that worked are here:

http://logicmason.com/2012/growing-a-hard-drive-partition-in-a-virtualbox-ubuntu-guest/

Basically load the GParted.iso as a Controller:IDE so that it boots on startup. Then, in its UI, you can reallocate disk space and move partitions around. Exit GParted and start Ubuntu and running df-h returns:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        12G  3.7G  7.3G  34% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            2.0G   12K  2.0G   1% /dev
tmpfs           396M  872K  395M   1% /run
none            5.0M  4.0K  5.0M   1% /run/lock
none            2.0G   76K  2.0G   1% /run/shm
none            100M   28K  100M   1% /run/user
/dev/sr0        222M  222M     0 100% /media/cameron/GParted-live


You're not looking for Ubuntu. There is a Linux distro which is designed to kick the password query out of the ram of Windows. However, since as a Windows user you don't know how to make a bootable device, it'd be easier just to use the protected mode / save mode (whatever it's called on Windows, everyone I know uses Windows in German, therefore I only know the German word for it) to replace the password with whatever you want to replace it with. If you boot in the protected mode / save mode, you can log into the admin account without password. Since you're new to this page: Please press the tick on the left it this solves your problem.


How to disable viewing Window's hidden files in Ubuntu?

If your using Nautilus File Manager you can create a file called '.hidden' in the directory where you want to hide files, open it with a text editor, and add the names of the files you want to hide (with each files respective extension as well).

This is not an system wide automatic method of hiding files without renaming it (in Linux files and folders are automatically hidden if they have "." in front of the file/folder name).  You would have to do this manually for every file/folder that you want to effect; and only feasible for the Windows system files/folders that you really want to keep hidden and not want to mess around.


ubuntu 14.10: ibus only working in the search applicatoin

I had the same problem. After I tried the following things, it worked for me (I'm not sure the exactly reason that made it work):

Run a system update: sudo apt-get update; sudo apt-get upgrade.
Remove ibus-pinyin and install ibus-libpinyin: sudo apt-get remove ibus-pinyin; sudo apt-get install ibus-libpinyin.
Open a terminal and run im-config, then click "OK" and "YES", then select "ibus" and click "OK" twice.
Reinstall ibus and ibus-gtk: sudo apt-get --reinstall install ibus; sudo apt-get --reinstall install ibus-gtk
Reboot the system


Merge values of consecutive rows if they have the same values on a different column (AWK)

Another awk solution to avoid printing repeated \newlines if condition didn't meet in any line:

awk '($4=="I-PER"){ printf SEP$1; SEP=" "; C=1; next }
      C==1{ SEP=""; print ""; C=0} END{print ""}' infile

example input:

Comandante  comandante  NP00000 I-PER
de  de  SPS00   I-PER
la  el  DA0FS0  I-PER
Guardia guardia NP00000 I-PER
Civil   civil   NP00000 I-PER
no I-PER in fourth column
anotherline no I-PER in fourth column
Pamplona    pamplona    NP00000 I-LOC
Poblador    poblador    NP00000 I-PER

The output is:

Comandante de la Guardia Civil
Poblador


Zebra does not provide a driver for use on Linux/Unix or Mac OS X operating systems but instead suggests the use of the Common Unix Printing System (CUPS) driver.

Currently the CUPS printer driver supports all Zebra based ZPL, EPL1, EPL2,  and CPCL printers.  Kiosk (KPL language) support is expected in the 1.6 version of CUPS.

They do provide extensive documentation on configuring printers using CUPS.

  To Install or Add a Zebra Printer

  Using Safari for MAC or Mozilla for Linux OS’s enter either http://localhost:631/ or http://127.0.0.1:631/ to access the CUPS driver.

  On the MAC OS and some Linux versions it is built-in directly.  The following examples are all based on the 1.4.2 version of the CUPS driver which requires installation of the Snow Leopard MAC OS. The CUPS contributors made significant changes to the 1.4.# interface compared to previous 1.3.# versions.  Zebra was present in 1.3.# versions and once you get to the Zebra printer setup the options are basically the same.

  From the Home screen select Adding Printers and Classes


Will the more gnome extensions and more cursors and themes i use make my computer slower?

Anything that adds additional work or demands additional resources from your hardware can slow your system down.
Beyond this, your question is purely hypothetical and case-dependent.  There wouldn't be any more detailed answer to your question that would be fact-based.


How to lock hostname changes in Ubuntu 18.04

If your "lab" systems are otherwise secure, you don't need to do anything. /etc/hostname is protected against casual access:

$ ll /etc/hostname
-rw-r--r-- 1 root root 4 Jan 29 18:08 /etc/hostname


You should have:

deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse

Upgrade your /etc/apt/sources.list file.


Any way to get colored icons in alt-tab task switcher in KDE?

The short answer is no.  KDE 4.8.1 brought about this change to the task switcher, and it has really slowed me down.  The system administrator at my work inquired about it, after I complained, and the response back from the developers was "works for me, so it's not a problem".

This is what happens when "cosmetic" changes are made by people who do not actually use the functionality they are breaking.  It makes as much sense as graying-out all the applications in the main menu/task bar, except for the current one.  Please complain to whomever you can!


Network manager keeps asking for login information with a Centrino Ultimate-N 6300 wireless card

gksu gedit /etc/modprobe.d/iwlagn.conf

Add the line options iwlagn bt_coex_active=0.


Does sudo crontab -e on Ubuntu Desktop 14.04.1 work

3 * * * * /root/dothis.sh does not run a script every three minutes, it runs a script on the third minutes of every hour (00:03, 01:03, ...). To run a script every three minutes, the syntax is:

*/3 * * * * /root/dothis.sh


How to connect to Cisco AnyConnect VPN via GUI in Ubuntu 18.04

You can install package "network-manager-openconnect-gnome", such as by CLI:

$ sudo apt install network-manager-openconnect-gnome


cannot find crti.o: No such file or directory

This is a BUG reported in launchpad, byt there is a workaround :

compiling 64 bits program in 32 bits platform :

LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
export LIBRARY_PATH

for 32 bits native :

LIBRARY_PATH=/usr/lib32:$LIBRARY_PATH
export LIBRARY_PATH

That in your .bashrc file (or ran from a console) is enough for GCC to find the new location of library.

thx. to Iain Buclaw (ibuclaw)  to point out in the right direction.

12.10 32 bits

hhlp@hhlp:~$ sudo find /usr/ -name crti*
/usr/lib/i386-linux-gnu/crti.o
hhlp@hhlp:~$

LIBRARY_PATH=/usr/lib/i386-linux-gnu:$LIBRARY_PATH
export LIBRARY_PATH

12.10 64 bits

hhlp@hhlp:~$ sudo find /usr/ -name crti*
/usr/lib/x86_64-linux-gnu/crti.o
hhlp@hhlp:~$

LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
export LIBRARY_PATH