Install Ubuntu on MacBook Pro 2006 running OS X 10.4.11

I have successfully created a bootable USB for a Mac Mini 2,1 (2007) just last week. I've been searching and trying for a while. What I've discovered is that most Linux distributions don't have an EFI implementation on their ISOs that satisfies those old Macs. I'll write a tutorial sometime in the next few weeks (I still want to find another working ISO, other than the one I've used), but it is actually quite simple.
In my findings you just need an extra folder to be included on the flash drive, which is 'efi/boot/', and inside that folder you'll need a few files. As I'm not an expert, what I did was copy/paste from another working flash drive that I created with a distro that worked just fine to be bootable form that Mac Mini. So here you go:

Download a version of [GeexBox][1], which is a simple Linux distro that only runs a media center. You'll only need the flash drive created with this. Or better yet, if you have any computer with a Linux OS, you may be able to just mount the ISO (just as a Mac would mount a DMG), and copy the files from there.

So either create a flash drive with the previous ISO, or mount the ISO. Open the flash drive (or the mounted ISO) and copy the whole 'efi' folder anywhere on your computer. It will be 'efi/boot' and inside boot you'll find 3 files.

Go ahead and create the USB flash drive with any distro you prefer.

Now comes the only tricky part. Most Linux distros, such as Ubuntu use Grub as a bootloader, and it uses a menu to display the OS boot options for you. Usually, the configuration for grub is in a file with '.cfg' extension. The one I was using last week was Ubuntu 14.04, so I opened the flash drive created with this iso and found a 'boot/grub' folder and a 'loopback.cfg' inside. Since I also have a copy of the Ubuntu 18.04 here, I just looked and it has the same folder, but with both 'grub.cfg' and 'loopback.cfg' there. I guess either will work (and someone with more expertise might correct me later saying which one is better). Open this file in a text editor and what you'll really need are the lines that begin with menuentry "Try Ubuntu without installing".
Go ahead and copy from that line until the end. In the Ubuntu 18.04 ISO, the loopback.cfg file seems to be all you need, since it only has those lines (with a few differences from the other file).

Go back to the folder that you've copied from GeexBox ISO/pen, and inside 'efi/boot' you'll see 'grub.cfg'. At this point, this configuration text file makes grub point to Geexbox, because you took it from there. Open it on a text editor, and replace the lines that start with menuentry "Try... with the ones you just copied from the '.cfg' file of your distro.

Now be careful. The iso that I used, Ubuntu 14.04, didn't have that 'efi/boot' folder, so I just copied the whole thing to the root of the flash drive. But as I just saw, Ubuntu 18.04 already has those folders, so if your distro's ISO already has 'efi/boot' on its root, just copy the files inside there. If it doesn't have 'efi/boot', copy the whole folders+files to the root. I just did drag'n'drop. It's as simple as that.
There should be 3 files inside 'efi/boot' on your flash drive now:

8x13.pf2
bootia32.efi
grub.cfg

I guess that those old Macs used an implementation of EFI that was 32-bit (hence this 'bootia32.efi' there). Modern EFI uses 64-bit (you'll find a bootx64.efi inside the same folder on Ubuntu 18.04 for example).

That should work. Try it out and let us know. Good luck!


I will assume you are talking about after 11.10 (Oneiric) has been released - as per this question, it's pretty buggy.

This is highly subjective, but I always do a fresh install, for a number of reasons:

Ubuntu gets somewhat bogged down after 6 months.
A fresh install (as opposed to a upgrade) keeps possible dependency conflicts to a minimum.
I like playing with new shiny features without having old configs/packages around to screw up.

How do I do it?

Download release via torrent, seed for a few days (I'm running Ubuntu+1 by then anyway)
Once I notice that demand has dropped off, I create a new folder on
my /home partition and call it something like Stuff I need to
keep.
I create my bootable USB key.
I install.
After that, I boot into my new install, and start transferring data
from that directory I made earlier.
Done!


I had to reboot my system in order for the new headers to be accepted and the project to compile flawlessy.


Formatted drive with Wubi installation, Windows boot manager menu still shows option

If you're going with an Ubuntu-only computer, ie ridding yourself of that virus called Windows, ;) then I would boot from a LiveCD/USB and then reformat the HDD and then install Ubuntu.

If you're going to dual boot with Windows, then you should still do similar to above, but instead only reformat the ext4 partition, as Ubuntu uses ext4 by default.


Does upgrading a kernel automatically enable trim?

No, it does not, the only way right now (At least up to 12.10) is to actually add the discard option to your /etc/fstab file like mentioned here: How to enable TRIM?

After rebooting it should be enabled. I tested the only SSD I have right not, an Intel 520 120GB and in 12.04 it does not activate automatically. This also includes the Beta 1 of 12.10. And with this in mind, I might just add that I am thinking that on 12.10 Final, it will be the same, so a manual approach is the only way right now.

The good thing is, after upgrading a kernel in any version of Ubuntu, the discard option stays there. So at least I don't have to turn it on every time I update a kernel.

The real question would be: Why trim is not enabled by default?

And I guess it would actually depend on several factors including:

What file system to use? (Not all file systems support TRIM)
What SSD to use? (Some are not good with TRIM. Some don't need TRIM)
Will RAID be used? (There are several RAID issues when using TRIM)
What performance impact will have? (Negative, Positive. This varies depending on SSD and file system in use)

So I guess with all of this doubts, the option for one to test it out ourselves is left with the manual approach and to see if there is an actual benefit. I can say that the benefit in an Intel 520 with and without Trim is very little, at least in my case.


Touchpad acting weird in 14.04 on MSI CR70 2M

For now the problem has been solved and the patch has been pushed to the mainstream. You can subscribe to the xorg-edgers ppa to get the latest updates and thus the immediate solution. Here are the commands if you want to add it:

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

[QUICK SOLUTION] If you can't wait for official release, I've quickly applied this patch against xorg-xserver-1.16.1 64bit version, and it has solved the problem. If you have another architecture please follow these steps, otherwise execute the steps below:

Download the archive here.
Run these commands in the terminal:

cd Downloads
tar -xvf Patched\ XServer\ 1.16.1.tar.gz
cd Patched\ XServer
sudo dpkg -i xdmx_1.16.0-1ubuntu1_amd64.deb xdmx-tools_1.16.0-1ubuntu1_amd64.deb xnest_1.16.0-1ubuntu1_amd64.deb xorg-server-source_1.16.0-1ubuntu1_all.deb xserver-common_1.16.0-1ubuntu1_all.deb xserver-xephyr_1.16.0-1ubuntu1_amd64.deb xserver-xorg-core_1.16.0-1ubuntu1_amd64.deb xserver-xorg-core-dbg_1.16.0-1ubuntu1_amd64.deb xserver-xorg-dev_1.16.0-1ubuntu1_amd64.deb xserver-xorg-xmir_1.16.0-1ubuntu1_amd64.deb xvfb_1.16.0-1ubuntu1_amd64.deb xwayland_1.16.0-1ubuntu1_amd64.deb

[IMPORTANT]: This solution will be pushed officially in the PPA in the upcoming release, so if you have read this post long after its publishing date, please just update xorg as mentioned before and it'll solve your problem.


You should probably see your processes. 1.1GB swap is to much. Too much swap usage will cause slowness. Can you post a picture of the Process page so everyone may know the problem?


Left click on the play list to give it focus.

Then click the - button on the left-bottom of the screen.


list installed packages that have available backport upgrades

aptitude search '?and(~i, ~Araring-backports)'

list all available backport packages (installed or not)

aptitude search '~Abackports ?not(~S ~i ~Abackports)'


Which is the best way to install new hplip versions?

You can use the official hp installer as I did. It will detect that I'm using Ubuntu, uninstall the older drivers, fetch all the dependencies (includind build-essentials), compile the new version, make a nice deb and install it.

Great features:

It's clean, it uninstalls old versions and install as a deb.
It's always the latest stable version, it quickly adds support to newer printers.
It worked with all the Ubuntu versions that I throw at it. Likely it's also cross-distro.

Problems:

Takes loads of time to install, it must compile the driver and fetch hundreds of megas of dependencies from the internet.
It doesn't integrate into Ubuntu Update, so no automatically security updates.
Does it really need to add an HP icon to the tray?.

It's a great piece of software, technically it's amazing, but the first two problems are a issue for me.


Your hard drive most likely dropped off the SATA bus.  If it had simply encountered an error and your filesystem had remounted read-only, you'd have gotten a different error - sudo: unable to open /var/lib/sudo/something/something: Read-only filesystem or similar.

When you rebooted, your drive decided to play nicely again.  This might be an isolated once-in-a-lifetime issue caused by a power burp or something, or it might be an early indicator of impending drive failure.  Check SMART data on the drive, and consider replacing the drive.

Uptime has nothing to do with this.  Linux systems are easily capable of years of uninterrupted uptime (though in practice this would mean a years-old version of the kernel, and therefore shouldn't really be strived for).


System is running in low graphics coupled with BSOD (Dual Boot)

Well, it looks like it is indeed a hardware issue, as you both mentioned heating up and also the fact that both systems started misbehaving again yesterday.

What were you doing exactly when it heated up? (physical conditions, like where the laptop was whenever that happened)


Ubuntu 14.04, disable password lock when waking from screensaver for ALL users

I have found one way to achieve this taken from https://help.ubuntu.com/community/UbuntuLTSP/DisableScreenLock where the steps taken basically is:

Create a script lock_disable.sh containing

#! /bin/bash
/usr/bin/gsettings set org.gnome.desktop.screensaver lock-enabled false

Make the file executable and add lock_disable.sh.desktop in  /etc/xdg/autostart/ with the following contents

[Desktop Entry]
Type=Application
Exec=/full/path/to/lock_disable.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=LockScreen Disabled
Comment=Disable the lock screen

replacing /full/path/to/ with the correct path to where lock_disable.sh is kept.

What this will do is change the setting for each user when they login to the system such that the lock-screen does not become enabled.


Problem with CanoScan Lide 20 not working in ubuntu 14.10

Please view this online tutorial and/or try a different usb cable


Method to query the package database in a case-insensitive manner?

dpkg accepts wildcard patterns. That's ok if you don't know whether the file name has an initial capital letter, but it doesn't scale.

dpkg -S '[Ff][Ii][Ll][Ee][Nn][Aa][Mm][Ee].[Tt][Xx][Tt]'

With no extra tools, you can easily reproduce what dpkg -S does internally:

grep -Fi filename.txt /var/lib/dpkg/info/*.list

You can use dlocate  to speed up dpkg -S with an index (like locate speeds up find /, but you don't gain nearly as much with dlocate). Since dlocate is built on locate, it accepts the same options including -i for a case-insensitive search. Since dlocate uses an index (normally rebuilt every night), it might be slightly out of date.

dlocate -i filename.txt

apt-file  searches a file name in all packages that are available for installations. It has a -ui option for a case-insensitive search.

apt-file -i search filename.txt


How can I find the latest stable kernel for Ubuntu?

For your release of Ubuntu,

Ensure you have the -update and -security repositories enabled.

sudo apt update (or sudo apt-get update)

Install the linux-image-generic metapackage to install the latest kernel that is packaged and tested for your release of Ubuntu. The metapackage will pull in several dependencies including the actual kernel packages themselves.
Using the metapackage will ensure you get upgrades as they become available.

Note that apt cannot remove kernels from other sources - you must clean up those yourself.


This guidance is helpful:
How to delete broken packages in ubuntu
sudo dpkg --remove --force-remove-reinstreq mariadb-server mariadb-server-10.3 mariadb-client-10.3
sudo apt-get update
sudo reboot
sudo apt-get upgrade
sudo apt install mariadb-server


How to set up a second display to be 1280x1024 if ARandR only suggests 1024x768 as a maximum?

Try to use disper to extend your desktop to an external screen.

disper -e extends to an external screen, disper -s deactivates it. Now when extending to your external monitor you can use extra options like:

--resolution= [1600x900,1280x1024]
--direction=  [left,right,top or bottom]
--displays=   [auto or list of displays]

and give the two resolutions for the two screens, the relative position and the type of view - please refer for details to man disper.
I am using different external screens and already with the plain disper -e, disper -s commands everything is set and (native) resolutions are automatically detected.


Depends on what you mean by incremental. One trick is to use hardlinks on an EXT4 drive. This means that if files don't change, they will appear in every snapshot, but will only exist (and be copied to the drive once). Here is script I've used before:
#!/bin/sh
NEW_FOLDER="$(date +%F\ %H-%M-%S)"
rsync --archive --human-readable --progress --link-dest /media/current "/etc/" "/media/incomplete/"
mv /media/incomplete /media/'$NEW_FOLDER'
rm -f /media/current
ln -s /media/'$NEW_FOLDER' /media/current

By using an incomplete folder, if the backup is stopped halfway through (very useful for large backups), it will pick up again when you next try. You can then browse each folder as a complete incremental backup. This is a similar approach to Apple Time Machine.
If you don't want to use hardlinks to save space, and don't mind file duplication, remove the --link-dest /media/current setting.


What is the purpose of "account-plugin-facebook" package?

This is a GNOME Control Center account plugin for single signon - facebook.

Which means it is used if you want to login to your facebook account via gnome. I cannot tell you if it can be uninstalled without problems as I use KDE and do not have such a package, but if you try uninstalling it and it does not try to remove a ton of other packages, you should be safe.


Use The Google Chrome 21 Flash Plugin in Firefox in Ubuntu 12.04

I think i find answer to my question:

Google Chrome 21 use Pepper project for supporting flash and mozilla team said in his wiki:

  Mozilla is not interested in or working on Pepper at this time. See the Chrome Pepper pages.

Therefore it seems there is no way to do this.


keyboard is not responding when My grub is open

It is the fast boot, disable it via bios and all will works wells, to perform a start without the fast boot unplug the power cord from power supply for a couple of seconds (5-10 should be enough)


Process terminated with status 127 while compiling in code blocks

To compile, you must, first, install a compiler. You can install g++ with the following command:

sudo apt-get install g++

To run this command, enter in terminal, and paste this.


Udev and systemd are broken any help would be appreciated

I had a similar problem:

update-initramfs: deferring update (trigger activated)
insserv: warning: script 'S85vpnagentd_init' missing LSB tags and overrides
insserv: warning: script 'vpnagentd_init' missing LSB tags and overrides
insserv: There is a loop between service ondemand and procps if started
insserv:  loop involving service procps at depth 2
insserv:  loop involving service udev at depth 1
insserv: Starting vpnagentd_init depends on ondemand and therefore on system facility `$all' which can not be true!

The problem was caused by the installation of a third party vpn client. I undid its installation and everything went back to normal.

So looking at your error message, it might be that one of 'plexmediaserver', 'plex' and 'mongodb' is causing the trouble. May be removing those packages solves the problem.


Try this (I have never tried myself and please do it on your own risk):

su

echo "deb http://ppa.launchpad.net/linrunner/tlp/ubuntu trusty main" >> /etc/apt/sources.list

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 02D65EFF; apt-key adv --keyserver
pool.sks-keyservers.net --recv-keys 02D65EFF

apt-get update

apt-get install tlp tlp-rdw

Also you may see these links:

https://stackoverflow.com/questions/22149188/unable-to-locate-package-tlp-during-tlp-installation

http://linrunner.de/en/tlp/docs/tlp-faq.html#install-config

https://launchpad.net/~linrunner/+archive/ubuntu/ppa


Audio Fix for 2015 Google Chromebook Pixel II?

****[Start Preamble]
Note that this is not my work!!

There was a website that had very good instructions on how to do this - it is now down and can no longer be found. A cache of these instructions on how to setup a Chromebook Pixel 2 with Linux can still be found on The Wayback Machine here.

( note that the scripts referred to can be found at this link ..

These instructions still work for me - I was able to set up sound on a 2015 Chromebook Pixel LS running Ubuntu Studio 19.10 on Jan. 31st 2020 without issues.

Also note that you do not need to clone the whole repository!!! it is 2GB and a lot of the custom work to make the Chromebook LS work is now integrated into the linux kernel.

You just need the stuff in the "setup/scripts" folder here - you can copy them on a script by script basis as needed. I used the keyboard and media keys ones as those are pretty cool to have working right.
[End Preamble]****

.

  Sound (Output)

  While the linux-samus kernel by itself allows you to see the onboard
  sound device, the bdw-rt5677, it doesn’t completely configure that
  device to be used for output:

  output of aplay -l showing bdw-rt5677 device

  There comes a script with the linux-samus repo to automatically fix
  this. Interestingly, this script never worked for me out-of-the-box in
  either GaOS1 (vivid) or GaOS2 beta (xenial). I had to follow the
  instructions near the bottom of linux-samus README manually. The same
  script, however, works almost flawlessly in Ubuntu 16.04 as installed
  by Linux Mint 18!

  Just run the sound.sh script:  (note by SteveHNM - this should say "
  run enable-audio.sh " ]

cd linux-samus/scripts/setup/sound

./sound.sh

  After this, you should find new bdw-rt5677 devices in your Sound
  settings:

note added by SteveHNM
after running

enable-audio.sh

, run

enable-speakers.sh

to start sound out of the speakers. enable-audio.sh just enables the card then enable-speakers.sh gets the card pumping sound to speakers. You can also setup media keys using instructions at the end of this post to adjust volume +  setup brightness keys.

Note that volume through headphones is really really low, even with over-amplification. This has something to do with needing to turn on the headphone amplifier separately for the bdw-rt5677 chip each time the headphones are inserted into the socket - more info here. Not sure how to do this yet BUT it is just a setting in alsamixer - just have not found it yet.  Will post here as soon as I do.

  Microphone

  After running the

./sound.sh

  script (Added by SteveHNM - that should be enable-audio.sh) , you
  should be able to add the microphone devices by running the following
  commands:

pulseaudio -k && pulseaudio -d

  Volume & Sound

  Simply navigate to “Sound and Media” in the nav list to the left in
  the Keyboard Shortcuts dialog of the "Settings" App. We’re just going
  to use F8-F10 as mute, volume down, and volume up, respectively.

  Brightness

  Increasing and decreasing the brightness of the screen will be mapped
  to F7 and F6, respectively. For the backlight of the keyboard, we will
  use ALT + - and ALT + =. The scripts for controlling brightness are
  located in linux-samus/scripts/setup/brightness/.

  For the scripts to work, we need to apply the correct permissions to
  some system files on every boot first. That’s what the
  enable-brightness.sh script is for. To run enable-brightness.sh on
  every boot, just run

sudo ./setup.systemd.sh

  (added by SteveHNM - this file is in the scripts folder in the
  repository under "setup/brightness here )

  You should also run

sudo ./enable-brightness.sh

  once, so that you can test your keyboard shortcuts before restarting.
  (added by SteveHNM - this file is also in the scripts folder in the
  repository under "setup/brightness" )

  The commands brightness and keyboard_led are copied into
  /usr/local/bin by the

setup.systemd.sh script

(added by SteveHNM - this file is also in the scripts folder in the repository under "setup/brightness" )

  Now, we can establish our actual keyboard shortcuts:

  Purpose                           Command Key         Combo

  Increase Screen Brightness    brightness --increase       F6

  Decrease Screen Brightness    brightness --decrease       F7 Increase

  Keyboard Brightness           keyboard_led --increase     ALT + = Increase

  Keyboard Brightness       keyboard_led --decrease     ALT + =


Don't put more than one argument in a variable, it will work for very simple cases, but otherwise give you nothing but grief. Use arrays instead. E.g.

infile=video.avi
outfile=${infile%.*}.mp4  # video.mp4
args=(
    -r 29.97
    -t 00:13:30
    -vsync 0
    -vpre libx264-medium
    -vf "[in] scale=580:380 [T1],[T1] pad=720:530:0:50"
)
#...
ffmpeg -i "$infile" "${args[@]}" "$outfile"

(The quotes are important)

In this case though, you might want a function instead. It's hard to say, since your question is a bit vague.

See BashFAQ 50


unable to upgrade 12.10 to subsequent releases

Do a fresh install of 14.04 , do not format your root partition and your data in /home will be preserved.

See - https://help.ubuntu.com/community/UbuntuReinstallation

A fresh install is going to be faster and less problematic then upgrading through 2 unsupported releases (13.04 -> 13.10) and then to 14.04.


Try out Clementine, Amarok-inspired music player.

Clementine provides very good UI and good search features. It does provide support for multiple internet radios like Grooveshark, lastfm, Spotify etc..

sudo add-apt-repository ppa:me-davidsansome/clementine
sudo apt-get update
sudo apt-get install clementine

For more download options, check out http://www.clementine-player.org/downloads


What do device's environment variable list's prefixes (P, N, S, E) mean?

The answer is in man udevadm:

--query=type
   Query the database for specified type of device data. It needs the
   --path or --name to identify the specified device. Valid queries
   are: name, symlink, path, property, all.

So:

N: is for device name in /dev
S: is for symlinks to that device name in /dev
P: is for device path in /sys
E: is for device properties in udev


How do you move an unallocated partition?

Try this (not sure if this will work or not):

Merge the unallocated space (you might have to convert this into a partition before merging) with sda6 , resize sda6 to its original size so as to give 97gb unallocated space after sda6. Merge this unallocated partition with sda7, resize sda7 to give 97gb unallocated space after sda7. Now see if you can merge this one with sda8.


Completely remove MATE desktop from Ubuntu MATE 16.04

To completely remove MATE:

Uninstall mate-desktop

To remove just mate-desktop package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal:

sudo apt-get remove mate-desktop

Uninstall mate-desktop and it's dependent packages

To remove the mate-desktop package and any other dependant package which are no longer needed from Ubuntu Xenial.

sudo apt-get remove --auto-remove mate-desktop

Purging mate-desktop

If you also want to delete configuration and/or data files of mate-desktop from Ubuntu Xenial then this will work:

sudo apt-get purge mate-desktop

To delete configuration and/or data files of mate-desktop and it's dependencies from Ubuntu Xenial then execute:

sudo apt-get purge --auto-remove mate-desktop

REF:LINK


Nvidia drivers installation make me unable to hibernate on ubuntu 18.04 LTS

Solved when I removed ususwp (tuxonice is too old). Using the linux default hibernation worked.


Try putting quotes around the location of JAVA_HOME
JAVA_HOME='/usr/lib/jvm/java-6-sun'
EXPORT JAVA_HOME
Also you should add system-wide environment variables and exports to a script file in /etc/profile.d ex. /etc/profile.d/java_home.sh instead of using /etc/profile
See:
https://help.ubuntu.com/community/EnvironmentVariables
Look under: System-wide environment variables


Exe. path is not absolute (Trying to start a service I created)

I got it working thanks to Soren A! The error was that I needed the absolute path, which is set when you install autossh (/usr/bin/autossh), then I had to put the parameters afterwards. I found an example here that I copied:
https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/


Unable to mount Windows 10 partition; it "is in an unsafe state"

You need to disable the "Fast Startup" feature. To quote the How-To-Geek:

  Open up your power options by hitting Windows+X or right-clicking your
  Start menu and selecting Power Options. In the Power Options window,
  click “Choose what the power buttons do.”

  If this is the first time you’ve messed with these settings, you’ll
  need click “Change settings that are currently unavailable” to make
  the Fast Startup option available for configuration.

  Scroll to the bottom of the window and you should see “Turn on fast
  startup (recommended)"

Uncheck the "fast startup" box.

Then, shut down Windows 10, and you should be able to mount the NTFS partition from Ubuntu just fine.

How-To-Geek quotation taken from here.


Unlike Gnome - the keybinding and mouse binding is controlled by a configuration file created when you first login - ~/.config/openbox/lubuntu-rc.xml

Open the file:

leafpad ~/.config/openbox/lubuntu-rc.xml

search for

<context name="Desktop">

Just below this are the statements highlighted:

Replace A-Up with A-S-Up and A-Down with A-S-Down

Alternatively just delete the lines below if you no longer want any ALT key mappings.

<mousebind>....</mousebind>

You should be able to move between desktops with ALT+SHIFT and Clicking.

You will also note if you search for A-Up & A-Down there are various other similar mousebind XML tag situations where Alt and click are used  - you could also think about changing these mappings to be consistent.

Save the file, logout and login to test the new key-mappings


How can I allocate more SSD space for Ubuntu?

It is a good idea to backup everything, that you cannot afford to lose before continuing, because the following operations are potentially risky.

This is a method, that will not tamper with the head end of the root partition (and the swap partition) to make a /home partition in the unallocated space. (If you tamper with the head end of the root partition, you must also modify grub, the bootloader.)

Create a partition with an ext4 file system.
Copy the content of the current /home directory into it for example with rsync (first 'dry run' to check, then remove the n and do the real copy),

sudo rsync -Havn /home/ /mount-point-of-the-new-partition

Modify your /etc/fstab to make the system use the new partition as /home.
When you see that things are working, you can remove the /home directory from the root partition, but watch out (make sure that you are deleting the correct data, and not the 'new home'.

You may prefer to do these operations, when booted from another drive, for example a USB boot drive with Ubuntu. In that case the rsynccommand line will be different: Mount the internal drive's root partition and copy from it,

sudo rsync -Havn /mount-point-of-internal-drive-root/home/ /mount-point-of-the-new-partition


Ubuntu 19.10 is an early release unstable build; it is almost impossible to not run into issues with it. It is highly recommended you opt for 19.04 instead, as it is more stable, and has the more available software and the same kernel version (5). Snapcraft has it's own Q&A forum available at https://forum.snapcraft.io/. Consider asking your question here instead of AskUbuntu, as you will likely get more appropriate help to resolve your issue faster.


How do I get an application to appear as a choice in update-alternatives?

You're looking for the this command:

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /path/to/firefox-beta 100

That adds /path/to/firefox-beta to the x-www-browser alternatives with a priority of 100 (auto-switching to it unless there's something else with a higher priority).  You can then use update-alternatives --config as usual.  To remove it, run the following:

sudo update-alternatives --remove x-www-browser /path/to/firefox-beta

This removes that particular entry from the alternatives for x-www-browser.


Would increasing my swap partition's size benefit my computer's performance?

Not really. The only thing (memorywise) that improves performance is more RAM.

Remember that the slowest part of memory is your Hard-disk - swap just provides the ability to use more memory by swapping some pages out to the disk, which is slow compared to RAM operations.

What you gain by providing more swap-space is the ability to run more/bigger programs, respectively programs with bigger memory requirements - at the cost of slowing the whole operation down.

As to the question of balancing: regard swap as last measure, used when everything else fails and the kernel would have to resort to killing a process because there no more memory available (OOM=Out of Memory). So keeping some swap is good.

An additional factor comes into play when you are using suspend to RAM (aka hibernating) - in that case you should provide the same amount that you have as RAM and maybe a little bit extra.


If I Boot From A USB Drive Will I still Be Able To Use My USB Drive For Other Things?

Yes, you will be able to use the drive for other things although some of its capacity will be used by Ubuntu files.


I can't get wordpress on working on a apache! Please help!

Alright Let's being First check your default configuration for apache to make sure that your apache server is looking for your website in /var/www

cd /etc/apache2/sites-enabled/
nano 000-default

inside this file checkc that the default virtual host's DocumentRoot points to /var/www. then create a virtual host declaration like the following.

<VirtualHost *:80>
DocumentRoot /var/www/wordpress1
ServerAlias www.yourdomainname.co.au
</VirtualHost>

Save the file and reload Apache with

sudo service apache2 restart

once this is done:

cd /var/www
mkdir wordpress1
cd wordpress
wget https://wordpress.org/latest.tar.gz
tar -xf latest.tar.gz
mv wordpress/* /var/www/wordpress1
mv .htaccess /var/www/wordpress1
cp wordpress1/ wordpress/
chmod -R 775 /var/www/wordpress && chown root:www-data /www/data/wordpress

Now we're going to back into apaches config files to make the virtual host declaration match our folder structure:

cd /etc/apache2/sites-enabled/
nano 000-default

now change your wordpress delcaration to look like the following:

<VirtualHost *:80>
DocumentRoot /var/www/wordpress
ServerAlias www.yourdomainname.co.au
</VirtualHost>

Save the file and reload Apache

 sudo service apache2 restart

No go into SQL and create a database for your wordpress installation

 mysql -u root -p
 CREATE DATABASE wordpress;

"Query okay blah rows affected"

 EXIT;

"Bye."

Now also long as your virtual machine is configured properly to talk with your host machine you should be able to access it by typing in your loopback address 127.0.0.1/wordpress. Usually your do this by choosing a bridged adapter setting for the virutal machine.

you should also make sure that php5 and php5-mysql are installed as well. you can install these with:

 sudo apt-get install php5 php5-mysql

hope this helps.


How can I stop terminal and firefox from launching on startup?

There are two possible reasons why the application is started: It is saved in the last session or it is listed in the auto started applications. Follow 1 of the two steps below to get rid of the applications.

Start the xfce4-autostart-editor and remove the application(s). You can also manually delete those files in ~/Desktop/Autostart and ~/.config/autostart.
Most of the time closing all the applications and save your session when you logout is sufficient. If this doesn't work, remove the content of the ~/.cache/sessions/ directory when you're not logged in. And if you don't want xfce remember every session you should turn off (uncheck) “Automatically save session on logout” in Settings Manager → Sessions and Startup (tab General)

Reference: 1.


This should work with Transmission. I don't think it will work with aria.

Start the torrent downloading it(you don't need to have a seeder around) and then stop it. Quit the torrent program. Go to the file in progress of downloading, and replace it with your completed file. Open the torrent client and right-click the torrent, and use the option to do a full recheck. Once that finishes, it will change to 100%. Start the torrent and it will seed.


If you don't care about using Samsung SSD space put everything in there as it's the best choice, although putting /boot partition on Sandisk SSD can save you some space in the Samsung SSD and it won't affect too much your system, the only thing that would change is a boot time increased for about 5 or 10 seconds.


From http://www.freedesktop.org/wiki/Software/xdg-user-dirs:

Settings
Sysadmins can configure things by editing /etc/xdg/user-dirs.conf. At the moment there are only two settings, you can disable the whole thing, and you can specify the charset encoding used for filenames. They can also set or change the default directories and their initial values in /etc/xdg/user-dirs.defaults.
$(XDG_CONFIG_HOME)/user-dirs.dirs specifies the current set of directories for the user. This file is in a shell format, so its easy to access from a shell script. This file can also be modified by users (manually or via applications) to change the directories used. Note: To disable a directory, point it to the homedir. If you delete it it will be recreated on the next login.


Help creating Custom Grub2 Entry for Parted Magic 2015 (Have working 2013)

Parted Magic Custom Grub Entry

sudo mkdir /home/isos/

Copy iso to dir and rename pmagic.iso && for 2015 copy pmagic dir from ISO to root / (also need ISO, on top of pmagic dir)

sudo chmod 777 /home/isos/ -R
sudo chmod 777 /pmagic -R
sudo nano /etc/grub.d/40_custom && sudo update-grub2

Custom Grub Entry

2013 Version w/ just ISO

menuentry "Parted Magic" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile boot=live
initrd (loop)/pmagic/initrd.img
}

2015 Version 32-bit

menuentry "Parted Magic" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile load_ramdisk=1
initrd (loop)/pmagic/initrd.img /pmagic/fu.img /pmagic/m32.img
}

2015 Version 64-bit

menuentry "Parted Magic" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage64 iso_filename=$isofile load_ramdisk=1
initrd (loop)/pmagic/initrd.img /pmagic/fu.img /pmagic/m64.img
}

An alias to use to reboot to ISO:

alias pmagic="sudo grub-reboot 'Parted Magic' && reboot"

Now your computer will auto reboot to Pmagic and when done, reboot and it will auto boot back into OS!(AKA Default Grub Entry)


Add "virtual" screen in my PC like a second screen connected

You can use VNC to connect to your PC with another session as mentioned in this link

virtual-vnc-screen-workspace


Ubuntu 12.4 HDD files can't be seen by XP on an external USB drive

By default, Windows can't read ext2/3/4 file systems - unless you specifically went out of your way to format your drive in a different file system when you installed Ubuntu, your files are probably in one of those file systems.

You'll need to install software on Windows that can read those file systems.

This article suggests three tools that you can try, but I don't have any personal experience with them myself: http://www.howtogeek.com/112888/3-ways-to-access-your-linux-partitions-from-windows/

If you try to read them from another Linux machine, you should not have this problem.

Good luck!


I've just been searching for a similar problem and used this solution from SuperUser

Basically, just extract the audio from the file as wav, run normalize-audio on it and then re-encode it as aac and remux.

I just wrote this quick script to do it:

VIDEO_FILE=$1
VIDEO_FILE_FIXED=${VIDEO_FILE%.*}-fixed.${VIDEO_FILE##*.}
avconv -i $VIDEO_FILE -c:a pcm_s16le -vn audio.wav
normalize-audio audio.wav
avconv -i $VIDEO_FILE -i audio.wav -map 0:0 -map 1:0 -c:v copy -c:a libvo_aacenc \
   $VIDEO_FILE_FIXED

Put it in a file like normalize.sh, then run bash normalize.sh file_to_convert.mp4.  You'll get a file out file_to_convert-fixed.mp4.

You might want to tweak the normalize-audio command to just raise the volume by some dB with the -g siwtch, or use another command entirely.  I saw aacgain and wavegain mentioned elsewhere.  normalize-audio is in the package normalize-audio, funnily enough.

Hope this helps you.


You need rsync my friend; check out the man page and do some research for some more information. Rsync will copy files between directories in a very smart way; only the changes are copied.

So a one-liner like rsync -a /path/to/importantfolder/ /path/to/backupdrive/importantbackup/

Look through the nan pages for the syntax to get exactly what you want.

Then you can wrap this in a bash script and run it as a cron job or run it manually when you hook up your harddrive.

This is the roll your own solution. If your not a fan I'm sure someone has already come up with a canned solution for this.


How to leave only the icon in the Me Menu?

Try this command:

gconftool -s /system/indicator/me/display --type int 0

If you are using any version before 11.04, you might have to use killall gnome-panel for the change to appear.


I cannot login to my ubuntu admin!!!! HELP!

You can get the userlist back by doing this:

sudo /usr/lib/lightdm/lightdm-set-defaults --hide-users false

Unfortunately I'm not sure what you're really trying to solve though.  When you click on "Other" you should be able to enter your username and password like normal.  You won't be able to use sudo or edit lightdm.conf as a guest user.  Did you forget your username?


Can I write an app for Android/Ubuntu Phone and openly recommend Ubuntu as a software platform legally?

In this link, we read that:

You can use the Trademarks, in accordance with Canonical’s brand guidelines, with Canonical’s permission in writing. If you require a Trademark licence, please contact us (as set out below).
You will require Canonical’s permission to use: (i) any mark ending with the letters UBUNTU or BUNTU which is sufficiently similar to the Trademarks or any other confusingly similar mark, and (ii) any Trademark in a domain name or URL or for merchandising purposes.
You cannot use the Trademarks in software titles. If you are producing software for use with or on Ubuntu you may reference Ubuntu, but must avoid: (i) any implication of endorsement, or (ii) any attempt to unfairly or confusingly capitalise on the goodwill of Canonical or Ubuntu.
You can use the Trademarks in discussion, commentary, criticism or parody, provided that you do not imply endorsement by Canonical.
You can write articles, create websites, blogs or talk about Ubuntu, provided that it is clear that you are in no way speaking for or on behalf of Canonical and that you do not imply endorsement by Canonical.

From which we can conclude that any suggestion that you act on behalf of, or any suggestion of
interrelationship or endorsement is not allowed.

In my opinion, the combination of presenting (your own) software, and making recommendation(s) to use Ubuntu is unavoidably suggesting some kind of relationship or endorsement, even if you would specifically say there isn't.

The bottom line is that I wouldn't mix the two. If you however still would like to do so, I would apply to this rule:

You can use the Trademarks, in accordance with Canonical’s brand guidelines, with Canonical’s permission in writing. If you require a Trademark licence, please contact us (as set out below).


Launcher changes the order of windows of the same application randomly in preview mode

If you are working with many MATLAB (or Octave, Scilab) figures - I can recommend to switch to MATE DE. It will not group their icons on taskbar and will show them in order of appearance. In other words - Unity or GNOME Shell are not so good as MATE (and maybe Xfce).

Below is example of how MATE orders Scilab figure windows which are produced with the following code:

xdel(winsid());for i=1:10, f=scf(i); f.figure_name=sprintf('f %d', i); plot3d(); end;

- it is completely logical and predictable.


How to build ubuntu touch for unofficial cyanogenmod device

Your well on the way...

As mentioned here:

How do I go about porting Ubuntu Touch to different devices?

Use this Guide:

https://wiki.ubuntu.com/Touch/Porting#Building_the_Android_pieces

You will need for development any 64-bit Desktop version of Ubuntu between 12.04 LTS and 13.10, the more ram the better.


How can I run Disk Utility in terminal via a comand line?

The application behind "Disk Uitility" changed in newer release versions. Hence the terminal command to call them is as follows:

For >= 12.10

gnome-disks

For earlier versions including 12.04:

palimpsest

Renaming partitions can also be done with a command line tool (no need to install and run gparted):

How to rename partitions?

Please note that the device and partition names /sda, resp. /sda1 ... /sdaX and /sdb /sdc .. do not depend on the disk label but are internal device numbers, depending on partition layout, SATA-port attachment, BIOS. To avoid confusion we have a unique UUID for each drive to mount it appropriately. This can be replaced by a label if needed.

Constant UUID on USB install


'Some index files failed to download' while updating

As vasa1 pointed out, the server your system is configured to use to download packages for installation is currently down.
What to do when your download mirror is down...
The solution to this problem is to use change it to a different mirror (i.e., a different server).
Option 1: Using Graphical Configuration Utilities
Open Software Sources
Press Alt+F2, type gksu software-properties-gtk, and enter your password. (Alternatively, select Settings... at the lower left corner of the Update Manager, or go to Settings > Repositories in Synaptic).

That's for Ubuntu 10.04 LTS, which you are running. In later releases, you can just run software-properties-gtk and when you make changes, PolicyKit will authenticate you.
Most people using newer releases have the Software Center and not Synaptic. In the Software Center, you would go to Edit > Software Sources....
The Update Manager is unchanged, but in new releases is called the Software Updater.

Change the Download Server
In the Ubuntu Software tab of the Software Sources window, there is a drop-down menu labeled Download from. Select your regional server. For example, I'm in the United States and it looks like this on my 11.10 machine:

Software Sources window showing Sever for United States being selected in the "Download from" drop-down menu.
You may see other servers listed in that short list (like the server you currently have set up).
You can use the Main server too but it is almost always considerably slower than using your regional server. (At least in the United States, anyway.)
If you want to use another mirror, you can look through a list of mirrors by clicking Other....

Option 2: Manually Editing a Configuration File
Back Up and Open sources.list
Back up your sources.list file and open it in a text editor:
cd /etc/apt
sudo cp sources.list sources.list.old
gksu gedit sources.list

If you've already ran the second line, don't do it again, unless you want to overwrite the old backup with a copy of the new configuration.
For a text-based editor (not requiring any GUI), replace the third line with sudo nano -w sources.list (or sudo vi sources.list, or sudo -e sources.list).

In the text editor, replace every instance of your old server name with the new server name. For example, you could replace every instance of ubuntuarchive.hnsdc.com with us.archive.ubuntu.com. (Your text editor, whichever you use, will facilitate this--you don't have to manually find each instance and type in the name of the new mirror.)
Save the file, quit the text editor, run sudo apt-get update, and it should work with the new server.
Option 3: Command Line Substitution
sed allows you to write simple (or complicated) scripts that act on a file, one line at a time. So you can issue a single command that goes through sources.list, replacing all the instances of the old server name with the new server name.
First, go into /etc/apt and (unless you did so recently) back up the file:
cd /etc/apt
sudo cp sources.list sources.list.old

Then run sed:
sudo cp sources.list sources.list.tmp
sed 's/ubuntuarchive.hnsdc.com/us.archive.ubuntu.com/' sources.list.tmp | sudo tee sources.list
sudo rm sources.list.tmp

For an old server besides ubuntuarchive.hnsdc.com, change that as appropriate.
For a new server besides us.archive.ubuntu.com, change that as appropriate.
I decided to copy sources.list into a temporary file and use that as sed's input. This is one way to ensure that sed is not overwriting the file while it's still reading it.
The sed "script" here is very simple. This explains how substitution works.

But what download servers are there?
There are over 400 registered Ubuntu mirrors for installing and updating software.
These are called archive mirrors. This should not be confused with CD mirrors, where ISO images and related files for installing Ubuntu are stored.
Many servers provide both, and are thus both archive mirrors and CD mirrors. But many are just one of the two.


Trying to Download Xubuntu, but don't have dvd

See our help for a list of options on installing without a CD. Some will not be possible for your specific machine and others might be difficult.

  Installation without a CD

  The new generations of laptops and netbooks are increasingly shipping
  without CD drives. To cater to this need, or if you do not wish to
  burn a CD to install Ubuntu, you are not left to trudge in the dark -
  Ubuntu can be installed without using a CD or CD-ROM drive!

  Quick Install from USB - A quick guide to installing from a USB
  memory stick. Intended for less technically-inclined readers.

  Install from USB - Installing from a USB memory stick (full
  version).

  USB stick + grub - Similar to above but using grub.

  Smart Boot Manager - Installing from a PC which will not boot
  from a CD.

  Install within Windows - Yes, it is possible to install Ubuntu
  from within Windows without using floppies, a CD, or any other
  removable media! This uses Wubi, and installs Ubuntu as a large file
  that may be uninstalled like any other program in Windows.

  Install with Floppies - Installing without a CD drive over a
  network.

  Install From Hard Drive with Floppies - Installing without a CD
  drive or network capabilities from a hard drive.

  Install from Existing Linux - Installing using a spare partition
  from an existing Linux system to house the Ubuntu CD image.

  Virtual Machine - Installing using a physical disk to a Virtual
  Machine.

  Portable installed system booting from UEFI & BIOS - A system
  for a USB pendrive - a good alternative to a persistent live system.

  Is it possible to split the installation between multiple disks, as is done for large video games and the like?

As you can see from the above links the answer is no. If it is just a lack in DVD-Rs I would get some and use those. Some of these options are difficult and require a more than average amount of expertise. Fun when tinkering; annoying when you have to get something running.

If you want to try lUbuntu out now use a virtual system inside XP. You can have that up and running quickly with no hassle at all and wait for your DVDs to arrive.


I'm using Ubuntu 15.10. I installed Chrome from the Google download page and Netflix works just fine. I installed the Chromecast plugin in the browser and I can even use it with my Chromecast. Very happy with it!


So it seems that the way to install it 'properly' is to create the bootable USB as a GPT partition scheme (I originally had it set to MBR for UEFI and BIOS); install without internet, updates, or Third-Party Software, and manually create the partitions according to this guide: http://linuxbsdos.com/2015/10/30/gpt-and-mbr-manual-disk-partitioning-guide-for-ubuntu-15-10/... Now that it's finally installed, I just need to deal with this issue: No Bootable Device after Installing Ubuntu 16.04 - No Drives in UEFI BIOS settings


What does HWaddr value of 00-00-00 .... would mean?

When you see HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 in the output of ifconfig tun0 it simply means that this is a virtual interface. Since this isn't an actual piece of hardware it doesn't have a hardware address.

Even for a virtual interface it is possible to make up a hardware address. However that is usually only needed for virtual Ethernet interfaces. For a tun device it is generally not needed, which is why it is left as all zeros.


looks like a damaged filesystem.  If you have a running linux, mount the persistent partition and fsck it.  If not, on a UEFI machine, you actually will run grub, and can edit the boot lines -- remove the word "persistent" on the linux line, boot, and you should have a clean live media boot, mount the partition which you used for persistence and fsck it.  If not a UEFI machine, if you can edit the /syslinux/text.cfg (Not sure of the name) file and find the linux boot line with the word "persistent" on it, remove the word persistent. Next boot should be a clean install media, mount other partition and fsck it.
  If the filesystem is clean, then I don't know what to suggest since you see the problem on multiple machines.  But you can backup the persistent partition, and restore it onto another live media's persistent partition.


You could tried this, and type this in the terminal:

 sudo apt-get install kde-full
 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get dist-upgrade

and it might work fine this way.


How can I start Nautilus on Xubuntu / XFCE via the shortcuts in the XFCE panels?

Yes, it is possible to simply open the current default file manager (in a sense of a macro) on Xfce from a shortcut.

First of, you need to install another file manager:

sudo apt-get install nautilus

Then open the (system) Settings and click on Preferred Applications. Under the tab Tools, choose 'Nautilus' for the file manager.

For the shortcut in a bar on your desktop, use xdg-open . (mind the dot at the end) as the command. You don't have to write nautilus. Example:

(Just fyi, I googled quite a bit for this, hence I made this quick Q&A.)

EDIT

I use Synapse on Xubuntu since it is, as of this writing on 2014-04-27, again available on the core PPA of the developer. Looking back, I found using Nautilus quite annoying since it intervened with Synapse's handling of MIME types. Ultimately, I went back to Thunar.


Try following this (yes, its got some age to it; but the game hasn't changed much since then) tutorial:

  Installing Java On Ubuntu for RuneScape By Renegades009

  Step 1: After a freshly installed Ubuntu system open up Synaptic
  Package Manager.

  Enter the password you created at install. Now once its open go to
  Settings Then click Repositories and make sure all boxes are checked
  in first tab.

  Now go back to the main window and search java. Scroll down to S and
  mark installation for sun-java6-jre and sun-java6-plugin or something
  like that.

  Don't forget to mark jre but I have that installed already. Once done
  click apply and click ok to get dependencies. When done with install
  restart browser and walla! RuneScape time!

  Also if RuneScape still doesn't seem to work for you reopen synaptic
  and install openjdk.

  Please don't rip my guide or pictures without giving credit and link
  back. Thanks enjoy!

Runescape is of the same caliber as Minecraft; which both use Java JRE as a game engine. Ubuntu comes with a default install of Java, but you often need to fine-tune the settings in Wine or download 3rd party repositories, to get them to work.


How to edit/add converter options in DeaDBeeF?

In fact the options are editable: you cannot remove the built-in options, but you can add modified versions of them by saving the changes under a new name. (You cannot make changes and save under a pre-existing name.)

So, the easiest way to add convert options is to use the 'Copy' button and then modify the commands and titles.

For FLAC:

Select [Built-in] FLAC (compression leve 5) --> Copy --> Title: flac compression level 8, command line: flac -o %o -8 -ignore-chunk-sizes -
--> Ok

See flac -h in Terminal for variables. 0 is the largest file (best quality) and the fastest process, 8 is the smallest file (best compression) and slowest process.

Similarly for the other formats.


Using watch command (or other method) to stop service when a file changes

How about connecting both commands by &&? This will make sure that the first command is successfully exited with code 0 which equals true in bash before the second part is executed. If that is true, the second part is executed and cups service will be stopped.

watch -d -g -t ls -l /home/username/*failed.log && service cups stop


Create a bootable Ubuntu USB from Ubuntu

mkusb will make any sort of bootable image you want, Live USB, Persistent USB, and can be used to make a Full install USB that works on BIOS and UEFI.

mkusb will make a drive with boot partition(s), a read only ISO9660 OS partition, a ext2 casper-rw persistence partition and a NTFS Linux/Windows data partition.

mkusb - tool to create boot drives | Ubuntu Community Help Wiki

You can also do a Full install to USB similar to a HDD install. Best to disconnect your HDD before proceeding.


Change mouse pointer position at boot or reset center position

Found at: https://linuxconfig.org

As a privileged administrator user use your text editor to perform the following changes of the GDM3 custom configuration file /etc/gdm3/custom.conf.

FROM:

# WaylandEnable=false

TO:

WaylandEnable=false

By uncommenting the above line your system will use the Xorg display manager instead of Wayland next time it boots.

Reboot your system to apply the changes. This worked for me.


External Full HD monitor and Virtual Desktop Size

if you want both screens next to each other your virtual size must be at least

Virtual 3840 1080

EDIT:

It seems like you need to extend the height too, so using

Section "Screen"
        Identifier      "Default Screen"
        DefaultDepth    24
        SubSection "Display"
              Virtual 3840 3840
        EndSubSection
EndSection

as xorg.conf works for me


Look at this answer :

https://stackoverflow.com/a/2171346/2557231

  As alex said, Phonon looks like your best bet because you can use it
  with Pyqt. You can find lots of examples of using phonon using google.
  This one, http://forum.kde.org/viewtopic.php?f=14&t=84275, for
  example is a command line tool to play audio using phonon. You might
  also want to take a look at the QSound class. QAudioInput looks
  interesting for adding support for a mike.

  I hope this helps.

  P.S.:

  The riverbank site does mention the phonon module :)
  I found a question on using Phonon + Pyqt -
  https://stackoverflow.com/questions/1083118/play-mp3-using-python-pyqt-and-phonon


Accessing zfs pool with chroot sftp - User can view files/folders but cannot create

In Linux Mint...

Adding the user (chrooted user for the sftp access) to the sudo group appears to fix the problem.

Add a User to a Group (or Second Group) on Linux


Dual-screen partial overlap on Ubuntu 18.04

I started to see same in Ubuntu 18.04. I never got success with desktop display adjuster, either running Gnome or Xfce4. The problem happens for me when I move from various projectors with different resolutions.

You can fix if you install the GUI program arandr, a nice interface to xrandr. arandr gives easy to drag overlapped window out of way.


The following pg_hba.conf allows local and specified Ip have privilege login， but reject others。

TYPE  DATABASE        USER            ADDRESS                 METHOD

local   all             all                                     trust

host    testdb          testuser      192.168.1.1/32             md5

host    all             all           0.0.0.0/0                 reject


Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable

Run this in the terminal thus allowing connection to X11

xhost +

After your done installing or running your game then

xhost -

...for security reasons.


UBUNTU 12.04 LTS - Dell Vostro 3446 audio and wifi (Atheros QCA9565 / AR9565) not working after update

EDITED BASED ON UPDATED INFORMATION

Your wifi card seems have trouble with 12.04 kernel and you may need to compile kernel yourself. This is based on ubuntu forum thread http://ubuntuforums.org/showthread.php?t=2172044

I suggest try to upgrade your kernel to 12.04 HWE (Hardware Enablement Stack - https://wiki.ubuntu.com/Kernel/LTSEnablementStack), use this command in console/terminal to upgrade kernel and x11 to trusty hardware stack.

sudo apt-get install --install-recommends linux-generic-lts-trusty xserver-xorg-lts-trusty libgl1-mesa-glx-lts-trusty

After that, restart your laptop, and then use this command to check your current kernel version:

uname -a

Trusty use kernel version 3.13++.
Precise use kernel version 3.2 / 3.5 / 3.8.

If you decide to use HWE and sometimes later want to upgrade your ubuntu, you are suggested to skip normal version and go upgrade directly to the next LTS (14.04). HWE may exhibit problem when upgraded to non-LTS release.


Unable to install Ubuntu on windows even after installing it properly

Please change the boot mode from UEFI to LEGACY or vice-versa. And reboot the machine.


This is a two step process - 1st, reduce the size of the windows partition, 2nd increase the size of your Ubuntu partition.  You will need a live USB or CD to complete the process.

1st:  Reduce the windows partition

Start windows - inside windows, find the disk manager - depending upon the version of windows it will be in different places.  Use Windows disk manager to shrink the size of the windows partition.

Do not use Ubuntu tools to change your windows partition - doing so may make your Windows OS unusable

After windows finishes shrinking the partition, you can start the second bit.

2nd:  Boot from the Live CD / USB- choose the 'Try Ubuntu' option.

Open a terminal window ctrl+alt+t

Enter the command

sudo apt-get install gparted

Then enter the command gparted

You can use gparted to increase the size of the Ubuntu partition to include the extra space left by Windows, assuming it is contiguous to the Ubuntu partition.

Please, please, please

Take the time to perform a backup before you do this!


I just resolved the problem
Setting>> Appearance>> Fonts>> then change the font size down to 9 or until you can see the buttons.

Its annoying because you can't make the screen smaller by dragging the top of the window down to make a smaller box, then drag the whole box upwards and scroll down to see the buttons; because it wont or give you the option to. This only occurred when I tried to install a new printer, and in the process menus I couldn't accept or see the buttons to continue the process.


ubuntu-12.04-wubi-i386.tar.xz for the wubi installer

You need to tell Wubi where the file is. Run wubi.exe as follows from the command line (e.g. if you placed the image in a folder called C:\UbuntuImage):

wubi.exe --dimagepath=C:\UbuntuImage\ubuntu-12.04-wubi-i386.tar.xz

Don't extract the contents before running.

PS I found it tripped over paths with spaces in them; if you find the same problem then move it to a folder as shown above.

Additional info

You can only install Ubuntu (32bit or 64bit) using the diskimage as shown above. If you want to install Kubuntu, Lubuntu, Edubuntu or Mythbuntu (or Xubuntu only on releases prior to 12.10) then you need to download the Desktop CD ISO and save it in the same folder as wubi.exe before running Wubi. Make sure that the ISO matches the release of wubi.exe and the flavour you are installing.

Note that Wubi will check the ISO MD5 sum to ensure integrity (if you run it when connected to the internet). It will still use the downloaded ISO if it's valid. However, if you disconnect from the internet it only checks the kernel and initrd md5sums so you should always check the ISO yourself.


ubuntu 17.10 popup keyboard on touch screen

This is a known bug. Please mark yourself affected here: https://bugs.launchpad.net/gnome-desktop/+bug/1723857

It's been a problem since 2015: https://bugzilla.redhat.com/show_bug.cgi?id=1274956,https://bugzilla.gnome.org/show_bug.cgi?id=742246

Florian made some patches this year (https://bugzilla.gnome.org/show_bug.cgi?id=788188), but I don't know how to apply them. Hence my as-of-yet unanswered question: How do I apply a GNOME patch?


Cannot install adobe air on 13.10; i386 pkgs don't exist

Just update the repositories and then try to install  the  packages,

sudo apt-get update
sudo apt-get install libgtk2.0-0:i386 libnss3-1d:i386 libnspr4-0d:i386 lib32nss-mdns libxml2:i386 libxslt1.1:i386 lib32z1 lib32ncurses5 lib32bz2-1.0


Ubuntu One for MAC 10.6 or higher says on 10.6.8 "Ubuntu one cannot run on this type of MAC"

unfortunately Ubuntu One for Mac OS does not currently run on 32-bit processors like the Core Duo. This is not a fundamental limitation, but just a lack of resources. See this launchpad bug if you would like to vote to give this issue higher priority.


Installing Ubuntu 16.04 with home encryption on a NVMe SSD

Startup asks for a password to decrypt the swap partition specified in /etc/cryptab. Comment out the line in /etc/cryptab to disable the use of an encrypted swap. The /etc/fstab above is not configured to use /dev/mapper/ctyptswap1 anyway. NVMe should not be a contributing factor.


In the manifest, you need to specify your name and email address in the following form:

"maintainer": "Joe Bloggs <joe.bloggs@isp.com>"


How to remove a WiFi channel using terminal?

I believe this is related to the region code.

I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.


sudo iptables --table nat --list --numeric --verbose

or in its short form:

sudo iptables -t nat -L -nv

--table nat is key: it lists the NAT table.
--list is the obvious listing command.
--numeric is probably needed to speed it up as it would otherwise do reverse lookups for each addresses.
--verbose is the obvious "I want all output" option.

Example output:

$ sudo iptables -t nat -L -nv
Chain PREROUTING (policy ACCEPT 22 packets, 6050 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain INPUT (policy ACCEPT 12 packets, 2994 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 5190 packets, 340K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 5164 packets, 337K bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 MASQUERADE  tcp  --  *      *       192.168.122.0/24    !192.168.122.0/24     masq ports: 1024-65535
    8   854 MASQUERADE  udp  --  *      *       192.168.122.0/24    !192.168.122.0/24     masq ports: 1024-65535
    1    40 MASQUERADE  all  --  *      *       192.168.122.0/24    !192.168.122.0/24


You need VNC for this, over SSH. So you need to install openssh-server and vnc-server. You don't tell us what version of Ubuntu it is, so I guess 14.04 LTS, so google if you have another version.

Install Open SSH server
How To Install VNC Server On Ubuntu 14.04


What does 'Ign' , `Get` or 'Hit' mean when running an apt-get update?

When you use apt-get update it verifies if the same update indexes need downloading, if not it does not download the same updated indexes again.

Hit means apt checked the timestamps on package list, those match and there are no changes.
Ign means there are no changes in the pdiff index file, it wont bother downloading it again.
Get means apt checked the timestamps on package list, there were changes and will be downloaded.

Nothing to be scared of, it just means there is no need to download updated indexes again, the ones you have are current.


My home folder is owned by root, how can I fix this?

I have faced this problem and solved by using a trick. You are getting chown: cannot access 'home/aaron/.gvfs': Permission denied error because .gvfs directory is in use.

What I suggest you to do.

Restart your system in Recovery Mode and follow these steps.

First chose the option Grub from the Menu listed there, accept yes. It will mount your file system in read/write mode. After updating it will exit from the Grub and will come back to Menu. Then chose root.
Now you execute all your commands that have you tried above again.
It would successfully change the permission. Then run following command to reboot  your system.

# reboot

2nd way is little tricky. But you can give it a try. Hope it works for you also, it worked for me.

Press CTRL+ALT+F1 to go to tty1 and login with your username.
Execute following command:

sudo pgrep $ | sudo xargs kill

It will display some message and wait for your next instruction. Do nothing just just press CTRL+ALT+F2 to go to tty2 and again login.
Here you have to run your commands to that you have already tried to make change your permission of your home.
Then go back to previous tty1 CTRL+ALT+F1 and press CTRL+Z or CTRL+C.
Press CTRL+ALT+F7 or CTRL+ALT+F8 to get your display back. you can also use ALT+ -> continuous to get your display back.

Hope it will work for you. Reply if something goes wrong.


Like I mentioned in the comments, the best way is to figure out if something strange is found in the EXIF segment of the JPG file. There are several tools, including online tools, available to help you do this. I'll show you how to use an online tool.

Click on this link: Online Tool To Inspect EXIF of a JPG.
Click on the button Choose file and pick the file you are having a problem with.
Click on the View Image From File button to upload and have the file checked.
You should see a preview of the image and a breakdown of the information found in the EXIF below it. See my example here.


How can I recover my data after replacing Windows 8 with Ubuntu 14.04?

You are not going to like my answer.

ABYD i.e. "Always backup your data!"
(We know from your post, it is too late. Sorry but your fault).
It won't be simple; you are going to have to learn the hard way or pay for data recovery service from people who know what they're doing.
Forget the urgency, this is going to take hours on end.
If you really stomped your previous NTFS file system with a fs based on ext3 or ext4, you probably are going to need to dig deep into your TB drive to recover the data that still is there, provided you have not gone on using that drive.
The way to go:

don't use your HDD, i.e. don't write anything on it. In fact the best would be to take it OUT of your machine and to temporarily make an external drive out of it, for the sake of data recovery.
become familiar with the likes of testdisk, photorec and foremost.
There are other free packages out there. Just stick with one at a time and two in a row. It usually is enough, provided you choose them for their complementarity.  Photorec is format and fs independent. I recommend using it in conjunction with testdisk.

-Follow-up 1-
If you use TestDisk on your HD with the data to be recovered (vol A), for instance by recovering lost partitions, etc., you might screw up your existing Lx partition table(s) on that drive, so I urge caution !. To avoid that I would recommend:

acquiring a new volume (vol B) on which to store yr recovered data, i.e. the data to be recovered from yr 1TB HD (vol A).
the new storage volume must big enough for a complete recovery of your data, plus 15%, plus 20 GB for a new Lx OS on it. That is so you can operate faster than you would from a burned DVD containing a Live Lx on it. Evaluate how many GB of data are to be recovered to work out how big volB must be.
replace your present 1 TB HD (vol A) inside your machine with the new drive (vol B).
format and install Lubuntu 14.04 (lighter) or Ubuntu Desktop 14.04 (bigger) on it, as well as Photorec and TestDisk.
optional:  include a partition on vol B with the same format as the one previously adopted by you for your data under Win 8, although normally both PhotoRec and TestDisk ought to write Win data recovered from vol A onto any sane Lx format on vol B.
mount vol A as an external volume (learn how to mount a volume in Lx/Ux from the console or just use the Disks application in the GUI to identify and mount it)
disable any time-based suspend/hibernate setting you may have on your OS. It might interfere with the data recovery as recovery is likely to last...
launch PhotoRec .. run your diagnosis with it so it may tell you how much time it will need to recover your files.  Note that if you have a lot of data or your data is very fragmented, recovery time may either be infinite (i.e. data unrecoverable, at least in part) or run in the hundreds of hours. You will know only when PhotoRec starts.

Please report in this thread on your progress.


Problem installing ATI driver 13.3 beta on Ubuntu Precise 12.04

You need to install the linux-headers-generic package, a meta-package that always points to the latest generic kernel header available. fglrx depends on this package.

sudo apt-get install linux-headers-generic

There are good instructions for building and installing the AMD drivers (albeit, written for Quantal) at Ubuntu Quantal Installation Guide. It gives the prerequisites as:

sudo apt-get install build-essential cdbs dh-make dkms execstack dh-modaliases linux-headers-generic fakeroot

Plus sudo apt-get install lib32gcc1 when using 64-bit.

Note that the list includes linux-headers-generic, not the specific name of the latest generic headers package.

For additional detailed information on installing video drivers, see:

Which driver should I install when using an Nvidia, Ati or Intel video card


If you want to search for other solutions, the keywords 'aero snap' might help you. This is how it's called in Windows 7 and many users and developers try to copy it from there.

I used the following two solutions, but I haven't tested them yet on 11.10 and I didn't test the third one at all. The biggest disadvage with all solutions I've found so far: there is no easy way to get the windows back to their original size and position.

Compiz grid

You'll need the package compiz-fusion-plugins-extra. Install it using the package manager or using the following command:

sudo apt-get install compiz-fusion-plugins-extra

Then open the CompizConfig Settings Manager and search for grid and enable this plugin. You can then place the active window to the left half

Compiz command

Compiz commands allow you to define custom commands executed based on specific bindings such as moving a window to an edge of the screen. Detailed instructions are available here.

gTile in Gnome 3

Use this gnome 3 gTile extension to resize and place your windows on a grid. This extension was inspired by Divvy for Mac OS, so you can watch this video to get an idea of how it's working.


Open /etc/fstab with a commandline editor (vi, sed, nano) to add the usrquota and/or grpquota to the partition (depending on your needs: pick one or both)(and yes, it assumes you use a partition for  it and in this case that would be /home/):

userquota is for users
grpquouta is for groups

Create a file for user and/or group:

touch /home/aquota.user
touch /home/aquota.group

The files need to be owned by root and have 600 as permissions

sudo chown root:root /home/aquota.user
sudo chown root:root /home/aquota.group
sudo chmod 600 /home/aquota.user
sudo chmod 600 /home/aquota.group

reboot or remount the partition.
command quotaon -av will enable quota
command edquota -u {user_id} will let you edit them where {user_id} is the id of the user. This will open vi for editing the quota.

Setting the quota is done in "blocks" or "inodes" and there are 2 options:

soft: Max number of blocks/inodes a user may have on the partition before a warning is issued and a grace period countdown begins.
hard: Max number of blocks/inodes user may have on partition.
(If set to zero then no limit is enforced on either of the options).

  The best would be by percentage for two users 45% and 45%. But by gigabytes will be fine as well.

Blocks are probably 4kB (stat -f . will show the blocksize on your system).
Inodes means amount of files and directories.

Answer based on this how to. The link has a lot more information about commands related to this and explains it a bit more in depth.


Is it possible to develop an app for Ubuntu with C (not C++)?

You can develop apps for Ubuntu with just about any language. If there are particular libraries you need your app to use, then as mdpc says that's the only thing that would likely impose any restrictions. Some libraries can only be used from certain languages.

But Ubuntu apps can be developed in C, and a lot of Ubuntu software is written in C, including many programs and libraries installed by default in almost every Ubuntu system.

Programs that are installed by default in Ubuntu or otherwise very popular, and are written in C, include: bash, Brasero, dash, Disks, most of the Document Viewer, Empathy, Evolution, the Eye of GNOME image viewer (src), the File Roller archive manager, GCalctool, GIMP, GNOME Terminal, LightDM, the Nautilus file browser, Pidgin (except some plugins), Rhythmbox, Seahorse (src), Totem, Upstart, and X.org.

So yes, you can definitely develop for Ubuntu in C. Many people do.

With that said, the Ubuntu SDK uses Qt. Qt has bindings for many languages but not C. So you probably cannot create programs with the Ubuntu SDK, by coding solely in C. (You could still often code most of your software in C.)

That may make it difficult to write mobile apps (for Ubuntu Touch) in just C. But there's no need to use the Ubuntu SDK for desktop apps. Many desktop apps (all but 4 apps listed above are desktop apps in the usual sense) that are packaged for and run well in Ubuntu don't use the Ubuntu SDK.

Furthermore, using the Ubuntu SDK may not be the best way to create portable apps that run well on other desktop operating systems besides Ubuntu. The Ubuntu SDK is good for many purposes, but even if it did support writing apps in C, you'd still likely not use it under a variety of circumstances.

One popular way to write GUI applications in C is to use Gtk+. There are other alternatives for GUI toolkits with C bindings, including WxWidgets (via WxC), IUP, and possibly Clutter (GObject is accessible from C but sometimes writing for its object model--or any object model--is difficult in C).


How to minimize virtual desktop window on Ubuntu?

Turns out it was a problem with VMWare View Open Client.  You cannot easily exit the Full Screen mode of the app.  Once you are in full-screen, you can try holding Alt key and clicking right-mouse-button.  That should pop-up a menu with a "minimize" option.  Problem is that this menu does not always pop-up, sometimes it does and sometimes it doesn't.

Here is more info on it:
https://groups.google.com/forum/#!topic/vmware-view-open-client/PvRDNjGSp4A


The OP found the solution.

From a comment:

  The fix is to install paprefs and to disable Multicast/RTP

From an edit to the question:

  The solution, from an admittedly sketchy memory, is to install and open the pulse audio control settings and disable netwrok broadcasting--this will stop pulse flooding your network.


Have you tried to set your virtualbox to full screen ?  it may helps .. but if not you may try setting it up to suit your screen go to system settings >> Displays >> Resolution you'll find many options on the list pick the suitable for you


What is the difference between KDevelop and KDevelop (Pick Session)?

kdevelop executable has --ps command line option to show a window listing currently created session and allowing you to start the IDE with selected one. It is strange that there two packages for that, though, because the executable being run is same in both cases.


How to specify block size when formatting?

type in Terminal:

mkntfs -c 4096 /dev/sdb1

from mkntfs man page:
http://manpages.ubuntu.com/manpages/trusty/man8/mkntfs.8.html


This will disable a few more key sequences than just the Ctrl+Alt+F# shortcuts, but should do what you want.

Open the Keyboard configuration tool.

Switch to the Layouts tab and click the Options...  button.

Expand the Miscellaneous compatibility options section and check the box next to
Special keys (Ctrl+Alt+) handled in a server.

The effect should be instant and persist when you log in again.

This also disables a few other server shortcuts such as Ctrl+Alt++ / - to switch video modes.


Sharing of swap partiton between linux systems?

Yes, you can share swap area with two or more operating systems. To share swap area, create the swap area when you install the first operating system and then when you install the second one, do not create a new swap area, instead just use the first OS's swap area as the mount point for swap area of the second OS.

If you have already installed both OS's, use gparted to create a common swap area and then add it to your /etc/fstab file to automount it at boot-time.

Just in case you would like to know the drawbacks of using a shared swap area, refer this question on StackExchange:

Ill-effects of sharing swap area


Command to rebuild all DKMS modules for all installed kernels?

I figured out a shell one-liner to do it:

ls /var/lib/initramfs-tools | \
    sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start

This works because the names of the directories in /var/lib/initramfs-tools are exactly the kernel version names that you need to pass to dkms_autoinstaller to tell it to rebuild all modules for those kernel versions. Note that if you have uninstalled some old kernels, their directories might still be lying around and cause some errors to be reported, but this isn't a problem because dkms_autoinstaller will just do nothing for those kernel versions that aren't installed.


Is there a way to get an indication after I double click a desktop icon?

Not really an answer to your question, but I would suggest using a single-click activation instead (Nautilus → Preferences → Behavior → Single click to open items).

Then when you click an item, it gets selected, and at the same time launched. This is generally consistent with the way we open links and press buttons in an Internet browser window (we never double-click), so once you get used to it, you will never look back (and it saves your mouse and fingers too).


How to quickly check the value of bash variables, aliases and history commands from terminal?

bash offers the Ctrl+Alt+e shortcut (from the bash man page):

   shell-expand-line (M-C-e)
          Expand the line as the shell does. This performs alias and
          history expansion as well as all of the shell word expansions.

Examples:

ls Ctrl+Alt+e

ls -aF --color

!268 Ctrl+Alt+e

ps -aef

$PATH Ctrl+Alt+e

/opt/vagrant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games


Ubuntu 19.10 on RaspberryPi 4 hangs on first boot

Set total_mem=3072 in /boot/firmware/usercfg.txt
(If you mount the sd card in another computer, the usercfg.txt is on the small vfat partition.)


Suppress command output lines that contain a certain string

Maybe the unwanted part is part of the output to stderr but to stdout.

Try:

./mycommand 2>&1 | grep -v "I dont want to see this"

You can pipe stderr and stdout to different targets. So you may see where the output comes from:

./mycommand > >(grep -v "I dont want to see this" > stdout.log)  2> >(grep -v "I dont want to see this" > stderr.log)


TV monitor detected, but stops working after logging in on Ubuntu 18.04

Ah, just needed to install drivers.

$ sudo apt-install nvidia-driver-390


VLC not working after upgrade Ubuntu to 14.04

I had that same problem on Manjaro after manually installing VLC.

In my case, installing the optional dependency "qt4" did the trick.
Not sure why this dependency is "optional"...


Black screen, blinking cursor and purple line left

You could try this and see if it lets you access the desktop:

When hard-drive has stopped loading and you are sitting on a black screen, press CTRL+ALT+F1 and enter your username and password and press ENTER.

Now type: startx   which should run xorg and bring you to your desktop...

If this works, open a new Terminal window on your desktop and remove LightDM by typing the following:

   sudo apt-get remove lightdm

and then done we'll replace it with GDM instead by typing:

   sudo apt-get install gdm

now type: sudo reboot   to reboot computer and hopefully all is well...


No Desktop appear after logged in using lightdm Ubuntu 14.04

Open your terminal or login into tty2 (by pressing Ctrl+Alt+F2) and go to home folder by using command cd ~ .

Delete files with the command rm as shown bellow. Exit tty2  by pressing Ctrl+Alt+F7, and re-login. This should solve desktop problem when you relogin, since those files will be recreated with new configuration.

rm -rf .compiz .config .gconf .gnome .gnome2 .kde .gvfs .local


Is there a reason why you want to install the MBR on /dev/sda1?
You should try with grub-install /dev/sda


Why do top and lxtask show different degrees of memory usage?

Because it includes cache and buffers in top (you can see them as individual items to the right of the total memory).


How do I set keyboard layout per window on Ubuntu 20.04?

Below picture is self explanatory..

Go to system settings,
Region & Language,
Input Sources,
Settings Icon,
Choose "Allow Different Sources for each window"

Or if you wish to make it via command line

gsettings set org.gnome.desktop.input-sources per-window true

to reset

gsettings reset org.gnome.desktop.input-sources per-window


I have a partial workaround which will do for now -- I randomly set the DISPLAY variable and hope. Works for now. I also run notouch as my userid (rather than root).

My disable_touchpad script in sleep.d now looks like this:

#!/bin/bash
case "$1" in
    thaw|resume)
        echo "running notouch" >> /tmp/notouchlogger
        export DISPLAY=:0
        su -c - yannick /home/yannick/bin/notouch 2>>/tmp/notoucherrors
        ;;
    *)
        ;;
esac
exit $?

and it seems to work.


After installation, the file system change from ext4 to ext3

this is bug in ext2fsd driver in Windows.  I have same issue with dual boot Ubuntu 18.04 and I gave a try to ext2fsd... Same issue sees it ext3 and cant read partition using this program


Python script: How to chop the output to a limited line size?

New version

The script you posted indeed groups the emails by domain, with no limit in number. Below a version that will group emails by domain, but split the found list into arbitrary chunks. Each chunk will be printed into a line, starting with the corresponding domain.

The script

#!/usr/bin/env python3
from operator import itemgetter
from itertools import groupby, islice
import os
import sys

dr = sys.argv[1]
size = 3

def chunk(it, size):
    it = iter(it); return iter(lambda: tuple(islice(it, size)), ())

for f in os.listdir(dr):
    # list the files
    with open(os.path.join(dr, "chunked_"+f), "wt") as report:
        file = os.path.join(dr, f)
        # create a list of email addresses and domains, sort by domain
        lines = [[l.strip(), l.split("@")[-1].strip()] for l in open(file).readlines()]
        lines.sort(key=itemgetter(1))
        # group by domain, split into chunks
        for domain, occurrence in groupby(lines, itemgetter(1)):
            adr = list(chunk([s[0] for s in occurrence], size))
            # write lines to output file
            for a in adr:
                report.write(domain+","+",".join(a)+"\n")

To use

Copy the script into an empty file, save it as chunked_list.py
In the head section, set the chunk size:

size = 5

Run the script with the directory as argument:

python3 /path/to/chunked_list.py /path/to/files

It wil then create an edited file of each of the files, named chunked_filename, with the (chunked) grouped emails.

What it does

The script takes as input a directory with files like:

email1@domain1
email2@domain1
email3@domain2
email4@domain1
email5@domain1
email6@domain2
email7@domain1
email8@domain2
email9@domain1
email10@domain2
email11@domain1

Of each file, it creates a copy, like:

domain1,email1@domain1,email2@domain1,email4@domain1
domain1,email5@domain1,email7@domain1,email9@domain1
domain1,email11@domain1
domain2,email3@domain2,email6@domain2,email8@domain2
domain2,email10@domain2

(set cunksize = 3)


Ubi-partman fails with exit code 141 when installing via hard disk

We bumped into the same situation with the exit code 141. We use the usb and select the second option to boot. After reboot, we can select the first option and can install the image without the exit code 141.


How to fix Minecraft showing as a grey question mark on the Launcher?

This is a pretty impossible problem to solve, unless you want to rewrite some Java code.

Unless Mojang and/or Java wants to re-program Minecraft to add an icon, it is not going to happen.

Try to contact Mojang to put an icon. If you are willing to muck through craptons of code, you might do it yourself, but I am not writing a 30-page long article for this. Sorry for that problem. Maybe tweet @Jeb_?


Open two windows of your file manager. Use Ctrl+H to show hidden files and folders.
In the first window, open ~/.config.
Create a folder called autostart. Open it.
In the second window, open /usr/share/applications.
In this second window, select the item "Cairo Dock" and copy it over to the autostart folder in the first window.
Close the second window.
In the first window, open the item "Cairo Dock" using the Leafpad text editor.
Find the line beginning with Exec=.
Change that to Exec=sh -c "sleep 1m && cairo-dock" and save the file.
Instead of "sleep 1m" use whatever else you like such as 30s or 2m or whatever.
Logout, login.


You cannot modify the size of a partition which is currently mounted.

You will need:

An Ubuntu installation DVD, CD, or USB device.

What you must do is log off and power down Ubuntu completely, do not hibernate.

First:

use an Ubuntu installation disk or USB to boot up and run a "live session".

Next:

Open gparted with permission or use the command: sudo gparted to open gparted.

Finally:

You should now be able to modify the size of these partitions.


How does magazine publishing work on the Ubuntu Software Center?

I do not know about magazines, but I published my app through the MyApps service.
They will package your magazine, so you do not need to provide the debian package.
I should take a look at the Ubuntu developer site.

After installing Full Circle Magazine #53 and launching it's icon from dash, Nautilus opened in /opt/fullcircle/issues and it contained fullcircle-issue53-eng.pdf.

The thing I know for sure is that your magazine must be in /opt.


I had a wireless driver problem on my ASUS 1015e recently, this blog post solved it for me.

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

I'm not sure if you've got broadcom hardware or not, but if you do this should fix it.


That stupid UEFI always spoils everything even on updated machines.
If you want to try more Linux distros please, use legacy MBR mode.

I'm going to tell you how to clean up that mess.
First of all you need to restore the windows boot manager, and please don't upgrade your system unless Windows is your only OS in the machine.

What you'll need:

No more than 5 hours
A device with Windows.iso
A device with Ubuntu.iso

Burn a CD/DVD or use a USB with Rufus for your Windows.iso boot the device, enter to repair > advanced options > command prompt type this:

bootrec /fixboot
bootrec /fixmbr
bootrec /rebuildbcd

That will restore windows and you will be able to access your files (please make a backup of your files with an external HDD and save your windows licence on a paper).
Boot windows and please remove all that ubuntu stuff in the Partition Manager, you will be able to delete all that is not windows.
Then for restore ubuntu insert the ubuntu.iso media and boot as live image, open the terminal(make sure that the name of your HDD typing ´lsblk´ and type this.

sudo grub-install /dev/sda

That's all


Local rsync command to capture a sub-sub-subdirectory of /

You can use the -R option. From man rsync:

  -R, --relative

  Use relative paths. This means that the full path names specified on the command line are sent to the server  rather
                than  just  the  last  parts  of  the filenames.

Example:

% rsync -acvzRAHSX /usr/local/bin/ out_dir/
sending incremental file list
/usr/
/usr/local/
/usr/local/bin/
/usr/local/bin/foobar
/usr/local/bin/spamegg

% tree
.
└── out_dir
    └── usr
        └── local
            └── bin
                ├── foobar
                └── spamegg

% tree /usr/local/bin
/usr/local/bin
├── foobar
└── spamegg


Main differences between Ubuntu Studio 12.04 and Ubuntu 12.04

Desktop environment: Ubuntu 12.04 uses Unity as shell over Gnome desktop environment while Ubuntu Studio 12.04 uses Xfce as
Linux kernel: Ubuntu Studio 12.04 uses realtime kernel (for reducing the amount of latency, which is extremely beneficial for audio work) while Ubuntu 12.04 uses generic kernel(more about kernel types).
Installation: Ubuntu 12.04 has live CD for installation but Ubuntu Studio 12.04 only has live DVD.
Applications: Ubuntu Studio 12.04 contain a lot more pre-installed multimedia software (several audio, video and graphical applications) than Ubuntu 12.04.
Appearance: Ubuntu Studio 12.04 has blue-on-black theme instead of Ubuntu's default purple and orange and also a new sound theme replaces the default Ubuntu theme.
JACK Sound System : Along with the ubiquitous Pulse Audio sound server, the powerful JACK sound server is also included in Ubuntu Studio. Both are already configured to work well together.
System Configuration : There is a different configuration of the system so as to "not-limit" you audio/video processing.


Installing Ubuntu 12.04 from a persistent bootable USB stick WITH installed packages

Never done it, but in principle you would "create" a new distro, that is, the basic Ubuntu with some additions and, perhaps, some things removed.

That would get you an ISO file, which you then use for the LiveUSB.

Check, for example:

https://wiki.ubuntu.com/DerivativeDistroHowto#Tools_for_building_distro
http://ubuntuforums.org/showthread.php?t=1073838&highlight=build%20distro
http://minez-inspirate.blogspot.com/2009/04/create-distro-livecd-ubuntu-with-ubuntu.html
http://lxer.com/module/newswire/view/162978/index.html

I hope this is of help.

edit: Also, check out this possible duplicate question.


How do I configure a Belkin n52te gamepad to work?

1. Install Monitoring and Remapping Application Needed for the Driver

It is Pystromo. It has to be download from Launchpad.

Press Ctrl+Alt+T to open terminal. Run these commands one by one in terminal;

cd ~/Downloads

sudo wget "https://launchpadlibrarian.net/18545559/pystromo-0.6.0.tar.gz"

sudo sed -i '$a uinput' /etc/modules

sudo modprobe uinput

tar -xvf pystromo-0.6.0.tar.gz

sudo cp pystromo/config/52-pystromo-debian.rules /etc/udev/rules.d/

sudo udevadm control --reload-rules

sudo udevadm trigger

mv pystromo ~/.config/

cp ~/.config/pystromo/config/* ~/.config/pystromo/

cp ~/.config/pystromo/lib/* ~/.config/pystromo/

sed -r 's:config/:~/.config/pystromo/config/:g' -i ~/.config/pystromo/monitor.conf

sudo python ~/.config/pystromo/pystromo-mon.py

In order to start it at boot,

Type "Startup Applications" in dash, select it and open.
Then Click on "Add" button.
In the new window, type "Pystromo" in Name field, and type "sudo python ~/.config/pystromo/pystromo-mon.py" in Command field. Then click on "Add" button.

Then you have to install the device driver.

2. Install Device Driver

It is Nostromo. You need to have Sun's Java JRE 1.6 installed to run it.

Can download Jnostromo from Sourceforge. After download install it with,

cd ~/Downloads

chmod +x jnostromo-1.5.2-linux-installer.run

sudo ./jnostromo-1.5.2-linux-installer.run

Driver installation prompt will start. After installation, you can run it with jnostromo Icon in desktop.(You need Sun's java JRE versionn 1.6)


Short answer

There might not be a universal solution, so you may have to resort to different tools for different computers.

Long answer

It sounds like the students have their own computers, which in turn means that you're probably dealing with a dozen or more different models. If so, there are quite a few variables at play, including (but not limited to):

Computer age -- As a general rule, brand-new computers are often hard to get working because they have new hardware for which Linux drivers may not have yet been written.
Firmware type (EFI vs. UEFI vs. BIOS) -- Computers older than about mid-2011 mostly used BIOS firmware, whereas beginning in mid-2011, manufacturers shifted rapidly to UEFI. All Intel-based Macs use EFI, which is similar to UEFI. (UEFI is essentially EFI 2.x.) EFI and UEFI boot in mostly the same way, but there can be some subtle differences.
Boot mode -- Most EFI- and UEFI-based computers provide a feature called the Compatibility Support Module (CSM), which enables them to boot BIOS-based computers. Some UEFI-based PCs that shipped with Windows 7 installed Windows in BIOS/CSM/legacy mode, and so may be configured to more easily boot Ubuntu in BIOS mode, rather than in native UEFI mode. It's also usually possible to boot Ubuntu in this way even on newer machines, although system-specific firmware options will have to be set. Understanding and controlling this detail on a dozen or more computers can be a challenge.
Buggy firmware -- Even aside from the firmware type, a lot of computers ship with downright buggy firmware. This can make booting certain media difficult or require system-specific workarounds.
Selecting boot media -- Many computers require hitting Esc, Enter, or a function key to bring up a boot manager menu that enables booting from a removable disk such as a USB flash drive. The "magic key" varies from one computer to another, though.
Secure Boot -- This is an optional UEFI feature that can interfere with booting Ubuntu. In theory, Ubuntu works with Secure Boot enabled. Practice usually follows theory, but there are exceptions to this rule.
Hardware support -- Even aside from hardware age, sometimes you need to tweak boot options to get things to work. A year or two ago there was a rash of problems with video hardware. I see fewer questions about that today than I did then, probably because support has improved; but you might still need to pass particular kernel options (like nomodeset) for some computers.

A lot of your problems are likely to be caused by firmware issues, and in particular by system-specific quirks and bugs. Furthermore, your ideal solution boots in either BIOS mode or in EFI/UEFI mode and supports storing files on the boot medium. I don't know offhand if there are any tools that support creating such media. If there are, I wouldn't be surprised if these tools were to fail on some computers, so you might need to prepare media in some other way for some of your computers.

Overall, my recommendation is to abandon your current approach and to try another: virtualization. In particular, VirtualBox is open source and is available for OS X, Windows, and Linux, so chances are all of your students can run it. You can install Ubuntu under VirtualBox yourself, then distribute your installation to your students, who should be able to run it on their own systems, no matter what the host OS. This will neatly bypass all of the variables I've just identified.

The main downside to virtualization is that it imposes extra overhead. On a computer with lots of RAM (say, 4GiB or above), this shouldn't be a big deal; you can run a lightweight desktop environment and all the tools you need for C++ development in 1GiB or a bit more, so on a 4GiB system, you can give 1GiB to the virtual machine and be fine. (Starting with Lubuntu rather than the "base" Ubuntu can be a good approach.) If a student has just 1GiB of RAM, though, either the virtual machine will be memory-starved or VirtualBox will end up relying on swap, thus dragging performance down. Thus, before you embark on the VirtualBox solution, you should probably take a survey of the hardware your students will be using to be sure this approach is viable for the available hardware.

Of course, you could use a mixed approach, too -- VirtualBox for students who have sufficient RAM, and deal with individual issues on a USB-based dual boot for those who are more resource-impaired.


No, you cannot simply disable all dialogs that may pop up.


Application icon not displaying for running app

Update: So I noticed this related post: Icon missing when application is launched which answers my question!
I needed to add:
StartupWMClass=<string>

to my .desktop file in order to fix my issue.