Ubuntu 12.04.1 SW RAID GRUB "out of disk", but works when I remove one disk

Couple things here, your old Dell may not be able to handle large disks without some tweaking, it could have misreported the size at boot and grub is just the victim of that, GIGO. Does it matter which disk you remove? If the error only corrected itself when a unique member is removed, that would be an interesting clue.

The file system you run can also affect things. As grub does have to co-exist with it. There's a 1MB space at the beginning of the disk for grub environmental vars that's supposed to be available but sometimes goes awry when you use something like btrfs.

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/477430

Considering it's an old system/BIOS, you may need to keep the first partition small, under 137 MB. Though if I'm reading your blocks right, md0 is under 120MB and MD1 has the remainder of the 1TB disk. That should be OK, unless I calculated that wrong?


restore permissions of ubuntu 10.04 after running "chmod 700 -R /" as root

I think you're boned =\

If it was just the root you could have fixed it, but running it recursively on everything below it really screwed you.

Time to bust out a live DvD and get to re-installing. Be more careful next time.


What are the benefits of having www in the home folder than in the default /var/www folder

Keeping web folders in user's home directory is good for 2 reasons mainly:

If you have a web server with multiple users, keeping www folder in user's home directory will help you organizing, you can -as a administrator- easily know which user has what in her web folder.
Second issue, well, actually the main issue is, security. By default Apache runs by a single user: www-data. However, if you have multiple web sites -owned by different users, let's say customers- running on a single server, and if you make www-data user own those web folders, users won't be able to make any modification in those folder via ssh, ftp, etc. Hence, to overcome this issue, you need to run apache with another user account for each user's web directory (apache-mpm-itk, suPHP and some other software helps you do this). In this case, keeping web folders of each user in user's home directory is the best. Because a user can do modifications on her own web directory connecting via ssh, ftp or any other method.


Change ownership of a file transfered using Samba

The usual way you get the saved file with owner = nobody is if you created a guest accessible share on your Linux box. The easiest way to resolve this is to make "nobody" look like you - at least for this share.

You do that by adding an option to /etc/samba/smb.conf:

force user = kresimir

Assuming your Kubuntu login user name is kresimir.

Where you put that line in smb.conf depends on how you created the samba share:

** If the share definition is in smb.conf itself add it to that share definition.

** If you created the share in Dolphin ( Right click > Properties > Share ) add it to the [global] section of smb.conf - right under the workgroup = WORKGROUP line is where I would put it.

Either way after editing smb.conf restart smbd:

sudo service smbd restart

All new files added to the share will have you as owner.


Ubuntu server setup - No Internet access

OK, the comment is too long. My first guess is that a file needed to start the interface is located in a damaged disk sector. You can test that hypothesis with debugfs: Identifying file associated with unreadable disk sector (on gra2.com) is a good explanation how to do it. It's not straightforward, mind you, but maybe it would be worthwhile to get through the steps just to make sure the two phenomenons are really connected.

In short, you need two steps:

convert the LBA (logical block address) of the bad block into the block address of the filesystem. LBAs are counted in different units than the filesystem block numbers, and start relative to the beginning of the disk, whereas the filesystem block numbers start at the partition start
once you have the filesystem block number, you can use debugfs to find the inode associated with that particular block. Hopefully you will find that (a) the file or files cannot be accessed and (b) have something to do with setting up the interface.

The above is not the remedy but forensics -- understanding what is going on.

However, I'd suggest to first shut down the system, boot it from the CD and do all subsequent operations from the rescue system. A damaged disk is always a bad sign


The snapcraft.yaml file does not contain shell commands. YAML is not a script; it's a way of organizing information. The file is read by your system's snapd during snap install (and uninstall).

The snapcraft.yaml file is located at /snap/$SNAP-NAME/$VERSION/snap/snapcraft.yaml. Obviously, the snap must be mounted for the system to read the file.

The snap's hashing and signature is not done in the YAML file. It's not a Debian control file.


Add option to "Extend to the Left" in XFCE4 Display Settings

The command is simple:

xrandr --output HDMI1 --auto --left-of eDP1

You will have to find the names of the displays and edit the command accordingly. To do so, simply run xrandr without arguments.


/proc directory stored in a RAM or Hard drive?

Taken from here:

  /proc is very special in that it is also a virtual filesystem. It's sometimes referred to as a process information pseudo-file system. It doesn't contain 'real' files but runtime system information (e.g. system memory, devices mounted, hardware configuration, etc).

again, from the same site:

  The /proc filesystem contains a illusionary filesystem. It does not exist on a disk. Instead, the kernel creates it in memory.

So, to answer your questions:

/proc contains information about your system and peripherals, it can also be used to control kernel behaviour by writing to it. Details about the content of each entry can be found at the first link.
For example, you can get your CPU information by inspecting /proc/cpuinfo:

cat /proc/cpuinfo

Or you can change options like IP forwarding:

echo "1" > /proc/sys/net/ipv4/ip_forward # enables IP forwading
echo "0" > /proc/sys/net/ipv4/ip_forward # disables IP forwading

It's not a real filesystem. It is a representation of the kernel inner structures. So, it's not really stored anywhere, but you can say that its contents are stored in the kernel memory (so "RAM").

Most of the operations you can perform directly on the /proc filesystem can (and really, should) be performed via the sysctl utility (manpage).


When running locally, does Juju use the host machine's APT cache?

If you're using juju locally then it automatically caches debs using squid-deb-proxy.

Juju has an option to allow you to use other apt proxies on your network, see:

https://juju.ubuntu.com/docs/howto-proxies.html

You basically define it in your ~/.juju/environments.yaml for the specific environment, like so:

apt-http-proxy: http://10.0.3.1:8000


ssh -X user@dedicated-ip-for-machine in a terminal would allow them to connect via SSH but also forward GUI programs to their system (so that if they type in gedit, it will run gedit, and forward the GUI program to their system's screen, rather than using the dedicated box's monitor.  This allows you to also restrict their access and can allow you to block items on the system.  Note that this would be a command line connection, rather than a remote desktop solution.

If you need something specific for complete remote desktop connections, you may consider utilizing TeamViewer, however the system can on occasion not operate to the specs that you are requesting in a program.


Left-click and hold the icon briefly and it will detach itself and can be moved up or down on the launcher. See https://askubuntu.com/a/170453/115414


adduser causes strange messages when called from preinst script

Since you did $(adduser ..) instead of simply adduser .., you apply command substitution and that line is replaced with the output of that command. So if adduser produces an output of Adding user ..., then the shell will try to execute Adding user ... as a command. Instead, do:

id -u ${username} > /dev/null 2>&1
if [ $? -eq 1 ];
then
    echo "Adding user"
    adduser --group ${groupname}
    adduser --disabled-password --ingroup ${groupname} --no-create-home --system ${username}
fi
exit 0


Why do I get a software not in sources error when installing software?

It might be caused by missing packages in your repository. Try to switch to the main server.

See: https://help.ubuntu.com/community/Repositories/Ubuntu#Download_Server

Then re-run update-manager and install any updates.


Dependencies for OPUS are not satisfiable on Ubuntu 16.04

Solution by OP

Finally got OPUS (kind of) running. Here's how:
I read the dependencies from the OPUS .deb file with

dpkg -f opus_7.0.122.1124-1_i386.Ubuntu1004LTS.deb

getting a list of about 25 needed packages. Some of them were obsolete, in which case I downloaded their i386 version from Launchpad and installed them and with gdebi, manually satisfying their dependencies.
Others could be managed with apt-get:

apt-get install xxx:i386

Finally, I used the .sh file to install OPUS and in line

opus_user_group="${OPUS_USER_GROUP:-opus}"

of the launcher I replaced 'opus' with my group name. This last step isn't pretty, but it works.
Obviously that's not the end of it. I'm now facing a thousand new problems when trying to actually use the programme, but they're beyond the scope of this site.


Ubuntu 14.04.5 update issue - Unable to find expected entry 'restricted/source/Sources' in Release file

Try removing apt lists:

sudo rm /var/lib/apt/lists/*

then:

sudo apt update

It should do the job.


Error every time I try to install some package with "app repository..."

The packages that are in the ppa:tualatrix/ppa are compiled for many Ubuntu versions up to 14.04. Trusty. Probably you are running 16.04 or 16.10 and that is the reason you cannot install the ubuntu-tweak. It is not an error and probably you fail installing other packages based on outdated Ubuntu tutorials that are misleading you (and many other users as well)...

There is a good explanation about manual install or alternative tweaks at How can I install Ubuntu tweak on Ubuntu 16.04


ubuntu 12.04 wpa key length only 63 characters

The network manager will accept 63 ascii characters or 64 hex characters. The 63 ascii characters are taken as a passphrase and converted to a 256 bits hex key. The 64 hex characters are the key.

See http://en.wikipedia.org/wiki/WPA_key


How would I install Budgie in 16.04 without using a PPA?

From the official Ubuntu Budgie website:

  We offer two stable releases - 17.10.1, and 16.04.3

  18.04 is the next LTS and is currently in development - do not use this on production machines.
  17.10.1 is the current stable release and follows Ubuntu support cadence - Oct 2017 to Jul 2018.
  16.04.3 is community supported - it is supported until upstream ends support (no current plans) and thereafter, as long as budgie-remix
  users wish to maintain its support.

https://ubuntubudgie.org/downloads


What is the difference between /etc/profile and .bashrc

I think this answer sums it up nicely:
From man bash:
Invocation
[...]

When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file exists.
After reading that file, it looks for ~/.bash_profile, ~/.bash_login,
and ~/.profile, in that order, and reads and executes commands from
the first one that exists and is readable. The --noprofile option may
be used when the shell is started to inhibit this behavior.

[...]

When an interactive shell that is not a login shell is started, bash
reads and executes commands from ~/.bashrc, if that file exists. This
may be inhibited by using the --norc option. The --rcfile file option
will force bash to read and execute commands from file instead of
~/.bashrc.


why is apt-get not install mysql server 5.5

Since you are getting mysql 5.1, I believe you have Ubuntu 10.04.

From my understanding of how package releases work in Ubuntu, you will not have any newer version unless you find another repository which offers it, or install it manually yourself.

Once an Ubuntu version is released, new applications, and even newer versions of applications are not released for it. Updating to a another Ubuntu Version is the only way of having a newer version of packages from the official repositories.

Only security and bug fixes are released.


Ok I know this was a while back but for some reason no one has made this information easily available so here is the answer:

It's very very simple.

Run sudo apt-get install ldmtool then make sure your drive is actually there by checking with sudo fdisk -l and once you have ldmtool downloaded, try to see if the harddrive is recognized by running sudo ldmtool scan. The print out should be a json like string with the device id. Finish by writing sudo ldmtool create all. DONE. You can now go to your /media folder and see all your mounted drives along with the newly mounted SFS partition!


Installing an operating system from an .iso file

potentially you could use QEMU to attach your real harddisk inside a virtual instance booted off that .iso you are willing to install. can be a bit tricky but it worked for me.

once booted from Ubuntu Live CD install qemu:

sudo apt-get install qemu

then download Chromium OS iso.
run QEMU telling it to boot off the .iso and use your real harddisk.

sudo qemu -drive file=/tmp/chromium-install.iso,if=ide,index=1,media=cdrom -hda /dev/sda[add partition number if you want to use one]

i have to warn you though that this might screw things up. you would be safer off by only using a partition of the harddisk dedicated for the install of Chromium OS. you might need to do some bootloader configuration if you consider installing on a partition.

good luck!


How do I enable the PPTP addition dialogue when using a regular user in Debian Wheezie under Gnome Unity?

Follow the steps at http://jeffhoogland.blogspot.se/2012/05/howto-give-network-manager-sufficient.html and this resolved my issue.


Installing git to be used in a multi-user system


Decompile .dll files without .net reflector

I think you have downloaded the .NET Reflector & this FileGenerator plugin , If you do,

Open up the Reflector.exe,
Go to View and click Add-Ins,
In the Add-Ins window click Add..,
Then find the dll you have downloaded FileGenerator.dll (which came with the FileGenerator plugin),
Then close the Add-Ins window.
Go to File and click Open and choose the dll that you want to decompile,
After you have opened it, it will appear in the tree view,
Go to Tools and click Generate Files (Ctrl+Shift+G),
select the output directory and select appropriate settings as your wish,
Click generate files.


Before we start lets locate the folder:

realpath virtualenvs
realpath .virtualenvs

Now assuming you get a return of /home/.virtualenv from option 2(again assuming it was actually a hidden folder), then we need to move it to the proper place which aught to be in /home/$USERNAME or /home/daniel in your case.

We do so by typing this in the terminal:

mv /home/.virtualenvs  /home/daniel/

But if it returns /home/virtualenvs, then the folder isn't hidden and should be moved thus:

mv /home/virtualenvs /home/daniel/

NOTE: If not hidden run through the answer without the . before every occurrence.

Now you access hidden folders from the terminal like any other, except you have to add the . character before the name. Now in your case the fault is that you did not add the exact location of the virtualenvs folder.

Say the virtualenvs folder is in our /home directory ( as we had moved it there ) then to get at it from the terminal we will put it this way:

cd /home/$USERNAME/.virtualenvs

Now note two things here:

We used the absolute path to get to it
We inserted the _environmental variable %USERNAME into the path. We could easily have inserted or used daniel if that is the name Ubuntu knows you by. In which case we would have had it like this:

cd /home/daniel/.virtualenvs

Now to see where your virtualenvs folder is run:

realpath .virtualenvs

This will return the path location of that folder which you will then use with the cd command to enter into it.

Absolute and Relative Paths:

Now let me try to explain this so you won't need to always type /home/daniel/.virtualenvs to get into .virtualenvs folder.

Relative Paths:

If I typed pwd and the result was /home/daniel. That means I am sitting or located in /home/daniel and when I type realpath .virtualenvs then also get the result /home/daniel/.virtualenvs then to get into virtualenvs ( which if you also is in /home/daniel) I will type:

cd .virtualenvs

Now this is the relative path, i.e. in relation to where I currently am.

Absolute Paths:

If I don't know where I am, but know that the .virtualenvs folder is in the /home/daniel as seen when we use realpath .virtualenvs command. Then I will use the absolute path to get to it with:

cd /home/daniel/.virtualenvs

Or if I type pwd to know where I was in the filesystem and I get a result like: /usr/lib then to get to .virtualenvsthe absolute path will be need as the relative path won't get me there. So from location/usr/lib` I would type:

cd /home/daniel/.virtualenvs

Now another important note is the use of ~/ in place of /home/daniel. This can be used to avoid typing the full /home/daniel, so for the absolute path to .virtualenvs I would have typed:

cd ~/.virtualenvs

and this would have got me there.


Why expensive headphones sound cheap on Linux - the drivers suck?

I've been able to achieve significant improvement in the sound with some tweaking.

First of all - these problems are only noticable on high end headphones.

What I hear is too much mid range. So I actually hooked up an oscilloscope to the audio port and started looking at what happens - and it does confirm that something very shi*ty is happening.
Every time a certain frequency is played, the output is not only this frequency but there's also a harmonic one at the other end of the spectrum.
20hz wave has a harmonic around 20 khz and the higher you go, the lower the harmonic goes, so around the mid range they meet and amplify.
I guess this is why you can hear so much mids.

So how to improve - obviously get a good EQ plugin for pulseaudio, such as PulseEffects and carefully lower these mids.

Another huge improvement comes from changing the default PulseAudio algorithm.
This is in /etc/pulse/daemon.conf: resample-method

Change to soxr-vhq or speex-float-5

I really don't know how they can spend so much time supporting these algorithms but ship it with the poor one by default, and hiding all information on the topic...

Anyways, enjoy!


SED copy specific section to different files

It is easier to do this with awk:

awk -v RS="HEAD\n" -v FS="\n" 'NR>1{print "HEAD\n" $0 > $1".txt"}' ex

Notes:

RS="HEAD\n" registers are separated by "HEAD\n"
FS="\n"   each field is a line
NR>1{print "HEAD\n" $0 > $1}  for all register except the first, write it to a file named field 1 -- "$1"

UPDATE: for the new question:

awk -v RS="<config>\n" -F"</config>" 'NR>1{print RS $1 FS > "conf-"NR-1}' ex

The configuration outputs are stored in files named like: "conf-1"


Can I upgrade my Ubuntu 10.04 to 10.10 using LiveCD?

You can upgrade from the Alternate CD, not the Live CD.

This is because the Live CD is basically an install of Ubuntu squeezed onto a disk with a apt database while the Alternate CD is just full of raw packages and you need the packages to upgrade.

But if you have things that aren't in the default install on your install, they won't be able to be upgraded without an internet connection anyway.


Does using both tmpfs and zram make any sense?

So to answer the question I think you're asking, it is possible to use these two together, and doing so won't cause any ill effects on the other.

I don't know if you are familiar with /dev/shm, but it's a filesystem mounted in RAM which appears to be a folder. SHM, tmpfs and zram are all slightly different implementations which lead to the same output - storage of data in RAM instead of a secondary storage device. As far as I know, the differences lie in how they react when RAM starts filling up.

Since you're asking this question you've probably heard of swap - when memory reaches near-full capacity, the OS starts moving data between RAM and a dedicated partition. From what I remember, and this might be wrong, but tmpfs will only be swapped when absolutely necessary, and will always try to remain in RAM. /dev/shm can be swapped as readily as any other data in RAM, and I don't know about zram but I suspect it's the same.


Why does inotifywait create files with "swp" or goutputstream in their names?

Comment "set locking" in /etc/nanorc or ~/.nanorc or $XDG_CONFIG_HOME/nano/nanorc or ~/.config/nano/nanorc

## Enable vim-style lock-files.  This is just to let a vim user know you
## are editing a file [s]he is trying to edit and vice versa.  There are
## no plans to implement vim-style undo state in these files.
#set locking

If you debug inotify you can see that gedit does not modify test:

OPEN test
CREATE .goutputstream-F4776Z
OPEN .goutputstream-F4776Z
ATTRIB .goutputstream-F4776Z
CLOSE_WRITE:CLOSE test
MODIFY .goutputstream-F4776Z
MOVED_FROM .goutputstream-F4776Z
MOVED_TO test
CLOSE_WRITE:CLOSE test
OPEN test
ACCESS test
CLOSE_NOWRITE:CLOSE test

but both uses event "close_write" or you can follow the inotify events and recreate the steps on your backup location.


USB port not working, while shutdown and network manager are misbehaving

OK, I am a fool.
The solution was to run Update Manager again.  It complained about some half-unpacked packages then about the lack of internet connection so that the update could not be completed.  This seems to have cleared something, maybe reverted the unfinished update.
I then attempted a restart, which failed (same as when I could not shutdown) but upon loging in from the login screen I could then initiate a succesfull restart and my little laptop is back up and running.

I wrote that I was a fool because although I thought I could shutdown after running Update Manager and it would finish its business when I next turned on, I should have opted for the proposed restart then, and none of this would have happened.


I have the same problem : click on the icon, «Settings», check and uncheck «Show icon on systray».

(The gconf key is : /desktop/ibus/panel/show_icon_on_systray)

This is really a bug, because it appear on startup while the key is set to false.

You can execute this in a script, at startup for instance :

gconftool --type boolean -s /desktop/ibus/panel/show_icon_on_systray true
gconftool --type boolean -s /desktop/ibus/panel/show_icon_on_systray false


You are getting these Permission denied errors because there are some python files that your user does not have permission to read, so grep is not working for those files (you can't search them).

You want to "get rid of" the Permission denied errors.

You can add 2>/dev/null to the end of your command like this:

grep -rn --include="*.py" "search-pattern" 2>/dev/null

This suppresses all error messages, so you won't see the Permission denied errors popping up. But this obviously still means that grep is not searching those files, so if they do contain your search-pattern, you won't see them in the output.

  Explanation:
  In Linux, there are three things called file descriptors: stdin, stdout, stderr. If you run a command and it gives you an error, the error is written to the file descriptor stderr. By default, stderr outputs the errors to the terminal. So what we can do is redirect the errors, i.e. we redirect stderr somewhere else instead of the terminal. We redirect stuff in Linux by using the > sign. So where are we going to redirect stderr? To /dev/null. /dev/null is a special file; think of it as a black hole. Anything you redirect to it gets thrown away. Finally, we refer to stderr as simply the number 2. So 2>/dev/null tells Linux to redirect 2 to /dev/null. 1 means stdout (which is the normal output of a command, i.e. not errors). So, for example, if you wanted to save the actual output of your grep command to a file rather than have it displayed in the terminal, you can use 1>/path/to/filename, which will redirect stdout to that file.

Use sudo with your command, assuming that you have the privileges:

sudo grep -rn --include="*.py" "search-pattern"

If your username has root privileges (i.e. if you're an administrator on the machine), using sudo before a command runs it as the root user, so you will never get the Permission denied errors and grep will search those files and output the search-pattern if it finds it inside them.


Brightness control not working in Lenovo G580

Try adding the following line to /etc/X11/xorg.conf in the "Device" section for your GPU:

Option "RegistryDwords" "EnableBrightnessControl=1"

Then restart X and see if the brightness controls work.
Probably the easiest way to restart X is to simple reboot the computer.

Source here.


Screen flashing after upgrade to Ubuntu 16.10 (graphics card NVIDIA GT750M)

I went ahead with a fresh reinstallation of 16.10 but I had the same issue. So I found a copy of 15.10 and installed that one instead. Problem solved. My graphics card now uses the Nouveau display driver and I can see the nvidia 352 in the additional drivers list. WIll just have to upgrade in a year or so...


is it possible to make a virtual box inside a USB

Yes, I have done it, both with a persistent live system and with an installed system (like installed into an internal drive, but into a USB pendrive). I did not use wine, but installed VirtualBox from the repositories, like any other Ubuntu program. It is in the multiverse repository, as can be seen with Synaptic or the following command

$ apt-cache policy virtualbox
virtualbox:
  Installed: 5.0.24-dfsg-0ubuntu1.16.04.1
  Candidate: 5.0.24-dfsg-0ubuntu1.16.04.1
  Version table:
 *** 5.0.24-dfsg-0ubuntu1.16.04.1 500
        500 http://se.archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages
        100 /var/lib/dpkg/status
     5.0.18-dfsg-2build1 500
        500 http://se.archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages

So Install it (into Ubuntu 16.04.1 LTS) with

sudo apt-get install virtualbox

Check that you get also the guest additions (also available from the multiverse repository).

-o-

Download and add the Extension pack from the VirtualBox web-site

https://www.virtualbox.org/wiki/Downloads

It provides support for USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe and PXE boot for Intel cards.


Which shell is shipped on default installs?

The default scripting shell (/bin/sh) is dash. The default interactive shell (/bin/bash) is bash. When using scripts on Ubuntu that are using /bin/sh you may need to avoid various "bashisms", like arrays or {}-style globbing.


You can not browse the internet because you do not have a rule that allows it. You need to allow outgoing traffic to destination ports 80 and 443:

-A OUTPUT -p tcp -m multiport --dports 80,443 -j ACCEPT

By the way, your external SSH connections are not limited to just your own country, because later on, after your country specific rule, you allow it anyhow.


Configure shared folder to be mountable without authentication

As it turns out I have an HP8600 in my network and I couldn't reproduce your problem when I set the Network Folder on the HP to a Xubuntu 18.04 machine.
But I did get the exact same Connection Refused error when I tested it against an Ubuntu 20.04 machine.
It would appear that either because of its age or the method it's using to connect to the samba share it is doing so using the 1.0 version of the SMB dialect. There is no SMB1 ( samba calls it NT1 ) on the server side of Samba in Ubuntu 20.04 ... but you can enable it if you want:
Edit /etc/samba/smb.conf and right under the force user = your-user-name that I suggested above add this one:
server min protocol = NT1

Then restart smbd: sudo service smbd restart
You may need to reboot the ubuntu box. Now I can send it to the Ubuntu 20 share.
Some notes about things that have come up here:
[1] You need to make a decision about how you want to create shares.
You created a usershare ( Local Network Share ) of the target folder in Nautilus then you created a classic share in smb.conf. It's best to create them one way or the other if you want to share a particular folder. So my suggestion would be to remove one of the shares for this folder.
[2] Force user happens after the client makes the connection not before.
[3] Where you place the "force user" depends on how you created the share.
If you create all your shares through Nautilus place it in the [global] sections as I suggested above. If you create the shares within smb.conf then add it to the share definition there.
[4] Without the "force user" you will end up with the scanned file being owned by "nobody" not you.
[5] And you should remove nobody from the samba password database since it's not meant to be used the way you are using it:
sudo smbpasswd -x nobody


The command you are looking for is probably

sudo update-rc.d mysql defaults

/etc/init.d/mysql

Default script:

#!/bin/sh -e
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.

set -e

INITSCRIPT="$(basename "$0")"
JOB="${INITSCRIPT%.sh}"

if [ "$JOB" = "upstart-job" ]; then
    if [ -z "$1" ]; then
        echo "Usage: upstart-job JOB COMMAND" 1>&2
        exit 1
    fi

    JOB="$1"
    INITSCRIPT="$1"
    shift
else
    if [ -z "$1" ]; then
        echo "Usage: $0 COMMAND" 1>&2
        exit 1
    fi
fi

COMMAND="$1"
shift

if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
        ECHO=echo
else
        ECHO=:
fi

$ECHO "Rather than invoking init scripts through /etc/init.d, use the service(8)"
$ECHO "utility, e.g. service $INITSCRIPT $COMMAND"

# Only check if jobs are disabled if the currently _running_ version of
# Upstart (which may be older than the latest _installed_ version)
# supports such a query.
#
# This check is necessary to handle the scenario when upgrading from a
# release without the 'show-config' command (introduced in
# Upstart for Ubuntu version 0.9.7) since without this check, all
# installed packages with associated Upstart jobs would be considered
# disabled.
#
# Once Upstart can maintain state on re-exec, this change can be
# dropped (since the currently running version of Upstart will always
# match the latest installed version).

UPSTART_VERSION_RUNNING=$(initctl version|awk '{print $3}'|tr -d ')')

if dpkg --compare-versions "$UPSTART_VERSION_RUNNING" ge 0.9.7
then
    initctl show-config -e "$JOB"|grep -q '^  start on' || DISABLED=1
fi

case $COMMAND in
status)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    $COMMAND "$JOB"
    ;;
start|stop)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
    if status "$JOB" 2>/dev/null | grep -q ' start/'; then
        RUNNING=1
    fi
    if [ -z "$RUNNING" ] && [ "$COMMAND" = "stop" ]; then
        exit 0
    elif [ -n "$RUNNING" ] && [ "$COMMAND" = "start" ]; then
        exit 0
    elif [ -n "$DISABLED" ] && [ "$COMMAND" = "start" ]; then
        exit 0
    fi
    $COMMAND "$JOB"
    ;;
restart)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the stop(8) and then start(8) utilities,"
    $ECHO "e.g. stop $JOB ; start $JOB. The restart(8) utility is also available."
    if status "$JOB" 2>/dev/null | grep -q ' start/'; then
        RUNNING=1
    fi
    if [ -n "$RUNNING" ] ; then
        stop "$JOB"
    fi
    # If the job is disabled and is not currently running, the job is
    # not restarted. However, if the job is disabled but has been forced into the
    # running state, we *do* stop and restart it since this is expected behaviour
    # for the admin who forced the start.
    if [ -n "$DISABLED" ] && [ -z "$RUNNING" ]; then
        exit 0
    fi
    start "$JOB"
    ;;
reload|force-reload)
    $ECHO
    $ECHO "Since the script you are attempting to invoke has been converted to an"
    $ECHO "Upstart job, you may also use the reload(8) utility, e.g. reload $JOB"
    reload "$JOB"
    ;;
*)
    $ECHO
    $ECHO "The script you are attempting to invoke has been converted to an Upstart" 1>&2
    $ECHO "job, but $COMMAND is not supported for Upstart jobs." 1>&2
    exit 1
esac


Trying to install Erlang on Ubuntu 12.04, error with make install

You need permission to modify system folders. Try:

sudo make install

PS: why don't you install erlang from Ubuntu repositories? Just run sudo apt-get install erlang.


How can I force Brasero to keep my mp3 playlist order of songs when I burn it?

An audio CD consists of tracks. They are numbered and do not contain any Data about Artist etc.

A data CD however contains just that: data. Your files can be ordered by the file browser that opens it. The playlist from Rhythmbox is not part of the mp3 files. You however try to export it as an m3u file. Most audio player software can read that format.


I had the same issue when i installed kubuntu on ubuntu 16.04.

While these font settings do not seem to work, you can change the font by going to :

System Settings>Appearance>Application Style>GNOME Application Style

There is a font setting which you may change and the effect will take place the next time you log in.


Unable to Boot Live CD to resize disk partition

Thanks for the help. The solution that worked was to:

Increase the size of the existing virtual disk in VMWare (having shut down Ubuntu).
Use GParted to create an extended partition from the unallocated space.
Create a logical partition of type ext4 within the extended partition wrapper.
Manually mount this new partition. (mount not available in GParted for some reason).
Verify with baobab that the new space is available to the filesystem.


No option to print in black and white in Document Viewer (Evince)

I was not finding the option on the GUI for an Epson XP-202, but I found it on the command line.

See the printer options with:

lpoptions -l

It gave me:

PageSize/Paper Size: 4X6FULL T4X6FULL 2L T2L *A4 TA4 L TL Postcard TPostcard INDEX5
MediaType/Media Type: PMPHOTO_NORMAL PLATINA_NORMAL GLOSSYPHOTO_NORMAL GLOSSYCAST_NORMAL PMMATT_NORMAL *PLAIN_NORMAL RCPC_NORMAL
Ink/Ink: *COLOR MONO

Ink=MONO looks good, so I set it with:

lpoptions -o Ink=MONO

And then when I print with:

lp a.pdf

it works.

It is a shame that there is no standard CUPS option for that. See also: https://unix.stackexchange.com/questions/18323/how-do-i-make-blackwhite-the-default


How to run installed Ubuntu on windows 7?

It is not possible to run installed ubuntu alongside windows on virtual machine running in windows 7.

You can run an ubuntu.iso file in virtual machine on windows.But it is not possible to run installed ubuntu(already installed in the hard-disk) on a virtual machine in windows.


Problems with making a desktop shortcut to a shell script

In a terminal window:

chmod +x /home/(username)/.vpn/vpn.sh to allow execution.

If you want only the owner to have this right, you may use u+x instead of x.

Also, remove the space after #!.  The correct syntax is #!/bin/bash.


Problems with Window Previews with CompizConfig

It often happened to me to think that it was not working because, in contrast to what happens in Microsoft Windows, this functionality only works for non-minimized windows. Are you sure this is not your case?


You are probably trying to do this in a root environment and not the chroot environment.

See the difference between

/home/rinzwind$ sudo su
/home/rinzwind# umount /proc
umount: /proc: device is busy.
    (In some cases useful info about processes that use
     the device is found by lsof(8) or fuser(1))
root@discworld:/home/rinzwind# exit

and

rinzwind@discworld:~$ sudo chroot ~/livecd/custom
bash-4.2# umount /proc

The 1st tries to umount /proc for the system you are using and of course fails. The 2nd one is done on the chrooted environment and works.

Looking at your prompt root@karthick: this should be a bash prompt.


Lag spikes when playing games since upgrade to 14.04 from 12.04

This is a problem that I have also been experiencing in DOTA 2. To solve it you need to upgrade your kernel manually. I upgraded to 3.14.4 personally.

Here is a guide on upgrading the kernel manually: How to update kernel to the latest mainline version without any Distro-upgrade?

I hope it will work for you !

PS : Sorry, my answer is duplicated here too Heroes of Newerth lagging periodically but both problems come from the same issue


Linux swap partition created accidentally

Testdisk and photorec are your best chance of recovering data on a partition that you've formatted. Install using:
sudo apt-get install testdisk -y
and run the command
sudo photorec
The program is quite easy to use. Select the disk you want to recover data from (using the arrow keys and enter), then select the partition (Probably called Linux Swap in your case). Select "other" for the filesystem type. Then select a directory where you want the recovered files to go. After that leave it to recover what files it can find.


Nvidia Driver 440 on GTX1050M recognizing Laptop Screen during but not after boot, only Second Monitor

Long story short: Install the new 450 driver
Long story long: Use "Additional drivers" to install nouveau drivers, run sudo dpkg-reconfigure xserver-xorg, reboot, repeat until boots on laptop screen, run sudo Xorg :1 -configure to generate xorg.conf.new file, copy that somewhere else just in case, run sudo dpkg-reconfigure -phigh xserver-xorg, reboot, go into tty2 using ctrl-alt-f2 because you can't get past the login screen, run sudo ubuntu-drivers autoinstall to install the newest 450 drivers, reboot, pray, have it all work.
I don't know which part fixed it and which parts did nothing but that is everything I ran that eventually got it working.
Also below is the new xorg.conf that NVIDIA X Server Settings created that you may be able to modify slightly and place in /etc/X11/xorg.conf to get yours working:
Edit: I could not get this file working when fractional scaling broke my config again and repeating this steps would not fix it. I think the key was whatever caused my tty2 to not load into the gui.
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 440.82

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 3840 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "Xinerama" "0"
EndSection

Section "Files"
    ModulePath      "/usr/lib/xorg/modules"
    FontPath        "/usr/share/fonts/X11/misc"
    FontPath        "/usr/share/fonts/X11/cyrillic"
    FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath        "/usr/share/fonts/X11/Type1"
    FontPath        "/usr/share/fonts/X11/100dpi"
    FontPath        "/usr/share/fonts/X11/75dpi"
    FontPath        "built-ins"
EndSection

Section "Module"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "TOSHIBA-TV"
    HorizSync       15.0 - 68.0
    VertRefresh     23.0 - 61.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection

Section "Device"

        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "Accel"                 # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "Backlight"             # <str>
        #Option     "CustomEDID"            # <str>
        #Option     "DRI"                   # <str>
        #Option     "Present"               # [<bool>]
        #Option     "ColorKey"              # <i>
        #Option     "VideoKey"              # <i>
        #Option     "Tiling"                # [<bool>]
        #Option     "LinearFramebuffer"     # [<bool>]
        #Option     "HWRotation"            # [<bool>]
        #Option     "VSync"                 # [<bool>]
        #Option     "PageFlip"              # [<bool>]
        #Option     "SwapbuffersWait"       # [<bool>]
        #Option     "TripleBuffer"          # [<bool>]
        #Option     "XvPreferOverlay"       # [<bool>]
        #Option     "HotPlug"               # [<bool>]
        #Option     "ReprobeOutputs"        # [<bool>]
        #Option     "XvMC"                  # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "VirtualHeads"          # <i>
        #Option     "TearFree"              # [<bool>]
        #Option     "PerCrtcPixmaps"        # [<bool>]
        #Option     "FallbackDebug"         # [<bool>]
        #Option     "DebugFlushBatches"     # [<bool>]
        #Option     "DebugFlushCaches"      # [<bool>]
        #Option     "DebugWait"             # [<bool>]
        #Option     "BufferCache"           # [<bool>]
    Identifier     "Card0"
    Driver         "intel"
    BusID          "PCI:0:2:0"
EndSection

Section "Device"

        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"              # [<bool>]
        #Option     "HWcursor"              # [<bool>]
        #Option     "NoAccel"               # [<bool>]
        #Option     "ShadowFB"              # [<bool>]
        #Option     "VideoKey"              # <i>
        #Option     "WrappedFB"             # [<bool>]
        #Option     "GLXVBlank"             # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "PageFlip"              # [<bool>]
        #Option     "SwapLimit"             # <i>
        #Option     "AsyncUTSDFS"           # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "DRI"                   # <i>
    Identifier     "Card1"
    Driver         "nouveau"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1050"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "nvidia-auto-select +3840+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Card1"
    Monitor        "Monitor1"
    SubSection     "Display"
        Viewport    0 0
        Depth       1
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
    EndSubSection
EndSection


Concatenate single common PDF to directory of PDF files

I would just run it in a loop, once for every pdf in the directory:

for f in *pdf; do
    pdftk A=../coversheet.pdf B="$f" cat A1 B output "$f"_out.pdf;
done

That will create a new file for each pdf with the cover page added. For a file called foo.pdf, it will create a new file called foo.pdf_out.pdf.

You can make this a bit more sophisticated. To create a file called foo_out.pdf use this instead:

for f in *pdf; do
    name=$(basename "$f" .pdf);
    pdftk A=../coversheet.pdf B="$name".pdf cat A1 B output "$name"_out.pdf;
done

And, to overwrite the files with the new versions, use

for f in *pdf; do
    pdftk A=../coversheet.pdf B="$f" cat A1 B output /tmp/tmp.pdf;
    mv /tmp/tmp.pdf "$f"
done


It sounds as if grub is working just fine (you can boot an older kernel) but that you are having a problem with the new kernel (rather then grub).

For this I would file a bug report against the new kernel, but you will need to provide the error message you are getting.

See - https://wiki.ubuntu.com/Kernel/Bugs


How can I divide an output with 2 delimiters?

$ echo $sentence | awk -F'[· ]' '{out=$0;print;for (i=NF;i>1;i--){out=gensub(/([· ])[^· ]*[· ]?$/, "\\1", "g", out); print out }}'
Hel·lo my name is E·ric
Hel·lo my name is E·
Hel·lo my name is
Hel·lo my name
Hel·lo my
Hel·lo
Hel·

Multiple line version

For those who like their code spread over multiple lines:

sentence="Hel·lo my name is E·ric"
echo $sentence | awk -F'[· ]' '{
    out=$0
    print
    for (i=NF;i>1;i--){
        out=gensub(/([· ])[^· ]*[· ]?$/, "\\1", "g", out)
        print out
    }
}'

How it works

-F'[· ]' tells awk to separate fields at any occurrence of · or a blank space.
{ marks the start of a processing group for this line.
out=$0 tells awk to save the current line, known in awk as $0, in the variable out.
print prints the current line.
for (i=NF;i>1;i--){ starts a loop which counts down over the number of fields in the input line.  For each execution of the loop:

out=gensub(/([· ])[^· ]*[· ]?$/, "\\1", "g", out) removes one field, including any preceding or following field separators, from the end of the line and saves the resulting text in the variable out.
print out prints the contents of the variable out.

} marks the end of the for-loop.
} marks the end of the processing group for this line


Wireshark problem. Can't select default interface

Run wireshark with sudo priveleges - gksudo wireshark. You will need super-user permission to capture packets from your network interface.


Thanks God for this Idea, I tried and it worked. It seems the current configurations left by previous version are somehow incompatible with previous ones or something corrupted. So I did this command (be careful the directories are right as there is no undo)

cd ~/
rm -rfv .mysql/workbench/

Note that this does not fix the problem of program hanging when using using recent files menu. So do not use recent files with this workaround


No audio in vlc player when sharing screen in discord

You normally can't stream sound on discord if you're not under W10, but here's a guide that may help you
https://www.reddit.com/r/discordapp/comments/f22vz6/guide_how_to_stream_audio_to_discord_on_linux/


This is overscan.

I had this problem with our last TV which was essentially just fixed with some messing around with the picture settings in the TV's menu.

Also just check (in nvidia-settings) that your resolution and refresh rates are what the TV's native rates are (look online or in the manual).


I don't think the problem you are seeing is a general one.  If you are having trouble, I would suggest using the contact form so that someone can have a look at what is going wrong with your transactions:

https://one.ubuntu.com/help/contact/


I do not see any problems here:

Add the universe repository

sudo add-apt-repository universe

Install Nemo (nemo package)

with default dependencies

sudo apt-get install nemo

  The following NEW packages will be installed:
  cinnamon-desktop-data cinnamon-l10n fonts-lato gawk gist hddtemp hwdata inxi
  javascript-common libcinnamon-desktop4 libjs-jquery libnemo-extension1
  libpython-stdlib libruby2.5 libsigsegv2 libxapp1 lm-sensors mesa-utils nemo
  nemo-data nemo-fileroller net-tools python python-minimal python2.7
  python2.7-minimal rake ruby ruby-did-you-mean ruby-json ruby-minitest
  ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.5
  rubygems-integration xapps-common

or without recommended dependencies

sudo apt-get install nemo --no-install-recommends

  The following NEW packages will be installed:
  cinnamon-desktop-data libcinnamon-desktop4 libnemo-extension1
  libpython-stdlib libxapp1 nemo nemo-data python python-minimal python2.7
  python2.7-minimal xapps-common

The latter seems to be the solution for your question.


Ubuntu login doesn't do anything. Left with only a cursor and background

I've fixed it by removing the entire ~/.cache directory. I read somewhere that it could be a permissions issue with a file there. Perhaps from running something as root/sudo. Still not sure of the right way to debug the problem, was just trial and error.


Tensorflow won't import with sudo python3

When running things with sudo, your PATH and LD_LIBRARY_PATH get reset to a (safer) default, so your CUDA libraries are no longer found.  You could reset them explicitly in your script.


That issue is due to big changes made to the snap. This is now using 64bit version of Notepad++ with wine64 on amd64 systems and 32bit version of Notepad++ on i386 systems. This snap is now using wine-platform snap so this has both i386 & amd64 wine pkgs earlier it was using wine-platform-i386 snap which only had wine i386 pkgs. So currently migrating to wine-platform snap from older wine-platform-i386 snap which is not done automatically when user updates the snap caused issue. I'm currently pushing changes to detect if user is still connected snap on older platform should ask to do these commands.

Run these commands will fix your issue.

snap disconnect notepad-plus-plus:wine-platform-plug
snap install wine-platform
snap connect notepad-plus-plus:wine-platform-plug wine-platform:wine-base-stable

If issue still exists then you have to remove win32 WINEPREFIX in order to create win64.

rm -r $HOME/snap/notepad-plus-plus/common/.wine


Failed to create thumbnail error fills gnome-session.log.1 to 50 GB!

Possible solutions:

1. CLEAR THUMBNAIL CACHE
Run the following commands to clear your thumbnails cache.

rm -r ~/.thumbnails
killall nautilus

2. Install Samba
If you don't have samba installed, you can try installing it.

sudo apt-get install samba

3. Disable 'file manager' plugin in GEdit
Open Gedit and go to "Edit >Preferences > Plugins" and turn off the File Browser pane.

Source: http://ubuntuforums.org/archive/index.php/t-2123796.html


StumpWM is a very minimal window manager....

  Stumpwm attempts to be customizable yet visually minimal. There are no
  window decorations, no icons, and no buttons. It does have various
  hooks to attach your personal customizations, and variables to tweak.

source

To install

With Software Center:

Or in Terminal:

sudo apt-get install stumpwm

Then create a sessions file:

sudo nano /usr/share/xsessions/stumpwm.desktop

Paste the following:

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=stumpwm
TryExec=stumpwm
Name=StumpWM
Comment=Stump window manager

source

Logout and login - but choose the stump session:

CTRL t + ? reveals the help screen.


Turning off the ability to suspend on Ubuntu 13.10

To a point you could control this in policykit, in /usr/share/polkit-1/actions/org.freedesktop.upower.policy and or /usr/share/polkit-1/actions/org.freedesktop.login1.policy

The relevant entries would be org.freedesktop.upower.suspend & org.freedesktop.login1.suspend respectively

In that case editing the line <allow_active>yes</allow_active> to <allow_active>no</allow_active> would work.

It's probable that in 13.10 policykit is no longer used for this so those edits would have no effect. In that case you could figure out how hibernate has been disabled & do the same for suspend or cause power management to inhibit suspend altogether.

The latter could be done as such -

sudo nano /etc/pm/sleep.d/00_cancel-suspend

copy & paste this in -

#!/bin/sh
# prevents suspend
. "$PM_FUNCTIONS"
case "${1}" in
  suspend)
    inhibit
    ;;
  resume)
    exit 0
    ;;
esac

Then on keyboard go

ctrl+o

enter

ctrl+x

to save & exit nano

Finish with -

sudo chmod 0755  /etc/pm/sleep.d/00_cancel-suspend


It is obvious that it should work. When something that should work doesn't, then the right thing to do, is to file a bug on Launchpad.net.


`make` returns error: recipe for target 'libast.la' failed


I had the same CRITICAL error, and it was caused by the Python extension. So I solved uninstalling the python-nautilus package, that was installed as a dependence of Insync (that I'm no longer using in this machine).

sudo apt-get purge python-nautilus


First, like the error message says, Please resume and shutdown
Windows fully (no hibernation or fast restarting) - fix this problem in Windows.

Second, if your disk is /dev/sda5, why did you try to mount /dev/sdb5? That won't work.


Ubuntu 16.04 WiFi not working after update

Like @Juxmix said, I disabled the proprietary driver, restarted and it didn't work. Then I executed the following command:

sudo apt-get install firmware-b43-installer

and it worked.

EDIT:
The wifi with the b43 firmware was running a little bit slower then Broadcom one.

disable the networking
uinstall the b43 drivers

sudo apt remove firmware-b43-installer
follow the instructions on this link


How can I get multiple workspaces in Kubuntu 13.10?

Yes, you can use multiple desktops in Kubuntu. You should go to System Settings >> Personal >> Desktops >> Multiple Desktops. Here's an official quick guide on basic settings: http://www.kubuntu.org/docs/kquickguide/C/ch03s07.html#desktop-multipledesktops

Now, if you find KDE annoying, maybe you should try another desktop environment, such as Unity. I believe you don't need to reinstall your system to get a new desktop environment running... installing the appropriate packages should do. See here: https://askubuntu.com/a/165803/169250 (Note: I've never done this, so I don't know if that really works!)


How to know what had done on my computer?

Yes there is a Tool .
GNOME Activity Journal (formerly known as GNOME Zeitgeist) is a tool for easily browsing and finding files on your computer. It keeps a chronological journal of all file activity and supports tagging and establishing relationships between groups of files.
Open your terminal and type as sudo apt-get install gnome-activity-journal to install .
Open your unity dash and type as activity-journal and click it to open .


Thumbnail Previewer not working for Large Images

There is another way to achieve this, I have no "preferences" whitin nautilus, so go to dConf editor > org > gnome > nautilus > preferences and look for "thumbnail-limit" and change its value for a higher one. I personally chose 20971520 (that is 20 megas in bytes). Good luck!


Specifically where do applications get their default font settings?

Regarding location of fonts, they are stored in /usr/share/fonts/ and /home/USERNAME/.fonts/. This may be somewhat relevant.

There is also a font section in the unity-tweak-tool for altering default font settings. Maybe give it a try.


Changing sample format and bit depth on audio files with ffmpeg

Can this be related to Sample formats?
To see options: ffmpeg -sample_fmts
For you it will be something like,
ffmpeg -i input -sample_fmt s16 -ar 44000 output
Ref: https://ffmpeg.org/ffmpeg.html#toc-Audio-Options


Remove windows boot manager and use grub instead

A very simple solution that works for me every time is to get into bios and check for boot order. Just go to bios and put ubuntu above windows and then grub will show you.


Is there a way to switch distributions without losing any data (settings, applications, home folder)?

I'm considering of switching from Lubuntu 18.04.1 LTS to Xubuntu (exact same version).

The only difference between Lubuntu and Xubuntu is the default desktop environment. To install the Xubuntu desktop environment, simply run

sudo apt install xubuntu-desktop

This will install the Xubuntu desktop. Log out, and select XFCE on the login screen.

To remove Lubuntu's desktop, run

sudo apt remove lubuntu-desktop && sudo apt autoremove


It seems I was able to solve the problem. Not sure how that was
  possible but there were two entries for my mobile broadband connection
  listed. I never added a second one. However as described below I was
  able to run the nm-applet using '--version'. This allowed me to remove
  one of the entries for mobile broadband connections.

source: bug report


How to check the information of a PPA without adding it

A quick hack (needs package python3-launchpadlib):

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

import sys,re

from launchpadlib.launchpad import Launchpad
import httplib2
import  lazr.restfulclient.errors

if len(sys.argv) < 2:
    print('Syntax: {cmd} ppa'.format(cmd=sys.argv[0]))
    print()
    print('For example: {cmd}  ppa://diesch/testing'.format(cmd=sys.argv[0]))
    sys.exit(2)

try:
    lp = Launchpad.login_anonymously('foo', 'production', None)
except  httplib2.HttpLib2Error as e:
    print('Error connection to launchpad.net:', e)
    sys.exit(1)

ppa_name = sys.argv[1].strip()

m = re.search(r'^(ppa:)?(?P<user>[^/]+)/(?P<name>.+)', ppa_name)
if m:
    user, name = m.group('user', 'name')
else:
    print('Unvalid PPA name:', ppa)
    sys.exit(1)

try:
    owner =  lp.people[user]
    ppa = owner.getPPAByName(name=name)

    print('PPA {name} at {url}'.format(name=ppa_name, url=ppa.web_link))
    print()
    print('Owner: {owner} ({url})'.format(owner=owner.display_name,
                                            url=owner.web_link))
    print()
    print(ppa.description)
except lazr.restfulclient.errors.RestfulError as e:
    print('Error getting PPA info:', e)
    exit(1)

Save this as e.g. ppa-info, make it executable and run it like

ppa-info ppa:diesch/testing

If the PPA exists, you will get some information, like owner and description, otherwise you'll get an error message.


Thunderbird has always requested entering the master password multiple times

I just found out that it is indeed a bug which is Gmail specific.


This answer appears to be working for me, but I have not investigated why yet.

To repeat the solution, just run this command in a shell (no root needed):

alsactl restore


original silverlight in ubuntu? (moonlight not accepted from italian website)

Silverlight unfortunately doesn't work on Ubuntu, it's Windows-specific.


I have found a temporary "solution" to this issue. Switching to windows and updating the firmware of my Corsair K70 (regardless of whether or not there is a firmware update available) will prevent the computer from freezing until the next system update. This has worked consistently for the past four weeks.

If anyone knows how I might be able to make this fix permanent I would appreciate it.


This really sounds like a hardware problem.

What happens if you boot up a Live CD or USB stick and see if the problem persists (if you still have your LiveCD or USB stick you used to install)? That should give us a fairly clear idea of whether it's hardware or software/configuration.

Another thing you could also test, especially if you don't have a LiveCD or USB stick, is plugging in a second keyboard to the machine and seeing if the same problem happens on the external keyboard. If not, it's probably something with the internal keyboard on the laptop.

From the proximity of the keys that are misbehaving, it really sounds like some circuit in your keyboard hardware is getting shorted or not making contact. If that is the case, you should be able to get a new keyboard for the laptop. Many times, if you get the exact model of the laptop you can order a new keyboard part. If you look on the website of the manufacturer, they should have a manual for installing the new keyboard. Or a computer repair shop should be able to do that for you.


Simple example to setup postfix with satellite SMTP

install postfix

sudo aptitude install postfix
configure postfix

sudo vi /etc/postfix/smtp_auth

add your smtp authentication information in /etc/postfix/smtp_auth:

smtp.foo.bar   user@host:password

and generate the postfix lookup table file (/etc/postfix/smtp_auth.db) using

sudo postmap /etc/postfix/smtp_auth

add the relayhost (outgoing smtp server e.g. smtp.foo.bar on port 587, depending your relay host info) information to /etc/postfix/main.cf:

relayhost = [smtp.foo.bar]:587

add the following lines to /etc/postfix/main.cf in order to enable smtp-auth for outgoing mails:

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
restart postfix

sudo service postfix restart


Boot Successful after Emptying Root Partition

Trying new kernels is always a good idea... however installing them without the package system is not so good: The BuildYourOwnKernel Wiki describes how you should do it in the future.

Running make and make module_install in the kernel source is only the second step. How did you configure the kernel? Usually you would follow these steps:

Configure the kernel: A good choice is to use the configuration of the running kernel form /boot/config-<kernel version>

$ cp /boot/config-5.0.0-25-generic /usr/src/ linux-5.2.9/.config
$ cd /usr/src/linux-5.2.9/ && make menuconfig

Update Configuring the kernel with make defconfig will create a working kernel, however it has only a minimal set of drivers configured. E.g. it might not work with current graphic cards or SATA chips.
Build and install modules (as you did)

$ make && make module_install

Copy the kernel into /boot. The available images depend on your kernel configuration

$ cp arch/x86/boot/bzimage /boot/vmlinuz

Create initrd. That is the part you properly missed, the default kernel will not boot without a initrd image. You can do that manually too, but there is a useful script for that update-initramfs:

$ update-initramfs -c -k 5.2.9

Add new entry to grup. The update-grub can do that, however it requires, that you kernel and modules have the same naming convention.

$ update-grub

And to answer your question: The space in the / or /boot partition has no effect on the Linux kernel. In fact the kernel does not need both partitions at all. The Ubuntu recovery mode e.g. only needs the initrd and start the busybox shell.

So deleting the kernel source under /usr/src did not fix your problem. It must be something else you did.


SSD is not showing up in bootloader installation device list while installing Ubuntu 14.04 alongside Windows

Just resolved the problem. Created a new partition in SSD with EXT4 file system and installed ubuntu there.


Boot your computer ...

On login screen press Ctrl+Alt+F1.

Enter your user name and the password.

Now execute the following commands :

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo reboot

Note : Rebooting Ubuntu operating system is not absolutely neccessary ... but it is recommended.

Update addressing your response that you still have a blank screen and can't access the desktop :

Execute the following commands :

sudo apt-get update
sudo apt-get install --reinstall unity
sudo reboot


Cannot reinstall unity on Ubuntu 16.04 LTS (64bit) on Virtualbox

The following command worked for me.
sudo apt-get install --reinstall ubuntu-desktop


Ubuntu 18.04 sound output not changed properly for applications after HDMI cable plug and unplug

I did not had opportunity to connect back hdmi cable (I've noticed an issue while I was in travel in train), so I digged deeper

Here is solution (Ubuntu 18 LTS):

pulseaudio -k && rm -r ~/.config/pulse


According to https://microstack.run/#get-started use:
snap install microstack --devmode --edge
microstack.init --auto


Convert Sony Vaio F Series to Ubuntu? Or dual boot?

Well, I'm pleased to report that I have successfully dual booted my VPCF234FD Sony Vaio F Series laptop. The installation went off without a hitch, Grub loads normally and all is well. Hooray. In case anyone is curious I did it via DVD, not USB. 14.04 LTS, 64-bit, of course.


FFMPEG cant convert MP4 to MP3 | No MP3 Encoder

Perhaps your build is broken.
Try uninstalling and then installing it using the following method

First install dpendencies

 sudo apt-get update
 sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
  libsdl2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
  libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev

Now make a directory for the source files that will be downloaded later

mkdir ~/ffmpeg_sources

Now install this assembler for x86 optimizations used by x264 and FFmpeg

cd ~/ffmpeg_sources
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install

Then install libmp3lame

cd ~/ffmpeg_sources
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix="$HOME/ffmpeg_build" --enable-nasm --disable-shared
make
make install

Then install ffmpeg

cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-nonfree
PATH="$HOME/bin:$PATH" make
make install
hash -r

You may have to restart your device as it sometimes doesn't work otherwise.
After installing go to the directory ~/bin

cd ~/bin

then in that directory try to run your command for eg.

./ffmpeg -i ~/input.mp4 ~/videos/output.mkv

PS:In your question where you've mentioned

//HERE SHOULD BE LIBMP3LAME

libmp3lame will not be there, rather it will be mentioned in the configuration as

configuration: --enable-libmp3lame

Do let me know if it works or not. :)


How do I configure lightdm to work with XDMCP?

To enable the XDMCP server in LightDM edit /etc/lightdm/lightdm.conf and add the following section:

[XDMCPServer]
enabled=true

Then restart LightDM with sudo restart lightdm from a text console (logout from any graphical sessions first).

You can set the XDM-AUTHENTICATION-1 key by setting key=value (value is in the same format as is used in the X -cookie option).  If the key is not set then no authentication is used.

You can change the UDP/IP port by setting port=1234.

All the available LightDM settings are shown in the example configuration in /usr/share/doc/lightdm/lightdm.conf.


Wireless/audio not working on Dell Vostro 15 5590 with Ubuntu 18.04.3 LTS

I manage to solve it. I have the exact same configs as yours and I've been through the same situation. I noticed

kernel 5.0.0-37-generic - wifi adapter not working, sound working
kernel linux-oem-osp1 - wifi adapter working, sound not working

First, I plugged in the good old ethernet cable and went back to kernel 5.0.0-37-generic. You can boot another kernel in the grub menu and make it the default. So, sound is on.

Secondly I tried lots of ways to make the wifi adapter work, this was the only one that really did it.

$ sudo add-apt-repository ppa:canonical-hwe-team/backport-iwlwifi
$ sudo apt-get update
$ sudo apt-get install backport-iwlwifi-dkms
$ reboot

not sure if this is the optimal way, but now wifi and sound are working.

I'll start my research about input audio now, I'll come back and edit if I somehow get it working.


How to install Lubuntu on Aspire one running Ubuntu 10.4

You have probably forgotten to make the unetbootin file executable.

Right click on unetbootin-linux-xxx, click on Properties, choose the tab Permissions. Check the small square Allow executing file as program.

Now double click unetbootin-linux-xxx and fill in your password.

You can also do it through the command line. Open a Terminal with Ctrl + Alt + T and type:

cd /path/to/unetbootin

chmod +x unetbootin-linux-xxx

./unetbootin-linux-xxx

Finally, fill in your password and create a bootable usb.

xxx=versionnumber

Having done this make sure your laptop boots first from usb in bios.

Furthermore if the regular installation image does not work you might consider using the alternate installation image, downloadable from here:

http://cdimage.ubuntu.com/lubuntu/releases/13.04/release/

This image lets you install Lubuntu via commandline, which is less taxing on your system and still easy to do. All you'll have to do is answer a few installation questions.


Undo a kernel header installation command line

What you did was simply download the file:

linux-headers-4.4.0-040400_4.4.0-040400.201601101930_all.deb

to the /tmp directory.

There is no need to delete it or do anything about it, it will simply be erased on reboot (that's what happens to every file in /tmp, so you know).

If you have any kind of issue, downloading and installing (which seems you didn't, but might have) packages is not a good course of action (specially kernel related packages). Next time you should probably ask about your problem here, or in other forums, before doing something that can compromise your installation or the security of your desktop.

Regards and welcome to Linux.


It serves as mount point for GVFS-Fuse.

  gvfs is a userspace virtual filesystem where mount runs as a separate
  processes which you talk to via dbus. It also contains a gio module
  that seamlessly adds gvfs support to all applications using the gio
  API. It also supports exposing the gvfs mounts to non-gio applications
  using fuse.Ubuntu Packages


Why can't we resize partition without using Live USB/CD just like in windows?

Any partition that is in use cannot be resized on any operating system:

On Ubuntu you can unmount any partition and resize it except the partition mounted to / (although you can still resize the filesystem on / to make it larger..)
On Windows you can do the same except %windir% (Usually C:)

However, on Ubuntu, you can even resize / with an Ubuntu Live USB/DVD whereas on Windows, you need to:

buy external tools
use the Ubuntu Live CD/DVD to resize the Windows system drive!

:-)


Is there a setting in the startup applications menu item to remember all apps when shutting down?

GNOME

GNOME on Ubuntu 14.04 LTS, 16.04 LTS and 18.04 LTS does not have such options in Startup Applications (or gnome-session-properties) - see screenshot below:

MATE

As far I know it exists in MATE Desktop Environment in any current Ubuntu version - 14.04 LTS (with MATE PPA), 16.04 LTS, 18.04 LTS.

You can access it from System->Preferences->Personal->Startup Applications (or mate-session-properties).

From my personal experience it restore several GTK-based applications such as Firefox, Pluma, Atril, Caja, Zotero on next boot.

KDE

For KDE see this answer given by @WinEunuuchs2Unix on the similar thread.


What does 'Locale not supported by C' mean?

It appears to be a warning about locales.

See: https://help.ubuntu.com/community/Locale


You can try to reinstall the GNOME Terminal with:

sudo apt-get install --reinstall gnome-terminal

and you will get missed org.gnome.Terminal service.


To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


What do these Unity errors mean and why are they showing up?

Try CTRL + ALT + F1

login to TTY1

type

unity --reset &

then CTRL + ALT + F7 to see if Unity was reset successfullly.


I don't think it is possible to install PHP 5.1 from repositories.

The PHP5 Launchpad page lists supported PHP versions starting from Hardy. 5.2.4 is the first supported version.

You might be able to install from untrusted repositories or compile from source.

But please note you are taking risks by not using a supported PHP version. The real solution would be to upgrade/fix the application instead of downgrading.


Can't use both mouse and keyboard at the same time

With Gnome Tweaks... This can easily be fixed! :D
In gnome tweaks click the "Keyboard and Mouse" tab and uncheck the slider called "Disable while typing" in the Touchpad section
Your trackpad being disabled while typing is how the trackpad works by default :D


Ubuntu: How to execute a script without using terminal?

Just move your executable from the directory where it is to the desktop using the mouse. Or if you want to keep it in it's original directory, create a symlink.

Depending of whether I use a shell script with the extension .sh or a compiled c-program (with just the name a.out) the icons look different, the symbolic links showing some additional arrow, but the programs are being executed ok.

From what you write, the program is obviously executable by you.

What happens, when you right-click on the file? Do you see an option to execute the program?


Thank you for your suggestions. Just discovered this and it works

"I had this Problem and none of the above worked for me. However the solution was simple. Im using the gnome classic environment,hold Alt + WinKey whilst you right click on panel.select Add to panel and add NOTIFICATION AREA. Voilla Dropbox Icon appears Hope this can help someone "

Wonder how that got disabled ?


Can I install Samba while running on LiveUSB?

I think the problem is you need to first run

sudo apt-get update

To install Samba.  That will take some space, but might not be too bad on 12.04.3
Possibly you could install an older version of Samba, but not sure how that would go, since I've never tried to "go back" for an install.


Is it possible (and relatively easy) for me to backup snaps, program data, and person files from Ubuntu 18.10 and 18.04?

Snaps: Yes, but it's not worthwhile. Simply download the Snap again on the new system. All releases of Ubuntu use exactly the same Snaps. That's the point of Snaps.

Programs: NO - doing this with debs will BREAK YOUR SYSTEM HORRIBLY. Yes, you can do it from a Snap easily and safely.

Program Data: Yes, easily.

Personal Files: Yes, easily.

Since you don't know how to use backup software in Ubuntu, it's probably easier to simply move your files manually.


How to preserve icons and emblems when copying files

I wrote a small Perl script that solves this issue, metasave. It saves nautilus metadata in the form of a shell script that you need to run on the destination system.

If you want to copy files on the command line and preserve their metadata, you need to use gvfs-copy, Gnome's replacement of cp.


After upgrading Ubuntu 16.04 to 18.04 vim does not work... can't install it!

Try adding this ppa - https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6

Then install it -

sudo apt update
sudo apt install -f
sudo apt install vim


How to install Canon MX870 wireless printer?

If anyone is still looking for this in Ubuntu 16.04 here is how I did it:

Found a package with the text 'bjpnp' using:

apt-cache search bjnp

Installed the only package containing that text: cups-backend-bjnp

sudo apt-get install cups-backend-bjnp

Went to Settings > Printers > Add Printer and expanded the Network printer section on the left. After a couple of seconds my printer appeared there. I clicked on it, clicked next, and configured my options.
I had an issue with the source of the paper, but fixed it in configuration.
Print!


Is it okey to use my os maximum time from flash drive?

Running Ubuntu from a flash drive is not harmful to your computer's hardware except for the flash drive itself which is not designed ruggedly enough to take the large number of read/writes that running an operating system requires, and it will eventually wear out. I don't consider this to be much of an economic issue because USB flash drives are so inexpensive, as long as whatever data is stored on the flash drive is backed up.

Also the performance of running Ubuntu in this way is less than would be desired. Running Ubuntu from a portable external SSD has better performance than you get from a flash drives. It's smoother, more stable and there is less annoying lagging.


Scanning in Ubuntu 20.10 with HP OfficeJet Pro 8025 scanner

The command scanimage -L seems to show the scanner name and info. If I copy the scanner name (HP_OfficeJet_Pro_8020_series all-in-one) and running the following command,
simple-scan HP_OfficeJet_Pro_8020_series all-in-one simple-scan will detect the scanner.  I found this article useful.
https://forums.linuxmint.com/viewtopic.php?t=329760


How to use DBG with a shell script program?

Looking at the ardour script, all you need to do is run ardour4 -g and it will run the actual ardour program under gdb.

Then you should be able to get a stack trace when the crash occurs.


Configure unattended-upgrades to run only at a certain time of the day?

Unattended-Upgrades is run by the script apt-compat (Ubuntu 14.04 or older: apt) in /etc/cron.daily.

So you could probably just edit your /etc/crontab to run cron.daily at a different time of the day or move it to a custom cronjob.

The script contains functions to sleep a short "random" amount of time (0-30mins) before executing /usr/lib/apt/apt.systemd.daily, which you could edit out if you like.


Can a laptop have problems with ubuntu cause of hardware?

The short answer - yes, hardware may be to blame for some, most, or all of these problems.

However, it's not necessarily the hardware that's the issue. For example, your "blue faces" thing isn't a hardware issue, nor is it even an "Ubuntu" issue, but a bug in the Flash player software. Your "video in video" thing would really need a screenshot for anyone to be able to help with (why can't you screen shot it?).

Additionally, the sleep function may be an issue with the kernel version (there's a known bug in the 3.2 version of the Linux Kernel that can cause issues such as what you're seeing). Or, it may be an issue with the driver for your particular video card model. Or, your video card itself may be going bad (which could also explain things like Flash issues).

Or, your motherboard could be going bad (which could explain pretty much all of your issues).

In general, figuring out whether it's hardware or software depends entirely on your setup, and doesn't really matter whether it's a laptop or desktop (other than that you're more limited on your hardware selection with a laptop). For example, are you dual-booting with Windows? If so, then that may be why you can't boot into Ubuntu (I've seen an issue where Windows and Linux don't agree about the exact date/time, and when Windows is running fast, Linux sees disk writes as "in the future" and freaks out). Conversely, if you do dual-boot, and Chrome/Chromium takes forever to load on both partitions, then it may be a hardware issue (since it's on program load, it's most likely a lack of memory, but it could also be that your hard drive is going bad).

If you're looking for actionable help on any of the issues that you're having, you're going to have to provide quite a bit more information. What are your hardware specs (and/or what is your laptop model)? Are you dual-booting with another OS? If so, what's the other version of the OS (ie - Mac OS 10.5, Windows XP, Windows 7 64-bit, etc)? Is your Ubuntu a fresh install (vs an upgrade from an older version of Ubuntu)? Is it an install from WUBI (vs an install via booting to the disk)? What version of Ubuntu are you on? How do your specs compare to your friend's? What did you do prior to trying to boot into Ubuntu (and/or, what did you do before you last shut down Ubuntu)?


I am facing the same problem. I have tried huge number of things. At last I changed my graphics card with lower version which was old one. That solved the problem. I guess it was an issue with the graphics card (GPU).


PC starts with "grub rescue" prompt and no matter what I tried, won't turn on

If you installed Windows AFTER you installed Linux, you partition is gone and you have to reinstall.
If not, something happened with you partition. Obviously blocks are missing, so grub can't access the initramfs.(usually in the boot folder). You do not need to fix the mbr- since grub started, that part is obviously working.
Take an USB live image (e.g. the one you've used to install you linux with) and boot with it.
When you get to a shell or terminal you need to check out, what the name of the partion is, where you've installed your linux:

blkid

You see sth like /dev/sda1 or /dev/sdb2 etc. Pick the correct partion (which should NOT be mounted) and enter:

fsck -y /dev/sdXn

where X is something like a,b or c and n is something like 1 or 2 or ..
You should select a linux partition, not any of the window partions.
When done reboot. Should work then....


Getting Apache to be able to write to a folder

Have you tried to make a folder inside /var/www/ putting your script in that and running it from there.  Making sure to do sudo chmod -R 777 /var/www/test before hand?

Seems strange it won't do it even with the permissions set to 777.  Is it a PHP script you are playing with?

Maybe try the following:

$ cd /var/www
$ php -a
php> file_put_contents('test','test');
php> exit
$ cat test

And see if it outputs the file.  If that works, paste <?php file_put_contents('test','test'); ?> into a file and run it, see if it does the same thing.

If it outputs the file too, then it must be a problem with your script.


Unable to connect to open wireless network

Have you tried loading the backports resources?

sudo apt-get update

sudo apt-get install linux-backports-modules-wireless-lucid-generic

Then, reboot.

You are probably better off just buying a cheap USB modem, as the Atheros AR9285 in known to have these type of issues.


What's the most effective way to get wifi working?

WiFi performance depends mostly on the chipset on your WiFi card (or stick) and the driver for said chipset. At the moment, the driver least likely to cause problems seems to be the ath9k.

The driver info page has a list of all supported chipsets.

Usually, cards or sticks with one of those chipsets are easy (and cheap) to come by. Also, the newer models are capable of using both the n wireless standard and 5GHz frequencies, which makes them rather futureproof.


Ubuntu 18.04 login page freezes, not entering tty

You can install python3 in 2 ways.
1. Boot from live USB and then chroot into your installation and install python3.
2. From the grub menu, you can also go into the recovery and then try to recover it.


How can I download all files from webdav page?

Try to enclose links in quotes if it throws syntax errors, international characters are converted to unicode by default. wget accepts multiple arguments simultaneously.

Runnning wget with quotes over all three links from the comment was successfull, not to mention my wget is lower by version than yours, i.e. 1.15.

wget "http://tinymin.asuscomm.com/toby/some_file.mp4" "http://tinymin.asuscomm.com/toby/some_unresolvable_name.mp4" "http://tinymin.asuscomm.com/toby/even_more_scary_name.mp4"

Note: also, do not leave right slash at the end of the link as it directs wget to the wrong way (it treats those links as directories).


Swap partition not enabled after booting up

It looks as though you have used encryption for your home folder. For security reasons, when you encrypt your home folder, the swap is also encrypted. Therefore, GPartEd is unable to see the contents of the partition.

The partition is accessed through the encryption application. The key line in your fstab is this:

/dev/mapper/cryptswap1 none swap sw 0 0

You can also see it from blkid:

/dev/mapper/cryptswap1: UUID="9b33ee92-f21f-4e07-b080-95ef59a62d1d" TYPE="swap"

It shows that cryptswap is going to load your swap partition. To check, open System Monitor and go to the Resources tab. Under the graph for Memory and Swap History, you'll see the Swap showing the amount available and the amount used. If the amount available is not zero, your swap is working fine.


This is happening because a MongoDB server is already running on your system, likely as a daemonized service.

According to your tags, you're running Ubuntu 16.04, which uses systemd. You can check the running state of the service using this command:

sudo systemctl status mongodb

If this reports as running, you already have a MongoDB server running - try to connect to it normally without manually starting mongod.

If you don't want/need a daemonized service to start at system boot, you can disable MongoDB from running with this:

sudo systemctl disable mongodb
sudo systemctl stop mongodb

Now, you can start and manually stop MongoDB using either mongod or by starting/stopping the daemon:

sudo systemctl start mongodb

I would personally highly recommend you continue to use your daemonized service, as you don't need to worry about it failing or similar. If security is a concern, block MongoDB's ports in your firewall.

If you need log entries for a running daemonized service, you can use the journalctl command, like so:

sudo journalctl -u mongodb

If you want a live journal, add the -f command-line flag to the journalctl command.

If, for some reason, you need both a daemonized MongoDB and a launch-on-demand MongoDB, you will need to change the bind information and data directory for one of the two instances. See here for part of the puzzle.

Alternatively, you can just stop the service while running the daemon directly.


My Ubuntu install CD wrote over entire Mac OS X. How Can I get OS X back?

I am not sure you will be able to get OS X without wiping off ubuntu, installing OS X again and then try again without hopefully loosing OS X.

Are you able to hold the option/alt key when booting your iMac to get the boot loader or is that completely gone?

If you can boot from your USB / CD by holding ALT when booting you might be able to use the disk utility to resize the partition and install OS X that way.

Not sure if any of this helps...?

Tim


Please add your user name to the vboxusers group with this command:
sudo adduser $USER vboxusers

Then restart.
Link to related ubuntu help page


You can download apt from here and install it with

sudo dpkg -i package_name

The major difference to apt-get is of course, that you don't use apt-get: use just apt.

This give you a bit of information on apt.


Use metaflac to rename .flac files from flac tags recursively

I have found a python script written by Louis-Philippe Véronneau.

The up to date code can be found on his git repository: https://gitlab.com/baldurmen/rename-flac

You need to install python-docopt (sudo apt-get install python-docopt) and run this script after you chmod +x rename-flac.py it:

#!/usr/bin/python

"""
rename-flac takes the information from FLAC metadata to batch rename
the files according to a filenaming scheme.

Usage:
    rename-flac.py [--verbose] <scheme> <directory>
    rename-flac.py (-h | --help)
    rename-flac.py --version

Arguments:
    <scheme>         The filenaming scheme. Has to be between quotation marks
    <directory>      The path to the directory containing the album

Options:
    -h  --help       Shows the help screen
    --version        Outputs version information
    --verbose        Runs the program as verbose mode

    These are the options you can use to define the filenaming scheme:
      %a = Artist  |   %b = Album         |   %d = Date
      %g = Genre   |   %n = Tracknumber   |   %t = Title
"""
import sys

try:
    from docopt import docopt  # Creating command-line interface
except ImportError:
    sys.stderr.write("""
        %s is not installed: this program won't run correctly.
        To install %s, run: aptitude install %s
        """ % ("python-docopt", "python-docopt", "python-docopt"))

import subprocess
import re
import os

TAGS = dict(a='artist', b='album', d='date',
            g='genre', n='tracknumber', t='title')

# Defining the function that fetches metadata and formats it
def metadata(filepath):
    args = ["--show-tag=%s" % tag for tag in TAGS.values()]
    tags = ["%s=" % tag for tag in TAGS.values()]
    formatter = dict()
    pipe = subprocess.Popen(["metaflac"] + args + [filepath],
                            stdout=subprocess.PIPE)
    output, error = pipe.communicate()
    if pipe.returncode:
        raise IOError("metaflac failed: %s" % error)
    output = output.splitlines()
    for tag in tags:
        for item in output:
            x = re.compile(re.escape(tag), re.IGNORECASE)
            if bool(re.match(x, item)) ==  True:
                tag = tag.replace("=", "")
                if tag == "tracknumber":
                    formatter[tag] = x.sub("", item).zfill(2)
                else:
                    formatter[tag] = x.sub("", item)
    return formatter

# Defining function that renames the files
def rename(scheme, dirname, filename, args):
    filepath = os.path.join(dirname, filename)
    new_filename = scheme % metadata(filepath) + ".flac"
    if new_filename == filename:
        if args["--verbose"] == True:
            print("%s is already named correctly") % (filename)
    else:
        new_filepath = os.path.join(dirname, new_filename)
        os.rename(filepath, new_filepath)
        if args["--verbose"] == True:
            print("%s >> %s") % (filename, new_filename)

# Defining main function
def main():
    args = docopt(__doc__, version="rename-flac 1.0")
    scheme = args["<scheme>"]
    if not re.search("%[tn]", scheme):  # To have a unique filename
        sys.stderr.write("%t or %n has to be present in <scheme>\n")
        return
    scheme = re.sub('%%([%s])' % ''.join(TAGS.keys()),
                lambda m: '%%(%s)s' % TAGS[m.group(1)],
                scheme)
    for dirname, _, filenames in os.walk(
                                   args["<directory>"],
                                   topdown=False):
        for filename in filenames:
            if os.path.splitext(filename)[1] == ".flac":
                try:
                    rename(scheme, dirname, filename, args)
                except KeyboardInterrupt:
                    raise
                except OSError:
                    print("Song title contains /. Please rename it")

# Calling main function
if __name__ == "__main__":
    main()

I tested it and everything works like a charm! Thank you!


Alt-Gr key binding not working, Ubuntu 13.04

I think this is what you're looking for:

Choose your current keyboard layout:


A simple command in the terminal:

gsettings set org.gnome.settings-daemon.peripherals.mouse locate-pointer true

Allows you to tape the Control key and get a ripple effect around the mouse pointer:


If it is just the MBR, you can install a Windows equivalent boot loader from most Linux repairCD or your Ubuntu installer.

How to restore the Ubuntu/XP/Vista/7 bootloader
https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:

https://help.ubuntu.com/community/Boot-Repair

You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.
LighterWeight (Lubuntu based) Boot-RepairCD

http://sourceforge.net/projects/boot-repair-cd/files/

And manually you can install the lilo boot loader, not all of lilo.
Restore basic windows boot loader - universe enabled if error on lilo not found
Simply open Synaptic and Settings > Repositories and tick the box against the Universe repo in the Ubuntu Software tab. Close that window and click on reload before installing lilo with Synaptic or command line.

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

May show error messages about the rest of lilo missing, ignore, we just want MBR with bootloader.

A few BIOS have settings that lock MBR. You may want to check that is not your issue. May be called bitlocker, virus protection, secuity, or locked boot sector.


How to have sshfs disk without auto-mount?

The fstab manpage lists a useful option:

  noauto do not mount when "mount -a" is given (e.g., at boot time)

Could you try that option?


You can select an alternate mirror from the software center, under the "download from" menu.

https://help.ubuntu.com/community/Repositories/Ubuntu#Download_Server


Installing Ubuntu 12.04 on a single GPT SSD which contains Windows 7

What went wrong? -- it's impossible to say from the information you've provided. It could be a hardware fault (bad RAM, say) that caused the installer to flake out and corrupt everything; or it could be a bug in the installer; or it could be a buggy EFI implementation; or any number of other possibilities. Unless you can find somebody who's had the same problem on the same or a closely-related model, it'll take some effort to debug this problem.
Will Ubuntu install on a GPT disk partition? -- Yes, at least, assuming there are no bugs in the firmware or hardware problems to block it. I've done numerous Ubuntu installations to GPT disks, under both BIOS and EFI firmware.
Will it install alongside Windows 7? -- Yes, although boot loader issues can sometimes require tweaking the setup afterward. For instance, on EFI-based systems, GRUB 2 often fails to add an appropriate entry for Windows, which requires adding a new entry manually (or, IMHO better, replacing GRUB 2 with a more reliable boot loader).
How do I do it? -- I recommend you begin by running some hardware diagnostics. If you find no hardware faults, you'll have to track down the problem with your system, which is likely to be extremely system-specific, and so better suited for solving in a Web forum, Usenet newsgroup, or other more interactive place than this one.


Took me a bit, but I figured out what was going on. Steps to resolve...

sudo chmod 666 /dev/dri/card0

That solved the permission issue.

sudo apt-get install driconf
driconf

This solved the driconf warnings that I was receiving.

And, just for good measure...dual monitors...

xrandr --output DVI-0 --left-of DVI-1
xrandr --output DVI-1 --right-of DVI-0


How to roll back touchpad driver to synaptic?

I uninstalled the libinput package and synaptic took over
just write down in terminal
sudo apt-get remove xserver-xorg-input-libinput


Ubuntu Touch: how to create a launcher to start a shell script?

this one works on my bq aquaris 4.5:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=aa-exec -- ssh -T pi@raspi2 francebleu.sh
Icon=/home/phablet/.local/share/icons/francebleustart.png
Name=FranceBleu Start
X-Ubuntu-Touch=true
X-Ubuntu-Default-Department-ID=accessories


This error is thrown by what you might call the "BIOS" of VirtualBox. There should be a button you can press during startup to select a boot device. If this doesn't work, you might want to try reinstalling.

If grub2 (the bootloader) isn't installed, the system cannot boot. To fix this, you will need to boot from a live cd, that is, booting from the installation disc and selecting "try ubuntu". Then open a terminal window (search for "terminal") and issue this command:

dpkg-reconfigure grub-pc

This will open a sort of wizard with several options. You can leave the text fields at the default value, but make sure to select the correct drive when you are asked. You will need to select the primary virtual hard drive, which most likely would be /dev/sda (not sda1). Look at the size of the drive to make sure that it matches.

After doing this, grub2 will be installed. Please note that this requires a working installation of ubuntu, so if it fails, try reinstalling. Also, there might be several boot options in a menu during boot (the grub2 menu), in which case you will need to find the right one. Once you have booted the virtual machine from the hard disk, you can eject the CD and run the above command again. I'm not completely sure about this last step, and it might not be necessary. Make sure to remove the CD before trying to boot the new installation.


Dual Boot Ubuntu 14.04 with Windows 7 on UEFI

While a different model Gigabyte mother board this may also apply.

Gigabyte GA-X79-UD3 with I7-3820
Needed F6 to set ACPI=Off.and nomodeset

Gigabyte UEFI boot issues - The partition size of the created USB Installer device needs to be under that of 4GB.
Others found UEFI/BIOS update solved issue of 4GB FAT limit.

turns out the IOMMU needs to be enabled in the BIOS. This problems seems to be exclusive to Gigabyte boards.

Some more related info:
IOMMU for USB3 ports Gigabyte board

http://ubuntuforums.org/showthread.php?t=2188370

Linux kernel enable the IOMMU – input / output memory management unit support - AMD

http://www.cyberciti.biz/tips/howto-turn-on-linux-software-iommu-support.html