I want shotwell to open all .cr2 files in a folder and all its subfolders, what command line do I use? Something like

shotwell *.cr2 ./

That doesn't work, but basically I want to use shotwell to open all files that end with .cr2 and in the current directory (including subfolders)

The context is that I am missing photos that I took on my camera that I have since deleted off of my memory card.

There are thumbnails for them in shotwell's "missing images" but I can't find them.  So I figured I'd run photorec to try and find them.  As a result photorec gave me a boat load of folders and files, enough that it filled up my hard drive.  Instead of sifting through all the files one by one, I decided to search for .cr2 files on my hard drive, while avoiding a particular folder called Photogs that I know doesn't have them because those weren't part of the photorec data dump.

Usually, you will want to just open Shotwell and drag in the folder.

If you need to, you can make the shell build a list of CR2 files and tell Shotwell to open just those files. Occasionally that may be what you want, but in this case that did not do quite what you needed due to Shotwell's behavior -- in some other circumstances, a feature -- of automatically showing you other image files (of all types) residing in the same folders as the images you opened.

To ensure Shotwell only knows about the images you are interested in, you could clone the directory tree somewhere else, copying only .cr2 files and the folders that contain them, but nothing else. That may take up substantial additional space, though. So another approach is to construct a hierarchy of symbolic links -- where instead of having having a new directory tree of copies of your original .cr2 files, you have a new directory tree of syminks to them. This takes up far less space.

This answer covers all those approaches.

Opening a Folder of Images (Including Subfolders) in Shotwell

Shotwell itself gives you two ways to open a whole directory tree of photos. If these will work for you, then you won't need to do anything clever in the command line or even use it at all. If not, you might end up doing this in connection with another technique.  (For example, if you end up creating a new directory of symlinks or copies of your .cr2 files, you can use one of these ways to open it.)

Way 1: Just open the whole folder in Shotwell.

In Shotwell, in the File menu, click Import from Folder. Then select the folder you want to import images from. This won't be limited to .cr2 files, but if you're opening files from multiple subfolders containing .cr2 images created from a digital camera, then most likely those will be the only files present.

See Jakob's answer to Show all pictures recursively (include any subfolders) for more information.

Way 2: Drag the folder into Shotwell.

With most desktop environments and file browsers, you can also open Shotwell and drag the folder that contains your images into the Shotwell window. Like Import from Folder, this is another way Shotwell recommends to open photos.

When you drag from a file browser window or your desktop into Shotwell, you can drag to a specific library. Or if you don't have multiple libraries set up, you can just drag basically anywhere and it works. (You don't even have to drag into the left pane.)

This method is very convenient, and it is as powerful as manually selecting the folder (with File > Import from Folder, as described above). When you open files or folders using either of these methods, Shotwell gives you the option to open the photos without copying them into its library.

To import without copying, click Import in Place instead of Copy Photos.

Launching Shotwell with a List of Image Filenames

If for some reason you want or need to do this by running a command in the Terminal, you can run the shotwell command and pass each image's filename to it as an argument. Globstar makes it easy:

shopt -s globstar
shotwell **/*.cr2

That opens the .cr2 files located anywhere in the current directory. It differs from running Shotwell and then dragging the folder in, in that Shotwell will only try to import the the files whose names you give it. However, since Shotwell often shows other image files from the same folders as the files you've told it to open, this may not be adequate for your needs. (And further information you've given about your problem suggests that it is not. See below for an alternative.)

This does not include files or subfolders whose names start with .. However, if you have CR2 files whose names start with a dot, then most of the time you probably don't want to open them in Shotwell anyway. Unless you've deliberately named your files or folders in this way, a dotfile with an image or document filename extension is more likely to be a metadata file rather than an actual image or document. For example, macOS often adds such files (e.g., ._kittens.cr2 for an actual picture kittens.cr2) when accessing external media (including flash drives and digital cameras).

If you do want to also find files whose names start with . or that are in folders whose names start with ., then enable dotglob as well. You can do this with shopt -s dotglob or by passing both globstar and dotglob to the shopt builtin:

shopt -s globstar dotglob

By default, globs are case-sensitive. But you might want to match filenames case-insensitively, so as to open files ending in .cr2, .Cr2, .cR2, and .CR2. To do that, either:

Enable nocaseglob by running shopt -s with nocaseglob, either by itself or with other shell options. For example, to run shotwell on all .cr2 files, searching case-insensitively and including .-files and files in .-directories:

shopt -s globstar dotglob nocaseglob
shotwell **/*.cr2

Or, use .[cC][rR]2 instead of .cr2 in your glob pattern itself. For example, this accomplishes the same as above:

shopt -s globstar dotglob
shotwell **/*.[cC][rR]2

Note that case sensitivity is entirely separate from whether or not . files and folders are matched. You can remove dotglob from the examples above and they can still be case-insensitive.

To specify a directory rather than just using the current directory, put its name and a / before the **/*.cr2 glob. For example, replacing the shotwell command above with this one will open all the .cr2 files inside the Pictures subdirectory of your home directory:

shotwell ~/Pictures/**/*.cr2

Unlike with the first command that uses your current directory, no matter where you run that command you will be telling Shotwell to open the same files.

Testing

If you really have to use the terminal for this, then I'm guessing it may be part of something more complex. If you like, you can test such commands before actually running them by replacing shotwell with printf '%s\n'. Instead of passing the filenames to Shotwell, that lists them one per line. For example, on my machine:

ek@Io:~$ printf '%s\n' ~/tmp/**/*.cr2
/home/ek/tmp/another image.cr2
/home/ek/tmp/image.cr2
/home/ek/tmp/some folder/image3.cr2

Turning Off Globstar and Other Shell Options

The globstar shell option has be enabled to work, which is what the shopt -s globstar command (above) did. If it's already enabled, then you don't need multiple commands. And you only need to set globstar once per shell instance.

You can turn globstar back off by running:

shopt -u globstar

And you can check whether globstar is on or off by running:

shopt globstar

If you're using globstar in a script, you should consider turning it back off if there might be code that comes afterwards in the same script that is not written with globstar in mind. For example, writing ** when you mean * is usually no problem when globstar is disabled, but with globstar turned on, it can cause serious problems by making a command affect far more files than someone intended.

Similarly, if you used dotglob or nocaseglob and you want too turn them off, you can do so with shopt -u dotglob and shopt -u nocaseglob, respectively. You can also pass multiple shell options to shopt -u to unset them at the same time. For example, to turn off globstar, dotglob, and nocaseglob:

shopt -u globstar dotglob nocaseglob

Compared to globstar, there are fewer serious mistakes you might make because you forgot you left dotglob or nocaseglob on. But other people (including people you consult on sites like Ask Ubuntu) usually assume dotglob and nocaseglob are disabled when they suggest commands for you to use, unless you tell them otherwise.

For more information on these glob-related shell options (and also on globs in general), see the bash reference manual. They are all covered primarily in 4.3.2 The Shopt Builtin. For globstar, see also 3.5.8.1 Pattern Matching. For dotglob, see also 3.5.8 Filename Expansion.

Building a New Directory Tree

Since in your case you seem to really need Shotwell to show only .cr2 files, you have non-.cr2 files in the same folders with .cr2 files, and image browsing in Shotwell is automatically offering those files too, it looks like you will need to have a folder that contains no other image files than the .cr2 files you're trying to open.

Moving the files, as you've suggested, is one approach, but I recommend instead either copying the files or, better, making symbolic links to the files (see also FOLDOC), because:

If you're moving the files across devices, that requires copying anyway, so in that case moving is no faster.
If you have the space, it's often a good idea to keep an unmodified folder of everything you started with until you're satisfied that what you've done is correct according to your needs. Obviously this is not always applicable or practical. But in your case, these files are the result of a data recovery operation. It may be useful to keep an easily perused record of precisely what was recovered and from where.
If you choose to create symbolic links, the amount of additional space consumed is extremely small. (If the target disk is completely full, though, then you will still need to free up space on it -- or use a different target disk -- to create symlinks.)

There is another decision for you to make, too. Do you create all the new entries (whether they be copies or symlinks) in the same directory, flattening the file hierarchy? Or do you create directories at the destination corresponding to each of the directories at the source that contain at least one .cr2 file?

Flattening the file hierarchy lets you see all the files at once, easily. In particular, it is easy to see the files' names and sizes all at once, as well as to select any combination of the files in a graphical file browser.
But it also loses information about what folders they were in, which may be valuable (though you can return to the original folder and look for them there if you don't move the files).
The bigger problem with flattening the file hierarchy, though, is what happens if you have two or more files of the same name in different places. If you flatten the file hierarchy, then depending on how you do it, either all but the first will fail to be copied (or linked) and you'll get an error or warning, or all but the last copy (or link) will be overwritten.

This is another reason I recommend copying or making symlinks rather than moving files. If you "successfully" move multiple files into the same file, you've lost all but the last one!

Because of the disadvantages of flattening everything into a single directory without subdirectories, the approaches I take here build a new directory tree at the destination.

Way 1: Copying

I show this first because it's a little simpler, but I suggest you instead create symbolic links ("Way 2"), especially if the destination drive might not have enough space to hold all the files. "Way 2," which is a bit more complicated, is much more detailed because there seem to be fewer resources on how to use that technique, it's the way I expect most people in this situation will prefer, and information that applies to both methods -- basic advice about escaping spaces in paths -- is given there rather than here.

When you need to copy a directory tree and you need to customize the copy operation, you should usually use rsync instead of cp. This is one of those cases.

Replacing src with the path to the top-level directory containing all your CR2 files, and replacing dest with the name of the directory you want to create that will contain a hierarchy of symbolic links to the CR2 files, run:

rsync -rl --prune-empty-dirs --include='*/' --include='*.cr2' --exclude='*' src/ dest

Don't forget the / after the name of the source directory, unless you want an additional top-level directory to be created inside dest. That is, if you omit the trailing /, then rsync will make the destination directory for you, inside dest. For example, suppose src is a relative path containing no /. Then:

With src/ in your rsync command, you get a symlink dest/foo/bar.cr2 for the file src/foo/bar.cr2.
With src in your rsync command, you get a symlink dest/src/foo/bar.cr2 for the file src/foo/bar.cr2.

Since it could be confusing for the top-level directory where symlinks will be placed to have the same name as that of the top-level directory containing the .cr2 files that the symlinks will point to, I recommend you include the / at the end of the destination directory name in your rsync command. (And, for the source directory, give it a directory that is empty, doesn't exist, or is otherwise dedicated to this purpose. Otherwise, you'll be cluttering up some other folder.)

As is generally the case when you pass the name of a file or directory to a command-line program or script, if your destination or source directory paths contain any blank spaces (or characters treated specially by the shell, like \, $, ', and various other punctuation), then you will have to quote them. I've detailed how to do this, for the most common case of spaces, in "Way 2"--the advice about quoting in that section applies here as well. However, if you're not sure how to quote the name of a folder, you can have Ubuntu do it for you by simply dragging the folder into the Temrminal; its full path will be pasted in with correct quotation.

After copying just the .cr2 files and the folders that contain them, you can open the destination folder up in Shotwell. (See "Opening a Folder of Images (Including Subfolders) in Shotwell" above.) However, before running rsync, I recommend you decide if want to skip entries that start with . and if you want to include entries with case-variant suffixes. If so, you'll have to run some slightly different rsync command.

Customizing the Handling of Dotted Entries and Case Sensitivity

You may want to use a different rsync command to change whether or not files and directories that start with a dot are skipped and whether or not you want case-sensitivity in matching the suffix .cr2.

The command above does include directories and files whose names start with .. To exclude such files and directories, put --exclude='.*/' --exclude='.*' before all other --includes  and --excludes. That is, use this rsync command instead (with the appropriate substitutions for src and dest, of course):

rsync -rl --prune-empty-dirs --exclude='.*/' --exclude='.*' --include='*/' --include='*.cr2' --exclude='*' src/ dest

The rsync commands shown thus far have been case-sensitive and will not copy files that end in .CR2, .Cr2, or .cR2 rather than .cr2. If you want such files to be copied, then you'll need to account for that by using the --include pattern *.[cC][rR]2 in place of *.cr2.

This third command is case-insensitive and (like the first command) does not skip files and directories whose names start with .:

rsync -rl --prune-empty-dirs --include='*/' --include='*.[cC][rR]2' --exclude='*' src/ dest

If you take the approach of copying files with rsync, and you're not sure which of these commands you want, I suggest using that one if you want to make sure not to miss anything. However, you should be aware that dotfiles may contain metadata, and dotfiles named like images may not really be images. See the discussions on dotfiles in the "Launching Shotwell with a List of Image Filenames" section above, and on dotfiles and case sensitivity in "Way 2" below.

This fourth command is case-insensitive and (like the second command) does skip files and directories whose names start with .:

rsync -rl --prune-empty-dirs --exclude='.*/' --exclude='.*' --include='*/' --include='*.[cC][rR]2' --exclude='*' src/ dest

Way 2: Creating Symbolic Links

This is what I recommend you do, though Way 1 is okay if you have enough space on the destination drive. You don't have to read Way 1 to use this.

The method presented here makes a list of .cr2 files and loops through the list, creating target directories as needed and populating them with symbolic links to each .cr2 file.

This is just complicated enough that I suggest putting it in a script rather than just typing it in interactively. You can put the script wherever you like, but for convenience, I'll show how to do it with the script placed directly in your home folder.

Write (or paste in) the script.

Create a text file, make-symlinks, in your home folder. No file extension is needed.

You can do this with any text editor, like Vim, Nano, Gedit, or Leafpad. Don't use a word processor like LibreOffice Writer, though. (You could even do it by running cat > ~/make-symlinks, pasting in the contents of the file, and pressing Ctrl+D on a new line, if you wanted.)

If you name the script something other than make-symlinks, make sure to use that name when you run commands that use the script later.

#!/bin/bash

shopt -s globstar dotglob nocaseglob

for f in **/*.cr2; do
    mkdir -p "$1/$(dirname "$f")"
    ln -s "$PWD/$f" "$1/$f"
done

Put that in the file, and save the file. This script uses globstar, a Bash feature explained above in "Launching Shotwell with a List of Image Filenames".

You can change how it handles dotted entries and case sensitivity.

Depending on your needs, you may want to make some changes:

If you don't want to include .cr2 files whose names start with . or that reside in directories whose names start with ., remove dotglob from the shopt line.

Files and directories whose name start with . are often used for metadata (see the "Launching Shotwell with a List of Image Filenames" section above). On the other hand, if you want to make sure you have everything, or if there's something inexplicably missing that you are pretty sure is there, then should keep dotglob.
If you want to include only files that end in exactly .cr2 but not case variants (.CR2, .Cr2, and .cR2), then you should remove nocaseglob. Since your situation involves data recovery and Shotwell will not show you any of the files you missed when you open up the directory of symbolic links -- that's the point of this method, after all -- you will likely want to keep nocaseglob.

Make it executable.

Run this command to mark your script executable:

chmod +x ~/make-symlinks

Run it at the source and pass the destination as an argument.

Then change directory to the source directory, i.e., the top-level folder that contains the pictures. For example, if they are in the Pictures subdirectory of your home directory, you would run:

cd ~/Pictures

This is where you'll run the script. Pass the destination directory to the script as a command-line argument.

For example, if you want a directory called cr2s to be created on your Desktop to contain the symbolic links, run:

~/make-symlinks ~/Desktop/cr2s

Or if you just want that directory directly in your home folder:

~/make-symlinks ~/cr2s

Or if you have a drive mounted at /media/you/MyDrive and you want to create a folder on it called links to contain the symbolic links:

~/make-symlinks /media/you/MyDrive/links

But if the drive is /media/you/My Drive (with a space) then you must use quotation. Any of these works (use just one, don't run them all):

~/make-symlinks '/media/you/My Drive/links'
~/make-symlinks /media/you/'My Drive'/links
~/make-symlinks /media/you/My\ Drive/links

But if you use ~ for your home directory, don't quote that:

~/make-symlinks ~/'Two Words'   # good
~/make-symlinks ~/Two\ Words    # good
~/make-symlinks '~/Two Words'   # BAD, because ~ doesn't get expanded

make-symlinks creates the destination directory for you if it doesn't already exist, just as it creates subdirectories within it. However, it still works if the destination already exists.

You can even run it multiple times and pass the same destination directory (for example, if you interrupted it with Ctrl+C), though you'll get failed to create symbolic link errors for the symlinks that already exist, and that could be confusing.

You probably don't want to pass the name of a directory that already exists and contains unrelated files (like your home directory) to make-symlinks. If you do, you can expect a whole bunch of symlinks and subfolders to be created in it. You probably want to use a new directory -- or one that doesn't exist yet -- for make-symlinks.

Import the newly created symlink tree into Shotwell.

After you run make-symlinks, just import the directory you passed to it into Shotwell, using either of the methods given in the first part of this answer ("Opening a Folder of Images (Including Subfolders) in Shotwell"). For example, you could open Shotwell and drag the folder in.

Since all the the entries in folder are either symbolic links to .cr2 files or directories that contain them, with no other file types, Shotwell should not see any of the other files.

I wasn't aware shotwell even opened raw files. I am certain you might get more mileage with digikam or darktable. Digikam comes with some Kde components and is a pretty good photo manager. Darktable comes with very good non-destructive editing capabilities.


Login and install packages when no DM is installed I recently updated a few machines to 11.10. On one of them, the promt to chose between gdm and lightdm. I tried selecting light dm, but the upgrade tool inevitably returned to the same prompt. I then chose gdm and the upgrade completed.

But now when I tried to boot, the computer presents no login screen. I'm thinking that it's because GDM was uninstalled in the upgrade process.

How can I install lightdm or gdm without logging in traditionally?

PS: apt-get does not seem to work in recovery mode.

Press Ctrl+Alt+F1 to get to the first console. You should be able to login there.

I would try to reconfigure lightdm from this console.

sudo dpkg-reconfigure lightdm

Try installing if its missing

sudo apt-get install lightdm

If this doesnt help, check the desktop manager configured in this file

/etc/X11/default-display-manager

when booting, on the grub menu where you choose what OS to boot, select the normal option and press e
you will now be able to edit the boot lines, select the line starting with kernel and press e again
you are now editing the line that loads linux, right at the end of this line add a space and 3
press ESC and then b to boot with the modified line

this will cause you to boot into runlevel 3 which has no GDM or GUI at all and you should end up in a traditional terminal window.
login and run the following command: sudo apt-get install gdm
after this has completed, you should be able to reboot and get the usual login screen

if you can't access the grub menu for some reason, you'll need to boot the machine using a live CD and modify grub to allow you to access the menu


How do I connect Ubuntu 20.04 to a Smart-TV? how do I connect my smart TV to Ubuntu (20.04 LTS) as secondary display? Cant find any option anywhere ..
Thanks for helping!
Achim

You can give a try to gnome-network-displays, installable through means of Flatpak system.
Keep in mind that it's considered "experimental" by its authors, meaning it may not work at all for you.
Also I don't know how it will be on Ubuntu 20.04 LTS, you'd better be on Ubuntu 21.04 (in beta as of my writing) cause it has several bugfixes and features relevant here.

Connect your pc or laptop to your smart-tv with wifi and then go to display in settings and then customize your settings such like which display will be your primary screen and other settings similar to Windows.


Intermittent crontab problem My crontab entry intermittently fails to find scripts in my user's home directory.  The crontab entries run exactly on schedule as specified, and occasionally the script runs correctly, but mostly it only produces output like this:

/bin/sh: 1: /home/<user>/script/check_cgi.pl: not found

The crontab entry for this is:

5,35 * * * *    /home/<user>/scripts/check_cgi.pl >>/tmp/check_cgi.pl.out 2>&1

I have double-checked that the script exists, and that root can see the filesystem and that the command runs correctly if I sudo to root.

Does anyone have any suggestions as to why cron would frequently not be able to find a file and how to solve it?

EDIT

This is root's crontab (edited by sudo crontab -e), hence the relevance of checking that root can see the script.

The permissions on the script are:

-rwxrwxr-x 1 <user> <user>  700 Apr 20 09:27 check_cgi.pl

and the directory permissions 775 or 755 too, so there is no problem with root having permissions to execute the script.

It seems that cron started to "find" the script after I added a new cron job to run "find /"; as if forcing cron to go through the entire directory tree allowed it to "find" the script again.

There are 4 scripts, which are all contained in the same directory.  They run at various times (every 15 mins, every 30 mins, once per day) and they all have this problem at the same time.  And then when the problem goes, they all work ok.

EDIT 2

I have found the problem... By running each hour the cron job "ll -lR /home", I discovered that around 15.00 it started to incorrectly report the contents of the /home/ directory.  Instead of the correct collection of directories (including the required scripts directory), it showed the completely different contents :

lrwxrwxrwx 1 <user> <user> 56 Jan 18 20:53 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
lrwxrwxrwx 1 <user> <user> 52 Jan 18 20:53 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt

And when I view the /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt file, it tells me:

THIS DIRECTORY HAS BEEN UNMOUNTED TO PROTECT YOUR DATA.
From the graphical desktop, click on:
 "Access Your Private Data"
or
From the command line, run:
 ecryptfs-mount-private

So that appears to be the answer.  The home directory is set up as an encrypted filesystem and the operating system unmounts it in periods of low use "to protect your data".

I just need to work out how to disable this behaviour either permanently or when the cron jobs run.  I guess the answer is within ecryptfs-mount-private...

The ubuntu help describes this problem https://help.ubuntu.com/community/EncryptedHome

Caveats
There are a few minor caveats that one must keep in mind about these encrypted configurations.
When you are not logged into your system, data in your home directory is not accessible in plain text. This, of course, is by design. This is what keeps an attacker from gaining access to your files. However, this means that:
1.    Your cronjobs may not have access to your Home Directory

The solution is, I think, not to have encrypted home directories, or move the files to somewhere that root can see (like root's home directory).

It's weird the script runs well occasionally.

But, in my experience, most of the problems related crontab is a privilege.

crontab runs the script with it's own privilege, not root.

Therefore, how about "chmod 707" or "777" to your script and your user's folder??


Fonts showing as squares in Libre office I am new to Ubuntu. I installed new fonts to Ubuntu which I was previously using on Windows. The English fonts works fine. However, all fonts in Arabic show as squares when I use them. The system Arabic fonts are rendering normally. All my fonts are of .ttf type.

I attached a photo to describe the situation. The first line shows that English fonts renders normally as well as native Arabic fonts as in the second line. However the installed Arabic fonts don't as in the last line.

You might need to install the specific font of specific language  i.e: You will have to download Arabic version of the font. I have the link here


How do I stop video tearing? (Nvidia prop driver, non-compositing window manager) I have that problem which seemingly afflicts many using the proprietary Nvidia driver:

  Video tearing: fine horizontal lines (usually near the top of my display) when there is a lot of panning or action in the video.

(Note: switching back to the default nouveau driver is not an option, as its seemingly nonexistent power-management drains my battery several times faster)

I've tried Totem, Parole, and VLC, and tearing occurs with all of them.  The best result has been to use X11 output in VLC, but there is still tearing with relatively moderate action.

Hardware:  MacBook Air 3,2 -- which has an Nvidia GeForce 320M.

There are two common fixes for tearing with Nvidia prop drivers:

Turn off compositing, since Nvidia proprietary drivers don't usually play nice with compositing window managers on Linux (Compiz is an exception I'm aware of).  But I use an extremely lightweight window manager (Awesome window manager) which is not even capable of compositing (or any cool effects).  I also have this problem in Xfce, where I have compositing disabled.
Enabling sync to VBlank.  To enable this, I set the option in nvidia-settings and then autostart it as nvidia-settings -l with my other autostart programs.  This seems to work, because when I run glxgears, I get:

$ glxgears
 Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.500 FPS
300 frames in 5.0 seconds = 59.992 FPS

And when I check the refresh rate using nvidia-settings:

$ nvidia-settings -q RefreshRate
Attribute 'RefreshRate' (wampum:0.0; display device: DFP-2): 60.00 Hz.

All this suggests sync to VBlank is enabled.  As I understand it, this is precisely designed to stop tearing, and a lot of people's problem is even getting something like glxgears to output the correct info.   I don't understand why it's not working for me.

xorg.conf: http://paste.ubuntu.com/992056/

Example of observed tearing::

One thing to try that may work. Open nvidia-settings and go to the powermizer section. Choose "Maximum Performance" in the drop-down, and you should see your powermizer level jump to the fastest speed.

Once you've done that, try the video.

In the past, I've found that vsync doesn't work when the nvidia card is on the slowest powermizer setting.

It seems that you are running some lightweight window manager (presumably openbox). If that is the case, it is possible that you are using xcompmgr as a composite manager to get desktop effects such as shadows, transparencies, etc.
In my case, turning xcompmgr off solved this same issue: tearing while watching videos, specially those in HD (which are CPU intensive). Apparently, tearing occured because of a bug in xcompmgr, which is a longly abandoned project.
To turn off xcompmgr you can execute "killall xcompmgr". That should work.
Hope it helps!
Saludos! Pablo.


Giving a Hard Drive Executable permissions for Steam I am completely new to Linux, installed it around 10 mins ago any my first order of business is to get my HDD working. I have it set up and plugged in or whatever and there is alot of files on it that I can't lose, so reformatting or whatever isn't an option. I need to give it executable permissions so I can run the steam games off of it. How do I do this? I've browsed around other threads and looked at the stuff but some of it seems really complicated to a complete linux noob like myself.

Thanks in advance.

This error seems to be related to the permissions of the folder your disk is mounted to, for me it was mounted by the user AFTER log in, by changing it to log in at boot (moving the mount point to /mnt from /media), it was mounted as root and the error was gone.

Open the dash and find the disks app, open it, click on the hard drive with your games on it and then, on the right the little cogs and mount options and make it look like this

Now just open steam and then, from the drop down menus, go to >> Steam >> Settings, choose downloads on the left then click STEAM LIBRARY FOLDERS button.

You should see a box listing only your steam install directory, click ADD NEW LIBRARY FOLDER and point it to the location of your folder.

Now your new drive is added and it will look, something like, this

Now your Steam should ask you where you installed games at the time of installation.

You can grant executable permissions using chmod. However granting executable permission to a whole harddisk is not at all recommended and WILL break your linux installation. What you wan't to do is run games i understand, and believe me you DON'T need to give executable permissions to a whole drive to do just that. Now, lets get to what you need to do to run your games.

First make sure are they windows game(ones which have a setup and are run by .exe file) or linux native games. Running a game native to linux will be very simple. You will most probably just need to extract it and run is main file by double clicking. Running a game you used to play on windows will require wine. You can find how to setup wine and run windows games here. Also not all windows games run smoothly in linux, check your game compatiblity here. Hope that clears it up, goodluck.


Why is Ubuntu switching to Unity? I understand from Jono Bacon's blog that Ubuntu will be switching to Unity as the default desktop in the upcoming 11.04.

What's not clear is "Why?".

Could someone explain the benefits of Unity over GNOME 2.x or indeed GNOME 3.x so that people can be informed about this decision?

This Arstechnica article based around an interview with Mark Shuttleworth (the founder of Ubuntu and Canonical) gives some reasons for going forward with Unity, as opposed to using the GNOME Shell.

The GNOME Shell is the major new component of GNOME 3, that many people are incorrectly referring to as simply 'GNOME 3'. Remember that future Ubuntu versions will still be based on GNOME 3 - the underlying infrastructure, applications, etc will not change - they just won't use the GNOME Shell by default.

Ubuntu would like to embrace different ideas to other parts of the GNOME family -  specific examples mentioned are Mac OS X style global menus, and heavier 'Zeitgeist' integration.
There are concerns about hardware support with the Mutter technology GNOME Shell uses. Whilst Unity has up to now also used Mutter, Unity has been ported to Compiz, which, through its inclusion in default Ubuntu for over three years, has proved itself to have excellent hardware support.
Recent Ubuntu design work, such as Application Indicators and NotifyOSD are likely to be incompatible with GNOME Shell, and we want to keep these improvements, not move backwards!
Other distributions may have different user bases and needs. Ubuntu has a lot of home users, whereas many other distributions have more commercial users in workplaces. Canonical employs a lot of professional design experts and they may feel they can do a better job than, or at least take a different approach to, the existing GNOME Shell.

I have dualboot and so always compare ubuntu, gnome and win, just the GUI!!!

If you know win7 and then compare it with unity, you will see that there are not may differences. So, I don't think that unity is something entirely new. It is just compiz like before with a panel and a dock, which is the same like win7 taskbar, just with a global menu.

Why? Quicklists = Jumplists
both combine starter and tasks (or grouped windows)
the grid in unity and gnome 3 is the aero-something in win

the start menu of win7 startmenu can filter recent documents with mouse over the related app. Unity has nothing like this.

the Lenses in Unity are realy different and will have some good features in the future.

gnome3 is realy a entirely new, next generation desktop. Unity just made its way into the present.

Maybe Unity likes to make it easy for windows user to start in the Linux world while gnome3 is too different.


Is there a simple "Hello World" for making games? Does anyone know of a simple "Hello World" for making games for ubuntu? I've seen the Getting Started with Quickly video.

Any examples for platformers or something like that?

EDIT:
Just a recap of the answers.

Blender Game engine -- Uses python

Pygame -- Python

MonoGame http://monogame.codeplex.com/ -- some sort of XNA ?

QuakeC -- This a Quake flavored C like lang.  See: Steel Storm http://one.steel-storm.com/

One fast and easy option is Quickly.

Creating a project is as easy as typing this at terminal:

quickly create ubuntu-application my-new-project

See this intro video.

Also this is a great site: http://developer.ubuntu.com/get-started/

And, of course, the manual:  man quickly

You will be using python which is also great for 3d games, see Panda3D.

//A Hello World for game
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    int a=5, answer;
    printf("I am guess number game\n\n"); getchar();
    printf("I have a number\n\n"); getchar();
    printf("...between 1 until 10...\n\n"); getchar();
    printf("Try to guess: \n\n"); scanf("%d", &answer);
    while(1){
    if(answer<a){printf("\nYours %d, too small...\n\nInput again: ", answer); scanf("%d", &answer);}
    if(answer>a){printf("\nYours %d, too big...\n\nInput again: ", answer); scanf("%d", &answer);}
    if(answer==a){printf("\nYou're Right! My number is %d!\n\nDa daaag...", a); break;}
             }
return 0;
}


Changing hostname without restart via cloud-init isn't working correctly I followed this thread while writing my cloud-init script.

I've tested and I have this in one part of my boothook script:

echo "HOSTNAME=$HOSTNAME" >> /etc/environment
echo "127.0.1.1 $HOSTNAME" >> /etc/hosts
echo "$HOSTNAME" > /etc/hostname
echo "$HOSTNAME" > /proc/sys/kernel/hostname
hostnamectl set-hostname $HOSTNAME

When I login to my system for the first time:

$ echo $HOSTNAME
aaa.bbbb.domain.org

$ cat /etc/hosts
127.0.1.1  aaa.bbbb.domain.org

$ cat /etc/environment
HOSTNAME=aaa.bbbb.domain.org

But for some reason I can't understand:

$ cat /etc/hostname
aaa

$ cat /proc/sys/kernel/hostname
aaa

$ hostname
aaa

Not sure why! Any clues?

I actually discovered after a lot of tinkering and researching that what I am seeing is the intended behavior, although it is different from what I am used to on CentOS/RHEL systems.

To summarize this from here:

  CentOS & RHEL deployment guide
  say the hostname should be the FQDN; Debian specifies
  the hostname should NOT be the FQDN.

  The kernel maintains the system hostname.
  This file should contain only the system hostname,
  not a fully qualified domain name.

I'm fine with it this way (sure makes shell prompts shorter!) I just wanted to make sure I wasn't doing something wrong.

you must edit /etc/hosts and add hostname like this:

127.0.0.1    aaa.bbbb.domain.org aaa.bbbb


Touchpad not working properly - Ubuntu 14.04 - Used to work Today, suddenly my Ubuntu 14.04 running on my HP Pavillion DV6 had the touchapd not working properly, at all.

I plugged an external mouse, it worked great.

Problems I'm having with my touchpad:

jumpy cursor
scrolling problems
Right-click panel shows by it self

when I scroll using 1 finger, the right click panel pops out by
itself suddenly

Mouse lagging

Touchpad became unusable, it's totally not working properly anymore. It worked fine just an hour ago. It might be caused by an update I just did to ubuntu ? Ubuntu asked for an update an hour ago and after that the touchapd problem appeared.

Some Logs:

lambasoft@Lambas:~$ xinput --list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=10   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ HP Truevision HD                          id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                       id=14   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=15   [slave  keyboard (3)]
    ↳ Logitech USB Receiver                     id=9    [slave  keyboard (3)]

lambasoft@Lambas:~$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

lambasoft@Lambas:~$ xmodmap -pp
There are 24 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              4
        5              5
        6              6
        7              7
        8              8
        9              9
       10             10
       11             11
       12             12
       13             13
       14             14
       15             15
       16             16
       17             17
       18             18
       19             19
       20             20
       21             21
       22             22
       23             23
       24             24

My mousepad if I cat /proc/bus/input/devices

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input4
U: Uniq=
H: Handlers=mouse0 event5
B: PROP=1
B: EV=b
B: KEY=e520 30000 0 0 0 0
B: ABS=660800011000003

lambasoft@Lambas:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

Please let me know if you need any extra logs or details.
Thanks

Have you gone into System Settings and checked the values, its possible that they got changed by something in the update.

Also, try rebooting, I know this is the cure for a number of the other OS's problems,  but every once in a while it works even in Linux.


Grub 2 detects incorrect partition for windows Windows 7 is present on /dev/sda3, but grub 2 detects Windows 7 on /dev/sda1. How can I configure Grub 2 so that it will always point to /dev/sda3 for Windows 7, even if later on I do a sudo update-grub?

Windows 7 is present on sda3, but during installation it created a small 100mb partition as sda1, which Grub 2 is pointing to. But Windows 7 on my machine can boot from /dev/sda3, not /dev/sda1.

Try to uninstall the cinnamon installed by using the following command,

sudo apt-get remove --purge cinnamon

and then

sudo apt-get autoremove

Once you are done with the above please proceed with login and logout else restart.


Wordpress alias problem I have configuration like this:

    Alias /blog /usr/share/wordpress
    Alias /blog/wp-content /var/lib/wordpress/wp-content
    <Directory /usr/share/wordpress>
        Options FollowSymLinks
        AllowOverride Limit Options FileInfo
        DirectoryIndex index.php
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/lib/wordpress/wp-content>
        Options FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>

In general I follow up this procedure help.ubuntu.com. Problem is in fact when I restart apache2 I get message

"The Alias directive in /etc/apache2/sites-enabled/wordpress at line 2 will probably never match because it overlaps an earlier Alias."

I had been added on test.php file on /var/lib/wordpress/wp-content. If I try mydomain.com/blog/wp-content/test.php, I got error 404. This means that in general I miss all plugins/themes static files.

What could be a fix for it?

Swap the order of those Alias directives so the most specific one comes first:

Alias /blog/wp-content /var/lib/wordpress/wp-content
Alias /blog /usr/share/wordpress

From the docs:

  [...] the Aliases and Redirects are processed in the order they appear
  in the configuration files, with the first match taking precedence.

  For this reason, when two or more of these directives apply to the
  same sub-path, you must list the most specific path first in order for
  all the directives to have an effect. For example, the following
  configuration will work as expected:

Alias /foo/bar /baz
Alias /foo /gaq

  But if the above two directives were reversed in order, the /foo Alias
  would always match before the /foo/bar Alias, so the latter directive
  would be ignored.

Add

ServerName mydomain.com

ServerAlias www.mydomain.com

on the top of the conf file


Can I directly download audio using youtube-dl? Can I directly download audio from a YouTube video instead of first downloading audio+video and then extracting the audio?

Here is a recent article in webupd8.org that explains how to use youtube-dl to directly download audio instead of first downloading video+audio and then extracting audio using -x. Unfortunately, the search facility that Maythux asked for here isn't offered. But it is still worth a look:
Video Downloader youtube-dl Gets Support For Separate Audio And Video YouTube DASH Streams

Basically, download the latest version of youtube-dl from source or from the ppa offered in the link above but not from the Software Center.

Then, if you already have the video link ...

Run, as example:

youtube-dl -F http://www.youtube.com/watch?v=HRIF4_WzU1w

This will list the various download formats available for this url (audio and video).

$ youtube-dl -F http://www.youtube.com/watch?v=HRIF4_WzU1w
[youtube] Setting language
[youtube] HRIF4_WzU1w: Downloading webpage
[youtube] HRIF4_WzU1w: Downloading video info webpage
[youtube] HRIF4_WzU1w: Extracting video information
[info] Available formats for HRIF4_WzU1w:
format code extension resolution  note
171         webm      audio only  DASH webm audio , audio@ 48k (worst)
140         m4a       audio only  DASH audio , audio@128k
160         mp4       192p        DASH video
133         mp4       240p        DASH video
134         mp4       360p        DASH video
135         mp4       480p        DASH video
17          3gp       176x144
36          3gp       320x240
5           flv       400x240
43          webm      640x360
18          mp4       640x360     (best)

Now, choose desired audio format. I went for 140

Run:

youtube-dl -f 140 http://www.youtube.com/watch?v=HRIF4_WzU1w

$ youtube-dl -f 140 http://www.youtube.com/watch?v=HRIF4_WzU1w
[youtube] Setting language
[youtube] HRIF4_WzU1w: Downloading webpage
[youtube] HRIF4_WzU1w: Downloading video info webpage
[youtube] HRIF4_WzU1w: Extracting video information
[download] Destination: Martin Luther King - I Have a Dream on August 28, 1963 [Sous-titres & Subtitles] [FULL SPEECH]-HRIF4_WzU1w.m4a
[download] 100% of 15.19MiB in 00:04

That's it.

I have this alias to easily download any audio with better filenames:
$ alias | grep audio

alias youtube-dl-audio='youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3'

Audio quality: From the documentation: "By default youtube-dl tries to download the best available quality, i.e. if you want the best quality you don't need to pass any special options, youtube-dl will guess it for you by default.". So there's no need for --audio-quality 0 or -f bestaudio.
Updates: Download last version of youtube-dl. Avoid repo or PPA version so you can upgrade with youtube-dl -U (necessary quite often).

To install it right away for all UNIX users (Linux, OS X, etc.), type:
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Albums: You can split the file into chunks/tracks with mp3split. Generate playlist timestamps:
ffmpeg -i "complete_album.mp3" -af silencedetect=d=0.1 -f null - |& awk '/silence_end/ {print $4,$5}' | awk '{S=$2;printf "%d:%02d:%02d\n",S/(60*60),S%(60*60)/60,S%60}'

Error 403?: Add --rm-cache-dir.
Moreover
ytmdl: A simple script to get songs from YouTube in mp3 format with all tags from iTunes
MP3 Tagging: I’m still trying to find a reliable CLI tool to fix and tag all the generated mp3:

Beets (maybe with tracker cheatsheet and gnome-music?)
lltag
foobar2000


How can I extract a page range / a part of a PDF? Do you have any idea how to extract a part of a PDF document and save it as PDF?
On OS X it is absolutely trivial by using Preview. I tried PDF editor and other programs but to no avail.
I would like a program where I select the part that I want and then save it as a PDF file with a simple command like CMD+N on OS X. I want the extracted part to be saved as PDF and not as JPEG, etc.

pdftk is a useful multi-platform tool for the job (pdftk homepage).

pdftk full-pdf.pdf cat 12-15 output outfile_p12-15.pdf

you pass the filename of the main pdf, then you tell it to only include certain pages (12-15 in this example) and output it to a new file.

If you want to extract from your PDFs, you can use http://www.sumnotes.net.
It's an amazing tool to extract notes, highlights, and images from PDFs.
You can also watch tutorials on Youtube by typing sumnotes.

I hope you will enjoy it!


Failed to bootstrap during Openstack autopilot installation I'm installing Openstack autopilot on Ubuntu 15.04 server. I've installed Maas and join nodes successfully. I tested Maas connection by installing juju and deploying service. but when I want to install openstack it encounters error in bootstraping.

I follow instructions at http://www.ubuntu.com/download/cloud/install-openstack-with-autopilot

I debug installation and get these:

config.yaml

headless: true
install_type: OpenStack Autopilot
landscapecreds:
  admin_email: user@mail.com
  admin_name: admin
  maas_apikey: [redacted]
  maas_server: 10.1.0.100
  system_email: user@mail.com
maascreds:
  api_host: 10.1.0.100
  api_key: [redacted]
openstack_password: [redacted]
openstack_release: kilo
ubuntu_series: trusty

command

DEBUG_JUJU_BOOTSTRAP=1 sudo -E openstack-install -c config.yaml --debug

commands.log

[INFO: 12-30 01:18:40] Starting OpenStack Installer v0.99.24
[INFO: 12-30 01:18:40] Start command: ['/usr/bin/openstack-install', '-c', 'config.yaml', '--debug']
[INFO: 12-30 01:18:40] Running Kilo release
[INFO: 12-30 01:18:40] Performing a OpenStack Autopilot install
[INFO: 12-30 01:21:48] Bootstrapping Juju
[INFO: 12-30 01:21:49] Bootstrapping Juju
[ERROR: 12-30 01:22:11] Fatal error
Traceback (most recent call last):
  File "/usr/share/openstack/cloudinstall/controllers/installbase.py", line 150, in start
    self.do_install()
  File "/usr/share/openstack/cloudinstall/controllers/installbase.py", line 134, in do_install
    self.loop, self.ui, self.config).run()
  File "/usr/share/openstack/cloudinstall/controllers/install/landscape.py", line 80, in run
    self._do_install_existing_maas()
  File "/usr/share/openstack/cloudinstall/controllers/install/landscape.py", line 42, in _do_install_existing_maas
    self.config, self.landscape_tasks).do_install()
  File "/usr/share/openstack/cloudinstall/controllers/install/multi.py", line 131, in do_install
    raise Exception("Problem with juju bootstrap.")
Exception: Problem with juju bootstrap.
[INFO: 12-30 01:22:11] Stopping eventloop
[INFO: 12-30 01:22:11] Cleanup, saving latest config object.

when I tried to bootstrap manually. I got these error:

command:

 JUJU_HOME=~/.cloud-install/juju/ juju bootstrap --debug

Error:

2015-12-29 22:10:53 INFO juju.cmd cmd.go:129 Bootstrap failed, destroying environment
2015-12-29 22:10:53 INFO juju.provider.common destroy.go:22 destroying environment "maas"
2015-12-29 22:10:53 INFO juju.provider.common destroy.go:33 destroying instances
2015-12-29 22:10:54 INFO juju.provider.common destroy.go:53 destroying storage
2015-12-29 22:10:54 ERROR juju.cmd supercommand.go:429 failed to bootstrap environment: cannot start bootstrap instance: gomaasapi: got error back from server: 500 INTERNAL SERVER ERROR (('UNHANDLED', 'Unknown Error [sajjad-maas:pid=774:cmd=CreateHostMaps:ask=b3]'))

Thank you in advanced for your help.

Regards
Sajjad

My problem solved, respect to to this post problem with juju on Ubuntu Openstack - Canonical Distribution

I've upgrade my region controller by these commands , after adding apt-repositories (described here)

sudo apt-get update
sudo apt-get dist-upgrade

Then I download latest images for 14.04 LTS from MAAS web UI, because my image was for two month ago.

And the installation of landscape auto-pilot done successfully. As a result It seems that if you want to install something, you must have the latest updates of everything.

You can work around this by changing the image-stream value in your ~/.juju/environments.yaml file from 'daily' to 'released'.


Removing Grub and MBR I installed Ububtu 12.04LTS as dual boot along with my Windows 7. I need to remove Grub and  restore Windows MBR but without uninstalling Ubuntu

To install a Windows bootloader, boot Windows and create a Repair CD. Boot from the repair CD (or from your original Windows DVD) to a repair prompt and run:

bootrec /fixmbr

(If you use Windows XP then the command is: fixmbr)

If you can't boot Windows and can't create a repair CD, you can install something like lilo which works identically to the Windows boot loader when used as shown below. Boot from an Ubuntu CD/USB and select "Try Ubuntu", connect to the internet and drop to a terminal (Ctrl+Alt+T):

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

Note, when you install lilo it will popup a big warning. You can ignore this (as it's not relevant when installing a Windows-style bootloader) - Tab to OK and hit enter. Also, if you don't boot from /dev/sda change as appropriate.

If you're planning to continue to boot Ubuntu after replacing the Windows bootloader you can use easyBCD. Otherwise you'll need to boot a live CD/USB to reinstall Grub later.

Install EasyBCD 2.2 go to advanced options, select which partition has Win7/xp installed and in the MBR configuration options select as per the OS you have installed.
Click on write MBR and restart..Voila..Go to disk management and restore the linux partitions by deleting and formatting them.


Keyboard doesn't work on GRUB I have Ubuntu 16.04 installed on an Acer Aspire VN7-792G laptop.

The keyboard was working normally until one day it suddenly stopped working on Grub menu. I can't select OS or even enter BIOS. But it normally boots into Ubuntu after waiting out the normal GRUB timeout (10 seconds I think), and the keyboard works fine then.

I tried to do some research and come across 'ohci_pci' and 'initramfs' but I couldn't understand how to apply them to my case or if they are even relevant to my case.

I would appreciate it if anyone can help.

I found a solution at https://ubuntuforums.org/showthread.php?t=2379525&p=13718691#post13718691

"You could insert the GRUB_TERMINAL_INPUT="at_keyboard" to verify keyboard. Usually c or e during grub, then add the line to the end of your kernel grub line.

You could also add the line to your /etc/default/grub file so it's added automatically after kernel upgrade or compiling."

I couldn't use the first option, but the second worked. It still doesn't work when I try to enter BIOS and I can't type the password. I'll update as soon as I find a solution for this as well.

I had the same issue. I switched the keyboard to a new USB port and it worked.
Even if the keyboard worked fine after boot.
Worth a try.


Can Sound Juicer become faster or should I use another program? I'm shocked at how slow Sound Juicer rips audio CD's. My machine is an Intel i7 with 4Gb RAM, so I thought that ripping would take just a couple of minutes. But the program takes it's time and lasts about 20' for each CD.

Is there a way to configure Sound Juicer to make better use of the available hardware?

Is there another program available for faster ripping?

The DVD is a Super Multi DL Drive. I guess it's faster than single speed. No serious errors on the command line after the extraction starts. Before that, gtk errors and glib errors. Running it from the command line is much faster.

Warnings on command line:

(sound-juicer:1285): WARNING **: Widget (GtkEntry) has more than one label
(sound-juicer:1285): GLib-GObject-WARNING **: invalid cast from GdkX11Window' to GtkWidget'
(sound-juicer:1285): Gtk-CRITICAL **: gtk_widget_get_display: assertion GTK_IS_WIDGET (widget)' failed
(sound-juicer:1285): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion GDK_IS_DISPLAY (display)' failed
(sound-juicer:1285): Gdk-CRITICAL **: gdk_cursor_unref: assertion `cursor != NULL' failed

I've monitored the system, and the memory use stays below 800Mb, also, the processors stay mostly below 20%.

Now, if a CD has 700Mb max, wouldn't it be possible to read the smallest song (in bytes) into memory, start processing that with one thread, read the next smallest song into memory and spawn the next process, etc?

With 4Gb RAM, and 8 processors, the computer should not have any problem ripping and encoding 4 CD's in memory at the same time. Or should it?

dd: reading `/dev/cdrom': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0258942 s, 0.0 kB/s

real    0m12.087s
user    0m0.000s
sys 0m0.004s

The reason extraction is so slow is because sound juicer uses cdparanoia, which was designed to read the disc multiple times in a very low level mode and perform complex software error correction to work around bugs that many drives commonly had, and any physical scratches on the disc.  I think these days most drives manage to do it correctly themselves, and so cdparanoia is no longer really needed.  There appears to be an open bug to have sound juicer stop using cdparanoia here:

https://bugzilla.gnome.org/show_bug.cgi?id=313302

It appears that sound-juicer has a gconf setting named paranoia where you can configure the paranoia settings.  Open gconf-editor and change the value to 0 and things go MUCH faster.

DVD write speed is a function of the drive and of the actual media. The media write speed for that particular media will be on the packaging, you can't do better than that. The achieved write speed is usually reported by the writing software so you can see if the advertised speed is achieved. Your drive is likely SATA which is capable of speeds faster than your drive can handle.


Would like to auto-mount two FAT flash drives with the same names I would like to auto-mount a flash drive I have called "flash". Infact I have 2 drives with the same name. Both FAT.

I would like ideally which ever one is connected when the system boots to be mounted. Is this possible? Or does auto mount work on an identifier beyond the name?

You can edit your /etc/fstab and add the following line to do this easily. But you may understand the risks of doing so.

LABEL=flash /media/where_will_be_mounted vfat defaults 0 0

Ok, lets boil down each option:

LABEL=flash: tells the system to mount any driver with the label flash
/media/where_will_be_mounted: Self-explanatory, you should already have the path created before mounting.
vfat: you said the filesystem will be FAT always, if it's not FAT it will fail.
defaults: This set up the driver with the default mount options for the filesystem, equivalent to rw,suid,dev,exec,auto,nouser,async. The important part here is the auto, that tells the system to mount automatically the filesystem when mount -a is issued, like it does at boot.
0: They are dump and fscheck options, you most likely won't want this.

Connect both drives, open a terminal (maximize it) and run

sudo blkid -olist

Take note of the UUID of your flash drives. Now write a script:

#!/bin/sh

first_uuid=<first-drive-uuid>
second_uuid=<second-drive-uuid>

udisks --mount /dev/disk/by-uuid/$first_uuid
udisks --mount /dev/disk/by-uuid/$second_uuid

(Substitute <first-drive-uuid> and <second-drive-uuid> with the UUID's of the drives.)

Make the script executable, and add it to Startup Applications or to some initialization script.


Just built a computer; trying to install Ubuntu from a flash drive I've just finished assembling my PC and I'm trying to install Ubuntu on it (there is no operating system on this machine). I downloaded Unetbootin on my Mac, downloaded the .iso image, and ran Unetbootin to put it on my flash drive. I plugged it in and ran into a lot of problems which I'd like help/an explanation for?

1- First time i tried to boot from my flash drive I got a Unetbootin default lop which would start up every 10 seconds. I redownloaded Ubuntu and plugged in my flash drive again. Ubuntu started to install.

2- I got a " Apt configuration problem. An attempt to configure apt to install additional packages from the CD failed"message during the middle of it. I clicked okay and then Ubuntu said it was done installing and rebooted.

3- When I rebooted I got a black screen with a blinking cursor. I realized I left the usb drive in the computer so i removed and rebooted.

4- Black screen of death again. Rebooted went to bios, changed the boot order so it booted from the hard drive since I assumed Ubuntu had installed already.

5- Didn't work, rebooted a few times. The I came to a black screen prompting me to put in grub commands which is the stage I'm at now. I tried to type boot but it said there is no loaded kernel?

Please help! I'm really close to finishing off my first build and this is really alarming.

Edit: Hardware I'm using

ASRock 970 Extreme3 motherboard

AMD Athlon II x3 450 CPU
WD5003ABYX 500GB 7200 RPM 64MB Cache SATA 3.0Gb/s 3.5" HD
PNY VCGGT4301XPB GeForce GT 430 (Fermi) 1GB 128-bit DDR3 PCI Express 2.0 x16 video card
G.SKILL Ripjaws Series 4GB (2 x 2GB) Desktop Memory Model F3-12800CL9D-4GBRL

While installing Ubuntu from a USB is much faster than from CD/DVD, you also need the OS installer to work correctly with the absence (or presence) of the optical drive (CD/DVD) during install.  The installer can sometimes still thinks it is really on a CD drive, and gets confused.

I would suggest simply burning the .ISO image to a CD, and trying this instead.

(OR, get a friend to create a genuine (Ubuntu-native) 'USB installer' on their copy of Ubuntu.)

Odd behaviour such as things failing that should never fail or things that fail once and don't fail the next time you try them are often a sign of bad memory (RAM). The mechanism at work producing such behaviour is that a RAM module stores value "A" in a memory cell but then returns "B" when asked for the value. This can produce data corruption, literally anywhere on the system, since different things use the bad cells at different times. Obviously there are other things that could cause that such as bad installation media or bad media you install to, but that happens much more rarely in my experience.

In your case APT failed when it shouldn't have. Once booting led you to a blinking cursor, next time it lead you to a GRUB error. These happenings should be enough to warrant a memory test. On top of that, memory modules that are faster than standard also known as overclocked or "OC", often have higher rate of defects. That's due to rough grained binning process used to minimize cost. This means that only a few modules per batch (1000 units for example) are tested to sustain the lowered latencies at the high frequencies they are set to operate on. Your modules are such and that should double warrant a memory test.

Memory test is performed by using the Memtest86+ utility, which is available on the default Ubuntu Live USB/CD. The option is in the boot menu and it's called "Memory test". Once you boot from the key and select "Memory test" you will be greeted with blue screen with lots of numbers and bars. The important one is "Pass". You have to let the test run until one full pass is completed. If the pass is completed without anything red appearing in the bottom half of the screen then you are good. The red lines indicate errors. If there are errors, the "Errors" counter will obviously be flipped as well.

Bad RAM is actually the easy way out of this, because the solution is as easy as swapping the modules. Most retailers or manufacturers will swap bad RAM without asking questions. They know. However if your RAM is good, then diagnosing the problem can become much harder.


gksudo doesn't act like sudo for 'string' >> file I'm trying to do a two-lines-script to temporary set a specific nameserver. Therefore I just output 'nameserver XXX.XXX.XXX.XXX' to the /etc/resolv.conf file, because it gets overwritten next time anyways. The thing is, when I try to ask for the password via gksudo, I get an error because it tries to output the gksudo result to the file.

UPDATE:

My current file is now:

#!/bin/sh
gksudo "bash -c \"echo 'nameserver XXX.XXX.XXX.XXX' >> /etc/resolv.conf\""

The command with sudo instead of gksudo and without the "" and \\ works as it should. Remains how to get it into the GUI prompt.

You were very close, try that:

#!/bin/sh
gksudo "bash -c \"echo 'nameserver XXX.XXX.XXX.XXX' >> /etc/resolv.conf\""

Have you tryed this in sted type in this:

    #!bin/sh
           Case (nameserver) in
                 /bin/sh
                 nameserver = XXX.XXX.XXX XXX >>
                 gksudo 'echo' nameserver >>
                 resolvconf XXX.XXX.XXX.XXX >>
           endl

and it might work fine this way.


Running Google App Engine on Ubuntu 14.04.2 I recently switched from Windows 8.1 to Ubuntu so please forgive me if this is a stupid question. I'm new to all this.
So I have python 2.7.6 installed and I tried to get Google App Engine
working, here: Hello, World! - Python - Google Cloud Platform. How do I find the path to the Python SDK ?

Simple Tutorial

Here are the steps I followed to get GAE 1.7.1 working on Ubuntu 12.04.

open a terminal Ctr-t and make sure you are in the home directory.
create a project folder. (I used google_projects)
cd into the project folder
download GAE 1.7.1
unzip the file
delete the zip. (optional)
Here are the terminal commands for the steps above:

    cd ~
mkdir google_projects
cd google_projects
wget -O gae.zip https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.6.zip
unzip gae.zip
rm gae.zip

Now its time to create the project and start the development server.

    cp -r google_appengine/new_project_template testapp
    python google_appengine/dev_appserver.py testapp

The first line simply copies and renames the new_project_template folder into google_proects as testapp. The last line starts the development server. You can stop it with Ctr-C.

With the development server up and running you can view testapp at localhost:8080. You should see "Hello world!".

Or you can do a diff way

sudo apt-get install python-pip
sudo pip install appengine

Then install a given VERSION of the SDK:

appengine.py [--prefix=/path/where/to/install] VERSION

Regards!


How to change tooltip background color in Unity? In a lot of applications the tooltips are just plain ugly (White text on black background, way too much contrast) or even unreadable (black or dark blue text (Hyperlinks) on black background). I want to change the background color of the tooltips to some medium gray or even some yellow or something like that, maybe even something semi-transparent.

Here is a screenshot of Eclipse which displays some source code in a tool tip with black text on black background:

Switching to a different theme (Something other than Ambiance or Radiance) helps but I like Ambiance and I want to keep it. It's just this darn tooltip color which is absolutely unacceptable.

I found several solutions for older Ubuntu versions but they no longer work with Unity in Ubuntu 11.10 because I can't find any function to customize the Ambiance or Radiance theme. So how do I do that in the current Ubuntu version?

Install and open gnome-color-chooser .

Go to Specific → Tooltips and put black foreground over pale yellow background.

A more user-friendly way to change the background is using the UI. Open System, Preferences, Appearance. By default "Ambiance" theme will be selected, but you can change it for any theme. Click on Customize button below and switch to Colors tab. There you can change foreground and background colors for tooltips by clicking on appropriate boxes.


Ubuntu 16.04 : No Ethernet cable and system not detecting WiFi paired with "Low graphics problem" . Tried everything online still nothing after much search and unable to find a solution to this problem I am starting to think I have a unique/difficult case.

After rebooting the system following the initial install I faced the "Low Graphics Problem". I searched the Internet and found this extremely helpful link:

How to fix "The system is running in low-graphics mode" error?

I tried to do it the  Recovery Mode -> FailsafeX way but was unable to get in.

After this i went to the cli. There I realized that my computer is not connected to the internet.

After reading some questions online and some helpful troubleshooting  in #ubuntu in freenode.net. I tried to get more information by entering the following commands:

lspci -nnk -d :0280   # this resulted in blank, nothing came up
ubuntu-drivers list   # showed one isntalled driver for the Nvidia graphics card. Also tried to install the same graphics card on the suggestion of a freenode contributor but that effort failed.
tried nmtuid but there are no wifi connections shown.
sudo lsusb and sudo lspci # listed devices but did not have the wireless card in there.
sudo lsmod  # this also did not have the wireless card listed.

Along with this I have tried all the ways to trouble shoot listed in many ask ubuntu question. I couldn't apply them primarily because the solutions required an internet connection.

also along the way I found this awesome article.

https://www.datamation.com/open-source/overcoming-ubuntu-wi-fi-not-working.html

I read it but I am not very technical at all. I tried to follow along but couldn't after the writer started manually loading the modules.

Also if it helps I have a Asus Z370-e motherboard. I have an Nvidia graphics card.

Any help would be most appreciated!

Thank you.

I have the same problem on several systems.
I noticed that:

WiFi shows: device not ready.
Wired connection does not work.
The keybord is set to default (en), not "it" as set.
Sometimes it boots correctly.

Re-install linux-header* linux-image* lightdm*  don't solve the problem.
Workaround:
Ctrl-Alt-F1, login, then:
sudo service lightdm restart

At least this works... I can login with graphic, wifi, keyboard etc. All work correctly... for one time!


How do I make Chromium use Flash from Google Chrome? Now, that Adobe has stopped issuing new releases for Linux desktops, the only option for users is to use Google Chrome, for those who want to use the latest Flash updates.
I use Chromium. Is there any way to get Chromium use the Flash from Google Chrome?
The reason I as this question is that I have noticed both these browsers run in the background, so technically, the browsers' plugins are available to use.

THIS ANSWER IS 4 YRS OLD AND MAY NOT WORK ON NEWER SYSTEMS

Download Google Chrome and extract libpepflashplayer.so from /opt/google/chrome/PepperFlash in the Chrome deb file
Copy libpepflashplayer.so to /usr/lib/chromium-browser/plugins
Make the necessary changes to the Chromium startup

sudo gedit /etc/chromium-browser/default

Add this to the CHROMIUM_FLAGS

CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=11.5.31.2"

You can get the correct version of the flash plugin from the "version": json tag in the mainfest.json from /opt/google/chrome/PepperFlash in the Chrome deb file

There in no need to use flash from Google Chrome. You can simply install it from command line.

sudo apt-get install flashplugin-installer

Wait until finished. Then restart your browser and enjoy.


Unable to get audio through HDMI connection to TV with Ubuntu 14.04 I'm having trouble getting audio through my TV which is connected via HDMI.  The item is available (HDMI / DisplayPort 2) via sound settings, but it doesn't play any sound.  I'm able to get the volume when logged in to Windows on the same setup.

I've tried updating my graphics card drivers through Software & Updates > Additional Drivers to NVIDIA binary driver - version 331.38 from nvidia-331-updates)

I've done a couple of the things listed here: Ubuntu refuses to output audio via HDMI (installed pavucontrol, did the sound test on the highest voted answer), but they seem to be related to not even seeing the device listed, whereas I have the device listed I just can't get any sound.

When I play through Speakers - Build-in Audio it works

Just fixed my audio issues spent days updating drivers and it ended up being the most basic setting. Permissions, add yourself to the "audio" group. So pop out to terminal and execute the following command.

sudo adduser $USER audio

Hope it works for you as well. It's odd that you are not automatically in that group as sound is an essential service.

Oh, and reboot, just to ensure the permission kicks in.

I have gone through the same headache [no sound out with HDMI] with my ACER Travelmate 8481G laptop with NVIDIA Optimus and Linux.

I tried every solution I could but because i installed a closed solution OpenELEC I was unable to try Bumblebee.

But then it occurred to me;

Bios change GPU from switchable to Discreet and
Disable on-board audio

And this worked perfectly.
NOTE: if you want to have sound come through the laptop speakers you will need to enable the audio when you are done with your HDMI.


Search and download audio-only from youtube Is there a way to search and then download from YouTube, with the situation that I only need to download the audio only, not the video.

First, install youtube-dl:

sudo apt-get install youtube-dl

Then download and convert the YouTube video

youtube-dl http://www.youtube.com/watch?v=dQw4w9WgXcQ -x

The -x converts it to audio.

Further audio options:

-x, --extract-audio              convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe)
--audio-format FORMAT            "best", "aac", "vorbis", "mp3", "m4a", "opus", or "wav"; best by default
--audio-quality QUALITY          ffmpeg/avconv audio quality specification, insert a value between 0 (better) and 9 (worse) for VBR or a specific bitrate like 128K (default 5)

Home Page:

youtube-dl

As the other answers have noted, youtube-dl is perfect for this.. to download with highest quality then you can use the command:

youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 https://youtube.com/watch?v=bT-HDjub20o

If you can't or don't want to use youtube-dl, then there are several websites that can do this for you.. I personally recommend https://youtube-dlmp3.com


How to know the proper amount of needed disk space for EFI partition In this Ubuntu help wiki about DiskSpace, it is recommended to have the size of EFI partition somewhere around 100~250 MB. However, I might have a 150 MB EFI partition while it actually needs 151 MB of space!
So how to know the exact size I need to allocate to the EFI partition?

You cannot know the exact size unless:

you plan on never updating the OS
you perform a preliminary test installation, then use that information to recreate the partitions during another OS installation

Using my own machines as a reference, the EFI partitions on the daily workhorses are 1GB in size. The partitions exist on a storage device that is at least 512GB in size. Currently none of the EFI partitions exceed 1.8% utilisation, or 180MB (the lowest is 97MB).
Having been burned by excessively small EFI partitions in the past, I allowed the Ubuntu installation wizard choose the size of its EFI partition and have had exactly 0 issues since then.
Additional Notes:
Microsoft recommends 100 MB for its operating systems, while many Linux forums suggest more for Linux based operating systems or for any dual boot or multi booting situations.
The author of gdisk suggests 550 MiB.
As per the Arch Linux wiki, to avoid potential problems with some EFIs, ESP size should be at least 512 MiB. 550 MiB is recommended to avoid MiB/MB confusion and accidentally creating FAT16.
So, most common size guideline for EFI System Partition is between 100 MB to 550 MB. One of the reason behind this is it is difficult to resize later as it is the first partition on the drive. EFI partition may contain languages, fonts, BIOS firmware, other firmware related stuffs. There are some firmware/software that are installed into the the EFI partition instead of the data drive.
As it may be difficult to enlarge the size of the EFI partition in the future, and because many storage devices measure in the hundreds of gigabytes, it makes sense to go with something that is not the absolute minimum unless the plan is to install the OS, disconnect the device from the Internet, and run it without updates until the end of time.

Although theoretically necessary, I’ve never seen the need for more than 5MB if you don’t install a lot of different operating systems.
You don’t store the Linux kernel there, only a boot loader for every OS you have, those tend to be small.
Personally, I make the partition 50MB because the Fedora installer complains if it’s smaller. Any other OS I’ve tried to install is happy with 5MB.
If you want to follow best practices, use 550MB, guaranteed anything will fit, and if you don’t miss the disk space it’s not really a loss.


Is there any way to go to the old switcher behavior? The new switcher in 11.10 looks really great, but I feel like it is a loss in productivity to me.  I have multiple instances of several applications open at once (especially browsers) many times and I like to be able to switch quickly between the all with one hand.  Now I have to either alt-tab and pause for a long time for the grouped windows to automatically expand, or I have to use my other hand to press down while holding alt to expand the windows.

Is there a way to go back to selectively go back to the old behavior where each process gets its own separate entry in the switcher where things are not grouped together?

Alt+` (the key above tab) does the same as hitting down and only requires one hand.

you can always use Super-Tab which is all of the windows in a circle


phpinfo() showing blank page on ubuntu18.04 I installed phppgadmin using this tutorial. How to Install PostgreSQL and phpPgAdmin on Ubuntu 18.04

The index.html file is showing fine that comes already installed.

But when I made a php file to display phpinfo();, it shows blank page.

This is the output of root@pan0xxx:/# tail -f /var/log/apache2/error.log

root@pan0138:/# tail -f /var/log/apache2/error.log
[Mon Oct 08 00:08:14.178971 2018] [mpm_event:notice] [pid 31651:tid 140420410256320] AH00489: Apache/2.4.29 (Ubuntu) con    figured -- resuming normal operations
[Mon Oct 08 00:08:14.178994 2018] [core:notice] [pid 31651:tid 140420410256320] AH00094: Command line: '/usr/sbin/apache    2'

EDIT

Output of /# tail -f /var/log/apache2/error.log after installing php separately.

root@panxxx:/# tail -f /var/log/apache2/error.log
[Tue Oct 09 00:06:22.406750 2018] [mpm_event:notice] [pid 31651:tid 140420410256320] AH00489: Apache/2.4.29 (Ubuntu) configu     red -- resuming normal operations
[Tue Oct 09 00:06:22.406777 2018] [core:notice] [pid 31651:tid 140420410256320] AH00094: Command line: '/usr/sbin/apache2'
[Tue Oct 09 12:05:47.122881 2018] [mpm_event:notice] [pid 31651:tid 140420410256320] AH00491: caught SIGTERM, shutting down
[Tue Oct 09 12:05:47.188994 2018] [mpm_event:notice] [pid 4685:tid 140256460741568] AH00489: Apache/2.4.29 (Ubuntu) configur     ed -- resuming normal operations
[Tue Oct 09 12:05:47.189114 2018] [core:notice] [pid 4685:tid 140256460741568] AH00094: Command line: '/usr/sbin/apache2'

What I did is something like this:

sudo a2enmod php7.2

If you get an error message showing conflicts, such as in my case I had: mpm_event error, you do this:

sudo a2dismod mpm_event

you'll get messages like "apache2 crashed!" or something. Don't worry. Do the same a2dismod for all errors. Once done, execute:

systemctl restart apache2
sudo a2enmod php7.2
systemctl restart apache2

And that should do the trick! Good luck!

Hello U might be not installed php You judt install apache2 server.
In this case apache2 supports html pages but for php you need to install php
For this you may run below command...
$sudo apt-get update
$sudo apt-get install php7.0*


Boot partition full, failing to delete old kernels. Broken packages Sorry for asking about what is probably really simple, but I've been Googling about for a week now and I've tried a lot of stuff without success.

To start off, I get a pop-up every time I boot saying my /boot partition is full, and the Synaptic Manager says linux-image-generic is broken, but it fails to reinstall either of them (linux-image-extra-3.13.0-54-generic and linux-image-generic).

My terminal tells me to try using install -f to fix things so I've tried that, and this is what it returned. Sadly, I'm still learning and I haven't been able to crack the code, I would like some help

aksel@aksels-PC:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
 linux-image-3.13.0-54-generic
Suggested packages:
 fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
The following NEW packages will be installed:
 linux-image-3.13.0-54-generic
0 upgraded, 1 newly installed, 0 to remove and 344 not upgraded.
5 not fully installed or removed.
Need to get 0 B/14,7 MB of archives.
After this operation, 32,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 431129 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13.0-54-generic_3.13.0-54.91_i386.deb ...
Done.
Unpacking linux-image-3.13.0-54-generic (3.13.0-54.91) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-54-generic_3.13.0-54.91_i386.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.13.0-54-generic' to '/boot/vmlinuz-3.13.0-54-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.13.0-54-generic_3.13.0-54.91_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

By using linux-purge

I have created a helper script for this purpose. It is called linux-purge and its project page is here in Launchpad.net. In the announcements section there are installation instructions here.

In this specific case you would run

sudo linux-purge --fix

Manual method

As an alternative, there are instructions on how to do the task manually at Communiy Wiki Help which I have contributed to (as jarnos).

Anyway, here are my manual instructions as an archive:

First remove any leftover temporary files from previous kernel updates.

sudo rm -rv ${TMPDIR:-/var/tmp}/mkinitramfs-*

(There may be some due to bug in Ubuntu 16.04 and older.)

List the successfully installed kernels excluding booted kernel by command:

dpkg-query -W -f='${Status} ${Package}\n' | awk '/^[^ ]+ ok installed linux-image-[0-9]+/{print $4}' | grep -Fv $(uname -r)

Delete the initrd.img file of an unneeded kernel (due to bug); here the chosen kernel release is 4.2.0-23-generic:

sudo update-initramfs -d -k 4.2.0-23-generic

Purge the kernel by

sudo dpkg --purge linux-image-extra-4.2.0-23-generic linux-image-4.2.0-23-generic

to free some space in /boot. If the command fails, some installed package depends on the kernel. The output of dpkg tells the name of the package. Purge it first.

You may also purge respective header package

sudo dpkg --purge linux-headers-4.2.0-23-generic

and even the common header package

sudo dpkg --purge linux-headers-4.2.0-23

if no other package depends on it; otherwise the command will fail, but it is safe to run.

Then run

sudo apt-get install -f

to fix the broken dependency. If that fails due to insufficient disk space, you have to remove another kernel the way told above.

Note that there still may be too many kernels installed in your system, but now you should be able to purge the extra ones by e.g. sudo apt-get purge followed by kernel package name(s).

Well it is not surprising the apt-get functions are failing if your /boot partition is full. You just have to free up space in your /boot, you can do it graphically or via terminal/ssh whatever you are more comfortable with. You can purge (not remove!) unneeded packages taking up space (kernels since its your /boot part), or you can expand your /boot partition making it larger then you can run the -f command again. If that all is a different language to you I will need more info to give you exact commands you need to run in order to do so.

List your installed kernels with: dpkg -l | grep linux-image-
How are system partitions layed out (what does cat /etc/fstab output)?
List your disc space with: df  command.

Here is a link that should help Removing Old Kernels


Crop tool with high resolution I am now using Shutter in Ubuntu 13.10 for crop different selections and to select windows, but the problem is that the resolution is very low after I check it saving in all formats. Please tell me software, that I can save crop selections and images in high resolution.

Snapshot tools record the desktop at its running resolution. If you need a higher resolution picture then you will need to increase your screen resolution. If you have a small screen, consider using a virtual machine (as its virtual screen can be larger than your host monitor).

Steps:

Step #1:

Click on the "cog" in the top right corner of your screen, and choose "system settings".

Step #2:

Click on "displays".

Step #3
Use the resolution options to pick a higher resolution (if available), and then click "apply".

I do a little research about the software for my problem, and I found GIMP is best for image editing and crop selctions or windows and save or edit the image in any format.


How to use my drive without administartive permission I have my 1tb drive which have my flutter projects. My drive always asks for administrative permission. Whenever I save files it asks permission and also shows error showing denial of permission. Please help me remove this file from use of administrative or completely allow this  drive for administrative permission.

Here's a solution(Do this in a terminal). It will change the permission of all the files in the drive to your user(So, be careful):

Go to the directory where you have mounted your hard disk.
Change the drive's permissions to belong to you. type this sudo chown -R <your-username> . and then enter your root(admin) password.

And you won't need root(administrative) permissions to change any part of the drive anymore.


How to remove permanently those error prompts while using openbox gnome? How to remove permanently those error prompts while using openbox gnome? Such as: update ubuntu latest release, this kind of errors etc, how to permanently disable them so that it does not show in front of my presentation.

Follow up:

a) How do i kill that screen shot error box?

$ cat /etc/default/whoopsie

[General]
report_crashes=false

$ apport-cli

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (69.7 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): I

b) How do i kill that update notification dialog box?

$/etc/xdg/autostart# vim update-notifier.desktop
#NoDisplay=true
NoDisplay=false
:wq

$ cat update-notifier.desktop | grep NoDisplay
NoDisplay=false

No more disturbing popup's now.

Final follow up:

root@sun-Inspiron-One-2320:~# apt-get -f remove apport update-manager update-manager-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 apport-gtk : Depends: apport (>= 0.41) but it is not going to be installed
 opera:i386 : Depends: libc6:i386 (>= 2.3.2) but it is not going to be installed
              Depends: libc6:i386 (>= 2.3.6-6~) but it is not going to be installed
              Depends: libfontconfig1:i386 but it is not going to be installed
              Depends: libfreetype6:i386 (>= 2.2.1) but it is not going to be installed
              Depends: libgcc1:i386 (>= 1:4.1.1) but it is not going to be installed
              Depends: libglib2.0-0:i386 (>= 2.16.0) but it is not going to be installed
              Depends: libgstreamer-plugins-base0.10-0:i386 (>= 0.10.16) but it is not going to be installed
              Depends: libgstreamer0.10-0:i386 (>= 0.10.15) but it is not going to be installed
              Depends: libice6:i386 but it is not going to be installed
              Depends: libsm6:i386 but it is not going to be installed
              Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed
              Depends: libx11-6:i386 but it is not going to be installed
              Depends: libxext6:i386 but it is not going to be installed
              Depends: libxml2:i386 (>= 2.6.27) but it is not going to be installed
              Depends: libxrender1:i386 but it is not going to be installed
              Depends: libxt6:i386 but it is not going to be installed
              Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
              Depends: gstreamer0.10-plugins-good:i386 but it is not going to be installed
              Depends: fonts-liberation:i386 but it is not installable or
                       ttf-liberation:i386 but it is not installable or
                       ttf-mscorefonts-installer:i386 but it is not installable
              Recommends: flashplugin-nonfree:i386
              Recommends: cups-client:i386 but it is not going to be installed
 update-notifier : Depends: update-manager-gnome but it is not installable or
                            update-manager but it is not going to be installed
 xdiagnose : Depends: apport but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

The error above is probably related to whoopsie, the crash report daemon. You could disable it by editing /etc/default/whoopsie, and changing report_crashes=true to false. As for for updates, the best solution, IMHO, would be to install them, however, if that's not possible, disable the update checker and the update notifier.

What other errors do you get?

For the first dialog, try uninstalling apport. For the second, you can remove update-managerand update-manager-core, assuming that @mikewhatever's got the correct package names (I'm not on an Ubuntu machine at present).

You can do it this way:

sudo apt-get remove apport update-manager update-manager-core

I'm fairly confident about apport, because that's the program that handles automatic bug reports. Instead of mucking about with the configuration, just get rid of it since you don't like it.


Can not install xserver-xorg-video-nouveau xorg-video-abi-15 because of the error of unmet dependencies When trying to run sudo apt-get install xserver-xorg-video-nouveau xorg-video-abi-15 I am having the following error, is there any solution for it.

The following packages have unmet dependencies:
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

the output of sudo apt-get install libcheese-gtk23 libcheese7

Reading package lists... Done
Building dependency tree
Reading state information... Done
libcheese-gtk23 is already the newest version.
libcheese-gtk23 set to manually installed.
libcheese7 is already the newest version.
libcheese7 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and apt-cache policy xserver-xorg-video-nouveau xorg-video-abi-15 libcheese-gtk23 libcheese7

xserver-xorg-video-nouveau:
  Installed: (none)
  Candidate: 1:1.0.10-1ubuntu2
  Version table:
     1:1.0.10-1ubuntu2 0
        500 http://mirror.23media.de/ubuntu/ trusty/main amd64 Packages
xorg-video-abi-15:
  Installed: (none)
  Candidate: (none)
  Version table:
libcheese-gtk23:
  Installed: 3.10.2-0ubuntu2
  Candidate: 3.10.2-0ubuntu2
  Version table:
 *** 3.10.2-0ubuntu2 0
        500 http://mirror.23media.de/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
libcheese7:
  Installed: 3.10.2-0ubuntu2
  Candidate: 3.10.2-0ubuntu2
  Version table:
 *** 3.10.2-0ubuntu2 0
        500 http://mirror.23media.de/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Warning ! DO NOT DELETE AND REINSALL libcheese-gtk23 or libcheese7,
If you do: it will work, but after reboot: X11 failed and you are good for reinstall ubuntu !

Try to install that (if it fail, don't force the installation)

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get -f install -y
sudo apt-get install libgl1-mesa-dev-lts-utopic libglu1-mesa-dev

EDIT: may be this one

sudo add-apt-repository ppa:xorg-edgers/ppa && sudo apt-get update
sudo ppa-purge  ppa:xorg-edgers/ppa && sudo apt-get update

Source: System settings stopped showing up


Is there an IDE for Ubuntu that combines Python, Gtk and Glade in one unique program? I like PyCharm, but it doesn't have a GUI designer. I like the quickly package but I don't want to use Gedit as my editor. I tryed Ubuntu SDK but it's kind of hard to use python on it, and it's not Gtk. What I need is something like a MonoDenvelop for Python, with a pycharm look.

Does this exist? Is there anything similar to this?

You're probably looking for Anjuta. It's an IDE with Glade built in.

Yes, there is. :) Rather different from PyCharm, but Stani's Python Editor is a great IDE for Python and ships with wxGlade (among other useful tools such as Kiki).

It can be installed from Ubuntu repositories with:

sudo apt-get install spe


Can I use the 2.6 kernel provided with my embedded system to run 12.04? In summary I am quite new to Linux, but have the task of writing some software. The software has to run on a particular hardware board and the manufacturers of this board have provided a custom build of the kernel that I am guessing is non standard. I have managed to install Ubuntu 8.04 onto a compact flash card on this board, and applied their kernel modifications. Now when I go to install g++ using

    sudo  apt-get install build-essential

I get an error

    E: Couldn't find package build-essential

I have seen this error in other questions, and I am not asking here why I get this problem but I do want to know if it would be safe for me to update my version of Ubuntu to a more recent version and then apply the vendor kernel modifications. The vendor kernel is labelled by them as 2.6.30 so would it be safe to apply this on a version that has a 3.2 kernel version? If I cannot install g++ it will not be safe for me to develop an application but I simply do not know enough about the inner workings of linux to know the effects of using a newer version and applying the vendor kernel modifications.

The minimal kernel required for Ubuntu 12.04 is 2.6.24
Ubuntu 12.04 should install and run successfully on any kernel that is newer than 2.6.24. The root cause of this requirement is the libc libraries shipped with 12.04 -- libc is the basis on which every single Ubuntu binary/library depends. This requirement can be bypassed too.
For 10.04 (or newer), your manufacturer requires you to use a special 2.6.34 kernel
You must use the special 2.6.34 kernel DMP supplies here, which is required to install Ubuntu 10.04 (or newer, if possible).
This fact is made perfectly clear on their support page:

Can you use the 2.6.34 kernel with Ubuntu 12.04?
I see no reason why you can't. DMP's FTP directory provides the kernel source as well as all patches. Of course, no one without a Vortex86DX/SX can confirm if it will work out of the box, or what you will need to make sure it works.
I very much doubt the manufacturer is going to hand you official 12.04 support on a platter since they seem to be having problems even with 10.10 and are stuck on 10.04. Unfortunately, that's how proprietary embedded hardware often is.

I do not know of official sources, but from 3.2 to 2.6 kernel versions there is a huge leap. If you install an Ubuntu 12.04 on that board and then apply a 2.6 kernel on top of that you will surely run into incompatibility issues (hardware and software wise, libraries, etc). Essentially you might end up with a barely usable system. Newer versions of ubuntu rely heavily on the latest kernel developments.

Looks to me that you have a problem with your DNS server configuration in your 8.04 version. If you fix that you should be able to install build-essential without any issues.

Run

  sudo apt-get update

and check what the output tells you.

If you do have internet connection, then you can go here: and download the .deb package of build-essential for ubuntu 8.04.