USB Full install of ubuntu 18.04 can boot on one pc only

Full Install to USB - BIOS/UEFI

Perhaps one computer uses UEFI and the older computer BIOS.
If you would like your USB drive to be able to boot from multiple computers, both BIOS and UEFI:

Use mkusb to make a Live system on the Installer USB (2GB or larger).
Use mkusb to make a Persistent system on the Target 128GB USB using default settings with ~25GB persistence, (remaining NTFS partition is used as Windows accessible data partition).

Open GParted and delete sdx4, the ISO9660 partition and expand sdx5 into the recovered space, sdx being the device name of the Target drive.

Unplug or remove HDD before proceeding further, (optional but recommended, highly recommended in UEFI mode).
Boot Installer drive, select Try.
Insert Target drive

Start Install Ubuntu...

Select Something else.
Select sdx5, (on the target drive), and click Change.

Select Use as: ext4, Format and Mount point: /.

Don't touch any other partitions (unless adding a /home partition).

Select sdx5 as Device for boot loader installation.
Complete installation.
Cut grub.cfg from sdx5/boot/grub and paste to sdx3/boot/grub, overwriting the existing grub.cfg file.
Boot the target drive and run sudo update-grub to add all drives to boot menu.
Do not install any propriety drivers, (ie Nvidia).


How can we increase Commissioning/Deploying timeout for nodes in MAAS?

It seems, commissioning_timeout in settings.py doesn't effect. It is hard coded within MAAS code. To change the timeout, I updated 'NODE_STATUS.COMMISSIONING' in /usr/lib/python3/dist-packages/maasserver/node_status.py
Then restarted all maas services:

$ sudo systemctl restart maas-regiond maas-rackd maas-proxy maas-dhcpd

Note: MAAS version 2.1.2


XP Pen PenTablet driver installing issues on Ubuntu 16.04

This answer was originally posted by the author of this question, tasnim_tamim, as an edit to their question:

I FIXED THE ISSUE.

After 4 days of email exchange to the XP-Pen support team, I found out that it only support 64-bit PC's. I on the another hand had 32-bit and as a result it gave out this error.

Issue was fixed by installing a 64 bit Linux Distribution. Used Ubuntu 16.04 x64 in this case and it worked flawlessly with no issues.

TL;DR - Driver only supports 64-bit OS, 32-bit will not work.


BTRFS and df don't see eye-to-eye. Simply put BTRFS can hide things all over the place that need physical space but aren't directly available to the system like snapshots and metadata.

Take my RAID10 for example.

$ sudo btrfs filesystem show
Label: ned  uuid: 567ea578-13a0-46c0-9a5c-513f028b7aac
    Total devices 4 FS bytes used 187.05GiB
    devid    1 size 1.36TiB used 119.53GiB path /dev/sdg
    devid    2 size 1.36TiB used 119.53GiB path /dev/sdi
    devid    3 size 1.36TiB used 119.53GiB path /dev/sdj
    devid    4 size 1.36TiB used 119.53GiB path /dev/sdk

4×1.3TiB drives should render about 3TiB of raw space. With "187GiB" used, on a traditional filesystem, that should leave me with 2.8TiB free.

df sees the drives but doesn't understand how they work together:

$ df -h /media/ned/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdk        5.5T  375G  5.1T   7% /media/ned

Even my version of btrfs-tools (3.12) doesn't understand enough to tell me free space:

$ btrfs fi df /media/ned/
Data, RAID10: total=238.00GiB, used=186.62GiB
System, RAID10: total=64.00MiB, used=48.00KiB
Metadata, RAID10: total=1.00GiB, used=447.08MiB
unknown, single: total=160.00MiB, used=0.00

Apparently this gets a lot better with 3.18 and up but you'll need Wily (or a PPA or to compile it yourself) for that. I've just compiled this for myself and it looks a lot healthier:

$ sudo ./btrfs fi usage /media/ned/
Overall:
    Device size:           5.46TiB
    Device allocated:        478.12GiB
    Device unallocated:        4.99TiB
    Device missing:          0.00B
    Used:            374.11GiB
    Free (estimated):          2.54TiB  (min: 2.54TiB)
    Data ratio:               2.00
    Metadata ratio:           2.00
    Global reserve:      160.00MiB  (used: 0.00B)

Anyway, you can read more about this on the BTRFS Wiki.


Delete also all the metadata associated with the Trash, not just the files.

rm -rf ~/.local/share/Trash

No need to use sudo for anything here. The files are yours.

The next time you send something to the trash, the Trash folder will be regenerated properly.


Does Ubuntu have any graphical software to compare and merge differences in files?

fldiff might be what you search. It's in the offical repositories. Install it with:

sudo apt-get install fldiff

Another one is diffuse:

sudo apt-get install diffuse


deluge doesn't start up on boot - how do I diagnose this problem?

I resolved issue by simply removing deluge, and reinstalling.

sudo apt-get --purge deluge-webui deluge
sudo apt-get install deluge deluge-webui


The mpich package only contains the program binaries necessary to run MPICH programs.

You will need to install the libmpich-dev package which includes the MPICH headers and static libraries, as well as the compiler wrappers needed to build MPICH programs.

Based on the error message you provided, the issue is not that mpich is not installed correctly, but that you are failing to link the necessary library for the function in question, which appears to be libmpichfort

i.e. you need to add

-lmpichfort

to your link command.


Mouse settings won't change primary button - 16.04 LTS

Also I have big problems with the mouse since I installed 16.04

It is like in universal access things were switched on:

In any case you should control y
 Click the icon at the very right of the menu bar and select System Settings.
Open Universal Access and select the Pointing and Clicking tab


Can I register my own script to gnome accessibility menu?

Download the gnome-shell-extension CustomAccessibilityButton from this  github-link

To install the extension from the Downloaded zip file,
change directory to the downloaded location. for Example if the Downloaded file is in $HOME/Downloads
cd $HOME/Downloads
gnome-extensions install CustomAccessibilityButton.zip

From the installed Extensions Directory run the compile-schemas-script
cd $HOME/.local/share/gnome-shell/extensions/Custom\ Accessibility\ Button/
./compile-schemas-script

Refresh the gnome-shell with Alt+F2 – "r" – enter method or logout/login

enable the extension
gnome-extensions enable 'Custom Accessibility Button'

Refresh the gnome-shell with Alt+F2 – "r" – enter method or logout/login

Now Custom Accessibility Button Should Appear.


Change resolution when enabling/disabling external monitor

You can use xrandr (assumming your driver supports it), for a nice guide check http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html .


I assume we are dealing with usershares.

Those are stored in /var/lib/samba/usershare.

You can use the command net to manage them, ie:

net usershare add (name) (path)
net usershare delete (name)
net usershare list


ubuntu 16.04 keyboard remap suddenly doens't work

If your goal is to change Alt_L and ISO_Level3_Shift, I think this command does what you want:

setxkbmap -option lv3:ralt_alt -option lv3:lalt_switch

If it does, you can make the change persistent for your user via this command:

gsettings set org.gnome.desktop.input-sources xkb-options "['lv3:ralt_alt', 'lv3:lalt_switch']"


In Windows the AppData folder is located in C:\Users\yourname\AppData. That folder is hidden away.

In Wine the AppData folder is located at /home/$USER/.wine/drive_c/users/yourname/.  To find the folder open "Files" (which opens to /home/$USER for your user).

The .wine folder should be here but, it is hidden. To unhide it, press CTRL+H. Now you should see the .wine folder.

Next, open and goto drive_c and you should see the folders Windows, users, Program Files, and Program Files (x86). Open users and navigate into your folder.

You should now see Application Data.


Kernel panic after update/upgrade on VirtualBox (Ubuntu 18.04)

Reboot your VM, then hit Esc or Shift button to get into grub, select another kernel.
If not try selecting recovery option in kernel.
Edit , if you cannot boot then you need to use a  live linux boot , then chroot into the hosed system a


You can use the following commands from a terminal:

swapon -s displays swap devices and sizes
cat /proc/meminfo displays the total swap, and the free swap space
cat /proc/swaps displays which swap devices are in use


er errors Given when installing libssh2-php

As a work around:

sudo mkdir -p /etc/php5/conf.d/
sudo apt-get install libssh2-php


Since mysql-utilities is not available from the 12.04 repo, you'll have to install the quantal version instead

Download this deb file
Install python-mysql.connector: sudo apt-get install python-mysql.connector
Run sudo dpkg -i mysql-utilities_1.0.5-1_all.deb


How to install newer version of libwacom-common (Ubuntu 18.04)? *updated

I would recommend to compile all Wacom packages from Ubuntu 19.04 source.
At first enable Source code repositories in Software & Updates (software-properties-gtk) and then run:

# get build dependencies
sudo apt-get build-dep libwacom
# get tools
sudo apt-get install build-essential dpkg-dev debhelper devscripts

# download source codes
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwacom/libwacom_0.32-1.dsc
wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwacom/libwacom_0.32.orig.tar.gz
tar -xf libwacom_0.32.orig.tar.gz
cd libwacom-*
wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwacom/libwacom_0.32-1.debian.tar.xz
tar -xf libwacom_0.32-1.debian.tar.xz

# compile deb-packages from source code
dpkg-buildpackage -b --no-sign

# install resulting deb-packages
sudo apt install ../libwacom*.deb

So you will get LibWacom 0.32-1 installed on your system.

If this does not help - then you can revert packages installation with command below:

sudo apt-get install libwacom-bin=0.29-1 libwacom-common=0.29-1 libwacom-dev=0.29-1 \
libwacom2:amd64=0.29-1 libwacom2-dbg:amd64=0.29-1

to have ordinary 0.29-1 from Ubuntu 18.04 LTS.


Dual boot windows 10 & Ubuntu 20.04 LTS - GRUB won't load

boot in live Ubuntu pendrive.
run terminal and paste the following command.

 sudo update-grub
This command update pre-installed grub also.
I hope your problem solved.


Can't remove a wine program after uninstalling wine

You need to find ".desktop" file of photoshop, and remove it. Photoshop is removed with wine, but link to it still exists.

$ locate photoshop.desktop


MongoDB Compass Error in Ubuntu 20.04 LTS

Here is a description how you can get the dependencies installed. MongoDB should have included that in the manual for installing compass.
Basically you just need to type
sudo apt-get -f install

And then your install compass with dpkg


JAVA_HOME should be set to the name of the directory that contains the bin directory that contains the Java executables (in particular, java itself).

Assuming you do have a /usr/lib/jvm/jdk1.7.0 directory, it probably contains a jre subdirectory that contains the bin directory that contains java and related executables.

So you should probably be setting JAVA_HOME to /usr/lib/jvm/jdk1.7.0/jre rather than /usr/lib/jvm/jdk1.7.0.


Multiple EnvironmentFile(s) for systemd service file

looks like according to https://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=

EnvironmentFile= ...may be specified more than once in which case all specified files are read.

So all I needed was

EnvironmentFile=/etc/environment
EnvironmentFile=/etc/conf.d/celery

Thanks to @steeldriver for the help!


The web server does not care what the browser does with regards to handling URIs, since the web server is not involved in the handling, only with responding to HTTP or HTTPS requests. Your problem lies elsewhere.


How to setup login your SSH server with Public/Private key authentification?

use ssh-keygen command to generate private and public key.
Add your public key ( id_rsa.pub) in server's authorized_keys file ( located inside .ssh or create if doesn't exist ).

to allow others to login on your computer tell them to run ssh-keygen command on their computer, take their *.pub file and append inside ~/.ssh/authorized_keys file.


How to connect to wifi using Qualcomm Atheros AR9462 Wireless Network Adapter, for an acer v3 772g machine running Ubuntu 14.04 LTS?

Try to use ndiswrapper. You must have the Windows driver and see if that works.


How to find out what is in an Ubuntu package

Install the apt-file package:

sudo apt-get install apt-file

Update its database:

apt-file update

Now you may use the following to list the contents of a package:

apt-file list <pkgname>

Other commands, like:

apt-file search <filename>

will inform you of what package(s) contain the filename file.


It is not too hard to use legacy init scripts with systemd. Here is an example. Given the following SysV init script in /etc/init.d/mylittledaemon:

#!/bin/bash

### BEGIN INIT INFO
# Provides: littledaemon
# Required-Start: $remote_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Description: My little daemon
### END INIT INFO

case "$1" in
    start)
        (sleep 5000) </dev/null >/dev/null 2>&1 &
        ;;
    stop)
        pkill -f "sleep 5000"
        ;;
esac

you can enable it using systemd like this:

$ sudo chmod +x /etc/init.d/mylittledaemon
$ sudo systemctl enable mylittledaemon
mylittledaemon.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mylittledaemon

and then start it using

$ sudo systemctl start mylittledaemon

This will look at the LSB info comments and actually call update-rc.d, just like insserv did. It will also generate a transient systemd service unit using systemd-sysv-generator.

See also: http://manpages.ubuntu.com/manpages/bionic/man8/systemd-sysv-generator.8.html

The better, long-term approach would be to convert your init scripts to systemd service units. There are plenty tutorials on the net, for example this one: http://0pointer.de/blog/projects/systemd-for-admins-3.html


New XPS, Starting on Linux, Still a Windows power user, configuration question

Personally I'd never be able to constrain my OS to use just 32GB of space, be it Linux or Windows.
What you can do if you know you're not going to install a huge amount of programs to your Linux OS is create a separate partition for your /home directory.

That's like the C:\Users directory in Windows.

When you're installing Ubuntu you just go to the advanced partitioning option during install, where you specify your SSD to use an EXT4 partition for most of the drive, leaving 1-2GB or so to create your "swap" partition, which is like the pagefile in windows, except obviously it's a partition not a file.

Then you allocate another EXT4 partition on your 500GB drive, and that one will be for your home directory.

You can set up the partitions using gparted or some other partitioning tool beforehand if you like, but when you're doing your Ubuntu install, you need to go to the advanced setup option where you set the partitions, so that you can allocate the mount points.

So you set the EXT4 SSD to use: "/" as its' mount point, which means it will be the root directory.
Then you set the EXT4 partition on your 500GB drive as the "/home" mount point. Which will tell the Ubuntu installer to use that partition for your equivalent of C:\Users.

Neat huh :0)

Only problem for me is that I think I'd probably even install more than 32GB of programs on the root fs. As even though I'd be installing all my windows games in wine, which stores it's files in the home directory, I found particularly when getting used to Linux, I became a package manager fiend... Once you open the Ubuntu software centre and there's millions of free apps which you're not already familiar with, it's awfully tempting to just go through and install piles of programs just to get familiar with them cause there FREEEEE! :OP

As for windows, I know that you can move the MyDocuments and MyVideos folders etc to a separate partition, but generally Windows is a space hog anyway so I'd definitely want to leave at least half of your 500GB drive for Windows.

Bearing in mind that you can mount your NTFS partitions inside Linux and read and write files, (without the ability to set file permissions).

While on Windows, you won't be able to easily mount your EXT4 partitions. There are programs I use like this one:
http://sourceforge.net/projects/ext2read/
Which will allow you to read your EXT4 partitions in Windows, but with that particular one you have to copy the files to the NTFS partition before you can open them.

Where as http://www.ext2fsd.com/
I think would allow you to mount your EXT4 partitions in Windows, but I found it tricky to set up and potentially a risk of damaging your data.

Having said all of which, if you're editing digital media I think it would be nice to have a 32GB SSD to use for working with your large image and video files, if you're going to be doing things that require a lot of read/write of the data. For example if you want to edit segments of video and save multiple copies while you're working with them. Though if you're working with video, 32GB would be a bit confining. I'd go for a larger SSD.

Whatever you decide to do, you can always copy your Linux partitions to another disk in the future if you choose to, and they'll boot just fine. You just need to boot up something like:
http://sourceforge.net/p/boot-repair-cd/home/Home/

or http://www.supergrubdisk.org/rescatux/
Which will let you update your grub2 boot loader configuration so that they point to the new hard drive.
You can also do that with windows by changing your BCD, http://pcsupport.about.com/od/fixtheproblem/ht/rebuild-bcd-store-windows.htm


open a terminal and type the following command

sudo gedit /etc/apt/sources.list

Now, scroll down to line 56. There is your problem. What is different about this line? Is there a typo somewhere? Did you add this line manually?

To get around this problem, you can delete this line or comment it out by placing a # at the beginning of the line. After fixing the line, removing it, or commenting it out, save the file.

After saving the file run this command:

sudo apt-get update

There should be no error anymore.

To apply updates, run these commands:

sudo apt-get upgrade

If it mentions any packages held back, you can run this command to install them:

sudo apt-get dist-upgrade


Unable to extend partition to adjacent unallocated space

Partitions cannot overlap and next to the partition you want to grow (sdb1) is the extended partition sdb2.

The purpose of the extended partition is to hold logical partitions, but in your case, a logical partition does not exist, so the extended partition is not needed and can simply be deleted.

After deletion of sdb2 you will be able to increase the size of sdb1.


How do I change the hostname in a cutomized live-cd Ubuntu 20.04

An easy way to do this is to add the hostname boot parameter to your boot configurations files.

Approach
For UEFI boot in Ubuntu 20.04...

Edit boot/grub/grub.cfg
Note that the section 'menuentry "Ubuntu"' is used for the default option

For Legacy BIOS boot in Ubuntu 20.04...

Edit isolinux/txt.cfg
Note that the section 'label live' is used for the default option

However, to keep things simple, just add this parameter to all default (filtered) boot configuration files listed on Boot tab of Cubic's Options page.
Note: The files you see on the Boot tab may be different depending on your flavor or version of Ubuntu. For example, for XUbuntu 20.04, only has /isolinux/txt.cfg.

Steps
On the Boot tab of Cubic's Options page...

Select boot/grub/grub.cfg
Add the hostname=MY_HOST_NAME parameter to the line(s) that start with liunx

Select boot/grub/loopback.cfg
Add the hostname=MY_HOST_NAME parameter to the line(s) that start with liunx

Select isolinux/txt.cfg
Add the hostname=MY_HOST_NAME parameter to the line(s) that start with append

Example
Here is an example here is what the isolinux/txt.cfg should look like. In Ubuntu 20.04, this file is used for Legacy BIOS boot.
default live
label live
  menu label ^Try Ubuntu without installing
  kernel /casper/vmlinuz
  append boot=casper hostname=SILVERSPR file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd.lz quiet splash ---
label live-nomodeset
  menu label ^Try Ubuntu without installing (safe graphics)
  kernel /casper/vmlinuz
  append boot=casper hostname=SILVERSPR file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd.lz quiet splash nomodeset ---
label live-install
  menu label ^Install Ubuntu
  kernel /casper/vmlinuz
  append boot=casper hostname=SILVERSPR file=/cdrom/preseed/ubuntu.seed only-ubiquity initrd=/casper/initrd.lz quiet splash ---
label live-install-nomodeset
  menu label ^Install Ubuntu (safe graphics)
  kernel /casper/vmlinuz
  append boot=casper hostname=SILVERSPR file=/cdrom/preseed/ubuntu.seed only-ubiquity initrd=/casper/initrd.lz quiet splash nomodeset ---
label memtest
  menu label Test ^memory
  kernel /install/mt86plus
label hd
  menu label ^Boot from first hard disk
  localboot 0x80

Screenshots
Example of changes to the boot/grub/grub.cfg file in Ubuntu 20.04 for UEFI boot...

Example of changes to the boot/grub/loopback.cfg file in Ubuntu 20.04...

Example of changes to the isolinux/txt.cfg file in Ubuntu 20.04 for Legacy BIOS boot...

Example of Ubuntu 20.04 Live Environment with a custom hostname...


Keyboard layout doesn't work properly in Ubuntu 18.04

Actually I found the problem.
Had to unset the Use system keyboard layout in the Advanced tab to fix the issue.


Delete Ubuntu files after Windows installation

If you deleted all the partitions then Ubuntu is gone and also take note that Windows can't see Linux filesystems so you can't tell from Windows how much space is left on the Linux partition.

Windows take a lot of space, expecially recent versions such as windows 8. Office is another space consuming application. That said, 29GiB for just Windows and Office is a bit too much so maybe check if you have other software installed that are using your space.

Use Windows Disk cleanup and select C drive then select clean up system files too that may free up some space in your C drive


Installing zlib1g-dev. Unmet dependency on libc-dev libc6-dev

Please try the following:

1) dpkg --configure -a

2) apt-get update and then reinstall your package.


Postfix continue sending mails with the hostname instead of the domain

Edit /etc/mailname to have a single line, with your domain, and ending with a newline, e.g.:

example.com

Then edit /etc/postfix/main.cf to uncomment the line

#myorigin = /etc/mailname

rendering it as

myorigin = /etc/mailname


Create a new partition with the unusable memory and remember the /dev/sdaX of that partition. After that follow the answer in below question for installing Ubuntu with something else option.

How to use manual partitioning during installation?

for more Installing Ubuntu with "something else"


How to get text from range of dates using grep/sed in large text file?

With grep if you know the number of lines you want you can use context option -A to print lines after the pattern

grep -A 3 2016-07-13 file

that will give you the line with 2013-07-13 and the next 3 lines

with sed you can use the dates to delimit like this

sed -n '/2016-07-13/,/2016-07-19/p' file

which will print all lines from the first line with 2016-07-13 up to and including the first line with 2016-07-19. But that assumes you have only one line with 2016-07-19 (it will not print the next line). If there are multiple lines use the next date instead and use d to delete the output from it

sed -n '/2016-07-13/,/2016-07-20/{/2016-07-20/d; p}' file


Broken fonts for code formatting blocks in slack and chrome in Ubuntu 18.04

I use Ubuntu 19.10 and ran into the same problem after making font changes using the Tweaks tool.

Do the following:

Make sure that the Fixed-Width font in chrome://settings/fonts is set to MonoSpace.

Add the file ~/.fonts.conf with the following code:

<match target="font" >
    <edit name="embeddedbitmap" mode="assign"><bool>false</bool></edit>
</match>

Uninstall chrome and reinstall chrome


Are there any easy to use image editing programs?

Shutter
It's a awesome program used for editing and annotating images.


"Background" tab missing in terminal profile settings

Since this feature is remove from gnome 3.7, there are some workaround in:

https://wiki.gnome.org/Apps/Terminal/FAQ

  Since version 3.7 this option has been removed from the Preferences
  dialogue. You can however still get the same effect by setting the
  _NET_WM_WINDOW_OPACITY X property, for example with the Devil's Pie or Devil's Pie II tools. E.g., set up Devil's Pie to start automatically
  with the session, and create the file ~/.devilspie/gnome-terminal.ds
  with these contents:

  (if   (matches (window_name) "gnome-terminal-window-*")   (opacity 90)
  )

  You can also use this shell script (@nirbheek) that however only works for
  existing terminal windows and not automatically for newly created
  ones.

(There are some links in the main article.)

and I forked @nirbheek script, and changed it, so it only make current terminal transparent, if you are interested it's available at github/setXtransparent. then you need to exec setXtransparent after running the terminal.


Usually, no.

But it depends of the software running on the wifi router.

If it runs openwrt and the likes, you can probably logs anything like DNS requests, or whatever you like, given the router is powerfull enough.

Otherwise, it would be best to replace the wifi router with one of yours running a linux box.


Trying to upgrade Ubuntu from 18.04 to 18.10 and then 19.04

as I read from this discussion

  /usr/lib/ubuntu-release-upgrader/release-upgrade-motd actually calls /usr/lib/ubuntu-release-upgrader/check-new-release.
  If you run /usr/lib/ubuntu-release-upgrader/check-new-release, that's the script that fails with the error message.

some other user fixed the issue running

  All I did to make it go away was: sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available

The same problem was experienced with 17.10

  The script will only update the file every 24 hours. So if you wait long enough, the file will go stale and the script will update the file anyway. But,if you want to update it immediately, just remove /var/lib/ubuntu-release-upgrader/release-upgrade-available and run /etc/update-motd.d/91-release-upgrade and it should start working correctly.

Happy to help you further


How to reduce the command line prefix length in Bash

Read man bash, the PROMPTING section, and about the PROMPT_DIRTRIM environment variable.

  PROMPT_DIRTRIM
          If set to a number greater than zero, the value is used as the number of trail‐
          ing  directory  components to retain when expanding the \w and \W prompt string
          escapes (see PROMPTING below).  Characters removed are replaced with an  ellip‐
          sis.

Add export PROMPT_DIRTRIM=1 to ~/.bashrc, and you'll get close to what you want.


What does MANPATH, LD_LIBRARY_PATH mean in Linux?

MANPATH. See "2.3.2. The man pages". MANPATH is the path to the manual pages.
LD_LIBRARY_PATH. See "3.3.1. LD_LIBRARY_PATH".

  In Linux, the environment variable LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories; this is useful when debugging a new library or using a nonstandard library for special purposes. The environment variable LD_PRELOAD lists shared libraries with functions that override the standard set, just as /etc/ld.so.preload does. These are implemented by the loader /lib/ld-linux.so. I should note that, while LD_LIBRARY_PATH works on many Unix-like systems, it doesn't work on all; for example, this functionality is available on HP-UX but as the environment variable SHLIB_PATH, and on AIX this functionality is through the variable LIBPATH (with the same syntax, a colon-separated list).


How to change the default installed fonts-liberation-1.07.4-5 fonts-liberation2-2.00.1-5 on Ubuntu 18.04 Bionic

Links to download the Cosmic versions of the packages:

fonts-liberation
fonts-liberation2


Running a non-official android app on my Ubuntu pc without having an android phone

Google Chrome has Chrome app called ARC WELDER to run android apps inside the browser environment.(It is primarily for Chromebooks, which have only a browser, to run android apps, but works on Ubuntu as well)

Not every app works. But it might be worth a try.

STEPS:

Install Arc Welder in Google Chrome from the Web Store https://chrome.google.com/webstore/detail/arc-welder/emfinbmielocnlhgmfkkmkngdoccbadn
Launch the Arc Welder app. Add your apk and do the basic configuration of your app.
Hit Test and hope that your app runs :p


Is it possible to force the Unity launcher to hide? Or to toggle hide/unhide with a keyboard shortcut?

If the launcher is set to auto-hide, with Super + e (mostly Windows + e) you can make the launcher show again. Havent found a way to hide the launcher through a shortcut though.


Question about moving Ubuntu partition guide step 6: grub-install -d

Try

sudo grub-install -d /media/91a82071-fccd-4fdd-80e7-654acba2fe6e/usr/lib/grub/i386-pc/ /dev/sda

I had a similar problem and it worked. That's because it's looking for a file within that directory called modinfo.sh (just like you wrote). You can look for that file in said directory.


How to display files and applications activity?

You need to install gnome-activity-journal , and ensure that you have file activity recording turned on in your system settings.


Kubuntu 15.04 doesn't suspend when closing lid

This may sound obvious, but have you tried the following?

Kmenu > Settings > System Settings > Advanced > Power Management > Edit Profiles

Sorry if I was no help at all   ¯_(ツ)_/¯


Fastest way to reload graphics driver module?

After a lot of research, I have found the two references that keep the module from unloading and how to reload the module. The two things holding a lock are:

LightDM, a lightweight X display manager
The generic framebuffer framework

To remove the locks respectively:

sudo /etc/init.d/lightdm stop
echo 0 > /sys/class/vtconsole/vtcon1/bind

However, the second option unbinds the framebuffer framework from the gma500_gfx driver, which stops the screen output. So, it is better to combine nr. 2 with a script to unbind, unload the module, reset the screen and load the module again. AFAIK, I have to run this from a console.

#!/bin/bash
echo 0 > /sys/class/vtconsole/vtcon1/bind
modprobe -r gma500_gfx
modprobe gma500_gfx
/etc/init.d/lightdm start

Preferably I would like to have 1 restart-script, which I can run directly from LightDM, which reloads the driver and restores the session. I have not been able to do this yet, however that is a different topic than the question above. Any suggestions for doing that, would make me happy. :)


UFW is a firewall. It can e.g. deny incoming connections to prevent remote machines from accessing any services that might run on your local computer and listen on any network ports (or it can also do a lot more fine-grained filtering in both directions, if you set it up).

Normally there's no reason why you should not have UFW running on your local machine with default settings (allow outgoing, deny incoming). As long as you are not running any server applications on your local machine that need to be accessible from outside, this is fine.

Connecting from your local machine to a remote server (e.g. GitHub) via ssh also works with UFW running as long as outgoing traffic is allowed.

I'd recommend to enable UFW and make sure it allows outgoing and denies incoming traffic on your local machine, to improve its security without interfering with your internet access:

sudo ufw enable
sudo ufw default allow outgoing
sudo ufw default deny incoming

If you ever need to specifically allow incoming traffic on a specific port (or for a specific known service) you can do that by running either of these (because e.g. ssh is known to use port 22):

sudo ufw allow in ssh
sudo ufw allow in 22

But again, you don't need that to connect to a remote server as a client.


How to make Lubuntu login automatically?

According to the Lubuntu documentation,  https://help.ubuntu.com/community/Lubuntu/Boot_Install_Login#For_release_12.04_and_on_.28LightDM.29,
You will need to create an /etc/lightdm/lightdm.conf with these contents: (do this as root)

[SeatDefaults]
autologin-user=<YOUR USER>
autologin-user-timeout=0
# Check https://bugs.launchpad.net/lightdm/+bug/854261 before setting a timeout
user-session=Lubuntu
greeter-session=lightdm-gtk-greeter


Hello Johnny there might be no need to format you HDD there is still some hope for your Windows 7 installation. Hoping that you have a working DVD ROM. Use your Windows repair disk and this should do the trick! The problem with your installation is that your boot MGR might have been corrupted the Windows repair disk will most probably do the trick. If you do not posses one ask your friends but most probably you PC Manufacturer gave you one. If all else fails then try this

  Restoring Windows MBR without a Windows CD

    If you want to boot directly to Windows but Grub has overwritten the MBR, the normal procdeure is to use the Windows CD to restore things. If you do not have access to the Windows CD, the following commands will rewrite the MBR, removing Grub and allowing the system to boot directly into Windows.

      Boot the Ubuntu LiveCD, open a terminal (Applications, Accessories, Terminal) and enter the following commands. Make sure you correctly identify the Windows device (normally sda):

Code

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Note *You will lose the option of booting into Ubuntu* so if you do not want to do this I suggest you follow the instructions on this page How to restore the Ubuntu/XP/Vista/7 bootloader

Hope all this works!


Controlling a synth like QSynth via hardware midi knobs

How a synthesizer reacts to controller messages depends on that synthesizer.

QSynth is a wrapper for FluidSynth, which documents some of its controllers, and also refers to sections 8.2.1 (not 8.1.2) and 9.6 of the SoundFont Technical Specification. FluidSynth does not allow to customize these controller assignments.


Way to disable windows from resizing while dragging but allow keyboard shortcut resizing?

The answer to your questions is yes (with a catch), but you have to use CCSM.

You can resize Windows using a shortcut key:

However, I'm not 100% sure that you can stop Windows from resizing when you hit screen borders.

As for having them snap to certain edges, the "Grid" plugin can do just that.


Can the installation of a pdf printer make a Canon printer not to print?

Chances are that the cups pdf printer installed a file that doesn't work well with your cups and/or the Canon drivers.

Install package cups-pdf again and start moving files to a different directory and restarting cups until printing starts working again. I would start with these 2 files:

/etc/cups/cups-pdf.conf
/usr/lib/cups/backend/cups-pdf

To list all files in package cups-pdf use dpkg -L cups-pdf.

Chances are that it is not Canon to blame this time (for a change), the bug looks like to be in package cups-pdf. Once you find the offending file please consider filing a bug report.


DistUpgradeFetcherCore errors while upgrading 12.10 to 13.04

Source: http://ithelpblog.com/os/linux/debian/ubuntu-debian/attributeerror-type-object-distupgradefetchercore-has-no-attribute-run_options/

Seems running sudo apt-get upgrade && apt-get update solves the problem. I noticed that while the problem was happening on my system, none of Canonical's or any other repos were enabled. Must be something wrong with the package management system...


Bluetooth not connecting to devices even though it recognizes them

For anyone wondering what the source of the files is in Jeremy31's answer, here's an alternative method.

Download the Windows driver from Microsoft to /tmp.

http://catalog.update.microsoft.com/v7/site/ScopedViewRedirect.aspx?updateid=87a7756f-1451-45da-ba8a-55f8aa29dfee

Unpack it using cabextract:

cabextract 20662520_6c535fbfa9dca0d07ab069e8918896086e2af0a7.cab

Download and build hex2hcd:

git clone https://github.com/jessesung/hex2hcd.git
pushd hex2hcd
make
popd

Make the .hcd.

./hex2hcd/hex2hcd BCM20702A1_001.002.014.1443.1572.hex BCM20702A0-0a5c-216f.hcd

Move it to your firmware folder:

sudo cp BCM20702A0-0a5c-216f.hcd /lib/firmware/brcm/

And reload the module:

sudo modprobe -r btusb
sudo modprobe btusb

References:

https://ftbeowulf.wordpress.com/2015/06/23/dell-xps-13-9343-developer-edition-bluetooth-firmware/
http://tech.sybreon.com/2015/03/15/xps13-9343-ubuntu-linux/


It looks to me like the driver should be available in newer kernels (under the name dc395x), but might not be activated/compiled by default. Does a sudo modprobe dc395x help? According to this, it is the right module for your card.


How can I use two instances of gfortran?

Checking my fortran install my version is gfortran-5, so to set up alternatives I did:

sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-5 60

Now when I do:

sudo update-alternatives --config gfortran

I see

There is only one alternative in link group gfortran (providing /usr/bin/gfortran):
/usr/bin/gfortran-5
Nothing to configure.

Because I have only one install of fortran, so add any other version you wish to use with `update-alternatives and set which to use with same.

Source:

https://ubuntuforums.org/showthread.php?t=2206425


How to prevent a module from being loaded

I suggest you blacklist the module so it never loads at all:

sudo -i
echo "blacklist acer-wmi"  >>  /etc/modprobe.d/blacklist.conf
exit

Reboot and test.


Installing Ubuntu on external HDD from windows 10

Burn ubuntu desktop dvd, or make usb flash install media. Detach internal hdd and attach both install media and external hdd. Press F2 or F10 or Del or something else what displayed for activate boot menu when booting, and choose install media. Install Ubuntu to external hdd.

Power off and connect internal hdd.

This way you'll be able to choose external hdd to boot. Or you can edit bios and make usb hdd highest priority to boot so it will boot every time it connected, if not connected internal hdd should take it place.


Can't add PPA on Ubuntu 15.10 - user or team does not exist

You need to export environment variable first. Open a terminal and run:

export http_proxy="http://username:password@proxy:port/"
export https_proxy="https://username:password@proxy:port/"

Now add the PPA:

sudo -E add-apt-repository ppa:git-core/ppa

You will get a prompt:

➜  ~ sudo -E apt-add-repository ppa:git-core/ppa
 The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
 More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

Press Enter and you will be able to install from a PPA.


By default, Firefox sets the size of icons in the toolbar, home button, etc., based on the size set by your system, using a value of -1.0 on  layout.css.devPixelsPerPx.
If you've adjusted the icon sizes in Settings, or with something like Gnome Tweak, this could affect the size of your icons in the Firefox toolbar.
You can oveeride this in advanced preferences:

Open an new tab and type about:config into the address bar
Search for layout.css.devPixelsPerPx
Change the value from -1.0 to 1.5 or a size that suits you

Make sure you don't change it to below 1.0, otherwise the icons could become to small to interact with.


Shortcut key for Terminator lands in the "/" directory

You will need to update the shortcut to the following command:

terminator --working-directory=~

From the MAN page:

   --working-directory=DIR
          Set the terminal's working directory


ux31a freezes when running out of memory

I had also issues with kworker eating whole memory. This seemed to help, run as root:

echo N > /sys/module/drm_kms_helper/parameters/poll

There are also other post about it on internet


What process of Google Chrome to kill to close window from terminal?

For the record, killing a process from Terminal isn't considered as "safely closing Google Chrome".

To kill the entire browser, you can run killall google-chrome-stable or (in this example) kill 2706 (note how the parent PID is 1, and all of the other processes stem down from this process).

To kill a tab, I can tell that process 3038 is a tab, but not which or what tab. You can run kill 3038 to kill the process running the tab, but note that the tab itself will still be open (but the content will be replaced with a blue screen).


Ubuntu 17.10 - what is a default window manager?

GNOME Shell does not use a separate window manager process:

  One Process. The first thing to note is that the ideas don’t naturally split into “window manager” and “panel”. The “Activities”
  view combines showing the windows that are currently open with
  launchers for existing applications. It would be possible to add
  complex API’s to the window manager to allow putting extra things into
  its scene graph. But it is going to be far easier to simply work in a
  single process with clean internal programming interfaces.

The window manager is still Mutter.


Lenovo Thinkpad T590 weird Bluetooth behavior

The problem is that 2.4 GHz wifi and bluetooth share the same frequency.

You can try to fix it by running

sudo tee /etc/modprobe.d/iwlwifi-btfix.conf <<< "options iwlwifi bt_coex_active=N"

Reboot to apply.


Translate text contents of an existing file from lower to upper case and copy to a new file

The following command can do that

tr '[:lower:]' '[:upper:]' < input.txt > output.txt


Turning off screensaver in Unity after installing xubuntu-desktop 12.10

Run the following command in the terminal:

sudo apt-get remove xscreensaver


Okay this is what went wrong.

After I upgraded from Lubuntu 13.10 to 14.4 the network manager was missing in my panel. I solved this by adding nm-applet --sm-enable & in my .profile. At first this seemed to be a good solution, the network manager reappeared again. But the problem mentioned above occurred.

What I should have done to get my network manager back again is select Preferences -> Default applications for LXSessions. Click the tab Autostart and type after + Add "nm-applet". Then click + Add. After logging on again the network manager is where one would expect it to be and Keyring will work as well to fill in the stored passwords.

http://www.webupd8.org/2014/04/fix-lubuntu-1404-network-manager.html

Cheers.


Adding my own dependency to a quickly app

This library is licensed using the LGPLv3, so you can use it with a commercial app without problems.

Now you have a couple of options to solve your problem:

The easiest way is to just include pygal in your project. Just add it as a module. Copy the pygal folder to your project root folder and import it.
A somewhat more complicated way is to add a script that uses pip to install it. Not worth the time IMHO, it won't auto-update, will need root privileges and looks quite complicated.
Finally you can package pygal yourself in it's own deb. This option has clear advantages like a clean install and uninstall and a better update policy. While this is clearly the better option for an open-source tool that is going to be distributed by a PPA, it will be very difficult to use with the Software Center.

So, in your position, I'd go for number one.


Ubuntu 14.04 network manager crashes every time after login

There are a lot of related bug reports on Launchpad, so this may be very difficult to solve. But if you look carefully through those bug reports and the comments on them, you may find a workaround. For instance on this one someone reports that they fixed the problem by purging the package urfkill.


With Oracle's Virtual Box 5.1 the DKMS (Dynamic Kernel Management System) is no longer used to download source code and compile it for every Kernel Upgrade.

Go to Install latest VirtualBox 5.1 Ubuntu 16.04 for instructions on:

removing old version
adding VirtualBox to sources.list (informs Ubuntu where to find it)
adding VirtualBox signature key to library
installing current version of VirtualBox

Also instead of Kernel version 4.8.1 which has the "Dirty COW" security holes (What is dirty COW bug?), you should use the most recent kernel version 4.8.4 (as of October 27, 2016) which has the bug fix.


Unable to scp files to Ubuntu 14 with Vagrant

According to the Vagrant docs, the correct way to SSH into a Vagrant box is:

vagrant ssh

Have a look at the configuration settings for Vagrant SSH to see how to manage SSH. Also, have a look at https://stackoverflow.com/questions/16704059/easiest-way-to-copy-a-single-file-from-host-to-vagrant-guest to see some ways of copying files to your Vagrant machine.


How to install Ubuntu 18.10 on a Modern PC

You have to disable IOMMU in BIOS for the errors to get fixed.

I had trouble with Ubuntu but never understood what was the problem until I ran Manjaro and that distro gave me more insight into my error by mentioning a problem with IOMMU AMD V. And so I went to BIOS, disabled IOMMU and both Ubuntu (any version) and Manjaro booted into their live session. Of course, I don't know if it can be installed yet or how well it will respond after installation but I finally was able to boot into the live distro which is good progress.


Trying to install Atheros AR8161 ethernet driver without internet connection

First of all, I don't see build-essential and its dependencies in your pastebin. Did you install it previously? What is the status?

    sudo dpkg -s build-essential

Second, the driver alx doesn't exist in the file you downloaded. Even if it compiled correctly, no alx driver could be built. I suggest you try this: http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.4-1-snpc.tar.bz2

I just compiled it on a 3.2.0-xx kernel for alx with no warnings or errors.


Get Network Manager name for devices from command line

The comments above got me far enough to be able to figure out the answer:

$ nmcli -t -f GENERAL.PRODUCT,GENERAL.DEVICE device show
GENERAL.PRODUCT:Ethernet Connection I217-LM
GENERAL.DEVICE:eth0


Starting and Shutting down LAMPP with sudo access

cd /opt/lampp/
sudo chmod ugo+rwx lampp

That should give everyone full permission.


Upgraded to 15.04 after manually install graphics driver, system now hangs on login screen

If anyone else had manually installed an Nvidia driver prior to upgrading and experiences this problem, here is what I did:

Boot into recovery mode
Enable networking (mounts filesystem writeable as well)
Go to root prompt and uninstall manually installed driver (./NVIDIA-installer-name-here.run --uninstall)
ubuntu-drivers autoinstall
nvidia-xconfig
reboot


SAMBA Issues: Core file & Cannot See Share from certain Win 10 Machines

Thank you everyone for the guidance and help.  After it became apparent that it was unlikely this was a samba issue, I spent some time today searching for possible causes in Windows.

I ran across the article below, followed the solution, and both desktop computers were immediately able to access the samba share.

Article with Solution: https://superuser.com/questions/1287731/windows-10-can-ping-other-pc-but-cannot-access-shared-folders-what-gives

Microsoft Support Article solution is based upon: https://support.microsoft.com/en-us/help/4046019

  Computer configuration\administrative templates\network\Lanman Workstation
  "Enable insecure guest logons"


you can try this, I've not tried it yet though..
http://ubuntuforums.org/showthread.php?t=1908210


Force DVDs to be auto-mounted using "unhide" option by default?

Use a text editor (not a word processor!) and edit the file /etc/fstab (note you need to be root or use sudo to do this.)

One of the lines should concern the DVD/CD, something like:

/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

In the forth column add unhide, like this:

/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8,unhide 0       0

Save this and it should get you what you want on the next mount.
I'm not real sure if the auto-mounter reads fstab each time, but worst case it should work after a reboot.

Hope that helps


Internet conection problem when updating Ubuntu 12.04 to 14.04 Server

Looks like an unusual one this...

Firstly I sincerely doubt that DNS is involved, though if you are using 8.8.8.8 et al for your DNS then DNS will fail because you can't reach those servers.

Firstly it can't be your LAN configuration because you can ping your local gateway, so traffic to and from it works.

The biggest hint is the double listing of your gateway in the trace. Your gateway should only be shown once, and this hints at a loop at your gateway - but all your other systems work fine, and according to what you write, it's only the local system that changed.

The only thing that I can remotely think of is if you had an iptables rule roughly like this:

iptables -t nat -D POSTROUTING ! -d 192.168.0.0/24 -j SNAT --to-source 1.2.3.4

Where 1.2.3.4 is some bogus or possibly previously valid IP address that no longer works.

This would let local traffic work but anything going out beyond the local network would break because replies would go to the wrong place. Your gateway may block traffic like that because it is in essence 'spoofed' traffic.

I think you would get a good hint to the issue with some traffic inspection at your gateway if it is at all possible.

If you can't do that - quite understandable - then maybe set up another Linux box on your network and make it the default gateway for this faulty system, and then you can inspect the traffic it is generating. This is assuming that the fault is on the upgraded system. If you configured that 2nd Linux box to ip_forward and make it's gateway the 192.168.0.1 device you might also see more useful info to help nail down the cause.

Will be interesting to see what it was when you finally get it sorted.


Install Nvidia driver instead of nouveau

Ubuntu 14.04 and beyond

Please note that nouveau drivers manual removal is required only if you are going to install the proprietary nvidia drivers yourself. If this is not the case then directly install the required graphic drivers from System > Administration > Hardware drivers. It's the recommended and the most convenient way available.

We'll blacklist all the culprit modules, remove all the nvidia* packages and as an extra step we may have to update the initramfs disk because it could be configured to load the modules at startup.

Blacklist the modules. Open the blacklist.conf file.

sudo vim /etc/modprobe.d/blacklist.conf

press i to enter insert mode and add the following modules in the file.

# this one might not be required for x86 32 bit users.
blacklist amd76x_edac

blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv

Save the file and exit.
Remove all the nvidia* packages

sudo apt-get remove --purge nvidia-*

Once you are done with the steps above, reboot, stop the display manager and try to install nvidia drivers.

Press Ctrl+Alt+F1. Once you are in the text mode, stop the display manager. This will forcibly terminate all running applications, so you better save anything you're working on and close them yourself before completing this step. To stop the display manager, run one of these commands depending on your display manager (lightdm is default in vanilla Ubuntu, but older versions or systems with GNOME desktop may use gdm and on KDE/Kubuntu/Plasma it should be kdm:

Edit: To determine what the default display manager your Ubuntu system is using, issue the command cat /etc/X11/default-display-manager While this doesn't guarantee you anything, in many cases it will be the correct choice.

    sudo service lightdm stop

    sudo /etc/init.d/gdm stop

Now, run the driver package that you downloaded from Nvidia’s website. Edit: Replace the filename in the example below with the one you actually have.

    sudo ./NVIDIA-Linux-x86-260.19.44.run

Note: If you still get the error related to nouveau drivers then you are probably required to update the initramfs, which might be configured to load the nouveau drivers. Don't reboot or poweroff, run this command to update the initramfs disk.

sudo update-initramfs -u

Now reboot and repeat step 3. This time things should go smoothly.


How to fix the dependency error when installing a package? It comes in ubuntu 16

You need to first Update and Upgrade APT. Run sudo apt-get update && sudo apt-get upgrade. Then clean unneccessary packages with sudo apt-get autoclean. Then run package diagnostics with sudo apt-get -f install && sudo dpkg --configure -a. Then run sudo apt-get -f install again and if you get 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded in the last line the APT is fixed. Install the package then.
Hope that helps


Problem with sudo apt update What should I do with this?

You have added repositories for applications to your apt sources.list file. They have been disabled and will have no effect. All this means is those applications will not be updated from those repositories.

At some stage you must have attempted to install Code::Blocks and Wine from the Ubuntu Wine Team. Both of these repositories look like they have been archived and are no longer in use.


how to remove tooltip message feature from all of Ubuntu 12.04 desktop and user applications?

Tooltips annoy me too! Here's what I did to get rid of them.

Install Compizconfig Settings Manager

sudo apt-get install compizconfig-settings-manager

Enable the Opacity, Brightness, and Saturation plugin
Click the New button and add a Tooltip rule as follows:

Optional: for awesome slightly transparent right click, drop-down, and app-indicators, make a rule like I have (just above my Tooltip rule), and specify the opacity as 90.


How to show mounted partition in devices list

First you need to make folder in /media ex. /media/Data then you can mount it to folder you've created before by using command :

# mount /dev/sda /media/Data

Now your mounted disk should appear in device list.


Intel Centrino Advanced-N 6235 throughput

If it is an issue only with wireless N enabled wifi routers, this usually works

echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

if cat /etc/modprobe.d/iwlwifi.conf already has options iwlwifi 11n_disable=1 you will need to edit the file manually with gksudo gedit /etc/modprobe.d/iwlwifi.conf and change it, save and reboot


I can't remember where this was talked about but I would stay in 16.04 in your case. Jumping to 18.04 even if it has your packages (probably the same 16.04 ones) could create issues. I think they tried removing the 17.10 to 18.04 upgrade from an i386 but forgot this one. In any case, if you are able to upgrade but everyone knows 18.04 is only oriented towards 64bit, it would be a bad idea to do the upgrade.


How to set up Micro editor as the default editor in Midnight Commander

To use another editor than those proposed by mc, just choose any of the options so mc creates the ~/.selected_editor file.
Then edit that file and replace the path to the executable in it to the editor you want to use. You need to use a command line that would also work in a terminal.


How to create a bootable ubuntu USB on a mac without using UNETBOOTIN?

There's more than a few applications that you can use. I tend to use Linux Live USB Creator as personal preference. On a Mac I've used Mac Linux USB Loader.

I would also recommend not letting LiLi auto-fetch the iso file. Download it yourself and link it inside the application. Hope this helps.


Changing the background of terminal in ZSH when connected to server

One method is to use different profiles for the Terminator windows - for example, you could have this as the profile at ~/.config/terminator/config:

 # This is a comment
 [global_config]
   focus = system

 [keybindings]
   full_screen = <Ctrl><Shift>F11

 [profiles]
   [[default]]
     font = Fixed 10
     background_color = "#000000" # A comment
     foreground_color = "#FFFFFF" # Note that hex colour values must be quoted
     scrollback_lines = '500' #More comment. Single quotes are valid too
     cursor_blink = True
   [[ssh]]
     font = Fixed 10
     background_color = "#0000BB" # A comment
     foreground_color = "#FFFFFF" # Note that hex colour values must be quoted
     scrollback_lines = '500' #More comment. Single quotes are valid too
     cursor_blink = True
     #exit_action = restart #Stops the terminal from closing after the command has been run

Then you could open the terminator window, selecting the profile with:

terminator -p ssh

You could also run the command directly with the -e option - e.g.

terminator -p ssh -e "ssh vps"

For this you may want to uncomment the exit_action = restart line, so the terminal does not exit immediately after the command is run.

For more on how to edit make/edit Terminator profiles, run man terminator_config - you can easily change the background colour by editing the background_color line - you will need to quote it.


While on a web page, hold down Ctrl key, move mouse wheel, you will see font change size.  Let us know if this works for you.


I can't access free space on my Ubuntu live USB?

If you create a persistent live USB boot drive with mkusb, you will use the whole drive.

The available space (after installing the operating system) will be shared between a linux ext partition with the label 'casper-rw' for persistence (storing what you install, save or tweak), and an NTFS partition with the label 'usbdata', that can be used to store data and to transfer data to and from computers running Windows.

See these links,

help.ubuntu.com/community/mkusb

help.ubuntu.com/community/mkusb/persistent


Maybe this article can help. I haven't used it myself but will try it just for fun.


you can use cron @reboot

sudo crontab -e

and add the line

@reboot   /path/to/bin/motion -b


cursor jumps when moving (and some other times)

I use VirtualBox (4.2.4r81684) on a Windows 7 host, had ubuntu desktop 12.04 guest, upgraded to 12.10 recently, and experienced this mouse jumping you describe, even after updating guest additions.

This helped me out:

Long story short: this bug will be fixed eventually. You can either run these commands on EVERY boot (can put into a script in your .bash_profile, or something similar):

xinput set-prop "VirtualBox mouse integration" "Coordinate Transformation Matrix" 0.5 0 0 0 0.5 0 0 0 1.0
xinput set-prop "VirtualBox mouse integration" "Coordinate Transformation Matrix" 1.0 0 0 0 1.0 0 0 0 1.0

OR you can install the bug fix:

sudo apt-add-repository ppa:a7x/bug1041063
sudo apt-get update
sudo apt-get upgrade

I installed the fix, and am happy to say that the problem has been resolved for me.


ubuntu file manager: text input for file names (with autocomplete)

Just so you know, the default file manager in Ubuntu is nautilus. Here are some options:

Opening nautilus and just typing should jump to the matching file.
Open the Go menu and choose Enter Location... or just press Ctrl+L.
In a terminal (you can open one with Ctrl+Alt+T) enter nautilus /folder/to/open.

Autocomplete using the Tab key should work for any of these.


Software Updater asking me to install updates but on Terminal nothing detected to upgrade

The GUI  (software updater) probably uses dist-upgrade instead of upgrade. The differences between upgrades options.

From the manual (man apt-get) it tells us for 'upgrade'

under no circumstances are currently installed packages removed, or
packages not already installed retrieved and installed. New versions of
currently installed packages that cannot be upgraded without changing the
install status of another package will be left at their current version.

and continues in the dist-upgrade section saying

in addition to performing the function of upgrade, also intelligently
handles changing dependencies with new versions of packages...

(copied from man apt-get)


Where can I find Ubuntu One client for Mac?

As per the official site Ubuntu One will be discontinued effective from June 1st, 2014. You may need to back-up your files which are already lying under the cloud as soon as possible.

Nevertherless, if you've gone through the Ubuntu One help FAQ's properly, you can see Where do I get Ubuntu One for Mac?  under U1 for Mac which gives you the client to be downloaded.

In case, if you're a premium user I'd strongly recommend you to go through their FAQ's to get a proper understanding on certain scenarios that you're stuck with.

Hope it helps! :)


Ubuntu 15.10 freezes, shut down, suspend, restart doesn´t work (ACER Aspire E-15 Start)

I was having this issue (shutdown did not turn the notebook off) with my ACER E15

I read that the problem was related to usb (http://ubuntuforums.org/showthread.p...4#post12389814)

I solved it by disabling xHCI support (usb3 related support) on the BIOS and now it shuts down fine


Type this command in terminal:

aria2c --daemon --enable-rpc=true

for more detail go to this link.


What is this circular orange spot in GNOME's top bar menu?

It means that you are recording your screen, the keyboard shortcut to start / stop it is CTRL+ALT+Shift+R.
As pomsky suggests:
The videos get saved to a default folder, which, in most cases, is your Videos directory.


Okay, so I figured it out. First, I re-enabled TPM. Then, All I had to do was type in fsck -f /dev/{corrupted device}. This would fix everything by reorganizing the file system and dealing with the blocks.


As you are running from inside a shell script, just add echo after each awk command i.e. in between the commands you want to get separate outputs.
echo adds a newline. For example:

awk '{print $1 $2}' file.txt
echo
awk '{print $3, $4}' file.txt

Original answer:

Append printf "\n" at the end of each awk action {}.

printf "\n" will print a newline.

Example:

% awk '{print $1; printf "\n"}' <<<$'foo bar\nspam egg'
foo

spam


You have discovered the limitations of the (64 bit install) ldd script.  The least you would expect is the complaint of "wrong ELF class".  Install a few more 32 bit pieces like the 32 bit ld, and you might start getting some reasonable output (ld is the 32 bit loader).
The package needed for this is libc6-i386.


I ran into the same problem earlier today when I updated my system and opened QT Creator. I found that the the ubuntu-sdk package didn't update itself properly. Try running this command to fix the problem:

sudo apt-get install ubuntu-sdk notepad-qml

I am sure you already ran this to initially install QT Creator, but running this again helped me. I cannot guarantee this will fix the issue, it worked for me.

Hope this helps!

Plus run this as well:

sudo apt-get install libbotan*


Ubuntu 17.04 Failed to start samba.service: Unit samba.service is masked

As I have said before:

This is not a bug.

What you describe is intentional on the parts of the Debian people.

You are not supposed to control samba services this way on a Debian/Ubuntu systemd operating system.  You are supposed to manipulate the smbd, nmbd, and samba-ad-dc services as needed.

There is no umbrella samba.target to do the original job of the old Debian/Ubuntu samba van Smoorenburg rc script; which was starting/stopping these three en bloc.  Other people created them, for other systemd operating systems.  The Debian people did not.

So where you read Debian/Ubuntu doco saying things like service samba action remember that that is not an available thing any more, now that Debian Linux and Ubuntu Linux are systemd operating systems.

Just to add to the confusion …

What the rest of the world outwith Debian knows as samba.service is called samba-ad-dc.service in the Debian world.  Similarly, nmbd.service and smbd.service are originally nmb.service and smb.service outwith Debian.

So where you read generic systemd operating system doco about samba talking about nmb, smb, and samba services, you must mentally perform the translation for Debian/Ubuntu, particularly for the latter name.

Further reading

Liang Guo (2014-03-06).  /etc/init.d/samba forbit systemd shutdown system.  740942.  Debian bugs.
Mask /etc/init.d/samba init script for systemd.  Ivo De Decker.  2014-10-24.
Ivo De Decker (2014-10-24).  samba init script should not be started after upgrade.  766690.  Debian bugs.
Ivo De Decker (2014-11-15). samba: unit samba.service is masked.  769714.  Debian bugs.
Wulf C. Krueger (2010).  samba.target


How do I vertically flip my webcam's image?

WebcamStudio allows you to run several effects at once, between other interesting features like running images, videos and other stuff as your webcam in order to be streamed in almost any via (web service, video conferencing system, chat, etc.)

In the next screenshot I am using my webcam in order to show the images flipped horizontally (up to down), but you can both invert horizontally, vertically and to run several effects at once.

Note: I am using Cheese in order to preview the webcam's output.

Aditionally you may wish to take a look at this answer by @Veazer: https://askubuntu.com/a/124934/9598 Posted here for your convenience:

  I think you'll need to create a launcher script for each application
  that needs this fix. For example, if you wanted a script for Skype
  that flips the video horizontally this should work:

#!/bin/bash
export LIBV4LCONTROL_FLAGS=1 && LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype

  If the image is not flipping correctly, try different values for
  LIBV4LCONTROL_FLAGS. My camera requires a vertical flip so I use '2'.
  I haven't used this on 11.10 until today when I saw your message, but
  it seems to be working.

No working for me but @Luis Alvarado informs that it works, if this last one is working for you please don't forget to give credit to its author.

Good luck!


Ubuntu 14.04 Server does not boot right after initial installation

Ubuntu is trying to switch to a high resolution video mode for the console and your hardware isn't cooperating.

Fixing this while at the machine

When Grub2 shows up:

Highlight the menu item for Ubuntu and press e
Go to the line where it loads the kernel and press End to go to the end of the line
Add nomodeset
Press F10 or Ctrl-X to boot

With any luck it will boot into the login screen. This won't save that option but at least now you can edit the file for Grub2 and update it to save that option if it works.

Fixing this for good

Log in (ssh will probably do, if you know the machine's IP)
Update the grub config file:

sudo nano /etc/default/grub

Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT
Edit the line to include nomodeset. In my case, the line looked like this afterwards:

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

but you may also have other parameters such as quiet and splash, which don't need to be removed.
Save/exit nano
Run

sudo update-grub

Reboot


Installing as root vs installing with sudo

If you're talking solely about using the apt command, the two invocations are identical.  Other commands that may depend on environment variables and such could potentially act differently.


Err: processtart_wineboot failed to start wineboot, err 1359

I was running Wine 1.5.7 perfectly well on 12.04 but after an upgrade this morning I started getting the errors you describe. It was the 1.5.7-0ubuntu3-pulse18 versions that were the problem.

(EDIT: Thanks to swift work on the part of the Wine packaging team, you can now upgrade away from the troublesome version. Try that first before attempting the downgrade method below.)

Fortunately I still had the 0ubuntu2 versions in my cache so I could downgrade like so (I'm on 64-bit, so if you're on 32-bit the dpkg line will be different).

cd /var/cache/apt/archives/
sudo dpkg -i wine1.5_1.5.7-0ubuntu2~pulse18_amd64.deb wine1.5-amd64_1.5.7-0ubuntu2~pulse18_amd64.deb wine1.5-i386_1.5.7-0ubuntu2~pulse18_i386.deb
sudo apt-get -f install

Having done so Wine is working again. If you don't have these packages you can get them here:

https://launchpad.net/~ubuntu-wine/+archive/ppa/+build/3602432
https://launchpad.net/~ubuntu-wine/+archive/ppa/+build/3602433

In which case, run the dpkg command from where you downloaded them, rather than your apt cache.


Login screen looping after installing CUDA ToolKit on Ubuntu 12.04 LTS

I have found a solution to this problem.

A short and easy procedure to install CUDA Tool kit v5.5 in Ubuntu is given on this link:
http://www.youtube.com/watch?v=lVzSullC9l8

If you have any version of CUDA, then run this command: /usr/bin/nvidia-uninstall. Then, proceed with the installation. The Xorg settings, and blacklisting drivers are automatically taken care of during the installation. I have followed this procedure and I could easily install CUDA on my machine.


Ubuntu "1 time password on login" solution

Usually, this is avoided for security. It may be annoying, but it's better than a rogue program messing up your computer. The functionality you're describing is running as the root user, which is generally avoided like the plague (again, for security). There are some times when it's necessary, but you mostly will just have to stick with typing in your password each time. If you have a fingerprint reader, you can use that to authenticate quicker.


I need to install a epson tm-u950 printer on Ubuntu 12.04 LTS

Firstly I visited https://pos.epson.com/developers/techresdetails.htm?productpk=554 and downloaded the file from there at a painful 164KB/Sec. Everything there was for Windows!

Next I went to http://www.posmicro.com/recprinters/epson/epson%20drivers.htm No Joy!

After a lot more hunting around, I found http://www.javapos.com/devices.html May be of interest (go to section 4) JavaPOS ADK 1.82 supports the TM-U950 and can be installed on a Linux platform.

As I do not have this printer, I could be barking up the wrong tree!

I hope that this is of some help to you.


Nvidia Drivers break several hot-keys on Ubuntu 14.04

Clean installing Ubuntu trusty, installing all the updates, then installing bumblebee seems to have solved the problem.

nvidia-prime must have been causing the x not starting issues, and now bumblebee is working, so I can use my nvidia and still have my hotkeys.


You may use LogicalDOC http://www.logicaldoc.com in combination with a multi-function printer or a document scanner.

In this way, the printer or the scanner might scan the documents and produce the PDF files.

The MFP (multi-functional-printer) will place the PDF documents on a network shared folder.

Subsequently LogicalDOC Business can acquire the PDF files from the network shared folder and proceed with the indexing of documents.

So LogicalDOC business may fulfill the following requisites:
2, 3, 4 (you can configure easily the backup), 5, 6, 8

With regard to the automatic categorization of the documents it is possible to define multiple import folders and specify a document type for each folder, so with a little effort you can enable the automatic categorization of documents


Will Ubuntu touch have this transparency effect?

I don't normally post on concept art but this looks fantastic I think Ubuntu apps should have a theming options where youcan choose the ccolour scheme.

Side note dunno why it doesn't look this nice on sailfish OS didn't think I'd like this.


Sounds like you need to detect your installed OSs again. Boot into your normal Ubuntu, open a terminal and run

sudo update-grub

That should detect all installed operating systems and update your grub accordingly. Windows should be there next time you reboot, as long as you see a line similar to this in the output:

Found Windows XP (loader) on /dev/sda2


How can I increase the dots per inch of a PDF file?

Well, there are several options.

Option 1:Online websites which you can use to change the DPI.

https://www.pdf-online.com/osa/optimize.aspx

https://pdftojpg.me/

Option 2: Using convert command form ImageMagick

convert -density 200 -trim test.pdf -quality 100 test.jpg

Option 3:Using ghostscript

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress-dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf


In your post title and text you write "naulitus", which is a typo, it should be "nautilus" (replace the "l" and "t").

When you run gksu nonexistentcommand or sudo nonexistentcommand, the system still asks your password and print an error message after. If you launched gksu nonexistent from a terminal you would see this error message, if you launch by other means then you might not see an error message, just nothing would happen, like you described.

It might be easier and safer to do change the permissions of a file using the sudo chmod and sudo chown commands in a terminal, for example:

# make a file readable
sudo chmod +r /path/to/file
# make a file executable
sudo chmod +x /path/to/file

If you use gksu nautilus, then after you changed the permission, you might forget to close the nautilus window with superuser permissions open, and you might accidentally do something dangerous in it.


Can I install LAMP and some IDE on my USB device?

Install a LiveCD distribution on your USB stick and boot the PC using this USB stick. Some LiveCD distributions are easily customizable so you that can include LAMP/IDE in them.

If booting on the USB stick is not an option, please tell us which OS/version the PC is running.

The most reliable is probably to store a VM image on the USB stick, but that might be slow to start/run/stop.


Lost directory is using space. How do I find, and delete it

You really shouldn't mount another filesystem on top of an existing populated directory.  You might have to manually merge new home dirs with old home dirs... it can get messy.  You are right that if you copied the contents... instead of moving them... the data is still there.  You could kick all the users off... switch to single-user-mode (root only) unmount the volume on top of /home... delete the contents of /home (or move to somewhere else for archiving purposes)... remount the disk... and all should be happy again.


How do I restore multiboot function on WinXP/Ubuntu Hard drive?

You have probably overwritten your bootsector. Try to use the Supergrubdisk. If that for some reason does not work, you can try the guide from the german ubuntu users wiki:

http://wiki.ubuntuusers.de/GRUB#Methode-2-root-directory-Variante

Start from a Ubuntu installation CD (or any other linux that runs from CD like knoppix). Then mount your Ubuntu root partition from the HDD to some folder, for instance /mnt. If you have a separate /usr, /boot or /etc partition, please mount it in the corresponding subfolder of the root parition (so if root is mounted at /mnt, then boot should be at /mnt/boot and so on). When finished, you can simply "sudo grub-install --root-directory=/mnt /dev/sda" (of course only if your hdd is sda).

If the last step doesn't work, because your installation is too outdated, you should still be able to use the chroot-method also given at ubuntuusers.de: Mount the root and boot partition as written above and bind the /dev directory so that you also have it available within the mounted root partition (assuming the root partition is mounted at /mnt):

sudo mount -o bind /dev /mnt/dev

Same for /sys and /proc

sudo mount -o bind /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc

Now you can chroot

sudo chroot /mnt /bin/bash

And you should be ready to run "grub-install /dev/sda". It's also a good idea to run "update-grub" afterwards.


I think you don't the the "end" syntax in the end of your lua script. Just remove it.

It's for something like "if", "functions" and "for" loops.

References:

https://stackoverflow.com/questions/22993973/eof-expected-neard-end
http://www.lua.org/pil/contents.html


The way you try to do that will rather not work - but I think rewrite module and rewriting rules may be interesting for you.


How to set mysql database name and password in juju charms?

There is currently no configuration option to change the username and password automatically via Juju, so you have to do it by hand.

According to the MySQL Charm README:

  Once deployed, you can retrieve the MySQL root user password by logging in to the machine via juju ssh and readin the /var/lib/mysql/mysql.passwd file. To log in as root MySQL User at the MySQL console you can issue the following:

juju ssh mysql/0 mysql -u root -p`sudo cat /var/lib/mysql/mysql.passwd`


Unable to log in into Ubuntu 17.10 after Nvidia driver rollback

I had the same problem with you.
And I solved it by

sudo apt-get purge nvidia*

in the recovery mode.

Honestly, it is not the best way to solve the issue, but it seems to be the only way.


dmenu as such does not recognize aliases, files, desktop files, etc. It only works with what you feed to it. Could be "Yes", "No", "Maybe". Could be a list of email addresses. Could be a list of programs. dmenu comes installed with a script dmenu_path, which is actually a script.

Execute cat $(which dmenu_run) to see the one-liner they use. Separated by the pipe symbols, you see the three steps:

Generate a list to standard output;
Pipe that list to dmenu, which shows the list as choices. dmenu spits out the choice you made to standard output, and
something is done with the output. For 1., a second script dmenu_path is called that creates the list: use cat $(which dmenu_path) to study that script.

Aliases are not intended to use in scripts. Try making a bash script: the script will not find your alias. See here for a plethora of options on how you can use what you defined in an alias in a script.


mySQL not reading max_connections configuration

In Ubuntu 16.04 the limits for the MySQL service are defined in the Systemd configuration file. To force MySQL read the value defined in your mysqld.cnf edit the service config:

sudo systemctl edit mysql.service

Add the following lines then save the file:

[Service]
LimitNOFILE=infinity

Restart the service:

sudo systemctl daemon-reload
sudo systemctl restart mysql.service

MySQL should use now the value defined in you config files.


The 'required' key is a peer to the 'properties' key.  When your schema contains an object it gets it's own properties and required keys (among the others).  You can update your actions.yaml like this and it should work:

create-root-cert:
  description: "Generate a Root CA Certificate"
  params:
    subject:
      type: object
      description: "Relative Distinguished Names (RDNs)"
      properties:
        cn:
          type: string
          description: "Common Name"
      required: [cn]

Notice 'required' is indented and the required field name is local, rather than scoped under 'subject'


Short answer: you can't.
Longer answer: What you see is the default Gnome Dash in the Application Overview. The size of the icons is automatically determined. There is no user exposed way to adjust the size of these icons: adjusting this would require inspecting and editing source code.
The size of the icons automatically is reduced when more icons are present on the dash. A workaround therefore could be to put more favorites on that dash. Icons would be smaller, but you would be starring at an entire column of icons in that scenario.
If the Dash annoys you and you would be fine not seeing it anymore ever, then there are Gnome Shell extensions that can hide the Dash.


How to use python 2 for certain installed application while keeping python 3 as default

As an alternative you can install newer version of Terminator from Ubuntu 20.04 LTS by:
cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/t/terminator/terminator_1.91-4ubuntu1_all.deb
sudo apt-get install ./terminator_1.91-4ubuntu1_all.deb

or from upcoming 21.04:
cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/t/terminator/terminator_2.1.0-1_all.deb
sudo apt-get install ./terminator_2.1.0-1_all.deb

It depends on Python 3, so should work with it.


Ubuntu Mate battery charge indicator disappears after reboot

Just found this and had a similar problem as a first-time Linux laptop user. In my case, the nature of the disappearance is easily rectified by adjusting the size of the panel up one pixel, and then back down one pixel to what I want. I wish I knew why it was doing that. I wish I didn't have to do that. But it's how I fixed it.


MSI GS65 Stealth Thin 8RE less than symbol printing ç symbol

WorkAround

from the outputs you provided, both the physical keys are with same keycodes, thus changing the keysymbols for each key will result in same keysymbol.

  This is the output I get when typing any of the physical keys < or ç

$ xev | grep keycode
    state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
    state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
$ xev | grep keycode
    state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
    state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,

So we need to assign different keycode to any of the physical keys < or ç

So decide which physical key keycode to be changed first out of the two.
run xmodmap -pke and choose any empty keycode

example:

keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth NoSymbol XF86Bluetooth
keycode 246 = XF86WLAN NoSymbol XF86WLAN NoSymbol XF86WLAN
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 = XF86WWAN NoSymbol XF86WWAN NoSymbol XF86WWAN
keycode 255 = XF86RFKill NoSymbol XF86RFKill NoSymbol XF86RFKill

I will choose 248 here.. now the trick is to deduct 8 from xmodmap keycode to use with setkeycodes which is 248-8=240

Refer to man setkeycodes and https://unix.stackexchange.com/a/52949

logon to any tty and run showkey --scancodes press the key and grab the scan code. in my case it is 0x2b but only 2b to be considered.

Refer to man showkey

run sudo setkeycodes 2b 240 this means when we run xmodmap the physical key which we selected shows keycode of 248
change to Desktop from tty

check with xev | grep keycode and press the physical key.

Example:

pratap@pratap:~$ xev | grep keycode
    state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    request MappingKeyboard, first_keycode 8, count 248
    state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
    state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
pratap@pratap:~$ xmodmap -e "keycode 248 = ccedilla Ccedilla"
pratap@pratap:~$ çççççççççççççç

Now both the physcial keys have different keycodes which you can map to any keysym you want.. lets say keycode 51 and keycode 248

run below commands:

xmodmap -e "keycode 51 = less greater"
xmodmap -e "keycode 248 = ccedilla Ccedilla"

All the changes will not stay after a reboot.., So xmodmap commands you can keep in startupapplications preferences and please follow the link provided https://unix.stackexchange.com/a/52949 for setkeycodes command.

Note: Tested in Ubuntu 19.04 but not with the keyboard type in the Question.


Proper way to let user enter password for a bash script using only the GUI (with the terminal hidden)

The -A sudo option allows you to specify a helper program (in the SUDO_ASKPASS variable) that will ask for the password.

Create a script to ask the password (myaskpass.sh):

#!/bin/bash
zenity --password --title=Authentication

Then insert this line at the beginning of your script:

export SUDO_ASKPASS="/path/to/myaskpass.sh"

and replace all occurences of sudo <command> with:

sudo -A <command>

You can use whatever password asking program you want instead of zenity. I had to encapsulate it within a script because SUDO_ASKPASS must point to a file, so it won't work with the --password option required by zenity.

The above works like a charm if it runs from command line or if you choose Run in terminal after double click the script file in the file manager, but if you choose Run or try to launch it from a .desktop file every sudo will ask for the for password again.

If you don't want a terminal window at all, you can store the password in a variable and pipe it to sudo -S. Maybe there's some security concerns, but I think it's pretty safe (read the comments on this answer).

Insert this line at the beginning of your script:

PASSWD="$(zenity --password --title=Authentication)\n"

and replace all occurences of sudo <command> with:

echo -e $PASSWD | sudo -S <command>


Why is user "lightdm" trying to log into my SBS 2003?

lightdm is a session manager and a user, lightdm runs as the lightdm user which has root privileges.

From /etc/passwd:

lightdm:x:104:112:Light Display Manager:/var/lib/lightdm:/bin/false

I'm curious what you mean by "trying to login" though, can you explain more?


sbuild errors "but it is not going to be installed"

My best guess here is that those package are either not available in the repo or not compatible with the dependencies. You can try adding a repo which can satisfy all the dependencies of that package.


There's an option inside the console where you should be able to just re-enable it if someone turned it off. It's under the monitoring section like you said. Or you can reinstall the plug altogether by going in the plug-ins section and reinstalling it again.


Okay found the solution.

The ssh-agent wasn'T aware of the keys. I wonder why. So reading here:
[stackoverflow.com/questions/26505980/…

I did:
ssh-add <path-to_key>

Then I could issue the git commands.


How to launch applications at start (NUC/Ububtu 16.04)?

I know this is a year old, but I was trying to figure this out yesterday (exactly a year after this question was asked) and today. I finally figured it out after a million (slightly exaggerated) Google searches. I found the solution here which says to add the following conditional in the ~/.profile file:

if [[ "$(tty)" == "/dev/tty1" ]]; then
  # do whatever you want here
fi

You can change tty1 according to your specific needs. And, of course, replace the comment with the command or script that you would like to run. This solution works perfectly for me on Ubuntu Server 18.04.3.


Ubuntu 16.04 - Wireless xbox 360 controller not detected by ubuntu/reciever

If you, like me, bought a damn cheap fake adapter, I think this will help you:

sudo xboxdrv --device-by-id 045e: 02a9 --type xbox360-wireless -l 6

How to make a launch without sudo I have not figured out yet. I think it is necessary to give the rights to start the user.

Perhaps, instead of 045e:02a9, you need to substitute your value. You can recognize it with the lsusb command.


HDMI Issue with Lenovo Thinkpad X1 Extreme

Thinkpad X1 Extreme HDMI port is wired up to the discrete GPU card (NVIDIA). You must be using the nvidia drivers to be able to use the port. If you are using the UHD 630 GPU, it is not possible to see the external HDMI port.


install Ubuntu on a Mac book single boot

To install Ubuntu on your computer you'll either need an external hard drive or an Ubuntu DVD/CD. Then you simply pop the CD in, and hold Option down at boot. This will give you a list of available boot devices. Select your CD, and you are set! (Don't fully partition your hard drive for Ubuntu if you want a Windows install later on, but be warned Windows 7 takes about 20GB of space, and on 80GB that is 1/4th of your hard drive!)

https://help.ubuntu.com/community/MacBook - Info on your specific macbook (I couldn't find a 2006 macbook with your specs)

http://www.ubuntu.com/download/desktop/burn-a-dvd-on-windows - Burning an Ubuntu disk on Windows


From this page, I read:

OK then it's clear: what's missing is
 X-KDE-Protocols=http,ftp,smb

in vlc's .desktop file.

You may wish to try that.


lightdm-gtk-greeter keeps loping into login screen

Contents of ~/.xsession-errors:

Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
/usr/sbin/lightdm-session: 5:/home/altaf/.xinputrc: Syntax error: newline unexpected

It shows us that the problem is caused by a syntax error in the file ~/.xinputrc. That file was created by im-config, but has apparently been edited accidentally. Rather than trying to fix the syntax error, it's easiest to simply delete ~/.xinputrc. It will be re-created when needed.


What is a .bashrc file and what does it do?

The .bashrc file is a script that is executed whenever a new terminal session is started in interactive mode. This is what happens when you open a new terminal window by pressing Ctrl+Alt+T, or just open a new terminal tab.

By contrast a terminal session in login mode will ask you for user name and password and execute the ~/.bash_profile script. This is what takes place, for instance, when you log on to a remote system through SSH.

The .bashrc file itself contains a series of configurations for the terminal session. This includes setting up or enabling: colouring, completion, the shell history, command aliases and more. The .bashrc file distributed with Ubuntu is well commented and you will be able to understand most of what it does just by reading it.

You can tweak .bashrc to your liking. Here you can get an example with many extra features.


When using light, try adding yourself to the video group

sudo usermod -a -G video yourusername


Why does scp get stalled? How do I resolve it?

This happens because scp is trying to grab as much bandwidth as possible, and any delay (by a firewall, etc.) can stall it. Limiting the bandwidth (with -l option) will fix it.

For example, you might want to limit the bandwidth to 1 MB/s (= 8192 Kbits/s):

 scp -l 8192 <file> <destination>

Source: http://www.aixmind.com/?p=1371 - Wayback Machine


Is it safe to init a Mercurial repository on /etc?

I would say "Yes!" and redirect you to etckeeper.

Even though the LTS server guide uses bzr, etckeeper is more versatile. From man etckeeper:

etckeeper - store /etc in git, mercurial, bazaar, or darcs

I personally use it with git. etckeeper will set up a repository when you install it, if it finds that /etc/ is not under version control, and use bzr by default. So create /etc/etckeeper/etckeeper.conf before hand, and set Mercurial as the preferred VCS system:

VCS="hg"

There are other variables set in that configuration file, so you might want to test it out on a system and then copy over the configuration.


Bash is printing (only) one of my aliases before every prompt

I found the solution here: https://stackoverflow.com/questions/9652126/bashrc-profile-is-not-loaded-on-new-tmux-session-or-window-why and here: https://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically

I needed to add source ~/.bashrc to the end of my .bash_profile.


Why has my xkb/symbols/pc modification been only half successful?

You should avoid to edit package owned files such as xkb/symbols/pc, and in this case it's probably not needed.

I think that the ctrl:swapcaps option may be what you are looking for. The applicable man page is man xkeyboard-config.

To test in you current session if that does what you want, run this command:

setxkbmap -option ctrl:swapcaps

To change it persistently, open the /etc/default/keyboard file for editing and change the line

XKBOPTIONS=""

to

XKBOPTIONS="ctrl:swapcaps"


Why does xrandr give me errors if I try and use commands on my computer, but not if I ssh into it?

"crtc 0 failed" error is happening when I run my xrandr command (on ubuntu server) because the server terminal does not connect to a display. BUT when I ssh (using ubuntu 16) into it I am using a graphical interface there for it connects to a display.

To solve this you must write a .conf file in your /usr/share/X11/xorg.conf.d Directory

Here is an example of mine. I also set my resolution to 4k

Section "Monitor"
   Identifier "Monitor0"
   Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
   Modeline "3840x2160_30.0" 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
   Modeline "4096x2160_24.0" 297.00 4096 5116 5204 5500 2160 2168 2178 2250 +hsync +vsync
EndSection
Section "Device"
   Identifier "Device0"
   Driver "intel"
EndSection
Section "Screen"
   Identifier "Screen0"
   Device "Device0"
   Monitor "Monitor0"
   DefaultDepth 24
   SubSection "Display"
      Depth 24
      Modes "3840x2160" "1920x1080"
   EndSubSection
EndSection

Here is where I found my information on how to create it
 https://wiki.gentoo.org/wiki/Xorg/Multiple_monitors


CPU overheating (Acer 4730z + Ubuntu 12.10)

90° C is high, but is still within range.  According to Intel you processor is rated at 100° C.

Now the fact that you said the you've been running window for 4 years, I'm sure that the unit has accumulated its share from dust.  My suggestion try to clean the CPU fan with some compressed air, I think it will help.


Bluetooth seems to be feeling blue. How do I make it work?

Try installing blueman bluetooth manager from the software center. It worked for me.


Ubuntu reboot fails - reboot or select proper boot device

Is your (hard or whatever, flash, etc) system drive there? Does it work?

From the boot repair output, the only drives are an ISO in sr0 (dvd) and the live filesystem's ram drives...

I think these next two are EFI related & only 1.5GB, too small for a system drive:

1:2048B:6143B:4096B::Apple:;
2:1539MB:1542MB:2392kB::EFI:;]

So, looks like it can't see your system drive, it must be gone / unplugged or broken :(


Nautilus: Custom Action on selected files via keyboard short-cut

Running actions on selected files

The answer below will first literally answer your question;

  how to call a script and use the currently selected files as arguments [1].

However, the accepted answer in the linked question uses nautilus scripts, which take files as arguments from nautilus. That does not work from a shortcut, only when right-clicked in nautilus. In [2], I therefore added the functionality of the scripts from the linked question to the answer, so you only need to run either one of them (in [2])  from a shortcut.

[1] For 16.04 and higher*, running a script with selected files as arguments

You can simply use the short script below. It will "read" the currently selected files and run your script with the files as arguments.

#!/usr/bin/env python3
import subprocess
import pyperclip
import time

time.sleep(1)
subprocess.call(["xdotool", "key", "Control_L+c"])

for item in pyperclip.paste().splitlines():
    subprocess.Popen(["/path/to/script", item])

To use

install python3-pyperclip and xdotool:

sudo apt install python3-pyperclip xdotool

Copy the script above into an empty file, save it as run_withselected.py Replace in the script

"/path/to/script"

by the actual path to the script you want to run. Use absolute paths, in quotes.
Add it to a shortut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/run_withselected.py

[2] However

Note that the linked nautilus script from the other answer will not run like this however, since it retrieves its arguments in another way from nautilus directly. I therefore combined the functionality of the script from the linked question, with the one above.

You don't need the other script(s) from the other answer anymore then.

A. Designate files by changing the name

select files

press shortcut to mark (toggle) the files

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

time.sleep(1)

def npath(p, f):
    return os.path.join(p, f)

subprocess.call(["xdotool", "key", "Control_L+c"])
for item in pyperclip.paste().splitlines():
    data = item.rsplit("/", 1); path = data[0]; name = data[1]
    newname = name[2:] if name.startswith("*0") else "*0"+name
    shutil.move(npath(path, name), npath(path, newname))

B. Designate files by creating a link in a "favorites" directory

select files

press shortcut to create (toggle) a link in "My_Favorites"

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

fav = os.path.join(os.environ["HOME"], "My_Favorites")

try:
    os.mkdir(fav)
except FileExistsError:
    pass

time.sleep(1)

subprocess.call(["xdotool", "key", "Control_L+c"])
for item in pyperclip.paste().splitlines():
    name = item.rsplit("/", 1)[-1]
    link = os.path.join(fav, name)
    try:
        os.symlink(item, link)
    except FileExistsError:
        os.remove(link)

To use (either one)

the scripts needs python3-pyperclip and xdotool:

sudo apt install python3-pyperclip xdotool

Copy the script above into an empty file, save it as toggle_selected.py
Add shortut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/toggle_selected.py

Explanation

The script uses xdotool to virtually press Ctrl+C
Subsequently, the script (internally) creates a list of selected files:

pyperclip.paste().splitlines()

These files are subsequently used as arguments to either rename the files:

for item in pyperclip.paste().splitlines():
    data = item.rsplit("/", 1); path = data[0]; name = data[1]
    newname = name[2:] if name.startswith("*0") else "*0"+name
    shutil.move(npath(path, name), npath(path, newname))

or create a symlink:

for item in pyperclip.paste().splitlines():
    name = item.rsplit("/", 1)[-1]
    try:
        os.symlink(item, os.path.join(fav, name))
    except FileExistsError:
        os.remove(link)

The time.sleep(1) finally is to make sure "real" key press does not interfere with the simulated keypress by xdotool.

Notes

In the linked answer, the second script creates the link, but does not toggle. I made answer "B" also toggle the existence of the symlink.
If it were for a published application, I would combine A and B into one script, and decide what action to take in a settings file. I might add that later.

*14.04

...will require a different procedure for installing pyperclip:

sudo apt-get install python3-pip xdotool
sudo pip3 install pyperclip


nzsql: error while loading shared libraries: libcom_err.so.2: wrong ELF class: ELFCLASS64 on Ubuntu 18.04

You should confirm this by running

file /usr/local/nz/bin/nzsql

but it's likely your netazza application is a 32bit application on an x86-64 (i.e. 64bit) installation; you will need to install the 32bit version of libcomerr2 like so:

sudo apt install libcomerr2:i386

as well as for any of the other system libraries it depends on.


How can I hide and protect devices in Dolphin (and other places in KDE)?

You just need to check the Hide 111.8 GiB Hard Drive checkbox, and dolphin will not display that drive any more.