How can I move content of a txt file to another using Bash Script?

Your question needs clarity. There's two possible cases that I can see happening:

Copying many to one:

for file in directory/*.txt; do cat "$file" >> someotherdir/combined.txt; done

Copying many to many:

for file in directory/*.txt; do cp "$file" someotherdir/"$( basename "$file" )".copy ; done

In each example we're looking at directory named directory in your current location ( check that with pwd command ). So if I'm in /home/foo_user we're looking at /home/foo_user/directory. The glob *.txt will match all files with .txt ending. The destination directory someotherdir also will be referenced relative to your current location.  Provide full path such as /home/foo_user/someotherdir/anotherdir if you want to copy to specific location. In first example we're using cat and >> to append contents of all files to single file. In the other cp makes a a copy of each file to new filename, which will take out the name of file currently in  "$file" variable and append .copy to it.

Note that if naming is not of importance, we can reduce second case to just making new directory and copying it recursively via cp -r:

mkdir copies
cp -r original_dir/ copies/

So can be done with first case like cat dir/*.txt > combined.txt however loops are preferable when you are dealing with a lot of files and may run into Argument list too long error, from which shell loops do not suffer.

Without knowing specific details, these two solutions should suffice for multiple cases. Adapt accordingly to your particular scenario.


How to define a shortcut key to grab part of the screen?

It works for me when pressing the shortcut twice (fast).

This seems to have worked at some point but doesn't anymore (see this thread at ubuntuforums.org - it doesn't work for me, with or without the '-i' switch).

There's already a bug report opened: https://bugs.launchpad.net/ubuntu/+source/gnome-utils/+bug/549935


kernel patching - how to check / verify when specific patch was applied

One way is to use the a git clone of the source and search for the patch.
Mine is a clone of the mainline source from kernel.org:

git log --oneline | grep "add DISCARD support to virtio-blk driver"

did not find anything. As a sanity check, look at the code itself and manually observe if the patch was ever applied or not. I looked at drivers/block/virtio_blk.c and didn't see the patch.

Conclusion: the patch was never applied to the mainline kernel, and therefore I very much doubt that it would ever have been backported to previous kernels.


How to create EFI partition and install grub2 on second disk

You've got a mixed-mode install, with Windows in EFI/UEFI mode and Linux in BIOS/CSM/legacy mode. This type of setup is difficult to get (much less keep) running. You have several options for how to proceed:

Install a Linux EFI boot loader/manager to the existing EFI System Partition (ESP) on the Windows disk. It should then be able to boot your existing Linux installation in EFI mode from the MBR disk. In principle, this is likely to be the easiest solution, but it requires either something easy to install or enough knowledge to not make a mistake when installing it. It also doesn't meet your criterion of not modifying any partition on the Windows disk; although it would not modify Windows itself, it would necessarily modify the ESP. The Boot Repair tool might set this up correctly if it's booted in EFI mode. rEFInd is also relatively easy to set up (I'd do it from Windows, but you'll need to add an EFI filesystem driver for whatever filesystem holds your Linux kernel -- probably ext4fs).
Free about 550MiB on the MBR disk, create an ESP on it, and install a Linux boot loader to it. The trouble is that some EFIs won't boot from an MBR disk, although many will. Some boot loader installation tools might also bypass an MBR disk (I have no idea if Boot Repair would work, for instance; and the Windows rEFInd installation instructions will probably end up putting rEFInd on the GPT disk.) This could also create problems if/when you upgrade or re-install Ubuntu, since the Ubuntu installer requires GPT for an EFI-mode installation.
Do as in the previous option, but convert the disk from MBR to GPT format by using GPT fdisk (gdisk, sgdisk, or cgdisk), which is part of the gdisk package in Ubuntu. This makes it more likely to work and be less likely to cause problems in the future, but it's an extra step and it's not 100% risk-free.
Re-install Ubuntu in EFI mode. Getting the installer to boot in EFI mode can be a challenge, because the boot mode is determined by the firmware and there's little standardization in how it's controlled. In general, though, an option to boot a CD/DVD or USB flash drive that includes the string "EFI" or "UEFI" will get the job done. Also, some ways of creating USB flash drives from installation images don't copy over the EFI boot files. You're best off just copying the image with dd, in my experience. Note also that you may have to be very careful with the installer to tell it to use the ESP on the Linux disk to hold the Linux boot loader; it might try to use the ESP on the Windows disk.

A fair amount more could be written about any of these options, so if you want to pursue one of them and have questions, ask. Please read my page on EFI-mode installations and/or the Ubuntu community wiki on the subject first, though.


How to deal with Windows 8 Boot Partition?

You made a slight mistake that got you confused: you should have deleted the partitions and only format the 2 you installed Windows (35) and your documents (85) on. Then you would have seen a slightly different image for gparted (where it would state 'empty' for sda1).

Install Ubuntu on sda1 by deleting sda1 and formatting it to ext4 (or less preferred ext3) where you divide sda into 3 parts: / (something like ... 10 Gb), swap (2 Gb) and /home (18 Gb)). (you will thank me someday for suggesting a separate partition for /home ;) )

So to answer the question: Or, all my fears are baseless and I should just go on with the installation? is the correct one. But you might need to fix something in grub to get Windows back. The fixmbr will remove grub and therefor Ubuntu from the boot list.


Kubuntu permanent install won't attach sound card

Recent versions of Ubuntu have inherited a bug from Debian, where snd-aoa modules are incorrectly blacklisted. If this is the case, the easiest thing to do is to delete the /etc/modprobe.d/blacklist.local.conf file that is generated by the installer ( sudo rm /etc/modprobe.d/blacklist.local.conf ). Also, delete any references to sound modules in the /etc/modules file and see if it works without them.

From https://wiki.ubuntu.com/PowerPCFAQ#Why_do_I_have_no_sound.3F


Ubuntu 18.04.2 periodically disables all devices

I see glitches of suspend system in dmesg. To fix it I disabled sleep and hibernate with the command:
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target.
Restart logind.service or reboot to apply.


Right-click -> Open with Other Application  (just like you did before), and select File Browser.  Make sure the checkbox at the bottom that says

  Remember this application for "folder" files

is checked.


Those are just backups of your original files that gedit creates before saving changes to your edited documents.

How to prevent this ?

In gedit preferences you need to disable Create a backup copy of file before saving, and if you want to automatic save your edits automatically set a timer with the option enable Autosave files every X minutes.

That way the ~ will be gone and your last changes will be saved on the file every x minutes in case something goes bad or your computer crashes.

The changes made to the file will be saved to the file itself and not to a temporary file.

Please be aware that if you delete the contents of a file and auto save is enable there will be a chance that you end up with a saved empty file.


Well, I'm using Ubuntu 10.04 (still cannot stand Unity) but I think this will still work . . .

Are you aware that you can move the active window from one workspace to another by holding:

Ctrl + Alt + Shift + {cursor key for direction of desired workspace}

For instance, if you're in the left workspace and you want to move the current active window into the workspace on the right you just hold Ctrl+Alt+Shift+Right.

And you can jump your view from one workspace to another by holding

Ctrl + Alt + {cursor key for direction of desired workspace}


How to check if graphviz-dev is installed on different Ubuntu versions?

As far I can see the package description for *graphviz-dev is always the same (looked from 16.04 LTS to upcoming 20.04 LTS):

  graphviz libs and headers against which to build applications

so you can use simple dpkg -l with pipe and one-line scripting:

dpkg -l | grep "graphviz libs and headers" && \
echo "*graphviz-dev is installed :)" || echo "*graphviz-dev is not installed :("

For example on 16.04 LTS it will return:

  ii  libgraphviz-dev                               2.38.0-12ubuntu2.1                              amd64        graphviz libs and headers against which to build applications
  *graphviz-dev is installed :)

You can install *graphviz-dev in universal way like below:

sudo apt-get install {lib,}graphviz-dev


Bumblebee optirun appears to depend on Intel

I worked around the problem, without understanding the root of it, by entering two symbolic links:

sudo ln -s /usr/lib/x86_64-linux-gnu/dri /usr/lib64/dri

creates

/usr/lib64/dri -> /usr/lib/x86_64-linux-gnu/dri

and

sudo ln -s /usr/lib/i386-linux-gnu/dri /usr/lib32/dri

creates

/usr/lib32/dri -> /usr/lib/i386-linux-gnu/dri

So now the libraries are found correctly


Can not mount virtualbox folder in fstab

I had this issue after upgrading from Kubuntu (guest) 12.04 to 14.04.  And the solution provided here solves the problem partially. Virtualbox shared folder mount from fstab fails; works once bootup is complete

The solution forces the vboxsf module to be loaded early, before mounting file systems.

It only partially works for me: the error message is still displayed, but strangely, choosing the 'mount manually' (instead of skip mounting) option, and then doing nothing but exiting (Ctrl-D) to continue booting mounts the shared folder, indicating that it works (automatically) during the second try!


Right, I finally twigged what the problem is. I had set a static IP address for the wired interface, but I hadn't supplied an address for DNS resolution. I added a DNS address (my router) and restarted the interface, and now it happily resolves DNS even when the wireless interface is down.

I guess I'd assumed that the system would assume it could resolve DNS via the gateway address. It seems to have worked that way in previous releases.


What distribution have these 3 taskbar tweaks possible?

You should try LiveCD/USB of Ubuntu MATE to test will it suite your needs or not.

I'm very happy with MATE's methods of window manipulation (in particular with many plots from Scilab and/or Octave and so on):

MATE DE with multiple windows of the same application:

if it is not enough you can use Window Picker applet (shown on top panel):

Window Picker applet in action

or use Window Selector applet (shown on top panel) as drop-down menu or with mouse wheel -

Windows Selector applet in action

if you want to use modern dock - then you can utilize Mutiny panel layout (selectable from MATE Tweak):

Mutiny panel layout

For me this functionality is well enough.


Ita, I still have your same problem. Hope this gets a better brain than mine. But here is only a workaround solution to the unlock button in Ubuntu 20.04 NOT working.

Opening the Gnome control center from a terminal window solves the user unlock issue, but the terminal window logs many critical warnings... maybe telling a smarter brain than mine can determine a better solution. Here goes:

Ollie shared the following related solution to another settings failing to even open.  Because the gnome-control-center might need reinstalling/updating. Open your terminal and type these commands:

sudo apt-get update
sudo apt-get install --reinstall gnome-control-center

And then the command for opening the display, and system settings, respectively, would be:

gnome-control-center display
gnome-control-center

You might want to run the apt-get update command again after reinstalling the gnome-control-center.

Unfortunately, this solution only works from a terminal window.  Going back to the built-in Settings, returns us back to the inability to unlock a user.


upgrade from 13.04 to 13.10 failed and broken dependencies

Problem is that the libboost1.49-dev which was installed from an other repository is competing with newly installing libboost1.49-dev from main repository.

So first you need to remove the present libboost1.49-dev.

sudo dpkg --purge libboost1.49-dev

Then clean the apt-cache

sudo apt-get clean

Then run sudo apt-get -f install.


I know that the sudo password protects my computer from being locally hacked by someone having physical access to it.

I do not want to scare you too much, but if someone has physical access you handed access over to them regardless of how strong your password is. It will take 1 reboot by someone for that someone to be able change your root password (can be done from "grub rescue" without the need to supply your current password). By the way: this method is considered valid and a feature, and an accepted security risk (otherwise you would never be able to fix your system in case the password did get compromised).

  but I know that it is not strong enough if someone can brute-force it remotely.

Here comes something else in play: a ROUTER should be smart enough to lock access from the outside if it is a repeated request asking for the same information over a short period of time. Basically what you have here is a DOS attack (or a DDOS if 2+ computers attacking you). A router should kill that connection and enforce a waiting period before accepting new requests from that connection.

  Can anybody access my computer in root mode using my sudo password with no physical access to the computer, on a standard Ubuntu desktop installation ?

They first need to connect, then provide the sudo password. "root" mode is disabled and you can not directly log in to a "#" prompt.

Note that it is possible to abuse a service. If you have "ssh" running on that machine and they can "ssh" to your system, and get a hand on your username and password for that user (and as it is an admin user your sudo password too) they can access your machine and mess it up. By the way: if they do it like that they must have knowledge of your system first (like your password).

But then there is an issue with that (and any other method): how did they get your password? They can NOT get it from your system itself. And in general guessing is not worth the trouble. If it was socially engineered ... then your problem is there, not with the security model of your system, Ubuntu or Linux in general.

As long as your sudo password is yours you will/should be fine. And you will be even better off if it is a strong password (maybe easy to remember for you but not guessable by others). An example I used before when discussing this: If your dog is named "Abwegwfkwefkwe" using "Abwegwfkwefkwe" as a password is BAD even though it looks good (since someone could ask you: 'what is your dog's name' and they try that as a free guess). If you have no relation to "Abwegwfkwefkwe" it is a good password.

Best advice I can give:

do not enter your admin password when asked for it unless you know it was expected to be asked. If you open a browser and are given a popup that looks like our "asking for admin account password" ... stop ... and think first.
do not leave your system unattended when the "sudo" grace period is active. sudo  --reset-timestamp removes the current grace period and will ask for the password again when you next use "sudo". Lock your screen when you go AFK.
do not install services or software for the fun of it. If you do not need ssh do not install ssh, if you do not use a webserver do not install a webserver.  And have a look at the currently running services. If you do not use BT on a notebook, disable it. If you do not use a webcam disable it (if active). Delete software you do not use anymore.
and for the really paranoid (and yes Paranoid Panda I am looking at you): change the password every so often. You can even install rootkit hunters to check for inappropriate access.
backup your important data to something that you keep off-line. So even if you do find someone on your system you can format it, and start over with a new install and your data restored.


postgreSQL installation from graphical installed

Just change the permission of the file and make it as a executable.

Open terminal and type:

chmod +x postgresql-9.1.6-1-linux-x64.run

To install the package as a root user, use

sudo ./postgresql-9.1.6-1-linux-x64.run

Hope this helps.


I made a folder unreadable after chmod. I can't undo it from terminal?

Are you using sudo chmod ugo-rw ./folder to add read and write permissions? The minus sign you are writing means that you want to remove those permissions, if you want to add them use a plus instead: sudo chmod ugo+rw ./folder


in case you have any graphics card in your system make sure your currently installed driver has no hibernate/suspend issues.

I had similar issue of machine failing to resume, installing the latest graphics driver (catalyst 11.12 in my case) fixed it.


What is the simplest way to check that a filesystem is really mounted?

Try
lsblk

You should see the NAME of the device in the first column and the MOUNTPOINT in the last column.
As a bonus, you get some other columns such as SIZE and TYPE in a human readable format.


Can't log into Ubuntu 16.04. Upgrade from 14.04

@Someguy: You are probably getting logged in, but your graphical interface is failing almost immediately.  You keep saying you can't log in, but you can.  But your GUI doesn't keep  you logged in.  This happens because some package upgrades failed (did not include all required pieces) or because your user account has some bad settings that are no longer applicable.

The way to make sure you can log in was recommended by others. Get into the virtual terminal and make sure you can enter a password and that "it" works. There are ways to launch X11 from there, possibly as easy as typing "startx".  But that may not help if you have a failed graphical login going on.

Now, what is wrong with your graphical interface is the question?  Obviously the upgrade from 14 to 16 was too big  of a step and all of the packages are not working well together.

This diagnostic step sounds good to me. Get in the VT, log in, then create an entirely new user account.  Suppose you get logged in the VT as "joe", then you run "sudo adduser henry" to create a new account. THen run "sudo password henry" and type a password twice.  Then run "exit" to get out of the VT, go back to the VT where the GUI login is running. (I can't remember.  It used to be that was Alt-Ctl-F7, but I think it is on F1 in current Ubuntu).  Then try to log in as henry.  If you see success, it means accumulated settings in your user account, not the Ubuntu system are to blame for your trouble.

If the new account is a fail, it means the "upgrade" was a fail.  Frankly, I've been doing this 20 years and many upgrades fail, especially when you try to skip over several versions.  You are hopping over 15 entirely, and in my experience that can be bad.

Here is what I would do:

Get fresh media for Ubuntu 16.10 install. I'd install from scratch.  Question: how to save your home data content?  Hopefully, you have the HOME partition separate. Then it is easy.  Just don't let the installer do the automatic everything for you. Make  sure it does not reformat your HOME.

If the login fails like in the upgrade, then you have to go into the VT and start moving out some of the "dot" folders and files, configurations that are causing your trouble.

When are looking at the graphical  login, do you see any alternative desktops available.  I hate Ubuntu's Unity desktop, so I always have several others installed. It may be you already do  have one and if may be that alternative will allow you to log in and stay logged in.

I can't picture the login on Ubuntu right now. I know on Centos linux there is a little gear thing that appears after you put in your user name.  I think in Ubuntu there is a top right chooser thing where you can pick something besides Unity. Maybe you have Gnome or such.

The reason an alternative desktop might be OK is  that the one you were using is filled up with your personal settings  from version 14 and they are likely at the root of your trouble.

If that is not possible...

I have done this.  Log in on the VT and fix whatever is wrong. Check to see if your networking is alive (could run "apt update", for example).  This is a good chance to learn your way around the terminal and the package manager.  Then you start running "apt-get" commands to install/reinstall packages.

You might considering installing an entirely new desktop, such as my favorite XFCE4 desktop. If you install a fresh one, it is not going to be polluted by any duds hanging over from the old version.  There are many competing desktops, several can be installed as easily as "sudo apt-get install xfce4".

This may sound overwhelming to you if you are a Unix novice, but I promise that everybody who is going to survive in Linux will go through this once in a lifetime. At least. Let us know how it goes, but you need to be calm and take some breaths.  Don't think as though you are the only one to ever end up in this situation, we all have, and there are plenty of good ways around it.  I think the best is to reinstall, not upgrade.  My upgrades in Ubuntu were smooth from the various 14's to 15.10, but upgrade to 16.04 was a fail and I did a fresh install. Then the upgrade to 16.10 was not smooth and I ended up doing full reinstall.

Good luck, let us know how it goes.


How to set ftp to access all /var directories but nowhere else

You just have to remove a line in config file.

Comment out this line:

chroot_local_user=YES


RTA file is an Adobe RoboHelp RTA Data File. RoboHelp is a help authoring tool (HAT) created by eHelp Corporation, acquired by Macromedia, which itself was then acquired by Adobe Systems.

You can use Adobe RoboHelp or other tools, but it seems there's only toos for Windows Or Mac.

You can try a Windows tool through Wine tough.

Read this link for more informatio: http://file.downloadatoz.com/rta-file-extension/


Can`t see HDD disk after Ubuntu 18.04 install on SSD

It would take me some time to explain step by step how to do this. However you might want to watch this video as it helped me setting up my hdd as well. Just note that he is creating two partition on his hdd but this is kinda useless. Just create one big partition on it. If there is already a partition on the hdd then format it to ext4 as shown.

Hope it helps !


No. It would drain your battery faster accessing files over USB.


After startup i lost all icons, favorite bar and can open anything on Ubuntu 20.04

First you have to open the terminal, so press Ctrl+Alt+T or Alt+F2 (Ctrl+Alt+T lets you see the output of commands better because it opens the actual terminal.)
Now you need to reinstall Yaru Icons, so type
sudo apt --reinstall install yaru-theme-icon

Now try to open a program such as files.
If the window top bar looks messed up, you might need to reinstall Yaru GTK3 theme so type
sudo apt --reinstall install yaru-theme-gtk

If there are no changes, you may need to reboot your machine.
Another solution would be to reinstall Ubuntu 20.04 if you have to, because other stuff may have been corrupted.


Is it possible to run Ubuntu Server 16.04 alongside Windows 10 Pro?

Yes you can install both in a dual-boot situation and then run one or the other, but no, you can't run both OS's at the same time.

However, if you used Virtualbox... then you could run both OS's at the same time. You install Virtualbox into Windows 10 (Host OS), and Ubuntu Server (Guest OS) into Virtualbox.


If you want to install ubuntu on 32gb usb flash drive, then use UNetBootin and install directly to USB. Installing to USB drive requires UNetBootin. If you want to increase the storage of the USB drive you can increase it by using persistence storage slider available in UNetBootin installer. The installation process that you are using is for installing to HDD. This way you can install to HDD only because it install GRUB on HDD. GRUB (Grand Unified Boot Loader) is used for multi boot machine. This way you can install multiple OS(Operating Systems) on the PC. We can install GRUB on USB. But I am not sure whether multiple boot on USB is possible.
Alternatively you can try to use virtualisation on USB.I didn't try this myself and can't guarantee any success. See here for details.


how to solve No CMAKE_Fortran_COMPILER could be found.?

it's probably missing gfortran Try installing the gfortran using the following command:

$ sudo apt install gfortran

Try installing the gfortran. It maybe works!


How to switch off GIMP message on RawTherapee export?

Add an error console tab somewhere in the interface where it isn't in the way to suppress the warnings:

Windows -> Dockable Dialogs -> Error Console.

Error messages should now go to this window instead of popping up a requester. It can be repositioned like a normal tool window.

Found this info at: https://groups.google.com/forum/#!topic/comp.graphics.apps.gimp/hZCukWA2OzU


How can I backup my system to an USB stick?

SBackup is a simple backup solution intended for desktop use. It can
  backup any subset of files and directories. Exclusions can be defined
  by regular expressions. A maximum individual file size limit can be
  defined. Backups may be saved to any local and remote directories that
  are supported by gnome-vfs. There is a Gnome GUI interface for
  configuration and restore.1

To install it Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install sbackup

1Source:Debian Admin

Based on the new information that you supplied, you can use Remastersys.  Remastersys will backup your install to ISO.  Then you can use the outcome to make a Live CD/USB which can be used to install the backup to disk.

Or you can use dd to clone the original disk to USB stick but you need a big enough USB drive so the backup will fit.

Another option is to use Clonezilla.  Clonezilla is an Open Source Software for Disk Imaging and Cloning, similar to ghost.  You can get it by Clicking Here.


You may try insync. It woks pretty well, but it's non-free.


If you copy/paste the error message we may have a chance to help you.

OT: You could try http://packages.ubuntu.com or http://packages.debian.org , find another package for gdb and install it from the command line using dpkg -i [package.file.name.deb]. Try to get something more recent, an older gdb package would depend on an older version of glibc and you will end up in a dependency hell.


Ubuntu Network installation gives warning, tried with 2-3 images

This file is part of the APT package repository; it sounds like you need to regenerate it with the tools for creating an APT repository.

Unless you've all of the other bugs worked out of your install process, I'd start by using an internet-based repository. Once the install process works, then make a local repository and test that for installing.

Alternately, set up the repository and test it by installing packages to other systems (not installations). Once you've got the APT repository working, then use it for installation.

There are a number of good documents describing how to do this; one is from Joseph Ruscio; one is from HiddenTao (Ramesh Nair); and one is from Stichting Lone Wolves of the Netherlands. There is also the Debian Repository HowTo.


How do I set a custom cursor theme in Ubuntu 12.04?

You can do this by using two tools, ubuntu-tweak and gnome-tweak-tool. But if you say it works sometimes and doesn't sometimes, then I think your problem is with your cursor theme, not with how to activate it.


How to install python-gpgme ubuntu 14.04

aptitude, apt-get, synaptic are all front ends. You can use any of them:

apt-get install python-gpgme
aptitude install python-gpgme
(some GUI method for Synaptic)

From 17.10, python-gpgme has been deprecated and replaced by python-gpg. Use that as the package name instead.


three finger tap not working with synaptics touchpad driver

Should work in any device with "synclient". Just run:

"synclient TapButton3=2"

this sets the middle finger button to the gesture action configured, namely paste the selected test.


How about using Dansguardian?

Info here and here


Automatic Connect to SMB server from 16.04 file manager

To automatically mount shares at boot do the following:

Edit the /etc/samba/user file using gksu gedit /etc/samba/user and add:

username=samba_user
password=samba_user_password

Note: KDE users must use kdesu rather than gksu and instead of Gedit they can use Kwrite as editor.

Change the permissions on the file for security:

sudo chmod 0400 /etc/samba/user # permissions of 0400 = read only

Create a directory where you want to mount your share:

sudo mkdir /media/samba_share

Using any editor, and add a line to /etc/fstab for your SMB share as follows:

sudo cp /etc/fstab /etc/fstab.bak
gksu gedit /etc/fstab

//myserver_ip_address/myshare  /media/samba_share  cifs  credentials=/etc/samba/user,noexec  0 0

To mount the share now, without rebooting:

sudo mount /media/samba_share

To increase security at the expense of convenience, use this line in /etc/fstab:

//myserver_ip_address/myshare  /media/samba_share  cifs  noauto,credentials=/etc/samba/user,noexec  0 0

This ensures a password is always asked before mount the shares folder

Source:

https://help.ubuntu.com/community/Samba/SambaClientGuide


How to write a bash completion to complete director names starting at ~/

Your description seems odd: If you get just proj1, how do you know what its parent directory is?

Anyway, to give you what you asked for:

# for me, this takes a looooooong time [1]. Do it once and cache it
mapfile -t _all_dir_names < <( find ~ -type d -printf "%f\n" )

# the function you want completion for
myfunc () { echo hello world $*; }

# the completion function
complete_myfunc() {
    local dir cur=${COMP_WORDS[COMP_CWORD]}
    COMPREPLY=()
    for dir in "${_all_dir_names[@]}"; do
        if [[ $dir == "$cur"* ]]; then
            printf -v dir "%q" "$dir"      # protect whitespace in the dir name
            COMPREPLY+=("$dir")
        fi
    done
}

# registering the completion
complete -F complete_myfunc myfunc

[1]: 2 minutes, 66782 directories


Ubuntu security risk due to default VLC 3.0.4 package?

To install the vlc snap package version 3.0.7 in all currently supported versions of Ubuntu open the terminal and type:

sudo snap install vlc

VLC is the VideoLAN project's media player. Completely open source and privacy-friendly, it plays every multimedia file and streams. The vlc snap package will be updated automatically in the background when updates are available.

The Linux ecosystem has several methods for opting out of security risks like this one. If there isn't an updated snap package available sometimes it is possible to install an updated version of the same package in a virtual environment, for example with python3-kivy which has a bug in 18.04 using this workaround. Another possible safe alternative is to search for an updated flatpak package of the same application and install the flatpak package in your own home directory as a normal user without root privileges.


Expansion for   Bash is  Bourne Again shell.

  Bash is the shell, or command language interpreter, for the GNU
  operating system. The name is an acronym for the ‘Bourne-Again SHell’,
  a pun on Stephen Bourne, the author of the direct ancestor of the
  current Unix shell sh, which appeared in the Seventh Edition Bell Labs
  Research version of Unix.

  Bash is largely compatible with sh and incorporates useful features
  from the Korn shell ksh and the C shell csh. It is intended to be a
  conformant implementation of the IEEE POSIX Shell and Tools portion of
  the IEEE POSIX specification (IEEE Standard 1003.1). It offers
  functional improvements over sh for both interactive and programming
  use.

  While the GNU operating system provides other shells, including a
  version of csh, Bash is the default shell. Like other GNU software,
  Bash is quite portable. It currently runs on nearly every version of
  Unix and a few other operating systems - independently-supported ports
  exist for MS-DOS, OS/2, and Windows platforms.

Source


Welcome Callum B to AskUbuntu,
first i want to give you two advices regarding Ubuntu (and eventually every piece of sofware):

1- keep always a backup of the files/settings that you are going to modify

2- try to search for answers already made in the topic, that will give you a more mature answer to use

for this case
try running sudo update-grub this way you will restore the windows menu entry
then backup the file and try renaming again


Are there plans to port Ubuntu to the Nexus 10?

There are currently no plans to support the Nexus 10, as it is based on the Exynos chipset rather than Tegra 3, which is in the Nexus 7.


External USB hard drive makes noises when the computer is turned off

If you can not access the S.M.A.R.T data of your external drive then most likely the USB controller of your USB-drive does not support SMART commands. This may be overcome with
smartmontools
a tool collection designed for testing and reading SMART data that also work on external USB drives.
There also is a GUI for smartctl GSmartControl
After installation these applications need to be run as root, e.g. from a terminal with
gksu gsmartcontrol

In case you encounter errors you may have an imminent disk failure ahead. If not, then you may only have a poor noise protection from your external drive case, resp. a drive that makes some noise on idle.


Apple Magic Mouse 'Successfully connected but doesnt work'

In a Terminal, type these commands:

sudo apt-get install blueman

sudo reboot

Then will works fine. Seems it's a bug in new Bluetooth manager.


How about this:

for i in *.report-server; do echo mv "$i" "$(date -d@${i%%.*} +%d-%m-%Y.${i##*.})"; done

This loops over the .report-server files in the current directory and for every file prints a line like

mv 1509106656.32538_1.report-server 27-10-2017.report-server

where you can check the file name. If it does what you want, simply remove echo from the command and run it to perform the renaming.

Be careful! If you end up having multiple files with the same date mv will (by default) silently overwrite the first ones. If you want to preserve the (presumably unique) .32538_1 part, change ${i##*.} to ${i#*.} in the command. If you want mv to ask before overwriting files, add the -i option.


Empty Desktop, Unity Launcher & Dash Missing

What version are you running? I ran into the same problem and just switched to xrdp. This article is pretty straight forward: http://blogs.bu.edu/mhirsch/2013/12/xrdp-on-ubuntu-12-04/

...or this:

sudo apt-get update && sudo apt-get install xrdp

then

echo "gnome-session --session=ubuntu-2d" > /home/YOURUSER/.xsession

then

sudo /etc/init.d/xrdp restart

Hope that helps.


how to create home directories for users automatically when they log in?

We can achieve this using below command & it will create home directory automatically when they log in, for only those users who do not have it & it also does not affect any other users who have their home directories already set. This command also works for LDAP users & normal local users.

authconfig --enablemkhomedir --update


sudo error "sudo: /var/lib/sudo/approachit writable by non-owner (040777), should be mode 0700"

Try to solve running the command:

sudo chown -R root:approachit /var/lib/sudo/approachit

Then run the command:

sudo chmod -R 700 /var/lib/sudo/approachit


Network not working on openstack instance

You need to associate your ubuntu-net with your instances and associate a floating IP.


Components that are (afaik) oficially supported:
PSU,
Case,
Liquid cooler,
vga,
m.2 ssd
Components that work if you can POST:
CPU,
MB,
RAM,
Conclusion:
It will work, if you can get into the BIOS (you can do xmp and cpu overclock there). I've heard that you might have some speed issues before driver installation and kernel updates.
Answer:
You can use any ubuntu (x86 = x86), but for optimal performance and support, use 20.04 LTS. If you want the newest of everything and don't mind updating every 6 months, use 20.10. If you want a windows alike look, use Kubuntu.


One solution is to make sure that the boot loader is installed to the MBR of the external disk.

If possible remove the internal disk before installing Ubuntu, make sure that Ubuntu only finds the external disk during the installation, when you want to run Windows7 you need to select the internal disk as boot device on your BIOS, when you want to run Ubuntu you need to select you external USB disk as boot device on the BIOS.

This way you have 2 disks, separate, both with information on the MBR and a boot loader but no interference between the 2 of them.

About the sizes and partitions, if you are making backups to the external disk I recommend that you make a 3rd one on another drive just to be sure and during the Ubuntu installation choose "Install Ubuntu along side with Windows", Ubuntu will try to re-size the partitions on the external disk and install it self to the space you assign.

If you are not going to make a intensive use of Ubuntu for now 30Gb sounds good enough, you can re-size the partition later on to take more space from the backup partition later on if needed.


How to change Teamviewer ID after cloning

Close TeamViewer. Then run in the terminal:

sudo teamviewer --daemon stop
sudo rm -f /opt/teamviewer9/config/global.conf
sudo teamviewer --daemon start

Edit: I checked, and TeamViewer also looks at your MAC address. It probably works like this. When you first start TeamViewer (with no configuration files available), it looks up your MAC address. If it is not known by TV, it creates a new TeamViewer ID and associates your MAC address with it. If the MAC address is known, you get the teamviewer ID associated with it.

So, if you clone to a new computer, the commands above would help you get a new ID. If you use them on the original computer, you'll get the same ID.


I say yes because Ubuntu operates under the GNU General Public License (GPL) and all of the application software installed by default is free software. In addition, Ubuntu installs some hardware drivers that are available only in binary format, but such packages are clearly marked in the restricted component.

Sources:

https://en.wikipedia.org/wiki/Ubuntu_(operating_system)

https://en.wikipedia.org/wiki/GNU_General_Public_License

Note: I am NOT an attorney.


To set your time-out 10 seconds (Adjust as you like):

echo 10 > /sys/module/snd_hda_intel/parameters/power_save

You can verify if powersave is on by

cat /sys/module/snd_hda_intel/parameters/power_save_controller

Powertop will always show 100% cpu on those though, it's a known error.


Cannot access the /usr/local/bin directory

If you want to put something in /usr/local/bin/, the command usually is:

sudo cp file /usr/local/bin/

Depending on the source / permissions of the files, you may additionaly need a chmod:

sudo chmod +rx /usr/local/bin/file

It's hard to uninstall or update individual packages from /usr/local/. If it includes libraries, it might even interfere with official packages. Best not to use it in the first place. If it's a software that's available in Ubuntu's package manager (or one of the PPAs), stop whatever you're doing and use that instead (sudo apt-get install software). If there's no ready to use package, the best option is to learn how to build one yourself.

Ubuntu is a very popular distribution. If you Google for something specific, in most cases you'll find someone else has already done the packaging work for you.


Network manager issue: The system network services are not compatible with this version

Get onto a working machine (or plug into internet using an Ethernet cable)  and download these three packages ... they are the working versions prior to recent broken release :

wget http://mirrors.kernel.org/ubuntu/pool/main/libn/libnl3/libnl-3-200_3.2.21-1_amd64.deb

wget http://mirrors.kernel.org/ubuntu/pool/main/libn/libnl3/libnl-route-3-200_3.2.21-1_amd64.deb

wget http://mirrors.kernel.org/ubuntu/pool/main/libn/libnl3/libnl-genl-3-200_3.2.21-1_amd64.deb

once downloaded copy onto a memory stick or similar then transfer onto your broken ubuntu box ... then install :

sudo dpkg -i libnl-3-200_3.2.21-1_amd64.deb
sudo dpkg -i libnl-genl-3-200_3.2.21-1_amd64.deb
sudo dpkg -i libnl-route-3-200_3.2.21-1_amd64.deb

reboot and your Wifi will be back working ... enjoy


/boot is only used on booting the linux (or updating it's boot files). Caching it will not give any performance improvement if your computer is not rebooted.

Consider using fast drive as swap partition


Partition moving resizing and separate home partition, is disk space from / also used?

No, your disk usage for your / does not include your home directory.

Have you thought about putting your home in the empty space instead of sliding everything over?  Either way, GParted won't be able to move/resize a file system while it's mounted and being used.  You can use your Ubuntu live drive or disc for that if you've got one.

The more direct route would be to boot friendly-recovery, and use parted to adjust your partition table, and then use resize2fs to adjust filesystems.

Anyways, you now need to match your universally unique identifiers (UUID) for your changed filesystems (see by running 'sudo blkid') to your filesystem table entries in the file '/etc/fstab' .. notice the UUIDs, and mount points.

Next, update your boot image with 'sudo update-initramfs -u', and then run 'sudo update-grub' to be able to boot that image.


Ubuntu 18.4 - Network adaptor running at Half Duplex?

Use mii-tool to set the interface to full duplex:

  mii-tool -F speed-mode interface

In the following example the speed is "100 mb/s full duplex" and the interface is "enp7s0"

  mii-tool -F 100baseTx-FD enp7s0

To set the interface to gigabit speed, use 1000baseTx-FD (run "mii-tool" to get the full parameter list).

You can make this command permanent upon reboot, creating a init.d script, or using /etc/rc.local.

Create /etc/rc.local:

  printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee -a /etc/rc.local
  chmod +x /etc/rc.local

Then, edit the /etc/rc.local local and insert the mii-tool command before the line containing exit 0.

Check also the Ethernet cable and the network hub/switch.


Battery capacity below 100% in Dell laptop and battery misbehaving

You can open the application "Power Statistics" to monitor the charge and discharge trends for your battery.

If you open the BIOS and go to the Battery page it should tell you if the status is far outside of "normal" for your battery according to Dell (usually if the current maximum charge  is <70% of the design charge).

Google Chrome is a notorious battery hog due to the number of background threads it runs for plugins/GPU processes/etc. Try running Firefox or using an extension like "The Great Suspender" to sleep tabs you haven't looked at in XX minutes and you may see much better battery life. Extensions like NoScript and AdBlock that prevent Flash ads from playing can also help. I've found that sites like WebUpd8 and Wikia can really kill the battery quickly due to the number of ads they use to sustain the site.

There are utilities like TLP that can really help with monitoring and controlling your power usage. A helpful article on getting started can be found here.

There is also a GUI for TLP available if you check out this answer


Trying to use symbolic link gives me "command not found" error

That is likely nothing to do with symbolic links per se - it is probably because by default the shell does not search the current directory for executable files (regardless of whether they are regular files or symbolic links) - if you add the relative path to whatever i.e.

./whatever

it should work.


to run ubuntu.sh, your android does need to be rooted, and from the terminal emulator you must first grant super user privelage by executing the su command, then you can sh ubuntu.sh, and after it loads , it is running as a vnc server, in order to view, and manage ubuntu.sh you would need to use a vnc viewer and on the same device the ip address to connect would be 127.0.0.1 if I'm right, its been a while since ive done so myself since upgrading to android 4.0.4 ICS, which sacrifices performance to give me beauty.


How do I make music sync with iOS 5 in Ubuntu 11.10 work?

Unfortunately, there is just no accepted to this solution at the moment. All we can hope for is that an iOS update makes it easier for libimobiledevice to mount our iDevices or for an update to libimobiledevice.

Not the most helpful of answers, I know, but at the moment that's all there is I'm afraid.


How do you add a new window manager to the gdm menu?

By gdm options menu, do you mean the list at the bottom of the login screen ?

If yes, then, as far as I know, the "correct approach" for adding a window manager to the list of session options presented to user at login time is to add a .desktop file to /usr/share/xsessions. Take an existing .desktop file there as starting point (say, gnome.desktop) and modify fields like Exec, TryExec, Icon to suit your new WM.

Since this is so obvious (by that I mean covered in the tutorials of many WM's I have tried to add), I think I haven't understood your question well. Can you confirm if you have tried this ?


curl: (56) GnuTLS recv error (-9): A TLS packet with unexpected length was received

For me, adding the -k/--insecure option to curl solved the issue:

curl -k [URL...]

This works by allowing the connection to proceed even if the SSL certificate cannot be validated. This helps get around some problems, including server misconfiguration, but you should be aware that you may not be able to trust the data you download. As the curl manpage says:

  -k, --insecure

  (SSL) This option explicitly allows curl to  perform  "insecure" SSL
  connections and transfers. All SSL connections are attempted to be
  made secure by using the CA certificate  bundle  installed by
  default. This  makes all connections considered "insecure" fail unless
  -k, --insecure is used.

  See this online resource for further details:
  http://curl.haxx.se/docs/sslcerts.html


Spyder5 Monitor Calibration Ubuntu 14.04

I've just experienced this same issue with my new Spyder5 on Ubuntu 14.04. For the sake of completeness, (and for my own future self googling this :-), I'll add all issues I've ran into and their solution:

Problem: dispcalGUI does not detect the instrument at all
Solution: Argyll CMS needs to be downloaded and installed manually, as stated in the first step of the dispcalGUI Quickstart Guide. After installing, run dispcalGUI, select File -> Locate Argyll CMS executables and locate the bin folder of your Argyll CMS installation.
Problem: Calibrate & profile fails with Error - new_disprd() failed with 'Instrument Access Failed'
Solution: Check if /etc/udev/rules.d/55-Argyll.rules exists. If not,
copy it from the Argyll install directory (or downloaded package). It
is in the folder usb/. Then reboot the system or at the very least,
unplug the device and plug it back in again. More info can be found in
the Argyll installation
manual.
USB 2 / 3
Apparently there might be issues when using some devices on an USB 3 port.
If possible, try switching it to an USB 2 port and see if this helps.
In my case it was not necessary, the Spyder5 runs fine on my USB 3 port.
Last resort
If all else fails, you could run either Windows or OS X on a separate
partition and do the calibration there using the vendor software. The
resulting ICC profile is compatible across operating systems, so it is
possible to import it to Linux. I haven't looked into this in detail as dispcalGUI seems to be working now for me.


Make Xfce display manager use internal monitor after restart

I found a way to activate the internal monitor while no display is active.

Following instructions here and upgrading to Xfce 4.12, there is a new window for xfce4-display-settings -m which by default is already activated by pressing Superkey-P. (Logout and in after upgrade.)

Even if the monitor is still closed,  press Tab (three times in my case), and then Enter, but pressing one or two times and Enter would still activate internal display.

Even easier: instead of Tab, use right-arrow multiple times and then Enter: the internal display is the last button to the right and it stays selected in this way.

But in fact this might have worked even before the upgrade with just the advanced window (xfce4-display-settings; before upgrade, adding -m displays the same window as far as I can tell) by pressing down-arrow key, then Tab (once) and Enter.

But the upgraded version is more interesting, more easy to use and has enhanced features (extended display).

After vasa1's answer to a different question, a solution emerged that in the end may be preferable, as it involves single, separate, clear shortcuts for each display configuration.

But this involves LXRandr, the LXDE default display manager, which can be installed from repos and used perfectly under the Xfce desktop. It is a GUI for xrandr and saves its configurations.

Save the desired configuration (the internal display in this case)
`

Use gedit or other text editor to open the saved file:

gedit ~/.config/autostart/lxrandr-autostart.desktop

Copy the executive command (it would be something like xrandr --output LVDS --mode 1680x1050 --rate 60.1 --output VGA-0 --off)
In Xfce, under Menu, Settings/Keyboard/Application shortcut, add this command and the shortcut.

This procedure can be repeated for the other two options (external monitor only, or mirror image - but there's no dual display in lxrandr).


What you need to install depends completely on the hardware. Most things should work out-the-box and those that don't or have other drivers available should suggest the drivers that can be installed.

In the case of a wireless chipset, this can mean you need a wired connection to download the driver but my experience of Atheros is largely positive (just works, no additional drivers required).

You can look up to see if things will work but frankly, that's a lot of time unless you're using a very popular SKU (eg macbook, certain dells, etc) and there's a single page about it. By all means Google for your laptop model with "Ubuntu" in the search.

But I would suggest testing the LiveCD. You can burn a CD and be running in a real Ubuntu environment without installing anything. You'll see first-hand how much is working and how well it works.

Two things about what you're installing though:

10.04 is old in technology terms. Yes, it'll be supported for a while yet but driver improvements don't always find their way back to older versions. Try the LiveCD first. If everything works out the box, ignore me. If it doesn't, try the LiveCD of 11.10 and if that makes a large difference, I'd go newer.
Server? I'm not entirely sure why you're going to install a text-mode operating system on a laptop. There are valid reasons so I won't hark on about it too much but if this is your first real install, server isn't going to hold your hand as much as the desktop install process will.


Bluetooth from the command line in 12.04?

Pair a new device
In Bluez4 install the bluez  package to be able to pair a device from the command line with bluez-simple-agent (Bluez5 will provide the bluetoothctl command):
bluez-simple-agent hci# xx:xx:xx:xx:xx:xx

Replace # with the Bluetooth adapter number (e.g. hci0) and xx:xx:xx:xx:xx:xx with the MAC of our Bluetooth device.

To get the number of our adapter we may issue:
  hciconfig

The MAC of devices can be scanned for with the following command:
  hcitool scan

The Bluetooth device should be in pairing mode of course. Enter the pin code when asked to pair the device.

Remove a paired device
If we already had paired a device and need to remove it from the database (e.g. for re-pairing) we may do so with
bluez-simple-agent hci# xx:xx:xx:xx:xx:xx remove

Note for keyboards (or mice): Until the Bluetooth keyboard is paired we may need to enter the PIN using an additional wired keyboard. See with the manual of your keyboard how the pairing is done (some expect PIN in computer first, some in keyboard first. Some may have a fixed PIN).
After pairing, we connect the keyboard with:
sudo bluez-test-input connect xx:xx:xx:xx:xx:xx

To allow auto-connection after a reboot we can add the device to the trusted devices:
sudo bluez-test-device trusted xx:xx:xx:xx:xx:xx yes


You can use sed -z 's/\r\n\r\n/\r\n/g'.
Normally sed only works on one line at a time. By using the -z option, sed will work on lines, which are seperated by 0 bytes, which normally don't exist in a text file, so the whole file will be treated as one line and newlines can be replaced.
(found on stackoverflow and added explanation)


How to make it impossible to mount an ntfs partition?

How to hide a(n) (NTFS) partition from ubuntu could be the solution you are looking for. It uses udev rules to achieve the result. If you are worried about changing device names, you could use UUID to mount the drive. blkid command will give you the UUID of the drive.

Or if you want to totally disable NTFS support, you could blacklist the NTFS Linux kernel module by sudo gedit /etc/modprobe.d/blacklist.conf and adding the line blacklist ntfs. You might have to reboot for the changes to take effect. I have not tried this out.


For just formatting a USB, there's no need to install any external packages.
Ubuntu 18.04 comes with Disks (gnome-disks) which can do basic management of drives.
You can launch it, then select the drive you want to format, click the vertical ellipsis icon (⋮) then Format Disk....


Sup is a console-based email client for people with a lot of email.

  It presents an interface of a list of threads, which are each
  hierarchical collections email messages. Threads can have multiple
  tags applied to them. It supports a very fast full-text search,
  automatic contact-list management, custom code insertion via a Ruby
  hook system, and more. If you’re the type of person who treats email
  as an extension of your long-term memory, Sup is for you.

This might be tool you're looking for...At least it should fulfill your requirements. Not sure tho. :-)

https://github.com/sup-heliotrope/sup


Where is error log in Looking Glass in gnome shell 3.6?

For everyone coming here with a similar problem. After research I found out for Gnome Shell 3.20.4 the errors are logged via journalctl

journalctl /usr/bin/gnome-session -f

If this (recommended command by gnome) does not help (like for me) use this command instead:

journalctl -xe


How does my encrypted /home work, and how can I get it to work via cl on another linux distro?

You will need to run

ecryptfs-unwrap-passphrase

from the command line to retrieve and record your generated passphrase.

(If you encrypt your home directory during installation, Ubuntu will show that message when you log in to your new system.)


Is a package a hybrid when its ex, Version 2.0.0 Really 1.8.2?

If you read the changelog entry for the specific version you're talking about it explains why they had to upload with +really2.6.1:

banshee (2.9.0+really2.6.1-0ubuntu1) trusty; urgency=low

  * [fbf05ca] Imported Upstream version 2.9.0+really2.6.1:  <---
    Downgrade to 2.6.1 -- 2.9.x is unstable and 3.0 won't arrive in time for
    release
  * [22de440] Revert packaging to 2.6.1-2ubuntu1
  * [7357b73] Merge changes from 2.6.1-5
  * [a7156c0] Filter out libgpod-cil-dev versions built against gtk#3
  * [e7c634d] Update dversionmangle for extracting +really version out
 -- Chow Loong Jin <hyperair@debian.org>   Sun, 09 Feb 2014 23:06:03 +0800

The problem with apt repositories is that once a version that is uploaded that supersedes the older version number, you can't easily get apt and dpkg to take the old version number and bump it back upwards.  Because they reverted to 2.6.1 and can't revert the version number truly to 2.6.1 because Trusty will start to complain, they had to do it this way.

This does not mean it's a hybrid package.  They just reverted everything back to 2.6.1 and merged some changes from Debian 2.6.1-5 into this version.  They had to add the +really2.6.1 so that apt would see this as a higher version than 2.9.0-2ubuntu1 on Trusty systems is all.


An error is going out on the stderr output. So you if you want to log it you have to redirect it's output into a file.

e.g.

php myscript 2>myscript-err.log

stdin, stout and sterr are handled by the shell through some variables as in stdin is 0, stout is 1 and stderr is 2. So if you want to redirect anything of those you use either variable to do so.


Is it possible to change the font of Adobe Flash Player in Google Chrome?

Could it be that you're missing some standard fonts, and the closest match isn't close enough?

Just guessing here, but from what i remember flash handles fonts in 2 ways, embedding them (should look just the same on every system) and using defaults from the system (kind of like in html, where you can specify "Arial, Verdana, .." and it will attempt to use these in order if available.)

Do you have the corefonts installed? If not try installing them with

sudo apt-get install ttf-mscorefonts-installer

and see if that fixes it.


Add a section as part of your 'phockup' part.

stage-packages:
  - exiftool

This will stage exiftool inside your snap.


OOPS - installed Kylin and don't speak Chinese

Ubuntu Kylin is a totally chinese version. If you can find the keyboard settings you will be able to install more languages but ... good luck with that.

You can find all versions on the releases page and the alternative downloads page.


How to get correct Modeline for an external display?

Not exactly the modeline, but you can download the monitor's EDID information where all supported resolutions are listed. I would use get-edid and parse-edid tools from read-edid package (http://manpages.ubuntu.com/manpages/oneiric/man1/get-edid.1.html). Then try to use the EDID information when starting X instead of asking the monitor for that information every time.

I know that nvidia driver has very good support for custom EDID file. I am not sure how it is supported in other drivers. I am sure you will figure it out.

Commands:

sudo get-edid > ~/lg_edid
parse-edid < ~/lg_edid


That's not a grub rescue prompt. It's a grub prompt. There is a difference - you have many more commands at your disposal - but it's not going to help you much, because it's a fresh install.

Usually when Wubi users experience this it's due to filesystem corruption and you can just run chkdsk from Windows or fsck from a live CD, but in this case, it's probably a different issue preventing Grub from loading the menu (grub.cfg) from the virtual disk (root.disk).

Not really sure what could cause this, but it happened to someone else recently - have a look here: http://ubuntuforums.org/showthread.php?t=2112111

You can try a few of the commands and see if your problem is the same, and if so, file a bug.


How to make Ubuntu 18.04 on screen keyboard work with Google Chrome?

The new Gnome on-screen keyboard in Ubuntu 18.04 is this one:
https://help.gnome.org/misc/release-notes/3.28/

However, note that the description in these release notes is quite misleading  (and the description in the Ubuntu help is as well in a different way: It depends on whether you use the default X session or Wayland, and enabling it in Universal Access settings may or may not help).

Following is a (slightly edited for correctness, though there may still be mistakes based on confusion) copy of my recent comment on an earlier bug report. You can find further links including additional new bug reports there: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1760399

Auto-summon of the new OSK in Ubuntu 18.04 only works with application/toolkit support. Text widgets in alien (non-Gnome or non-Gtk?) toolkits don't summon the OSK (Chrome, Firefox, Qt, whatever other toolkits; I don't know if this is even standardized by freedesktop.org.
Because of alien toolkits there is always a need to summon on demand. Since Gnome 3.28 in Ubuntu 18.04, you can summon on a touch screen by swiping up from the bottom of the screen. However, this ONLY works in a Wayland session, not in X. I can confirm that it does. None of this is described in the Gnome 3.28 release notes or the Ubuntu 18.04 help. These are clearly documentation bugs.
Judging by the confusion in this bug report and the many questions on Askubuntu,com, it seems that the swiping up eluded even those users who have access to the feature because they use Wayland. Quite clearly this is not sufficiently discoverable, which IMHO is a bug. (Of course this is not helped by the buggy docs)
The Gnome extension to summon on-demand (https://extensions.gnome.org/extension/1061/on-screen-keyboard-button/) does NOT work with touch in Ubuntu 18.04 (Gnome 3.28) according to the author, and neither does it in Cosmic (3.30). It works with the mouse but this is awkward to say the least. The author will hopefully be able to look into it but it may take some time.
I don't know why for me in Gnome 3.30 (Cosmic) the auto-summon only works for Activities and Applications menus search boxes, and not elsewhere in Gnome as far as I can find. Hard to believe that this is a bug in every Gnome application, maybe a Gtk bug?


Are there any stats about ubuntu touch sales?

The Meizu phone has not been released yet, so the number of those units sold would be 0.

However, the sales are not via Canonical or Ubuntu sites. It is up to the manufacturers if they wish to post sales/return rates for the phones.


Is it possible to “SSH” into my virtual machine remotely?

To install/configure SSH you should check out one of many guides you can find browsing the internet, this one for example.

You can connect to your viritual machiene via SSH using the following command:

ssh user@ip

You will thereafter be prompted to enter your password. To be able to connect you need, as said, an IP. When connecting locally you have a local IP. You can check this address for the current system using the ifconfig command. Example:

ifconfig
eth0      Link encap:Ethernet  HWaddr e8:39:35:42:ed:96
          inet addr:191.13.238.54  Bcast:191.13.255.255  Mask:255.255.0.0
          inet6 addr: fe80::ea39:35ff:fe42:ed96/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:85385 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77885 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:48235010 (48.2 MB)  TX bytes:9640323 (9.6 MB)

The inet addr being your local IP address, in my case 191.13.238.54. If I would connect to my SSH server on my computer I would therefore execute the following:

ssh user@191.13.238.54

To allow connecting from outside of your network you are required to forward the incoming traffic, on the port SSH is running on, to your local IP address via a admin panel for your router. Some routers may not support this and the admin panel work differently between manufacturers. You can always call customer support if you are stuck with this issue.

To check your "global" IP address you can visit this website: what's my IP?

When connected to your "server" through SSH you can perform various tasks such as SQL:

mysql -u root -p -h 127.0.0.0

In the above scenario root is the user, password is enabled through -p and the host is 127.0.0.0/localhost (your local computer).

You can also access files using nano or any other text editor like the very popular and powerful (and complicated) vim. All in all you now have the power of a terminal in your hands, that is if you connect via PuTTY.

Connecting via, say Ubuntu's file manager, gives you a better visual experience and allow you to edit files in a GUI editor rather than through the command line. Similar programs exist on Windows, you'll have to figure that one out yourself.


As indicated in this very similar question, your best option appears to be using keymon; it is fairly easy to customize it for an effect similar to what you see in your video.
1. Install keymon
From the Software Center, or via sudo apt-get install key-mon
2. Make its window minimal and enable the click indicator

The default window shows mouse and keyboard status, like:

Unless you want it, let's get rid of all these; right-click on it window, and chose Settings:. Then, uncheck everything under Buttons:

and set up the Misc tab as:

This leaves you with a minimal status window:

And the default click-indicator, which you don't like very much :)

3. Customizing the mouse-click indicator and making the KeyMon window disappear

First, let's make the keymon window disappear. Simply run it from the terminal (you can set up a launcher, script or startup too) as:
key-mon --scale=0.1

Next, the files we need to modify are in /usr/shared/pyshared/keymon, so cd to that folder.

Make the click-indicator bolder: in shaped_window.py, find win.set_opacity(0.5) around line 58 and change the 0.5 to 1.0

Increase the fade-out time: at the end of shaped_window.py, find gobject.timeout_add(200, self.hide) and change the 200 to e.g. 750 (it's in milliseconds)

Change the indicator: The indicators are simply SVG files, under themes/*/mouse-indicator.svg; you can edit these with Inkscape, etc. to customize it to whatever you want to be.

To get you started, I've created a red square like the one in your video. To "install it", just make sure keymon is not running, and download it this way (SVGs are just text files):

sudo wget http://pastebin.com/raw.php?i=rBnUiXWh -O/usr/share/pyshared/keymon/themes/classic/mouse-indicator.svg

Now start keymon, and you'll see a nice red fading-out indicator like the one in your video around the cursor whenever you click/drag:

Youtube Video Demo


Why doesn't the NetworkManager GUI need sudo privileges?

The NetwotkManager GUI asks the NetworkManager daemon to make the needed changes. This daemon runs as root so it has the privileges to change the files in /etc/NetworkManager/.


How to recover apt-get that was deleted by me?

apt-get is a kind of "frontend" for dpkg which is in an ultimate instance, who do all operations. You can easily recover your apt-get if you download the package from the repository and install it yourself:

(this is a illustrative example, I'm using the latest version of apt i386 from precise-updates repository, you should download the one that fits you, for a complete list of versions check: Ubuntu apt package list or Launchpad apt package list. You should check your installed version using apt-cache policy apt)

wget http://mirrors.us.kernel.org/ubuntu/pool/main/a/apt/apt_0.8.16~exp12ubuntu10.12_i386.deb http://mirrors.us.kernel.org/ubuntu/pool/main/a/apt/apt-transport-https_0.8.16%7Eexp12ubuntu10.12_i386.deb
sudo dpkg --unpack apt_0.8.16~exp12ubuntu10.12_i386.deb apt-transport-https_0.8.16%7Eexp12ubuntu10.12_i386.deb
sudo dpkg --configure -a
sudo apt-get update

Now you have your apt-get working again.

  Why not use --install instead of separated --unpack and --configure?

The --install switch executes tasks that are not necessary (prerm, preinst, postrm) for recovering apt binaries, and might run into problems later due the sorry state of the installation. For such reason, --unpack to get the binaries set in place and --configure to restore any lost configuration file are just necessary.


!Help! Allow another user to access partitioned drives on Ubuntu 15

First you will need to make the drives mount at boot by editing /etc/fstab. See:
https://help.ubuntu.com/community/Fstab

Once you have modified fstab and restarted and all the drives are mounted in the correct place you can set up permissions.

You will need to change the owner of Bethy's drive to her. Assuming it is mounted in /media/Bethy you can do this by running the following in the terminal.

sudo chown bethy:bethy /media/Bethy -R

This will change the user and group to be bethy. (If you need to be able to access her files then you should add yourself to her group.. see below.)

So your own partitions are owned by you, and the group should also be you. Lets assume all your drives are mounted in /media you could run:

ls -al /media/

This should list the drives in the form

drwxrwxr-x  2 julian agroup  4096 Jun  1 22:44 SomeName

This tells us that the directory "SomeName" (which could be a mounted drive, as they just mount as directories) is owned by julian and has the group "agroup". The first block tells us some permission info, the first letter tells us it is a directory; the next 3 are the owner read, write, execute permissions; the next 3 are the group, read, write, execute permissions; final 3 are the read, write, execute permissions for any other user.

For each drive you will want to make sure the other permissions are off. For example for the bethy drive you would run this command
    chmod -R o-rwx /media/bethy

this recursively removes the read, write, and execute permissions for all users that are not bethy or in the bethy group, on all files in bethy.

For the drives you want access for just you, you should make sure that your account is user and group. And also use chmod as above to remove the other permissions.

For entertainment you want to make an entertainment group that you and bethy are in. To do this run these 3 commands (I assume your username is ed)

sudo groupadd entertain
sudo usermod -a -G entertain ed
sudo usermod -a -G entertain bethy

So assuming the entertainment partition is mounted in /media/Entertainment you can run:

sudo chown ed:entertain /media/Entertainment -R

Also it is best to again use chmod to remove the other permissions.

Now we want any file added to this directory to inherit the group so we setgid with

sudo chmod g+s /media/Entertainment

Finally we need to edit how new files get file permissions so the "other" permissions are off. To do this edit the file /etc/login.defs by finding the line starting with umask and replacing the number afterwards (probably 022) with 027.

I think you need to log in and out again for your permissions to update.

That, I think, should have you ready to rock.


the error messages was removed after deleting the following directory

  rm -d -r ~/.PyCharm2019.3

and after that reinstalling pycharm will make it work like a charm


Every "apt upgrade" or similar -> The following packages have unmet dependencies

I solved the problem by reinstalling the correct package from the correct version:

wget http://fr.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.27-3ubuntu1_amd64.deb

sudo dpkg -i libc6_2.27-3ubuntu1_amd64.deb

sudo apt upgrade

Thanks to 'guiverc'


The labels come from the libsensors config file - /etc/sensors.conf - and are determined based on chipset. When you see temp1 etc. it means there is no label defined yet for that sensor on that chipset. This is probably because it your hardware is new, or your libsensors is old (unlikely with 11.04), or maybe different vendors use the sensor for different things, or other reasons.

I would suggest using the stress or other stress-testing command to put load on certain parts of your system in order to determine what the sensor is for, and then add your own label into sensors.conf, eg.:

chip "lm87-*"
    label temp1 "M/B Temp"

Replace the lm87-* with your chipset as seen in the output of running sensors from a shell.


2 libre office versions installed, not sure which to uninstall

"Best" is a matter of opinion. You have two great options.
If you prefer Deb packages, keep the upstream version.
If you prefer Snap packages, keep the Ubuntu version.
If you don't care which package, try one...then the other... until you do have a preference. Or until you forget to switch again. Or flip a coin.


How can I display a reminder while or before shutdown?

To display a message before halting, just follow these steps:

Write a script containing the commands you want to be executed, e. g.:
#!/bin/bash
# for zenity it might be necessary to set the DISPLAY variable first with the following line:
# DISPLAY=":0.0"
zenity --warning

save the script wherever you want, I use ~/scripts/myscript as an example here

make it executable with
sudo chmod +x ~/scripts/myscript

link it to the shutdown directory using
sudo ln -s ~/scripts/myscript /etc/rc0.d/k01zenitywarning

The script will be executed the next time you shut down. To execute it alsoon reboot, additionally link it to /etc/rc6.d/ with sudo ln -s ~/scripts/myscript /etc/rc6.d/k01zenitywarning.
This does what you asked for, however I also really like omid abc's approach to solve the problem – instead of manually turn off the speakers every time just mute the sound using his command (replace the zenity line in the script for that).
Edit – simpler approach
An even simpler way is provided by the upstart package, after installing it just save the following script in ~/.init/onshutdown.conf
start on starting rc RUNLEVEL=0
task
script
 # for zenity it might be necessary to set the DISPLAY variable first with the following line:
 # DISPLAY=":0.0"
 zenity --warning
end script

Again, zenity --warning can be replaced by any command(s). This script doesn't need to be made executable, just save it and you're done. For more information about upstart see man 5 init.


I dropped brigthness to 0 in compizconfig. How to recover

Press Ctrl + Alt + F1 to go to TTY mode, type your user name and password. Then run following command to restore compiz setting.

rm  -rf ~/.compiz-1 ~/.config/compiz-1

To access GUI again, press Ctrl + Alt + F7


Ubuntu 16.04.5 LTS update mysql version 5.7.23 to 5.7.26

You haven't fully upgraded your 16.04 LTS system.

Your Ubuntu 16.04 should have reported 16.04.6 on or after 28-Feb-2019, however by not fully-upgrading your release, you're behind on updates.

The packages of mysql shown with https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=mysql show 5.7.26 is the current used by a fully-upgraded Ubuntu 16.04 system.

Your need to sudo apt full-upgrade


Nvidia xserver settings reset to default on every boot in ubuntu 16.04

Okay so it turns out, the issue was with the converter / adapter. When I plugged in a DVI monitor, the settings stuck and didn't reset. Used a different VGA adapter, and the settings were still there.


If you look at the Edubuntu website, you will see that 10.04 users might be able to upgrade, although "sometimes" there are problems.  I would take this to mean that although there is an upgrade path, it may not work properly, ad a reinstall is a better solution.

The Edubuntu download page gives you the options needed to download an appropriate ISO file to burn onto a DVD, and install from there.  I would recommend that you backup all of your important files, both in Edubuntu and in Windows before you attempt to do either an upgrade or a new installation of Edubuntu.


Not positive about this, but I think this is right:

Now that you have the partition, let's assume it's /dev/hdb1

Let's make it a swap: mkswap /dev/hdb1

Now let's activate it: swapon /dev/hdb1

Let's update our fstab file to make it activate on boot: gksu gedit  /etc/fstab

add this line: /dev/hdb1       none    swap    sw      0       0

I THINK that should work, and the community will correct me where I went wrong.  Good luck!


Windows-based Network With Ubuntu Server?

As for the first question, what you are asking is kind of the reverse of what is normally done.  Normally, you would setup the Ubuntu server with Samba to serve the user's files. Samba can even be used as a NT4 style domain to centrally handle authentication, auditing, and authorization unless you are using Windows 7 Home Edition. The Ubuntu Server is a great place to start when setting up a samba server. You could set up Samba shares for each of your users and then they can save the files at their discretion.

If you are simply interested in a backup server, Bacula may be more what you are looking for. You could set up a Bacula Director on your Ubuntu server, and then configure Backula File on each of your clients.  Once again, the Ubuntu Server Guide can help you set this up.

You could share the home directories of all of the users on all of your windows machines and setup mount points on the Ubuntu Server and setup a cron job to back the files up to the server.  This will quickly get cumbersome as you add and subtract machines.  Let me know if this is really what you want to do and I will try to get you some instructions.

As for your second question, it depends entirely how you want to access your database.  If you want to access the server directly, you will need edit the /etc/mysql/my.cnf file and edit the bind-address = 192.168.0.2 parameter and change 192.168.0.2 to the ipv4 address of the server to listen over the network. Once again, this is documented in the Ubuntu Server Guide.

You could also use phpMyAdmin to access the database from any browser.  Once again, The Ubuntu Server Guide has instructions to set this up as well.

Good Luck.


auto start a reverse ssh tunnel on system startup

Just add sleep 60; before your ssh command:

@reboot sleep 60;ssh -N -f -R 0.0.0.0:1234:localhost:22  -i /home/username/.ssh/id_rsa  username@remote-server.com
after reboot your network is still down


Install Ubuntu while running Windows 8
No you can't install Ubuntu while running Windows, you will have to boot from the USB.
Install Ubuntu on UEFI enabled hardware
In most cases it is just necessary to boot Ubuntu and install it that Ubuntu will handle the UEFI settings for you. Learn more about UEFI here.
Troubleshooting
Before following the instructions given here, see this page.
Although if after installation you don't be able to choose which OS to use and your system simply start Windows 8, you will need to boot from the USB again, enable network connection and use the Ubuntu Boot-Repair Tool.
If your problem continues it means that your USB is not being booted in UEFI mode, so you will need to configure the BIOS to use only UEFI/EFI/Non-CSM Mode and if your system support the following features you will need to disable them: Secure Boot and Intel Rapid Response Technology/Intel VT-d/Intel Short Time Response. Some BIOS has an easy option: boot USB in UEFI mode, if you have this option enable it.
Then just install Ubuntu again, it is better not to choose the option Reinstall Ubuntu, but instead choose the Advanced Options, select the Ubuntu partition and mark it to be formatted and use "ext4 with journaling", then install it.
Then if you still don't get to the "choose OS screen" at boot time, run Boot-Repair once more time and everything would get fine.


Windows Ubuntu dual boot - Share files between OS

Putting /home in an NTFS partition is not advisable as Linux cannot preserve ownership and permissions on NTFS partition.

I would recommend keeping /home in the default / partition in the SSD and creating sym links to the folders with most data (Documents, Music, Pictures, videos etc.) in a "Storage" partition formatted NTFS, that both Ubuntu and Windows can read and write to.

Since /home also stores all your config files, keeping /home in the / partition in the SSD helps keep things speedy.

A detailed How To is at: http://www.howtogeek.com/howto/35807/how-to-harmonize-your-dual-boot-setup-for-windows-and-ubuntu/

After following the instructions in the "How To" create the sym links like this:

Open Nautilus and delete the folders you will not use in
/home/[user], such as Documents etc. You should already have
Documents etc. in the Storage folder. (In linux a partition is a
folder as well).
Navigate to the Storage folder and you will see the Documents etc.
folders there.
Right click on Document folder and select make Link. This will
create a folder Called "link to Documents".
Similarly, create "Link to Music", "Link to Pictures" and all the
other sub-folders in the Storage folder.
Copy these "Link to..." folders to your Home folder /home/[user].
Finally, right click on "Link to Documents" and rename it
"Documents". Repeat for the remaining links.

Alternately

Delete the folders in /home/[user] as before.

Open a terminal by pressing Ctrl+Alt+T and enter

ln -s /media/storage/Documents /home/[user]/Documents
ln -s /media/storage/Downloads /home/[user]/Downloads
ln -s /media/storage/Public /home/[user]/Public
ln -s /media/storage/Pictures /home/[user]/Pictures
ln -s /media/storage/Music /home/[user]/Music
ln -s /media/storage/Videos /home/[user]/Videos

Hope this helps


How do I migrate a Virtualbox image to an LXC container?

For those who might be wondering:

The following article covers booting a raw image as a container.
Perfect for my situation as we use raw images with virtualbox.

https://www.stgraber.org/2012/03/04/booting-an-ubuntu-12-04-virtual-machine-in-an-lxc-container/

Charlie101


Overwrite Vista with XP Professional and then reinstall Ubuntu

Windows programs will not natively run in Ubuntu because Ubuntu is based on Linux, and Windows is based on DOS. (Correct me if I'm wrong.) They're two very different environments.

One way to run Windows programs in Ubuntu is by using wine, but even that is a bit unstable.

Did you use wubi to install Ubuntu inside the Windows partition? If so, back up all your files in Ubuntu first, then boot from the XP disc, then opt to erase the Vista partition.

Or did you install Ubuntu on a different partition? If so, no need to delete Ubuntu, just directly boot from the XP disk and erase the Vista partition for installation!

What sound hardware do you have (e.g. sound card, speakers, etc.)? Perhaps you just need some drivers.


Is there a tool that lets you navigate to frequently used directories more easily?

Here's a link from the LinuxJournal with script that would do just this:

http://www.linuxjournal.com/article/10585


echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-grub2
sudo update-initramfs -u

or have a look at this page (in spanish): http://lavidalinux.com.ar/2010/05/como-arreglar-plymouth-en-ubuntu-10-04.html


Go to System Settings -> User Accounts. The second entry is the user's language, you will be able to change it to english from there.


Cannot save files or links to the desktop in Ubuntu 19.10

I have found a Gnome extension that does the job Desktop Icons NG (DING) by rastersoft


Keyboard repeat/delay is reset occasionally in Ubuntu 18.04

You can create a script to automatically reset keyboard repeat rate during resume:

#!/bin/bash

# NAME: keyrepeat
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically
# DATE: July 4, 2019.

# NOTE: https://askubuntu.com/questions/1086780/keyboard-repeat-delay-is-reset-occasionally-in-ubuntu-18-04

case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
        ;;
  post/*)
    echo "$0: Waking up from $2..."
    gsettings set org.gnome.desktop.peripherals.keyboard delay 250
        ;;
esac

Place the script in /lib/systemd/system-sleep.

Make it executable with:

chmod a+x /lib/systemd/system-sleep/keyrepeat

Reboot and then every resume after suspend the command:

gsettings set org.gnome.desktop.peripherals.keyboard delay 250

is automatically run.


If you are asking how to install Adobe PDF for Ubuntu 64 bit 15.10, then here you go. Open a terminal and execute the following commands:

First, install the dependencies:

sudo apt-get install libatk1.0-0 libc6 libfontconfig1 libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk2.0-0 libidn11 libpango1.0-0 libstdc++6 libx11-6 libxext6 libxml2 libxt6 zlib1g lsb-release debconf

Then, download and install adobe reader:

wget http://archive.canonical.com/pool/partner/a/acroread/acroread-bin_9.5.5-1raring1_i386.deb
sudo dpkg -i acroread-bin_9.5.5-1raring1_i386.deb

Finally, open adobe reader and accept the licence:

acroread &


Surpress command line questions during package installation

Thanks to the user seahawk1986 in the German Ubuntu forum:
https://forum.ubuntuusers.de/topic/kommandozeilen-abfrage-bei-paketinstallation-u/

I found a solution to the problem:
https://debian-handbook.info/browse/en-US/stable/sect.automatic-upgrades.html#id-1.9.17.9

I made a skript:

#!/bin/sh
export DEBIAN_FRONTEND=noninteractive
/usr/bin/yes '' | /usr/bin/apt-get --yes --force-yes --quiet -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install "$@"

--yes - Reply with "yes" to every question
--force-yes - Force to reply with "yes" to every question
--quiet - Don't show e.g. any progress bars.
-o Dpkg::Options::="--force-confdef" - Use the default answer if a configuration file should be replaced.
-o Dpkg::Options::="--force-confold" - Use the old configuration file if a configuration file should be replaced. Just in case the --force-confdef doesn't work.
"$@" - All package paths I pass to that script.
export DEBIAN_FRONTEND=noninteractive - Use only non-interactive mode when installing / updating packages.

The interesting part is the

/usr/bin/yes '' |

So far I've never worked with "yes". It simply prints 'y' followed by a line-break (means Enter) which then can be piped to the standard input (stdin). In this case we just use an empty string. That way "yes" floods the stdin with Enter inputs. If a question pops-up, in most cases the default option is used when replying to that question just by pressing enter. And that's the magic which helped me.

Hope that also helps to other people facing the same or similar problems.


i installed ubuntu in a different drive and windows was already there in another drive

Open the bios (Normally your delete key) and set the boot order to begin with your Ubuntu hard drive. When grub loads and offers a few ubuntu options, pick Ubuntu -(Recovery mode). A menu should load up, select update grub and hopefully that should allow you to select windows or Ubuntu at the grub menu rather than having to worry about the bios.


auto-remove of files from U1 account as soon removed from U1 folder

Ubuntu One (U1) is a file and folder synchronization service. It is designed to keep the files in our computers in sync with the files in the cloud. It is not designed to be a file storage and backup system. So if you delete the files from your local folder they will be deleted from the U1 server and any other computers you have U1 signed on with the same account.

To do what you want, remove the computer (Remove Device) from Ubuntu One's account. You can do this by going to the Ubuntu One web page, signing in, and going to the "My Account."

Then Ubuntu One will not sync files from this computer. You can still upload the photos and other files in Ubuntu One using the web interface.

However, if you have other computers, phones etc. associated with this Ubuntu One account, the photos and files will be downloaded in those devices.

Hope this helps.


Ubuntu fails to mount external RAID with "Disk read failed". How should I troubleshoot this?

I managed to get the enclosure working this morning.  I simply pulled one of the drives out and put it back in.  The enclosure detected that a drive had been replaced and proceeded to rebuild.  This took several hours, and appears to have fixed the problem.
I don't recommend anyone else do this unless they are prepared to lose data.  I didn't lose anything, but if something had gone wrong I could have.


Error when i do ''make'' in cado-nfs map

Version 2.0 has many open bugs. I had success with version 2.1.1.


The error message ist clear: "ERROR A size must be specified for non-existent disks" Looks like the file specified by "--file=test.img" dosn't exist. Have you created the image file before? Have you tried entering the full path?
You can easily create an image file with the virt-manager from the libvirt package.


Armitage error, could not connect to database

I went through this problem too, this is how I solved:

Check the location of your database.yml file, it could be in 2 places:
/opt/metasploit-framework/
/home/youruser/.msf4/
Then set the variable MSF_DATABASE_CONFIG to that location:
MSF_DATABASE_CONFIG=/thelocation
Finally, launch the armitage as root, while preserving the user enviroment:
sudo -E armitage

it should work.


You may be often receiving error messages like the one below, caused by the Ubuntu problem reporting service, apport:

This does not necessarily mean that something is wrong with your system; just that a system process has crashed. When a user clicks "Report Problem...", they are faced with this bug in apport, preventing the actual error report from being sent.

On the other hand, you could receive an error message such as the following

In this type of dialog, the error report service works flawlessly. This, again, reflects bug #1050577 in Ubuntu, which causes the password prompt for the error report in the first type of dialog to hang and prevents the report from being sent.

When you receive the "System program problem detected" message, go to Terminal (Ctrl - Alt- T) and type:

nautilus /var/crash/

You can study the various crash reports in that folder, and file bug reports for them accordingly.


postconf -d not updating after service postfix reload

Use this command to check the current parameter values in the configuration:

postconf -p

Or just:

postconf

The command that you have used with the -d option will print the default values. You can also use the -n option to print only the non-default values, to print only what you explicitly changed in the main.cf configuration. See the Ubuntu Manpage on postconf for even more options.

Although this question was posted over a year ago, I am curious where you might have read instructions to use the -d option, because you are not the only one walking into this problem.


How to unblock something listed in rfkill?

"Hard blocked" cannot be changed by software, look for a wifi toggle on your keyboard or edges of the laptop; the device can also be hard blocked if disabled in the bios.

"Soft blocked" means "blocked by software". A faulty driver or other kernel module can lead to connectivity loss.

Some methods to get WiFi working are described on help.ubuntu.com/

There is also a Launchpad question on this issue: answers.launchpad.net


This might work well:

10.10.10.10:6789:/     /mnt/ceph    ceph    name=admin,secretfile=/etc/ceph/secret.key,noatime,_netdev    0       2

but in my situation with Ubuntu 12.04 and kernel v3.2, _netdev doesn't work and I had to add a script at /etc/network/if-up.d/fstab that contain this code:

#!bin/sh
mount -a


How to replicate multi-user encrypted automount home folder setup to second hard disk?

I have a similar setup in my computer with an external drive and it's been working fine for a while.

This steps are based on rcoup's answer to this question, but a more GUI-like procedure is used.

It's been checked to work with Bionic Beaver 18.04

You might come across a few problems due to this bug. It only affects the manual mount, but not the automount proposed here.

To be allowed to do administrative operations with nautilus, you need to have the extension nautilus-admin installed

sudo apt install nautilus-admin

Then, follow these steps:

1) Open GParted, Right click the partition you want to use as Home2, Information, Copy its UUID.

2) Using Nautilus, navigate to Other locations, Computer, etc.

3) Right click the file fstab, Edit as administrator, Add the line

UUID=the-UUID-you-copied-from-GParted /mnt/Home2 ext4 defaults 0 2

Save the file

4) Navigate to Other locations, Computer, mnt.

5) Right click blank space, Open as administrator.

6) On the admin nautilus window that opens up, right click blank space, New folder, Home2.

7) On GParted click GParted, Refresh devices. Check that the mount point /mnt/Home2 shows up for your partition.

8) Still on GParted right click that partition, mount on, /mnt/Home2. There should be a key showing that the partition is mounted. Close GParted.

9) On the admin nautilus window navigate to Other locations, Computer, mnt, Home2.

10) Right-click blank space, New folder: .Private-A, Hit Ctrl-H to see hidden files.

11) Right click .Private-A, Properties, Permissions, Group: , Close admin Nautilus.

12) On regular Nautilus: Navigate to your home folder, Right click blank space, New folder: Home2.

13) Navigate to .ecryptfs (there's a symlink in your home folder).
Right click Private.sig, Copy, Right click blank space, Paste.

14) Right click the newly created file 'Private (copy).sig', Rename: Home2.sig

15) With the Text editor, create a new document containing this line:

/mnt/Home2/.Private-A /home/<your_user>/Home2 ecryptfs none 0 0

Save it as Home2.conf in your .ecryptfs folder.

16) Open Gedit and create a new text file /home/your_user/.local/bin/automount_ecryptfs.Home2 with the following content:

#!/bin/bash
MOUNT_POINT=/home/<your user>/Home2
grep -q $MOUNT_POINT /proc/mounts
if [ $? -eq 1 ]; then
  mount.ecryptfs_private Home2
fi

17) Navigate to this file with nautilus and right click on it, Permissions, Allow executing file as program.

18) Open the file .bashrc in your home folder, and add the lines:

# Automount additional encrypted home folder
/home/<your user>/.local/bin/automount_ecryptfs.Home2

In the dash, open 'Startup applications', Add, Name: Automount Encrypted Folder, Command: /home/your user/.local/bin/automount_ecryptfs.Home2, Save

Reboot the computer

You can do the same with the other user. Just repeat the steps from #9 on and use the name .Private-B for the lower folder instead.


I have found a solution to my problems.

Blacklist nouveau:

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

Type:

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off

Ctrl+O and Ctrl+X to exit.

After that I just stopped the x server and rebuilt initramfs.

Ctrl+Alt+F1 to go to TTY1. Log in.

sudo service lightdm stop
sudo update-initramfs -u

Restart with shutdown -r 0. vainfo still returns errors but it also shows information about profiles and entrypoints. Like this:

libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Only sad thing now is the fact that I have no clue what caused all this.


You've to install XSane pacages for use your scanner device

sudo apt-get install xsane

or the gnome pacage for scanner:

sudo apt-get install gnome-scan


Editing /etc/sudoers to allow Winbind Group members to Only sudo to 1 Local User

I found the solution.  We needed to set the login shell and path to the sudoers entry for the service user's home like so:

%domain.local\\service ALL=(service) NOPASSWD:/bin/bash, /opt/service/*

Now we are able to enter the following to become the service user:

$ sudo -i -u service
$ whoami
service
$ pwd
/opt/service


Are Python apps allowed in Ubuntu App Showdown?

The rules say:

Ubuntu SDK: submissions must use some aspect of the Ubuntu SDK. They can be written in C++, QML, HTML 5 or OpenGL, as long as they use the SDK and it’s components where appropriate.

So the question is: does the Ubuntu SDK offer Python? And an answer has already been provided: no, sorry.

By the way, note that the first showdown required participants to make use of Quickly. That requirement was dropped after requests from some of the participants.


OpenSSL installed but no openssl.pc (needed by pkg-config)

You need to install the package libssl-dev.

You can use "Search the contents of packages" on https://packages.ubuntu.com/ to search for a package that contains a given file.