Issue for restricting SSH access from a Windows AD Group (using sssd)

I can give an example.  In our sssd.conf, we start with the general ldap_search_base parameter. You need to know the names of the acceptable user categories, but suppose this one lets in everybody from your organization

ldap_search_base = ou=friends,dc=ou,dc=edu???ou=groups,dc=ou,dc=edu??ldap_group_name = uid

These are written in an impossibly long line. I don't know how to punctuate them.

To limit the range of users that can get in, we add ON THE END additional requirements. This says we don't want to allow people who are not current employees (no oldWorkers in personPrimayAffiliation) and the user accounts have to be found in any of the groups that begin "grpname_" or "project_admin".

ldap_search_base = ou=friends,dc=ou,dc=edu??(!(personPrimaryAffiliation=oldWorkers))?ou=groups,dc=ou,dc=edu??(&(objectClass=posixGroup)(|(cn=grpname_*)(cn=project_admin)))

The key bit here is that you need to know the magic words that your organization server uses to refer to users and groups. Start with the general thing that lets everybody in, then add restrictions.

Our config file has krb5_realm and krb5_server similar to yours.  Maybe this won't exactly help  your case, but perhaps it gives you a hint.


Problems with NAT Adapater since upgrade to Ubuntu 12.10

Known bug of (K)Ubuntu 12.10.
Try the following two command lines :

VBoxManage modifyvm "name" --natdnshostresolver1 on
VBoxManage modifyvm "name" --natdnsproxy1 on

if that does not work, install virtual box 4.2 :

Uninstall virtualbox from your computer

sudo apt-get remove virtualbox

also uninstall the guest-addition iso as the 4.2 version contains a new one :

sudo apt-get remove virtualbox-guest-additions-iso

Download and install virtual box 4.2

echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-4.2

When running virtualbox the first time it will ask you to update guest-addition module with the one downloaded.

Enjoy !


First check whether the router you want to hack have enable wps or not using this code;

wash -i wlan1mon

If wps lock is "no" then only reaver can crack the  password, but if it is locked you cannot use reaver.

You may have different interface instead of "wlan0mon" like wlan0,mon0 etc.


Aria2 download from FTP from a list of URL

From man aria2c

--ftp-user=<USER>
      Set FTP user. This affects all URIs.  Default: anonymous

--ftp-passwd=<PASSWD>
      Set FTP password. This affects all URIs.  If user name is embedded  but  pass‐
      word is missing in URI, aria2 tries to resolve password using .netrc. If pass‐
      word is found in .netrc, then use it as password. If  not,  use  the  password
      specified in this option.  Default: ARIA2USER@

So you can use something like this

aria2c -j5 --ftp-user=yourname --ftp-passwd=password --input-file=list.txt

Another way may be gnu parallel(check man parallel for more details):

cat list.txt | parallel -j5 wget --user=mylogin --password=mypassword -P /home/ftp


Switch user after upgrade to 14.04 not working

I had the same problem and the problem was the display manager. I previously had "gdm" and solved my problem by switching to "lightdm" Display Manager.

Run:

sudo dpkg-reconfigure lightdm

In my case I had "gdm" selected and I selected "lightdm" instead. Reboot and login again. Now, account switching should work both while logged in and from the lock screen.

Potentially you need to install lightdm.

sudo apt-get install lightdm

My machine was initially installed as a 12.04 server, and then I added Unity and finally upgraded to 14.04.1.


How to triple boot Ubuntu 14.04 and freeBSD 10?

You must add at the Grub2 menu, Freebsd.

Open a terminal,Press Ctrl+Alt+T
Run it:

$ sudo -i
# nano /etc/grub.d/40_custom

In the file you need to add these lines:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "FreeBSD" {
    insmod ufs2
    set root=(hd0,1)
    chainloader +1
    }

Ctrl + O, save file. Ctrl + X, close nano.
Now just need to update the Grub

# update-grub

Note: Change these parameters:
set root=(hd0,1)
That apply to your installation of FreeBSD


lsblk (List Block)
You can use lsblk command:
$ lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL
NAME        FSTYPE LABEL                 MOUNTPOINT     SIZE MODEL
sdb                                                   186.3G 2105
├─sdb2      ntfs   S3A6550D005           /media/rick/ 178.9G
├─sdb3      ntfs   HDDRECOVERY                            6G
└─sdb1      ntfs   TOSHIBA SYSTEM VOLUME                1.5G
sda                                                   931.5G HGST HTS721010A9
├─sda4      ntfs   WINRETOOLS                           450M
├─sda2                                                  128M
├─sda5      ntfs   Image                               11.4G
├─sda3      ntfs   HGST_Win10            /mnt/d         919G
└─sda1      vfat   ESP                                  500M
nvme0n1                                                 477G Samsung SSD 960 PRO 512GB
├─nvme0n1p5 ext4   NVMe_Ubuntu_16.0      /             44.6G
├─nvme0n1p3                                              16M
├─nvme0n1p1 ntfs                                        450M
├─nvme0n1p6 swap   Linux Swap            [SWAP]         7.9G
├─nvme0n1p4 ntfs   NVMe_Win10            /mnt/c       414.9G
├─nvme0n1p2 vfat                         /boot/efi       99M
└─nvme0n1p7 ntfs   Shared_WSL+Linux      /mnt/e           9G

You can see my NVMe SSD is a Samsung SSD 960 PRO 512GB
Create an alias for arguments
As pointed out in comments a typo was made for MODEL and the output was incomplete. To avoid that in the future and more importantly so you don't have to remember the arguments create an alias in ~/.bashrc called lsdrv which you can use all the time:
$ cat ~/.bashrc | grep lsdrv
# Create lsdrv version of lsblk without UUID's
alias lsdrv="lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL"

Now in the terminal you can simply use lsdrv to see all your drives complete with model number and other useful information.
Voltage / Power
This is pretty much irrelevant. The deciding factor is M.2 22x80 mm size or a different size. Also whether if it is Gen 3 x 2 or Gen 3 x 4 speed (the second is twice as fast).
For example I have two M.2 SSD bays the first one supports Gen 3 x 4 speeds the second one only supports Gen 3 x 2 speeds because there are a limited number of PCIe lanes on the Skylake chipset.
There may be other issues but this is what I remember off the top of my head. You should of course do your own research.
Basically you need to know the make and model of your computer to know the make and models of the M.2 NVMe SSDs you can install in it.


Cant install boot-repair or OS-uninstaller

Ubuntu 19.10 Live (USB/CD) causes a similar issue, with a different dependency. The cause is the universe repository not being enabled, and the python dependency not being found.

This is easily fixed using:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

and then attempting to install boot-repair again.


Remove ubuntu-online-account after an upgrade

This is/was driving me crazy as well, I couldn't get rid of the uoa accounts in Evolution and the popups asking for the passwords.

Finally I found some files in my Evolution settings where account or other data sources are defined:
Path: ~/.config/evolution/sources

some files did contain account information like this example:

[Data Source]
DisplayName=yahoo (*<login>*)
Enabled=true
Parent=

[Ubuntu Online Accounts]
AccountId=0

[Collection]
BackendName=yahoo
...

After changing the all the "Enabled=true" lines to "Enabled=false" the popups stopped appearing even though the accounts were still visible in Evolution account settings. After removing the files the account information did disappear completely.

Of course I tried several other things before and maybe some of them did play a part as well so here is a few more things I tried before.
Checked and edited the following files:

~/.config/signond/signon.db
~/.config/libaccounts-glib/accounts.db
~/.config/goa-1.0/accounts.conf (as the name suggests this is probably used for GOA accounts only)
Did cleanup up a plethora of obsolete packages from previous ubuntu versions.

Hope this helps


Difference between OEM install and custom Ubuntu image

The OEM Install

The OEM install allows machine by machine customization.
It does not create an ISO image, but customizes a single machine.
Customization is done at the stage of installation.

Advantages

Do not require a custom iso.
Each machines can have different customization.
Suitable for small number of customized machines, each with its own
set of customization.
Also suitable for uncustomized machines where user gets to setup her
own settings.

Disadvantages

If each machine needs to be customized the same way, they still have
to be done individually at the time of install and thus, will take
longer.
You will need some other tools to create an iso image.

Custom Ubuntu Image

On the other hand custom Ubuntu Image allows making a single
customized iso.
Copy it in multiple CD/DVD/USB
Deploy the same image in multiple machines quickly.

Advantages

Suitable for large volume deployment of identically customized
machines.

Disadvantage

Requires an extra step of creating and testing a custom iso
image. May not be worthwhile for one or two machines.


The Python package Kate Plugins contains a JSlint. The link given also has installation instructions.

Personally, I prefer the cross-platform Sublime Text 2 editor.


Disabling "back" for a Logitech trackball

I think the option you're looking for is ButtonMapping.  I had a similar annoying feature with my mouse ( https://www.kensington.com/en/no/4493/k72327eu/slimblade-trackball ), so figured this out a while ago.

The "EmulateWheelButton" option still should work even if you disable the button or reassign the mapping...

Now, I've only tested this with xinput on evdev.  It's a lot quicker to try things out with xinput and then you could just add a script to your "Startup Applications" instead of having to modify /etc/X11/ and restart X over and over.

So this should be all you need in xorg.d/mouse.conf (the commented out lines are what should be needed if you don't want to use a login script to do this per user), though you might not need this at all if you use xinput:

Section "InputDevice"
    Identifier  "Configured Mouse"
    Driver    "evdev"
    Option    "Device"                "/dev/input/mice"
    Option    "Protocol"              "auto"
    #Option    "EmulateWheel"          "1"
    #Option    "EmulateWheelButton"    "8"
    #Option    "ButtonMapping"        "1 2 3 4 5 6 7 0 9 10 11 12"
EndSection

Here's what I did to figure out my solution (replace my device with your device in the following commands obviously):

Show devices:

$ xinput list
Virtual core pointer                        id=2    [master pointer  (3)]
  ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
  ↳ ELAN Touchscreen                            id=11   [slave  pointer  (2)]
  ↳ SynPS/2 Synaptics TouchPad                  id=13   [slave  pointer  (2)]
  ↳ Kensington Kensington Slimblade Trackball   id=18   [slave  pointer  (2)]

See what properties are supported for that device:

$ xinput list-props "Kensington Kensington Slimblade Trackball"
Device 'Kensington Kensington Slimblade Trackball':
    Device Enabled (142):        1
    Coordinate Transformation Matrix (144):        1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (273):        0
    Device Accel Constant Deceleration (274):        1.000000
    Device Accel Adaptive Deceleration (275):        1.000000
    Device Accel Velocity Scaling (276):        10.000000
    Device Product ID (260):        1149, 8257
    Device Node (261):        "/dev/input/event17"
    Evdev Axis Inversion (277):        0, 0
    Evdev Axes Swap (279):        0
    Axis Labels (280):        "Rel X" (152), "Rel Y" (153), "Rel Vert Wheel" (573)
    Button Labels (281):        "Button Left" (145), "Button Middle" (146), "Button Right" (147), "Button Wheel Up" (148), "Button Wheel Down" (149), "Button Horiz Wheel Left" (150), "Button Horiz Wheel Right" (151), "Button Side" (679), "Button Unknown" (263), "Button Unknown" (263), "Button Unknown" (263), "Button Unknown" (263)
    Evdev Scrolling Distance (282):        1, 1, 1
    Evdev Middle Button Emulation (283):        0
    Evdev Middle Button Timeout (284):        50
    Evdev Third Button Emulation (285):        0
    Evdev Third Button Emulation Timeout (286):        1000
    Evdev Third Button Emulation Button (287):        3
    Evdev Third Button Emulation Threshold (288):        20
    Evdev Wheel Emulation (289):        1
    Evdev Wheel Emulation Axes (290):        0, 0, 4, 5
    Evdev Wheel Emulation Inertia (291):        10
    Evdev Wheel Emulation Timeout (292):        200
    Evdev Wheel Emulation Button (293):        8
    Evdev Drag Lock Buttons (294):        0

Now let's give it a shot:

$ xinput set-button-map "Kensington Kensington Slimblade Trackball" 1 2 3 4 5 6 7 0 9 10 11 12
$ xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation" 1
$ xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Button" 8

Now my top right button only works as auto-scroll instead of the infuriating back behavior!


The systemtray( right top system bar) coming with a blank button, how to fix it?

That looks like it is an application indicator. You have some process running which is adding the indicator. Find and terminate the process which is providing a blank indicator, and it will go away.


Unable to Install Viber due to missing libssl1.0.0 package

for all the people out there who do not like to install the flatpak version and want to stick to the deb version, there is another way: since new versions of Ubuntu are shipped with libssl1.1 or have this package in their repositories, viber.deb can be tinkered to state libssl1.1 as a dependency.

I cannot guarantee 100% that all dependencies are met, but retro-compatibility should function. I have also applied this method and so far I do not have any problem on Xubuntu 19.10.

Here is a short walkthrough:

Ensure that libssl1.1 is installed:

sudo apt install libssl1.1

Note: if a newer version of libssl is available, this should be used further on on step 4.
Download viber.deb from the Viber webpage and copy it to a temp folder. I have used /home/<user>/temp for this.
Now we need to make some changes to the package, following this guide.

mkdir viber
cd viber
ar x ../viber.deb
tar xzf control.tar.gz

Line by line this does the following:

Creates a new folder named viber.
Moves to the new folder.
Unpacks viber.deb.
Unpacks control.tar.gz.

Now we need to change dependencies:

Open the control file with a text editor.
Change on line 6: libssl1.0.0 to libssl1.1.

Note: in case of newer version of libssl use the new version (see step 1!).
Save the file and exit.

Repackage the .deb file.

tar --ignore-failed-read -cvzf control.tar.gz {post,pre}{inst,rm} md5sums control
ar rcs viber-new.deb debian-binary control.tar.gz data.tar.gz

Install the new deb:

sudo dpkg -i viber-new.deb

Voila!


Ubuntu 14.04-Windows 10 dual boot makes windows hang

Can't write comments to your main question due to low reputation points. I wanted to tell you that (or at least it used to be) windows will boot fine when it sees its partition as "active".

Let's say you're going to install Windows: First you boot onto your disk and this will report an error about "missing operating system". Perfect! at this point the disk/partition is marked as Active. Now you can reboot and continue installing Windows. Windows bootloader will be installed on that disk.

Linux does not care. You can install its bootloader on a old floppy if you wish..

But this is probably a cause why your Windows have difficulties booting when another disk is inserted.


Upgrade/backport evolution to latest version

There is an exising Launchpad bug report requesting a backport of Evolution v2.32 to 10.04.

The backport is not a simple process:

  Backporting Evolution 2.32 to 10.04 requires backporting at least a
  dozen other packages - new GLib and Gtk+, few other libraries, e-d-s,
  modules that evolution uses to provide additional features like
  Exchange support, and most likely evolution-couchdb. This is far to
  invasive for an in archive backport. A PPA is the best way to support
  this.

This PPA exists purports to do just this upgrade.

However heed this maintainers warning:

  WARNING: There is no easy way to go back to the 2.28 release once you
  launch 2.32 - new Evolution migrates data to the new directory
  structure making them incompatible with the old release.

To install:

sudo add-apt-repository ppa:kklimonda/evo232
sudo apt-get update && sudo apt-get upgrade

Have a valid disk-image that you can return to if the PPA makes your system unstable


My keyboard shortcut binding does not work with my script

The command more doesn't seem to work.

Try changing each time it says more to cat.

How did I solve it?

I added this line after each if:

notify-send Alert No1

changing the number 1 to another number each time I used it. This showed me that the if then else statements weren't running. I then decided to change it to cat, because I use that and know it works!

notify-send

is a useful debugging tool for me. Have a look at it's man page to make it easier to use. If you can't use it, try to echo sometextNo1 > logfile.txt, and check that file.


Where can I find the openoffice fonts not in Libre like calibri

Please see this bug report for a discussion on the subject and for alternatives that can be used by LibreOffice.

Comment #6 has this:

  the non Unicode Type 1 PS fonts have been completely dropped with ESC approval

Some links to sources mentioned there:
 - http://www.gust.org.pl/projects/e-foundry/tex-gyre/
 - http://git.ghostscript.com/?p=urw-core35-fonts.git;a=tree
 - http://practicaltypography.com/charter.html


Ubuntu 18.04 suddenly does not detect a monitor

After sudo apt update and sudo apt upgrade, my Ubuntu 18.04 is able to detect the external display. But I do not know which package was needed to be up to date.


X11 forwarding works only with sudo permission

try editing the /etc/ssh/sshd_config file to add in this line:
X11UseLocalHost no

Notice it is setting it to no.
then restart the service using sudo systemctl restart sshd. You'll have to logon again. This is how I fixed my 17.10 system.


Unpredictable behavior on first login after installing 12.04

I have sort of the same issue going on.  It appears that Unity 3D is not working properly.  I have not been able to figure out what the problem is nor how to fix it.  There are so many posts on the topic.

Good news is I do have a work around, using Unity 2D.  At the login screen, right click the Ubuntu circle thing to the right of your name, click Ubuntu 2D, and login as normal.

Here is what I get when I execute unity --reset

mmorris@ion:~$ unity --reset
WARNING: no current gconf profile set, assuming unity
WARNING: Unity currently default profile, so switching to metacity while resetting the values
Checking if settings need to be migrated ...no
Checking if internal files need to be migrated ...yes
[LOG]: Moving Internal Files
[LOG]: Copying subdirectory from /home/mmorris/.compiz/session to /home/mmorris/.compiz-1/session
[LOG]: Copied file /home/mmorris/.compiz/session/1099d83abd38142b6b135126642044748200000020980043 to /home/mmorris/.compiz-1/session/1099d83abd38142b6b135126642044748200000020980043
[LOG]: Successfully moved internal files
Backend     : gconf
Integration : true
Profile     : unity
Adding plugins
Initializing core options...done
compiz (core) - Warn: failed to receive ConfigureNotify event on 0x2000004

compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1200002

compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1400002

compiz (core) - Warn: failed to receive ConfigureNotify event on 0x30000b8

Initializing composite options...done
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 55
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 56
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 59
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 58
nvfx_screen_get_param:95 -  Warning: unknown PIPE_CAP 30
Initializing opengl options...done
Initializing decor options...done
Initializing vpswitch options...done
Initializing snap options...done
Initializing mousepoll options...done
Initializing resize options...done
Initializing place options...done
Initializing move options...done
Initializing wall options...done
Initializing grid options...done
Initializing session options...done
Initializing gnomecompat options...done
Initializing animation options...done
Initializing fade options...done
Initializing unitymtgrabhandles options...done
Initializing workarounds options...done
Initializing scale options...done
compiz (expo) - Warn: failed to bind image to texture
Initializing expo options...done
Initializing ezoom options...done

(compiz:2077): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed

** (process:2161): WARNING **: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/mmorris/.config/dconf/user.CAEZMW': No such file or directory

** (process:2166): WARNING **: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/mmorris/.config/dconf/user.VPOGMW': No such file or directory

** (process:2169): WARNING **: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/mmorris/.config/dconf/user.B6WGMW': No such file or directory
WARN  2012-10-26 10:51:51 unity.favorites FavoriteStoreGSettings.cpp:139 Unable to load GDesktopAppInfo for 'ubiquity-gtkui.desktop'
Initializing unityshell options...done
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00090!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00093!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00096!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
compiz (core) - Warn: unhandled ConfigureNotify on 0xc00099!
compiz (core) - Warn: this should never happen. you should probably file a bug about this.
WARN  2012-10-26 10:51:53 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-writer.desktop' is using a deprecated format for its actions that will be dropped soon.
WARN  2012-10-26 10:51:53 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-calc.desktop' is using a deprecated format for its actions that will be dropped soon.
WARN  2012-10-26 10:51:53 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-impress.desktop' is using a deprecated format for its actions that will be dropped soon.
Initializing annotate options...done
Initializing blur options...done
Initializing clone options...done
Initializing colorfilter options...done
Initializing commands options...done
Initializing cube options...done
Initializing imgjpeg options...done
Initializing kdecompat options...done
Initializing mag options...done
Initializing neg options...done
Initializing obs options...done
Initializing opacify options...done
Initializing put options...done
Initializing resizeinfo options...done
Initializing ring options...done
Initializing rotate options...done
Initializing scaleaddon options...done
Initializing screenshot options...done
Initializing shift options...done
Initializing staticswitcher options...done
Initializing switcher options...done
Initializing thumbnail options...done
Initializing water options...done
Initializing winrules options...done
Initializing wobbly options...done
ERROR 2012-10-26 10:51:55 unity.glib-gobject <unknown>:0 g_object_unref: assertion `G_IS_OBJECT (object)' failed
Setting Update "main_menu_key"
Setting Update "run_key"
Starting gtk-window-decorator
compiz (decor) - Warn: No default decoration found, placement will not be correct
compiz (decor) - Warn: No default decoration found, placement will not be correct
compiz (decor) - Warn: No default decoration found, placement will not be correct
compiz (decor) - Warn: No default decoration found, placement will not be correct
WARN  2012-10-26 10:52:43 unity <unknown>:0 Unable to fetch children: No such interface `org.ayatana.bamf.view' on object at path /org/ayatana/bamf/application283295483

ERROR 2012-10-26 10:52:45 unity.glib-gobject <unknown>:0 g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
WARN  2012-10-26 10:53:09 unity <unknown>:0 Unable to fetch children: No such interface `org.ayatana.bamf.view' on object at path /org/ayatana/bamf/application283295483

ERROR 2012-10-26 10:53:11 unity.glib-gobject <unknown>:0 g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed


Start script in /etc/service (runit) is not working with daemon

Don't use forever.

It's dead easy.  As you've already observed, forever is unnecessary here as runit already is a service manager, and is already starting and restarting your program.

As you've also already observed, there are a few rules for what run programs must do.  They must not fork and exit the main program.  The runit service manager, like most daemontools-family service managers (there being a whole family of softwares that all work like this), expects that the process running the run program is the dæmon.  Not its parent.  Not a brief fly-by-night that forks and exits.  But the actual dæmon itself.

a simple run program

There are various scripting languages that make writing such run programs a doddle.  Laurent Bercot's execline is one.  My nosh program is another.  Presuming that bin/www is the actual executable program for your dæmon, a nosh run script would look something like:#!/bin/nosh
fdmove -c 2 1
chdir /src
bin/www

An execline script is similarly brief.  But the shell script isn't that much longer.  If your run program is a shell script, the thing to remember is to overlay the shell program with your dæmon program in the same process.  The shell command for doing this is exec and a shell script thus looks something like:#!/bin/sh -e
exec 2>&1
cd /src
exec bin/www

I strongly recommend that, if your program does not require superuser privileges, you execute it via the chpst program (and its -u option), so that it starts as a non-privileged user — for best results, one that is dedicated to this service.

Several people have collected and published suites of run programs, over the years, and most of the run programs are that short and simple.  Since you have runit, you can start with Gerrit Pape's own collection of run programs.

starting and stopping dæmons

When it comes to starting and stopping the service, again most daemontools-family service managers need to be told to stop auto-restarting the service.  They all come with a tool to do this.  You just need to use it in your clean-shutdown script.

runit has the sv program: sv down /etc/service/MyApp
s6 has the s6-svc program: s6-svc -d /etc/service/MyApp
perp has the perpctl program: perpctl d /etc/service/MyApp
daemontools has the svc program: svc -d /etc/service/MyApp
daemontools-encore has the svc program: svc -d /etc/service/MyApp
nosh has the service-control program: service-control --down /etc/service/MyApp which is also aliased as svc: svc -d /etc/service/MyApp

I said that it was a family of toolsets.  In fact, under the covers all of these tools are speaking mostly the same protocol.

This brings me to a larger point.  All of these toolsets are not exclusive.  Just because you have runit, that doesn't stop you from using execline if you want to.  Or you can run a nosh script under s6's service manager.

logging

You've tried to write log files with forever.  Again, don't use forever.  This isn't the right way to go about logging with runit.  Redirecting standard output and error directly to files makes your logs impossible to rotate, size-cap, and otherwise control without drastic interference in your dæmon's operation.

daemontools-family service managers all do logging by having the output of one main service connected, through an ordinary pipe, to the input of another log service.  This pipe is set up by the service manager.  You don't do it yourself.

The log service is another service.  It runs one of the many available tools that simply read from their standard input and write to a strictly size-capped, automatically cycled, on-demand rotateable, set of log files in a log directory.

These programs are multilog,multilog, s6-log, tinylog, cyclog, and svlogd which latter is the one that you'll find that comes in the toolkit with runit.

In fact, you might find that whoever set up /etc/service/MyApp has already set up a log service in /etc/service/MyApp/log .  If not, a log service script is dead simple:#!/bin/sh -e
exec chpst -uMyApp-log svlogd -t ./main

Just create a user account named MyApp-log, mkdir /etc/service/MyApp/log/main, chown MyApp-log /etc/service/MyApp/log/main and you are away.  (Note that main can be a symbolic link to somewhere else where you make the directory instead.  You don't have to put logs under /etc with runit.  I put my log directories under /var/log/sv.)

You do nothing at all to your main service to cycle and size-cap logs.  The cycling and size-capping happens independently, in the log service process.

Further reading

Jonathan de Boyne Pollard (2001).  "Don't fork() in order to 'put the dæmon into the background'.".  Mistakes to avoid when designing Unix dæmon programs.   Frequently Given Answers.
Jonathan de Boyne Pollard (2014). A side-by-side look at run scripts and service units..  Frequently Given Answers.
https://stackoverflow.com/a/21554947/340790
https://superuser.com/a/868519/38062
Gerrit Pape.  A collection of run scripts.


Execute an executable under a dynamically-created AppArmor profile?

Have a look at firejail, which can create a sandbox per application :

http://packages.ubuntu.com/search?keywords=firejail

https://firejail.wordpress.com/

https://wiki.archlinux.org/index.php/Firejail


Window not remaining in single workspace

Open Settings and go to Window Manager Tweaks. There you should see 6 tabs: Cycling, Focus, Accessibility, Workspaces, Placement, Compositor. Click on Cycling and un-check "Cycle through windows on all workspaces" if it's checked. Next go to the second tab Focus, you'll see 3 options for when a window raises itself (meaning the window wants focus), choose either "Switch to window's workplace" or "Do nothing". Finally go to the fourth tab Workspaces and un-check "Use the mouse wheel on the desktop to switch workspaces".


Why can't we remove bluetooth service the reguler way?

update-rc.d is indeed the usual way...to change a sysvinit (not upstart, not systemd) init priority.

Those sysvinit scripts are in /etc/init.d

But Upstart doesn't use update-rc.d nor /etc/init.d (except for legacy compatibility).
So the short answer to your question is that the bluetooth software uses Upstart jobs instead of sysvinit scripts.

One good way to permanently disable an upstart job is to rename the .conf file.

Example:

sudo service bluetooth stop
sudo mv /etc/init/bluetooth.conf /etc/init/bluetooth.conf.disabled

You can re-enable by changing the name back to bluetooth.conf without a restart.

sudo mv /etc/init/bluetooth.conf.disabled /etc/init/bluetooth.conf
sudo service bluetooth start

You change the dependencies of automatic startup by editing the .config file.


How to change size of notification in ubuntu 18.04

Usually on the installed GNOME-Extensions page see here which lists all available extensions and a tab for those you have installed there is an icon which allows you to configure the extension on the RHS of the page against the extensions listed as installed.

I don't have that extension listed personally so the graphic shows some installed on my system which are active where the configure button is seen to be available.


Another update: Currently flash may be blocked if it doesn't show as having the right version - e.g. for me on Firefox it shows as 11.2.202.569 in Firefox (And blocks it) but the package has 11.2.202.577 installed (the flash lib binary shows also 11_2_202_577, so something's broke). Basically it is up to date if it matches the version here.

UPDATE (from https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/FirefoxAndAdobeFlashNPAPI):

  Firefox blocks Adobe Flash NPAPI plugin for 11.2.202.481 and earlier

  Several serious security vulnerabilities were found in Adobe's flash
  plugin with exploits known to be in the wild. Because of the critical
  nature of the vulnerabilities, the Mozilla foundation decided to block
  this version of the plugin. Unfortunately, at the time of the
  blocklist, only the PPAPI version of the plugin (as used by chromium)
  was available and Firefox users found the NPAPI plugin was blocked via
  Firefox's click-through security mechanism.

  UPDATE: As of 2015/07/16, Adobe released 11.2.202.491 which fixes all known issues for PPAPI and NPAPI and updates are available for Ubuntu

  Timeline

  2015 Jul 14: Adobe releases flash plugin security update for PPAPI ahead of NPAPI
  2015 Jul 14: Ubuntu Security contacts Adobe regarding NPAPI. Ubuntu told NPAPI plugin will be ready soon
  2015 Jul 14: Ubuntu releases adobeflash-plugin and flashplugin-nonfree with updates for PPAPI only
  2015 Jul 16: Adobe releases updates for NPAPI (11.2.202.491)
  2015 Jul 16: Ubuntu releases adobeflash-plugin and flashplugin-nonfree with updates for NPAPI (11.2.202.491), including
  the previous PPAPI fixes

  SecurityTeam/KnowledgeBase/FirefoxAndAdobeFlashNPAPI (last edited
  2015-07-16 13:36:40 by jdstrand)

You should be able to update/install it using:

sudo apt-get update
sudo apt-get install flashplugin-installer

(or sudo apt-get install --reinstall flashplugin-installer, sudo apt-get remove --purge flashplugin-installer && sudo apt-get install flashplugin-installer etc)

or, it should also be updated if you use:

sudo apt-get update
sudo apt-get upgrade

Flash is currently being blocked in Firefox by default in all versions:

Anyway, to fix it:

Open the Add-ons Manager ('Tools' > 'Add-ons', about:addons, CtrlShift+A)
Go to Plugins
In the dropdown next to 'Shockwave Flash' select 'Ask to Active'

Please only do this if desperate - youtube and other sites now have a option to use HTML5, which should be used in preference to this)

This is due to the unfixed security issues in the Adobe Flash plugin, which can be widely exploited by attackers.

The flash plugin in general is very insecure and should be replaced - apparently Adobe and others should be reducing the use of Flash to replace it with HTML5, WebGL and other open standards. One of the reasons (other than they couldn't be asked...) that the Linux version of Flash is stuck at 11.2 (the version for linux gets security backports for 5 years from release) is due to the supposed roadmap with which Adobe will remove Flash support globally (supposedly).

See also:

Twitter - Facebook Security Chief's view on the matter
The Register - Adobe: You just don't know what it's LIKE having to look after Flash security


How to run C/C++ program using context menu (right click option)

1. Create Nautilus script's file and make it executable:

touch "$HOME/.local/share/nautilus/scripts/MyC++Run"
chmod +x "$HOME/.local/share/nautilus/scripts/MyC++Run"

2. Here is the content of the script. It creates an auxiliary (auto deleted) script, which is executed in a new gnome-terminal, thus you can see the error messages within the terminal window:

#!/bin/bash -e

# Get the list of the selected in Nautilus items as an array $ITEM_LIST
IFS_BAK=$IFS
IFS=$'\t\n'
ITEM_LIST=($NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)
IFS=$IFS_BAK

# Create aux script, that compile and execute the program. Run the script in gnome-terminal
compile_and_exec_program() {
        OUT="${DIR}/${NAME}.out"              # Define the name of the output file
        AUX="${DIR}/${NAME}.bash"             # Define the name of the aux script
        printf '#!/bin/bash -e\n' > "${AUX}"  # Create the auxiliary script
        printf '%s "%s" "%s" && "%s"\n' "${1}" "${OUT}" "${item}" "${OUT}" >> "${AUX}"
        printf 'rm -f "%s"\nexec bash' "${AUX}" >> "${AUX}"
        chmod +x "${AUX}"                     # Make the aux script exec and run it
        nohup gnome-terminal -x sh -c "$(echo \'"${AUX}"\')" >/dev/null 2>&1 &
}

# For each selected item: get its name, location, etc. and proceed...
for item in "${ITEM_LIST[@]}"; do

        ITEM="$(basename "${item}")"          # Get the item name (exclude the path)
        DIR="$(dirname "${item}")"            # Get the path to the item (exclude the name)
        NAME="${ITEM%.*}"                     # Get the name (exclude the extension)
        EXT="${ITEM##*.}"                     # Get the extension (exclude the name)

        # If the item is a file and its extension is `c` or `cpp`, then compile and execute
        if [ -f "$item" ]; then
                if   [ "$EXT" == "c" ];   then compile_and_exec_program "gcc -o"
                elif [ "$EXT" == "cpp" ]; then compile_and_exec_program "g++ -o"
                else notify-send "Wrong extension of the selected file: $ITEM"
                fi
        else
                notify-send "The selected item is a directory: $ITEM"
        fi
done

Additional explanations: Using of an auxiliary script is the most robust way to run more than one commands within a new gnome-terminal, that I found while I made one of my answers.

Depending of the input parameters of the function compile_and_exec_program, the content of the generated, by the printf section, auxiliary script will be similar as:

#!/bin/bash -e
g++ -o /work/dir/project.cpp /work/dir/output.out && /work/dir/project.out
rm -f /work/dir/project.bash
exec bash

Where && means (as usual) if the command that is on the left side is successfully executed, then execute the command that is on the right side. The line rm -f /work/dir/project.bash will remove the auxiliary script itself. The last line exec bash intends to keep open the new gnome-terminal window.

This part $(echo \'"${AUX}"\') intends to print single quote marks around the name of the aux script. It is important when the script name contains some special characters. I couldn't found other way to do that. Another way to qote only the spaces is using of: ${AUX/\ /\\ }.
Here is an example script, that creates a log files, where you can see the error messages from the process.

3. Here is a demonstration (from the previous version) of the script's features:


Downloading problem at slow internet speeds

There is a very good tool for this purpose known as Xtreme Download Manager XDM it can boost download speed by 4 Times and the best thing is it is also available for Ubuntu you can download it by typing

wget -O xdman.zip http://sourceforge.net/projects/xdman/files/xdman.zip/download

Now unzip the zip file and put it into a folder

`mkdir xdman

unzip xdman.zip -d xdman/

Enter into Xdman directory and give it execution permission

cd xdman/`

chmod +x xdman.sh

Finally Run the xdmam.sh file

./xdman.sh

For more information see this


Run alsamixer in a terminal and check that all channels are not muted. You'll know because they have an M at the bottom of a slider. Press m on your keyboard to toggle the channel mute status.


Will 12.04 LTS install on my old computer?

Download the alternative ISO and try if that works. It's a text-based installer which runs fine on older PC's.

Link to ISO: Alternative downloads


It was an issue with the host system, it was unable to download the `offending' packages.

I got the URLs that apt-get was requesting through Squid proxy on the host. Then I tried to fetching them by hand on the host and the download failed -- not sure why.

Moral: always check that the host is able to get the update.

The workaround is to use a separate machine to get the packages (only the ones you are unable to get in VM), verifying that they can be opened, and then putting them in /var/cache/apt/archives, so apt-get can grab them.


F_WBS_BRN_ contains the substring S_BRN_ so should be returned by your expression.
If you want to match strings that start with either S_BRN_ or F_BRN_ you can enable extended regular expressions using the -r or -E switch and use a word boundary anchor
$ sed -rn '/\b(S_BRN_|F_BRN_)/p' example_file.txt
1, S_BRN_, 3.21
2, S_BRN_WBS, 9.2
2, F_BRN_, 2.11
2, F_BRN_WBS_, 2.11

or more simply
sed -rn '/\b[SF]_BRN_/p' example_file.txt

In your case, you could also match the space before S or F, however the word boundary anchor has the advantage of also matching where there is no specific preceding character to anchor to, such as at the start-of-line.
Alternatively (since you also tagged the question awk) you could match the second space-delimited field, and use a start-of-pattern anchor ^:
awk '$2 ~ /^[SF]_BRN_/' example_file.txt


An experimental Linux driver for the Elgato Game Capture HD has been developed since you asked your question. For more information:

Driver webpage on GitHub
Detailed, text-based tutorial for Ubuntu
A video tutorial using Arch Linux may be found on Youtube


If you need to install uTorrent on Ubuntu 12.04, you can try it on either of the following. (Wine based methods)

PlayOnLinux (POL)
Winetricks

You can install uTorrent by following the blow procedure. But, i recommend to use buil-in torrent client like Vuze in 12.04.

METHOD 1: (PlayOnLinux)

If you have executable of uTorrent, ie; uTorrent.exe, it is better to try POL.

POL installation:-
Run the command in a terminal:

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_precise.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

Click on the install button, after running the POL. Then click on the link below the POL install menu window:

  Install a non-listed program

Then follow the procedure as you install uTorrent on Windows.

METHOD 2: (Winetricks)

This can be used if you don't have any uTorrent.exe files.

First install Winetricks using:

sudo apt-get install winetricks.

Then try : winetricks utorrent.

(Or manually go to Winetricks GUI and select "Install an app-->uTorrent-->OK)

It will show otput as:

Executing w_do_call utorrent
Executing load_utorrent
------------------------------------------------------
Please download utorrent_2.2.1.exe from http://www.oldapps.com/utorrent.php?old_utorrent=38, place it in /home/myname/.cache/winetricks/utorrent, then re-run this script.
------------------------------------------------------

So, go to the link  uTorrent download  and download uTorrent.exe and place it in the specified folder "/home/myname/.cache/winetricks/utorrent".

That's it. In any of the above you can enjoy uTorrent in 12.04.


No, you can run multiple desktop environments: LXDE (included in Lubuntu), GNOME (included in Ubuntu GNOME), MATE (Ubuntu Mate), Unity (included in plain vanilla Ubuntu) without your underlying software being affected.

That being said, if you run KDE, some software might have to get more libraries pulled in but a simple sudo apt-get MySoftware --reinstall will accomplish that.


How to install a self-created snap on an Ubuntu Core machine?

Easiest way is to copy your snap to the Ubuntu Core instance and then install it locally using something similar to:

$ scp your-snap.snap ubuntu@webdm.local:
$ ssh ubuntu@webdm.local
$ sudo snap install your-snap.snap


Proprietary ATI Driver fglrx kills my Video

Yey! I did it after reading some more. It was really annoying because when you boot without video, you have to shut down in inappropriate manner, so in recovery mode you get first some errors.

But the whole point is to get in recovery mode and type two lines:

mount -o remount,rw /
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

Thank you Ash for your answers to my question.


How to store html class content into shell variable

the github API  https://api.github.com/  returns json which is can be nicely crunched with the command line tool jq

What do you need ? a list of releases ?  ... try this

curl https://api.github.com/repos/FAForever/client/releases | jq .[].tag_name

which gives you output

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  107k  100  107k    0     0   314k      0 --:--:-- --:--:-- --:--:--  314k
"0.12.0-pre2"
"0.12.0-pre1"
"0.11.60-p1"
"0.11.61-pre2"
"0.11.61-pre"
"0.11.60"
"0.11.59-pre"
"0.11.58"
"0.11.57"
"0.11.55"
"0.11.54"
"0.11.53"
"0.11.52"
"0.11.51"
"0.11.50"
"0.11.49"
"0.11.47"
"0.11.16+291"
"0.11.14"
"0.11.8+270"
"0.11.7+267"
"0.11.3+247"
"0.11.0"
"0.10.125"
"0.10.124"
"0.10.123"
"0.10.124-pre"
"0.10.123-pre"
"0.11-pre-3"
"0.11-pre-2"

if you say "Just show me the latest" then issue

sudo apt-get install jq

curl --silent  https://api.github.com/repos/FAForever/client/releases | jq .[].tag_name|sort -n|tail -1

with output

"0.12.0-pre2"

now to bundle into a shell script  vi show_latest.sh

#!/bin/bash

latest_release=$(curl --silent  https://api.github.com/repos/FAForever/client/releases | jq .[].tag_name|sort -n|tail -1)

echo latest_release $latest_release

which generates output

latest_release "0.12.0-pre2"


Why does every directory have a size 4096 bytes (4 K)?

Without getting too technical, think of a directory entry as simply a "link" to a list of the files the directory "contains."
Then, as with everything, ls shows you the size of that link, not the total space occupied by the contents of the directory.
The minimum size a file or directory entry/link must occupy is one block, which is usually 4096 bytes/4K on most ext3/4 filesystems.


How to configure Ubuntu's Calendar event to open Thunderbird

Sounds like you are probably using Ubuntu 11.10 LTS... As far as I can tell the monthly calendar displayed in Unity's control panel (or whatever that bar at the top is called) is only integrated for Evolution. The mail on the other hand is integrated to Thunderbird. Thunderbird has an extension called Lightning which adds calendar capabilities to the program. I haven't been able to find any packages to install that will integrate lightning to the calendar in Unity.

There have been workarounds mentioned where both Thunderbird and Evolution are installed to allow events to be viewed in the Unity Calendar. However, it seems Thuderbird will not integrate with this calendar. I am currently looking into a way to change the default calendar app... unfortunately I am unable to when in: System Settings > Details > Default Applications. Maybe I'm doing something wrong but this is where I would expect to see it.


Did you install the qt sdk, you have a lot libqt unmet dependencies

sudo apt-get install qt-sdk

And try again


How to force user to type username & password for LXDM Login Window Lubuntu

Type following to edit lxdm.conf:

sudo gedit /etc/lxdm/lxdm.conf

For  Lubuntu it is :

sudo gedit /etc/xdg/lubuntu/lxdm/lxdm.conf.

Now search for following line

[userlist]
 ##if disable the user list control at greeter
 disable=0

Change the disable=0 to  disable=1

Now you will get textbox instead of userlist to enter username at login screen.


Bash script with sudo installs files in root's home directory, How can I fix this?

I would use rsync for the commands.
rsync -a user@123.456.789.012:/github.com/ael-code/zsh-colored-man-pages.git ~/.config/zsh/plugins/

You are only doing a single file at a time it is a simple matter. If the place you store the files allows a shell access account so a .ssh/authorized_keys can be created it can be done without a password.
The command above uses the rsync program to make an archival copy of the /github.com/ael-code/zsh-colored-man-pages.git to the directory on the computer it runs on of ~/.config/zsh/plugins/. A straight copy of the file is made check-summed and guaranteed to be byte for byte copy or it fails to copy it with an error.


You can set the emacs window geometry at startup ->

On you panel emacs icon or through the menu editor - set the command to run emacs like this -- emacs -geometry 135x42

See HERE for other ways to do it!

Enjoy your bigger window!


I don't use Evolution, but this sounds promising:
https://help.gnome.org/users/evolution/stable/backup-restore.html.en

Edit after the new information about the existing local mails:
If your local mails are in the way, this might help:
https://help.gnome.org/users/evolution/stable/data-storage.html.en
If I understand this correctly, the mails are in $HOME/.local/share/evolution.
So I'd try to terminate Evolution, move that directory away for the moment and then use Evolution's backup function, copy that backup to the other machine, terminate Evolution and then move the directory back to its old name.


Script works from command line but not from a command in Application Finder Launcher

Well, we had a PEBCAK error...

I mistakenly thought that if I ran the script, the script would automatically know where itself was and would use it's current location as a relative path.
This is not the case, it turns out. The script will treat whatever location the user is running the script from as the path to use when referring to relative paths.

Meaning that if I went to /home/harmelodic/ and ran:

$ ./.Jetbrains/CLion.sh

The script would fail as it would look for /clion*/bin/clion.sh in:

/home/harmelodic/

instead of

/home/harmelodic/.Jetbrains/

The solution was to get the current directory of the script and then perform the command using the current directory combined with the relative path to mimic a relative path whilst actually using absolute paths:

#!/bin/sh

CURRENT_DIR=`dirname $0`

$CURRENT_DIR/clion*/bin/clion.sh

This works from any directory, meaning that it works within a launcher from Application Finder.


Cant access NFS share with non-root user

I was able to solve this problem by adding the user group to the ACL.  I also modified the default group permissions so new files will also be accessible in the future.

Fist installed acl

sudo apt-get install acl

Changed the permissions

sudo setfacl -d -Rm g:nas:rwx  private/

# -d to change the directory default.
# -R for recursive
# -m g:nas:rwx to add the group to the ACL list for folder private/

I verified the changes:

sudo getfacl private/


GNOME commander has a "normal" .desktop file in /usr/share/applications and should be available in Dash.

You probably just need to log out/in to make it available in Dash. Alternatively: run the command

gnome-commander

and lock the icon to the launcher. That will work instantly.


Macbook retina 13" Mini DisplayPort to VGA Adapter. Does anybody test it?

I have connected my 13" retina (mgx82) Macbook pro to VGA video projector(monitor) with mini display to VGA adaptor and it works fine.


You installed a 32-bit Chrome by mistake. Remove it by running:

sudo apt-get remove google-chrome-stable:i386

and install a 64-bit Chrome.


Question about RAID controller compatibility

I can't see any direct information out there, but from some sites that come up during a Google search of the Marvell 91xx chipset, they are indeed saying that the kernel is compatible with that chipset  https://ubuntuforums.org/archive/index.php/t-1614764.html . I took a look at the driver for the UGT-ST644R card, and the driver for that card for Windows shows that it installs the Marvell 91xx driver.

According to the specs on the card, it shows that the drive capacity supports up to 8TB at this time:

http://www.vantecusa.com/en/product/view_detail/578

Also, here is the manual for the card to help familiarize yourself with it:

http://www.vantecusa.com/system/application/media/data_file/ugt-st644r_manual.pdf

Hope this helps!


Pendrive capacity decreased after installing ubuntu on it

Even though your pen-drive is sold as having 8gb, you won't have access to all of it. The advertised memory is never the actual memory. Some of the space is required for memory allocation.

Also, from what I understand from your question, your pen-drive has 700mb in it and 7gb free? That means you've access to 7.7gb. It's pretty good imo.


main partition marked as full but / directory only half the size

This is a good link on how to move /home from a folder inside / (root) to a new partition. To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions

https://help.ubuntu.com/community/Partitioning/Home/Moving

Once you have copied /home to new partition, and confirmed that copy is correct you can then delete the info in /home folder inside / (root).

Of course good backups before any major changes are needed just in case.


Where are the Gnome Fallback Configuration User Files?

Gnome3 uses DConf instead of GConf. The Gnome Panel settings are at org.gnome.gnome-panel.

As DConf saves its data in binary form to improve performance you can't edit the settings  by hand but need to use  the command line tools gsettings (package libglib2.0-bin) or dconf (package dconf-tools) or the GUI dconf-editor (package dconf-tools) to view or edit them.


Installing Xampp on ubuntu 13.04 64-bits

Get the tar file using wget

wget http://www.apachefriends.org/download.php?xampp-linux-1.7.3a.tar.gz
Extract the tar file as

tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
Give permissions

sudo chmod 777 -R /opt/lampp/htdocs/
Start xampp using

/opt/lampp/lampp start
Stop xampp using

/opt/lampp/lampp stop


Ubuntu 18.04 - Launching Chrome shows under the VSCode icon instead

You might have installed VSCode as a snap package, which causes $XDG_CACHE_HOME to be set to ~/snap/code/common/.cache, which could cause some cli tools to mistake that for your cache directory, and install/launch binaries from there.

If you install VSCode from the .deb download, it should fix your issue


You need the debugging files package of the stdlibc++ you're using, and optionally the source files. They're available through the package manager or apt-get.


Following is step by step for installing 16.04 on a 16GB flash drive on an Intel machine.

Turn off and unplug the computer. (See note at bottom)
Remove the side from the case.
Unplug the power cable from the hard drive.
Plug the computer back in.
Insert the flash drive.
Insert the Live CD or Live USB.
Start the computer, the CD/USB should boot.
Select language
Select install Ubuntu.
Select Download updates while installing and Select Install third-party software.
Continue.

At "Installation type" select "Something else".
Continue

Confirm Device is correct.
Select "New Partition Table".
Click Continue on the drop down.

(Optional partition for use on Windows machine)
Click "Free space" and "+".
Make "Size:" about 1000 MB.
Select "Primary".
Location for the new partition = "Beginning of this space".
"Use as:" = "FAT32 file system".
And Mount point = "/windows".
Select "OK"

Click "free space" and then "+".
Select "Size:" = 5000 to 7000 megabytes, "Primary", "Beginning of this space", Ext4, and Mount point = "/" then OK.

(Optional home partition)
Click "free space" and then "+".
Select "Size:" = 1000 to 4000 MB, "Primary", Beginning, Ext2, and Mount point = "/home" then OK.

(Optional swap space, allows hibernation)
Click "free space" and then "+".
Select "Size:" = remaining space, (1000 to 2000 megabytes, or same size as RAM), "Primary", "Beginning of this space" and "Use as" = "swap area" then OK.

(Important)
Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged.
Click "Install Now".

Select your location.
Continue.
Select Keyboard layout.
Continue.
Insert your name, computer name, username, password and select if you want to log in automatically or require a password.
Requiring a password to log in and selecting "Encrypt my home folder" are good options if you are worried about loosing your USB drive.
Select Continue.

Wait until install is complete.
Turn off computer and plug in the HDD.
Stick the side panel back on.

Note:
You may omit disabling the hard drive if, when partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR.
You can revise grub later, if you wish.


Inverting network status using rfkill on ubuntu + cinnamon

There is no invert flag in rfkill and there is no alternative cli tool that can do this. You can write a small script like the one below for it and have a keybinding initiate the script.
Note : You will need to add your user to sudoers file to run rfkill without password.
#!/bin/bash
BTDEVNO=1
currentState=$(rfkill list $BTDEVNO)
if [[ $currentState =~ ": no" ]]; then
    echo "Unblocked, going to block";
    sudo rfkill block $BTDEVNO;
else
    echo "Blocked, going to unblock";
    sudo rfkill unblock $BTDEVNO;
fi

Edit - About sudoers (made by Bruh) :
To add rfkill to the sudoers list, type sudo visudo and then add the following at the end of the file, under the %sudo line :
user_name : ALL=(ALL) NOPASSWD : /usr/sbin/rfkill
This will allow rfkill to run without the need of the sudo password.
Edit 2 - Slight change to the script (Made by Bruh) :
If the scipt seems to be always seeing BT blocked despite a manual rfkill list showing it unblocked, try replacing the if statement by the following :
if echo $currentState | grep 'Bluetooth Soft blocked: no'; then


How can I install usbip on Ubuntu 14.04.2?

There is no such module like usbip. In recent kernel if compiled with:

CONFIG_USBIP_CORE=m
CONFIG_USBIP_VHCI_HCD=m
CONFIG_USBIP_HOST=m

You should have usbip-core, usbip-host and vhci-hcd. To set host side please use:

sudo modprobe usbip-core
sudo modprobe usbip-host
sudo usbipd -D

Then you can start binding USB device. If you want to setup client side:

sudo modprobe vhci-hcd

More information you can find on my blog post


I fixed the issue. Thanks for all the help.

SOLUTION FOR ME:

Go to sleep and wake up refreshed.
Flash "Ubuntu Dekstop" onto a USB drive from you mothers PC without her permission (do at your own risk)
Boot, and select "Try Ubuntu without installing".
Find the directory (I went to 'Places' and selected my hard drive)
Open the directory in the terminal.
Remove the file causing the issue, i.e sudo rm config. (password was not necessary)
Power off (when prompted to remove the USB, do it.)
Power on and it was fixed for me (the file causing the problem is gone and sudo now works).
Make sure you edit files with visudo in the future, to avoid syntax errors, or at least have a root account.


I had file that overwrites settings from theme. It was in /home/user/.config/gtk-3.0/gtk.css. When I deleted this file square corners disappear without any action (reboot or relogin). I don't know what created this file but I'm using the same profile for 10 years.


So we solved the problem with help of top command this way:

sudo killall boinc

sudo apt-get remove --purge boinc*

sudo apt-get update && sudo apt-get upgrade

sudo apt-get autoremove


It is not completely solution, tricky one, but it Worked for me.
Go settings > universal access > repeat keys (in typing section)
Reduce down the delay section a little is enough.
me also get used to use caps lock instead of shift and everybody answers this question as simply learn shift, caps lock is not produced for that. Oh really we didn't know that :)
It also increases the character deleting speed which comes similar to Windows settings.


To create a folder in Desktop without permission denied?

Running these commands will change the owner of the directories owned by dell in /home/dell to masi and the group of the directories in the dell group in /home/dell to masi:

find /home/dell -type d -user dell -exec sudo chown masi {} +
find /home/dell -type d -group dell -exec sudo chown :masi {} +

The first one will change the owner, the second one will change the group.

You may also wish to change the owner / group of the files; if that's the case run the command without the type -d switch:

find /home/dell -user dell -exec sudo chown masi {} +
find /home/dell -group dell -exec sudo chown :masi {} +


Installing Ubuntu Desktop 18.04 LTS but it's not detecting my Samsung PCIe NVME SSD

Well after a lot of google search I came across this post. The issue was at the BIOS level.
In case of Dell desktops and laptops - one has to set the SATA mode to AHCI rather than the default Raid On. If you don't follow the above post - your machine won't boot Windows 10 as the AHCI driver is by default not installed. That's why one need to go into the safemode first then make the changes in BIOS and then disable the safemode. Being in the safemode - it installs the AHCI drivers via which O/S can talk to the drives.
After this I booted via the live USB and i can see the Samsung PCIe NVME SSD being visible from the gparted.


What is the difference between libgtk2.0 and libgtk2.0-0 when using apt-get?

-0 at the end means  that there was not a debian package yet. If it was libgtk2.0-1 for example it would mean that this is the 1st debian package of version libgtk2.0

Doing a quick apt-cache when you sudo apt-get install libgtk2.0-0 you only installed GTK+ graphical user interface library not everything else needed. When you sudo apt-get installed libgtk2.0 it pulled in everything else needed thus why it now works.


I installed it from repository as N0rbert suggested:
sudo apt-get install gnome-mahjongg


NetworkManger on KDE cannot edit a connection

With me, the only way I managed it was to "Store password for all users (not encrypted)" in the "Wi-Fi Security" tab and in the "General configuration" tab I selected "all users may connect to this network"


There is no delete key on a Chromebook, but you can achieve it by holding down the alt key while pressing backspace.


I also had the same problem with a daily built of Ubuntu 13.04.

The problem seemed to be that the file in /casper/ was named as "vmlinuz.efi" instead of "vmlinuz" -without ".efi" - which it was looking for.

After removing the ending (.efi), Ubuntu procceded without any implications.


'Check that kernel supports aes-xts-plain64 cipher' after upgrading to Ubuntu 16.04.1 LTS

You need to add to /etc/initramfs-tools/modules

xts
aes-x86_64

Then regenerate the initramfs files

update-initramfs -c -k all
update-grub

If you want to debug your initramfs further, you can extract the contents by using the following command:

gzip -d < initrd.img-4.4.0-112-generic | cpio --extract --verbose --make-directories --no-absolute-filenames


Why does my Apache folder show two configuration files?

The apache main configuration happens to apache2.conf. If you go thought the configuration file around line 207 you will realise it includes the httpd.conf.

This way you can make your custom configurations in the httd.conf without getting lost in the apache2.conf and you can keep your individual changes to your individual file.

It doesn't really matter where you write your configurations since both files are getting used.

In order to make sure it works sudo /etc/init.d/apache2 restart this will restart the Apache server.


I don't know why or how it happened but i shut down the installation midway forcefully and tried installing ubuntu again. I followed the exact same steps I did the last time (even while partitioning) and this time it worked perfectly.


I know this is old, but this is still the first hit on google for this problem and I wanted to let people know how to fix it. Looking at strace told me that it wasn't finding the library in any of the paths (looks like it is looking through a different set of folders for some reason). Regardless, I just linked my copy of the library into one of the directories that it was looking at, and it worked perfectly fine. I ran this code:

sudo ln -s `locate libcuinj64.so.5.0.35` /usr/lib/x86_64-linux-gnu/libcuinj64.so.5.0.35

You can just run the locate command on its own if you want to put it in manually, but if you only have one copy of the library this will work fine. Create the upper level directory first if you don't have it for some reason:

sudo mkdir -p /usr/lib/x86_64-linux-gnu/

Hope this helps!

Update for CUDA 5.5:  The library for CUDA 5.5 is libcuinj64.so.5.5.22.  So, the one line command is:

sudo ln -s `locate libcuinj64.so.5.5.22` /usr/lib/x86_64-linux-gnu/libcuinj64.so.5.5.22


Websites erroneously believe I don't have Flash installed

You have html5 plugin for firefox installed, which allows watching youtube videos, but sites like hulu do require flash.  You can verify that if you go to about:config and then Plugins in firefox, OpenH264 is what you're looking for

To install flash , run sudo apt-get install flashplugin-installer, but keep in mind that the latest version is 11.2.577 and Adobe removed support for Linux version of flash like since last year and it won't be supported anymore.

Note that you must have multiverse repository  enabled in System Settings -> Software & Updates

Alternatively, switch to pepper flash in Chrome


Xmodmap remapping modifiers not working?

I'm not an expert myself, but I'll give it a try. First of all, let us make an xmodmap script at ~/.Xmodmap. I understand you want the right alt to function as a super key. I suggest this:

clear mod1
clear mod4

!Make right alt to look like Super_R
!I'm assuming your right alt has keycode 108, you can check using xev
keycode 108 = Super_R NoSymbol Super_R

!Add the Super_L and Super_R keys to the modifier mod4
add mod4 = Super_L Super_R

Your other alt key and super keys may now be messed up, but you can assign them to anything you want analogously. (If you don't want to change them at all, use xev to see what they did originally and assign them to that.) Just put all clears together first, then the assignings of keycodes to key names, then finally the assignings of key names to modifiers, and I think it should work.
Normally, ~/.Xmodmap should be executed automatically on login, but if not, you can try adding a line

xmodmap ~/.Xmodmap

or

sleep 4 && xmodmap ~/.Xmodmap &

to ~/.bash_profile.


How do I identify what hardware button is pressed?

Open a terminal. Run this

$ xev

hit a key, output in xev will spew out, telling you the hardware characteristic that your OS is seeing.  I've had to do this when the right control key seemed to do nothing. And it turned out the keyboard layout was not set to receive that key.

Only if the OS sees your key will it be useful to configure keyboard shortcuts that previous answer suggested.


No, provided the extglob shell option is set, the second one loops over all directories that are not named Runfirstall
From man bash:

If the extglob shell option is enabled using the shopt builtin,
several extended    pattern matching operators are recognized.  In the
following description, a pattern-list  is  a  list of one or more
patterns separated by a |.  Composite patterns may be formed
using one or more of the following sub-patterns:
      ?(pattern-list)
             Matches zero or one occurrence of the given patterns
      *(pattern-list)
             Matches zero or more occurrences of the given patterns
      +(pattern-list)
             Matches one or more occurrences of the given patterns
      @(pattern-list)
             Matches one of the given patterns
      !(pattern-list)
             Matches anything except one of the given patterns


Enable Sync to VBlank on LXDE with Intel Video Card

Edit your /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
Option         "TearFree" "true"
EndSection

Edit your /etc/default/grub

On the line with GRUB_CMDLINE_LINUX_DEFAULT

i915.i915_enable_rc6=1 i915.semaphores=1 pcie_aspm=force


From https://wiki.debian.org/redmine

Install your database, e.g. postgresql (or don't, if you want to use sqlite)

apt install postgresql # or mysql-server

Install redmine with support for your database of choice

apt install redmine redmine-pgsql # or redmine-mysql, or redmine-sqlite

Database configuration can be fully automated, courtesy of dbconfig-common.

Configure web server

apt install apache2 libapache2-mod-passenger
cp /usr/share/doc/redmine/examples/apache2-passenger-host.conf \
  /etc/apache2/sites-available/redmine.conf
edit /etc/apache2/sites-available/redmine.conf
a2enmod passenger
a2ensite redmine.conf
service apache2 reload

Using passenger (libapache2-mod-passenger) is usually the easiest way. For using in a domain shared with other applications, base your config on /usr/share/doc/redmine/examples/apache2-passenger-alias.conf instead.

You can then log into Redmine http://servername (ServerName that you put in /etc/apache2/sites-available/redmine.conf and in your DNS or hosts file) with the following default admin account:

username: admin password: admin


How do I back up my ubuntu packages/settings/etc so that it can be restored from a clean install?

In brief

Backup you $HOME or whatever partition, logical volumes that contains your personal data
Get a list of the installed packages dpkg --get-selections > pkg.list keep the file
When restoring the packages sudo dpkg  --set-selections < /path/to/pkg.list and sudo apt-get dselect-upgrade
Backup your /etc if you can't remember what changes you have made for tuning

You can use tar or rsync over SSH to a remote host. I personally recommend booting using a USB/DVD Live (e.g. Ubuntu Desktop or System Rescue CD) and do the backup just to avoid file lock issues, always safer;-)


How to search skype chat history for linux beta version

According to Skype community:

  Search in conversations is not yet supported in the Alpha Preview of
  Skype for Linux.


I use Ubuntu 16:04; why is the boot process so long? 17 minutes

A similar problem blaming apparmor and plymouth turned out to be caused by a swap partition on a slow disk.

swapon

will tell you which partition and disk you are currently using and how much of it is in use.

You can test if using a swapfile on your main hard disk speeds up the boot sequence. 4 GB is a reasonable swap file size for a modern desktop computer, but make sure your computer has 4 GB available on its root partition:

df -h /

shows you how much space you have available under Avail. If it is less than 4 GB, adjust the size below to the space you have available. Create the swapfile and use it as swap:

sudo fallocate --length 4GB /swapfile
sudo chmod 0600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Finally, edit /etc/fstab to ensure that /swapfile is used for swap after you reboot.

sudo nano /etc/fstab

Add the following line to declare that /swapfile should be used for swap next time you reboot:

/swapfile    none    swap    sw    0   0

Now reboot and see if it is still slow.


Options

Create a boot-able DVD or USB stick and do a fresh install from that. I would go with the USB stick as you can reuse it.
see   https://help.ubuntu.com/community/Installation/FromUSBStick
Via update manager.
Ubuntu 9.04 is not supported anymore so you will need to edit /etc/apt/sources.list
to do this.  Full instructions here  https://help.ubuntu.com/community/EOLUpgrades

Note: if you take the upgrade path you will need to update from 9.04 to 9.10 which is also unsupported so you will need to edit /etc/apt/sources.list again.

Then to 10.04 which is both supported and is an LTS release, though support runs out this April.  From 10.04 you can upgrade to 12.04 the next LTS release.

You can then upgrade to 12.10 the latest release if you want.

A lot has changed between 9.04 and 12.10 so I would recommend a clean install however.
Make sure you have good backups in case things go wrong.


Netplan - Multiple ssids with different static IP on the same interface

Effectively this is not supported through netplan.  You can instead set renderer: NetworkManager and use your netplan config as a seed of initial configuration to NetworkManager, then manage the IP settings through NetworkManager directly.


Unable to download softwares from Ubuntu Software Center

Problem was that I use internet provided by my institute which doesn't allow me to connect to http://dl.google.com/linux/chrome/deb/ server.
Unchecking it from repositories solves the problem.
Software & Update => other sources tab => uncheck http://dl.google.com/linux/chrome/deb/.


Making "alt+shift" behave as "alt gr"/reconfiguring non standard keyboard? (Corsair SK621 Norwegian Layout)

Just wanted to add an update if anyone else runs into this issue with the same or a similar keyboard.
I managed to do a workaround using Windows and another keyboard. Basically, I loaded up the CM settings for my keyboard using their windows driver, then I assigned the menu button (two buttons to the right of space) to R. Alt/Alt Gr by pressing that key on the other keyboard.
Obviously, a solution that wouldn't require Windows, another keyboard with the right key, and reassigning a key that some users might need(even though I do not) is not preferable, but it works for me.


After changing the root password, why does my user sudo login is failing?

The password that you enter when doing the sudo command is not the root password, it's the password of the user executing the sudo command. So, if you're logged in as a user uday, and you do sudo <command>, you'll be asked to enter the password of the account uday, not the root password. Take a look at this:

uday@ubuntu:~$ sudo mkdir /media/test
[sudo] password for uday:

Notice that it says password for uday.

So if your intention was to change the password that you enter when you use sudo, then change the password of your account, not the root password.

Since you've set a root password, the root account has now been unlocked and enabled to login. It is usually advisable against that. So, unless you really need the root account, you can delete its password and lock it and by issuing the following command:

sudo passwd -dl root

If you want to read more information about root and sudo, visit this page.


Installing Windows 7 after Ubuntu: returning /home to root partition, editing MBR

Windows 7 does not need two primary partitions. If you are partioning your disk within Windows 7 Installer, it will automatically create two primary partitions for Windows. But if you create your partition yourself, you can still install Windows 7.

So if you want to install Windows to your NTFS partition, just boot your computer up with your USB disk and choose the partition when installing.

The installer, however, will erase GRUB. If you want to use GRUB for dual-booting (which is a better choice than using Windows bootmgr), you need to re-install GRUB.

To re-install GRUB, you could have a look at this question: How can I repair grub? (How to get Ubuntu back after installing Windows?)


16.04 Encryption disappears, impossible to log-in from desktop environment

This answer addresses how to restore encryption. The problem of the loop in the log-in screen remains, so please feel free to edit this answer or post your own answer (I'll be glad to accept it).

Restoring encryption with ecryptfs-migrate-home

Mandatory reading

man ecryptfs-migrate-home explains concisely how this works and the critical caveats. Note this solution works if you have enough space in your drive to make a whole copy of the unencrypted data (and a bit more). Check out with df -h, for example.

Useful reading

This tutorial http://bodhizazen.com/Tutorials/Ecryptfs/ gives a good overview to familiarise with ecryptfs, although it refers to old releases of Ubuntu.

Pseudo-code

This must be done from the terminal (tty accessible from CTRL + ALT + F1, for example) with all users logged out from any session.

The strategy is to make a temporary profile next to the one whose data are unencrypted. Then, use this temp user to launch ecryptfs-migrate-home on the unencrypted home. Here user is the profile with unencrypted home

login  # as user
sudo adduser <tmpuser>
sudo adduser <tmpuser> sudo  # sudo rights are essential
exit  # log out user

login  # as tmp-user
sudo ecryptfs-migrate-home -u user  # sudo needed, mind the option
# ...
# script asks for `login passphrase` of user = linux login password
# makes check (with lsof, see below)
# verbose listings, can take time
# prints diagnostics, to read carefully
exit  # log out tmp-user, DO NOT REBOOT

login  # as user again
ecryptfs-unwrap-passphrase
# type in the log-in passphrase and save the mount passphrase
ls -a /home  # check that the directory .encryptfs has been created
ls /home/user  # check that the files are visibile
# play around until change of mood and mind, you may reboot

During the doing

The script ecryptfs-migrate-home launches a lsof -u user (list open files) to make sure that user has no open files. The outcome can be a warning about one file open in the way of What means this error message: lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/nes/.gvfs  -- I presumed that this can be ignored, since it deals with an unavoidable circumstance. Corrections welcome.

At the end of its task ecryptfs-migrate-home notified me of a rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1] -- rsync is launched by the script itself, but I could not trace back which files had not been transferred and which previous errors it refers to.

After the doing

If you look at /home there will be a new directory user.<some code> next to user. The former contains the old state of things: it is a clear-text copy kept as a fall-back position, just in case. This can be deleted/shred after having tested the functioning of the new encrypted home thoroughly and before it gets risky to hold unencrypted data in your drive.

In the end I managed to get my /home/user encrypted back in place.

Logging in with the desktop environment

Still to be solved. Contributions welcome


You can get the build requirements for the Ubuntu version of Evolution with a simple:

sudo apt-get build-dep evolution

If the requirements have changed since then, you might have to manually fulfil some dependencies.


trying to install from usb- ubuntu 12.04

The boot sequence used by your computer is mainly a function of the BIOS, see a basic explanation here, when you first turn the computer on, as the BIOS posts, you should be able to access the settings to verify the Boot Sequence, and ensure that it will boot form USB so that you can continue with your Ubuntu installation. Most computers will briefly display some sort of message  telling you which key to press to enter the bios, but I am sure if you look up the make/model of your netbook you will quickly find how to access the BIOS too.


Recovery Mode - Terminal

Have you tried rebooting into recovery mode? When the boot options screen appears:

Advanced options > ***** (recovery mode)
Accessing recovery mode

This will allow you to access the terminal as root, and update graphics drivers etc.

Fixes

Back up first! you may damage your system trying to fix it so use this guide to backup in recovery mode.

Copy files to USB in recovery mode

It depends on what your problem is specifically. But here's some similar problems that may apply to you.

Stuck at busybox
Failed Ubuntu Upgrade


muxing overhead: unknown Conversion failed! ffmpeg

The correct command line for your purposes should be:

ffmpeg -i video_0.avi -qscale:v 1 keyframes/vid0/img_%06d.jpg

This should successfully create your images with 6 digits in the output filenames.

The error in your command line being the extra '%' in the output filename section: img_%%06d.jpg.

References:

Create a thumbnail image every X seconds of the video The definitive guide to creating images from media files using FFmpeg.


Installation stuck at copying files after booting

You can try uninstalling the application from the windows side. (It should have finished installing on the windows side). Once you have done that you can download the .iso file and burn it to a cd. Boot to the cd, and choose install.

The installer will see that you have windows already, and you can choose to install side by side with windows. (this will install it the same way the windows installer does, within the windows install).

iso link: http://www.ubuntu.com/download/desktop

Check and make sure your file downloaded correctly with an md5 hash. You can find a list of all the hashes at: https://help.ubuntu.com/community/UbuntuHashes

To find out how to check the file please look at this documentation: https://help.ubuntu.com/community/HowToMD5SUM#MD5SUM_on_Windows

Hope this helps!


The answer to the question uses a [code] block for formatting text, but the text you see is system log output for the plug-and-play system, meaning it should work automatically when you plug it in. No need to "write code".


As pointed out by a comment, there's no package for 11.10 yet. However, there's a bug opened in launchpad regarding this; so, if you're not in a hurry, I suggest to subscribe to the bug to get the updates when the status of the same changes.


They are not interchangeable, they have no functionality overlap. zpool is used for pool level operations, zfs is used for file system and volume level operations.


You can use cron. cron allows you to set scheduled tasks in Linux.

crontab -e
@reboot <path-to-script>/boot-up #add to end of file


How to best copy large files to an SD card?

Make sure you're using "safely remove device" button before removing the card from the card reader - to speed up things, the OS buffers data in memory, so the copying process may finish early but the actual data may not be yet written to the card.

To do this, you need to click on the Eject icon next to your card's entry in the left pane of the file browser, and wait until the icon disappears, indicating that the card is unmounted. From my experience, this actually may take longer than the original copy operation took because the cards are quite slow.


Macbook Pro late 2011 screen brightness issue

Please do double check to see if that directory exists.
You can do so by repeatedly going deeper into the directory using cd and ls.
For instance, cd /sys would get you into the /sys directory and ls would list whatever is in it.
For me, the above mentioned brightness controls are in /sys/class/backlight/apple_backlight/brightness, so in my case, its echo '5' > /sys/class/backlight/apple_backlight/brightness


Until I can get a dkms done for this, the following will work until a kernel update

sudo apt-get install build-essential linux-headers-$(uname -r)
wget https://www.dropbox.com/s/kj6w4qkantc8sul/btusb-vivid.tar.gz
tar -zxvf btusb-vivid.tar.gz
cd btusb-2.0
make -C /lib/modules/$(uname -r)/build M=$PWD modules
sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
sudo modprobe -r btusb
sudo modprobe btusb

Got a dkms one done

wget https://www.dropbox.com/s/texcobck1yjvhzc/btusb-dkms_2.0_all.deb
dpkg -i btusb-dkms_2.0_all.deb

Reboot


I installed Ubuntu 18.04 in my Chuwi Lapbook made with Apollo lake processors. Created a bootable USB and change the boot order in bios.Works great but I don't know if it's better to install an appropriate kernel. I saw this link but yet didn't try it. https://linuxminipcs.wordpress.com/ubuntu-18-04-2-lts-bionic-beaver/


Cannot mount USB disks due to "not authorized" error

I am experiencing the same issue in the same scenery, modified  my Ubuntu 12.04.1 LTS in order to start in console and I start my XFCE via startxfce4, the same problem mounting external drives/usb. Hope someone drop an answer for a fix.

Meanwhile, I deliver this workaround for future reference:

We can gain access to the unmounted usb/external drives by dropping the next command in a terminal.

sudo -S palimpsest

I know that we should use gksudo instead of sudo but if you do it that way you'll receive an error as in the next screenshot:

After providing our user password, the Disk Utility will be presented so that we can choose the drive/usb memory that we wish to mount and gain access to its files via file explorer (nautilus or any other) for read/write.

BUT! For that purpose we need to click in the link provided in the lower right corner with the label "Mount Point: Mounted at /media/DriveName"

This also works for my additional SATA Drives, which got compromised after the change that I made to my grub in order to boot in console (text) mode. No. This change isn't reverted by removing the changes I made to my GRUB.

Let's wait for an answer and meanwhile I hope this works for you the same as it does for me and may help future visitors.

Good luck!


Currently on Windows XP-want to boot Ubuntu from USB

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

After that insert the pendrive and restart ur pc ubuntu will start on its on
Or if dosent start then go to bios and select the option BOOT from pendrive.

Then try

U Can try these site for more information

https://sites.google.com/site/easylinuxtipsproject/installation


You can use:

xdotool getmouselocation

to get the current mouse position. Then you can find ways to draw something at the mouse position.

Example usage using xwinwrap and ImageMagick, which displays 1.png for 3 seconds, but you may need to change some configurations of your window manager to make it work:

xwinwrap -g 100x100+$(xdotool getmouselocation|sed -r 's/^x:([0-9]+) y:([0-9]+) .*$/print \1-50;"+";\2-50/'|bc) -ni -a -st -sp -nf -o 0.5 -sh circle -- bash -c 'display -window $0 1.png;sleep 3s' WID


How to make Autokey type Unicode characters?

Two options:
(See my blog for more details and screenshots for option 1)

First option (much simpler)

Upgrade to the python 3 port of autokey (because python 3 deals with unicode characters better than python 2)

For me, the installation worked as follows:

# Edit (April 2018). Autokey now uses python 3 by default. So try
pip3 install autokey

# Install the original autokey
sudo apt-get install autokey-gtk
# Update autokey to python 3 using pip3
pip3 install --user autokey-py3

Then make sure you run the python3 version, which is probably at

~/.local/bin/autokey-gtk

With this method, you can enter your unicode characters as phrases

Second option (if you can't get autokey-py3 to work)

Use a python script (File -> New -> Script) together with the system's clipboard

Paste the following into the script

import sys
reload(sys)
sys.setdefaultencoding('utf8')
from subprocess import Popen, PIPE

def paste_character(symbol):
    c = Popen(['xclip', '-selection', 'clipboard'], stdin=PIPE)
    c.communicate(symbol.encode('utf-8'))
    keyboard.send_keys('<ctrl>+v')

paste_character('γ')

This works by changing the default python settings to work with unicode correctly. It then sends the chosen character to the clipboard (ensure you have xclip installed). Here I've used γ as an example). Then it sends control+v to paste the character.

Extras for second option

The second method can be improved by taking all but the last line of the script and putting it in a file (lets call it MyCopy.py). Then, in Autokey's preferences (Script Engine), tell Autokey where this file is. Then the script becomes

from MyCopy import paste_character
paste_character('γ')

Some applications don't use control+v for paste (eg terminal uses control+shift+v). But the character will still be on the clipboard.


How can i get a Intel HD 5500 graphics driver for linux OSes?

First it sounds as if you are new to Ubuntu / Linux , but generally the driver for your graphics card is in the kernel and thus installed already.

Second, if you do need to install a driver it is best to use the packages available from the repositories in your distro.

for Ubuntu see - https://help.ubuntu.com/community/InstallingSoftware and https://help.ubuntu.com/community/Repositories/Ubuntu

If there is a package you need not in the repositories, you then try a ppa or, IMHO, build from source.

There are various reports regarding your video card

Works - Intel HD 5500 support on ubuntu?
Bugs - https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/1432194

So, have you tried Ubuntu ? Did you actually have a problem ? If you did, you would need to file / follow a bug report and/or contact Intel for a driver as is is a 3rd party proprietary (closed source) driver.

So to some extent your question is quite broad as you are asking about all distros, and not just ubuntu, and we do not know if you are even having a problem or not.

To be honest, as with any OS, it is best to either purchase a computer with Linux (Ubuntu) pre installed (same as you did with windows) or purchase a Linux compatible video card. You would have the same problem if you tried running a windows incompatible video card in windows.


Why does Eclipse install to this directory?

When you install a package, many files might be installed in many places. Checking out the contents of the eclipse package for Oneiric on http://packages.ubuntu.com shows me that it (indirectly) depends on the package eclipse-platform, and the file list for that package shows me that it installs many files under /usr/lib/eclipse and an executable (or link) in /usr/bin.

You do not need to copy any folders or files yourself after installing this package; it's not a good idea to do that, because then the package management system can't keep track of the files (if you uninstall it, the package management system won't know that you've manually moved the files around).

(Why do you think that you need to move files around manually?).


Unable to turn on seamless mode in VirtualBox

For seamless mode (Host+L) Virtual Box Guest Additions of the same program version need to be installed in the guest OS.

How to install Guest Additions see also this answer. In some cases you will simply need to reinstall the Guest Additions if they don't run the way they should.


I have a Radeon 6570 and the xrandr solution did not work.

As doing CTRL+ALT+F6 and CTRL+ALT+F7 worked, I used the command chvt.

So I changed the Marcos Silveira script as follow:

/lib/systemd/system-sleep/fixhdmiaudio

#! /bin/sh
case $1/$2 in

    post/*)

        # Vai para o VT + 1 e retorna para o VT atual
        CURRENT_VT=$(fgconsole)
        chvt $((CURRENT_VT + 1)) && chvt $((CURRENT_VT))
        ;;
esac


Is iLuv USB Audio Adapter supported in Linux?

Yes, I got one today - it said "PC Compatible" but no mention of Windows, so I figured I would give the company a hard time if it did not work (even though it was less than $10)
I had to go into sound settings and change it over - it is listed as "Audio Adapter (Planet UP 100, Genius G-Talk) Analog Stereo."

I have not tried using it for input, but it works just fine for output.

I am on Ubuntu 12.0.4 if that makes any difference...


How do I approve specific computers to ssh into a machine with password authentication disabled?

On each user you want to have access to the server, run in a terminal:

ssh-keygen
ssh-copy-id <username>@<serverIPorDNSname>

It will ask you where to save it, the default is just fine. It will ask you to enter a passphrase. This is to encrypt the key just in case the computer is stolen or compromised. If you do not want a passphrase, you leave both passphrase prompts blank.

The first command creates a ssh key for the current the user it is run on. The second command ssh's into the server and adds the the current user's key to the server's list of who is allowed to login. Since ssh-copy-id is using ssh, you will need to do this before you disable password logins.

SSH keys are two matching halves. One half is told to everyone, the other is kept secret. Using a mathematical algorithm, the public half can be used to decrypt data encrypted with the private key. If data decrypts successfully with the public key, you know beyond a doubt that it was the private half of the key that encrypted it. So when you login with a ssh key, the client sends a message (encrypted using the private key) that basically says "let me in". The server checks using the public key and if the public key is in the list of allowed computers the login is successful.

ssh-copy-id is (using ssh) copying the public half to the servers list of what keys are allowed to login (this list is stored at /home/<username>/.ssh/authorized_keys2, or in the case of root at /root/.ssh/authorized_keys2). If you already disabled password authentication, you can still add a computer. You just have to copy the public key (at /home/username/.ssh/id_rsa.pub on a client computer) to something like a USB stick and then add the contents of id_rsa.pub to the end of the /home/<username>/.ssh/authorized_keys2 file on the server. (You could do this by running command like cat /media/USB/stick/path/to/id_rsa.pub >>/home/<username>/.ssh/authorized_keys2 on the server.)


What is the path that I need to put in for a cron job

It is not necessary to put /bin/sh in front of the command.
Make sure the file site_backup.sh is executable and it will work.

If your script has any graphical output, place export DISPLAY=:0 && in front of your command, so it will look like

0   0   *   *   *  export DISPLAY=:0 && /home/username/public_html/backups/site_backup.sh


Trying to create a bash script, redirecting to youtube links

You can improve it by:

putting it in a while loop (if user enter other choice)
have shorter options:

#!/bin/bash
while true
do
        printf 'What video do you want to see? (1, 2) or quit'
        read video

        case $video in
            *1 ) xdg-open https://www.youtube.com/watch?v=xQ9MpPIs1jM;;
            *2 ) xdg-open https://www.youtube.com/watch?v=T2uWvrwq4T4;;
            [qQ]*) exit;; # for quit, Quit...
            *) printf 'Please enter 1, 2 or quit'
    esac
done


Open a terminal in the directory where Minecraft.jar is stored and try with the following command

java -jar Minecraft.jar

Then post the result.


Windows 10 keeps opening the boot disk files instead of running ubuntu install disk

You need to BOOT into CD/DVD in order to install onto your hard disk. You CANNOT just open the CD/DVD in windows. Install the CD/DVD into your optical drive and reboot PC depending on what type PC you have, you need to go into your boot options and pick the boot from CD/DVD or boot from USB options. computer will then boot into LIVE MODE and you can choose to run in live mode or install straight to disk, you will have 2 choices.


As you're probably going to use IP the MAC addresses won't help you at all. What you want is mDNS to reslove local host names. In Ubuntu, this is activated automatically. You should be able to resolve other computer's IP addresses using their name plus .local as in:

my-pc.local


What is the right way to reinstall from source after package was installed via apt?

You'll want to look at the command sudo apt-get build-dep python which will install all the build dependencies, but not the package itself.


ACPI shutdown not working from VirtualBox

Ubuntu Server doesn't ship with ACPI support installed. See this thread for the original answer: link

To install ACPI support in Ubuntu, type this into a shell:

sudo apt-get install acpid


I found a away to fix it, by removing the diversion first:

  dpkg-divert --package ack-grep --local --remove --rename --divert /usr/bin/ack /usr/bin/ack-grep

apt-get upgrade works fine after that.


The Ubuntu documentation page has the following information in relation to the Macbook.

LCD Brightness Control

The package nvidia-bl-dkms is not available for 12.04. Fortunately, the following procedure works (taken from http://www.voria.org/forum/viewtopic.php?f=3&t=1091):

If backlight control does not work for you, follow these instructions:

Edit the file '/etc/X11/xorg.conf' and add this line into the Device section:

 Option "RegistryDwords" "EnableBrightnessControl=1"

Reboot and check if backlight control works. If so, you're done.
If not, edit the file '/etc/default/grub' and change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Update grub with this command: sudo update-grub
    Reboot and backlight control should work.

If it still doesn't work, try installing the nvidia-bl-dkms package from mactel-support for Natty (from https://launchpad.net/~mactel-support/+archive/ppa), this was the only way for me to get the backlight control working on Precise. Results may vary as some people claim this driver does not work on Precise.

Link to these info is below.

https://help.ubuntu.com/community/MacBookPro5-5/Precise

Also this blog appears to have used a script to get it to work.

http://www.mabishu.com/blog/2010/06/24/macbook-pro-keyboard-backlight-keys-on-ubuntu-gnulinux/

Best of luck!


Launcher auto-hide not working Ubuntu 14.04

Avoid holding down the Super button.

When locking the screen with Super + L the Super key is normally held down before pressing Super. But holding down Super is in itself a shortcut to get the Shortcut Help Screen up. By using this to lock the computer, you make the sidebar reveal itself before it's "interrupted" by the screen locking. This is the reason why using Alt+Ctrl+L does not produce the same effect: none of those keys have any effect on the sidebar, dash or the Help screen.

Either rapidly tap Super+L simultaneously (DO NOT HOLD DOWN Super), use Alt+Ctrl+L or find a way to remove the Super shortcuts for the Dash/Sidebar.

EDIT: Also found that if your sidebar gets stuck, you can tap Super twice to get rid of it.


How to install R statistics system and r-cran-tidyverse in Ubuntu 20.04?

r-base and r-cran-tidyverse are provided by the default repositories in Ubuntu 20.04. Open the terminal and type:

sudo apt update
sudo apt install r-base r-cran-tidyverse