Why aren't my mounted internal partitions showing in the Sidebar I have several partitions on my internal HDD. When I open a Nautilus window (any folder), the mounted partitions are not showing in the window's sidebar. This happened after I installed Ubuntu 16.10. Before that I was using Elementary OS without Nautilus.

The same problem exists on my guest account.

If I enter in Terminal sudo nautilus then all the partitions do show up in the sidebar, although some show their UUID instead of Label.

While trying to resolve this, I've modified my /etc/fstab several times (both manually and through Disks app), but without success. Every time the result is be the same - no partitions in the Sidebar.

An additional question, not sure if it's related, if I open Disks app, edit any partition's Mount Options and set Automatic Mount Options to On, that partition does not automatically mount. This is not the case on my other computers. Could it be in any way related to my problem above?

As I said, I've modified my /etc/fstab a few times already, but here's how it currently looks like:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda9 during installation
UUID=28f8f040-66ac-4edd-9b3e-670425ce8b31 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda10 during installation
UUID=25c545a9-51e2-46d3-9cc2-fc3d72fc8035 /home           ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=4172ee4d-d887-464c-862d-04b2acc4b287 none            swap    sw              0       0

# AMPP
# /dev/disk/by-uuid/54905800-7fed-4426-9fdc-c9a5748cac58 /mnt/54905800-7fed-4426-9fdc-c9a5748cac58 auto nosuid,nodev,nofail,x-gvfs-show 0 0

# DATA
# /dev/disk/by-uuid/EAA9-7535 /mnt/EAA9-7535 auto nosuid,nodev,nofail,x-gvfs-show 0 0
# UUID=EAA9-7535    /media/tomica/DATA  vfat    defaults,nosuid,nodev,locale=en_US.utf8 0   0

# ntfs-data
# /dev/disk/by-uuid/40C9576D12CF1939 /mnt/40C9576D12CF1939 auto nosuid,nodev,nofail,x-gvfs-show 0 0

# win7
# /dev/disk/by-uuid/E06491F96491D320 /mnt/E06491F96491D320 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=E06491F96491D320   /media/tomica/win7  ntfs-3g defaults,nosuid,nodev,locale=en_US.utf8 0   0
/dev/disk/by-uuid/54905800-7fed-4426-9fdc-c9a5748cac58 /mnt/54905800-7fed-4426-9fdc-c9a5748cac58 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/EAA9-7535 /mnt/EAA9-7535 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/40C9576D12CF1939 /mnt/40C9576D12CF1939 auto nosuid,nodev,nofail,x-gvfs-show 0 0

Edit: So muru suggested that my question is a duplicate of this one. I've tried both answers from that question and neither worked unfortunately.

I've also tried Byte Commander's suggestion from his comment, i.e. commented out all partitions from /etc/fstab and restarted my computer (twice) and that didn't work either. Any new suggestions are much appreciated.

Edit 2: As advised by user.dz, I'm adding here outputs of the following commands:

udisksctl dump > udist.dump: http://paste.ubuntu.com/23607475/
ps aux | grep udisks: http://paste.ubuntu.com/23607475/

How did you configure your folder permissions?
If you can show them when you are root, maybe those folders don't allow users to see them because of permissions.
Try this (as root) (you can change "tomica" to your desired user):

# chown -R tomica:tomica /media
# chmod -R 775

NOTE: Only devices mounted in /media will show up in your file explorer as normal user.


Cannot find location of permanent aliases. A couple of months ago, I made a few permanent aliases for my bash shell on Ubuntu 14.04. They are actively making my life easier, and I would like to add a couple more to the list, but I cannot find them. My .bashrc file does not actually contain any aliases, just the lines about running ~/.bash_aliases if it exists. And my ~/.bash_aliases file is completely blank.

Run man bash to see what files bash may be looking at.
They include .bash_profile, .bash_login, .profile,
and, if you went privileged, /etc/bash.bashrc and /etc/profile.
Or you could pick a word or a sequence of words from one of your existing aliases
(for example, qwerty aardvark42), and do

grep "qwerty aardvark42" ~/.*
grep "qwerty aardvark42" /etc/*

The file /etc/skel/.bashrc contains the original .bashrc


how to read and use crash reports? A small independent application is crashing on my system (Kubuntu 12.04). I want to manually review the info in the crash report and then email the relevant parts to the developer. The file is located in /var/crash/_usr_bin_appname.1000.crash however I am not sure which tool I need in order to read, edit and save the crash report in a form that I can email to the developer.

Apport Crash reports should be located in:

/var/crash

And when I look at one:

jmunsch@NE-522:/var/log$ sudo cat /var/crash/*.*

ProblemType: Crash
Architecture: i386
Date: Fri Jul 11 20:40:09 2014
DistroRelease: Ubuntu 12.04

This is the program that caused a problem:

ExecutablePath: /usr/sbin/winbindd
ExecutableTimestamp: 1395068066
ProcCmdline: /usr/sbin/winbindd
ProcCwd: /var/log/samba/cores/winbindd
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)

These are the C shared objects / shared libraries that were being used by the problem program:

ProcMaps:
 b6606000-b6622000 r-xp 00000000 08:01 394314     /lib/i386-linux-gnu/libgcc_s.so.1
 b6622000-b6623000 r--p 0001b000 08:01 394314     /lib/i386-linux-gnu/libgcc_s.so.1
 b6623000-b6624000 rw-p 0001c000 08:01 394314     /lib/i386-linux-gnu/libgcc_s.so.1
 b6642000-b664d000 r-xp 00000000 08:01 442782     /lib/i386-linux-gnu/libnss_files-2.15.so
 b664d000-b664e000 r--p 0000a000 08:01 442782     /lib/i386-linux-gnu/libnss_files-2.15.so
 b664e000-b664f000 rw-p 0000b000 08:01 442782     /lib/i386-linux-gnu/libnss_files-2.15.so
 b664f000-b6659000 r-xp 00000000 08:01 442517     /lib/i386-linux-gnu/libnss_nis-2.15.so
 b6659000-b665a000 r--p 00009000 08:01 442517     /lib/i386-linux-gnu/libnss_nis-2.15.so
 b665a000-b665b000 rw-p 0000a000 08:01 442517     /lib/i386-linux-gnu/libnss_nis-2.15.so
 b665b000-b6662000 r-xp 00000000 08:01 442803     /lib/i386-linux-gnu/libnss_compat-2.15.so
 b6662000-b6663000 r--p 00006000 08:01 442803     /lib/i386-linux-gnu/libnss_compat-2.15.so
 b6663000-b6664000 rw-p 00007000 08:01 442803     /lib/i386-linux-gnu/libnss_compat-2.15.so
 b666c000-b6670000 rw-s 00000000 00:0f 11331      /run/samba/messages.tdb
 b6670000-b6679000 rw-s 00000000 08:01 393253     /var/lib/samba/account_policy.tdb
 b6679000-b6682000 rw-s 00000000 08:01 445067     /var/lib/samba/passdb.tdb
 b6682000-b668a000 rw-s 00000000 08:01 394026     /var/cache/samba/winbindd_cache.tdb
 b668a000-b668b000 rw-s 00000000 08:01 442342     /var/cache/samba/netsamlogon_cache.tdb
 b668b000-b668d000 rw-s 00000000 00:0f 11353      /run/samba/serverid.tdb
.
.
.

This shows what the program was doing when the crash happened:

ProcStatus:
 Name:  winbindd
 State: S (sleeping)
 Tgid:  1556
 Pid:   1556
 PPid:  1
 TracerPid: 0
 Uid:   0   0   0   0
 Gid:   0   0   0   0
 FDSize:    256
 Groups:
 VmPeak:       18000 kB
 VmSize:       17880 kB
 VmLck:        0 kB
 VmPin:        0 kB
 VmHWM:     2956 kB
 VmRSS:     2956 kB
 VmData:         400 kB
 VmStk:      136 kB
 VmExe:     7668 kB
 VmLib:     8656 kB
 VmPTE:       44 kB
 VmSwap:           0 kB
 Threads:   1
 SigQ:  2/30418
 SigPnd:    0000000000000000
 ShdPnd:    0000000000000000
 SigBlk:    0000000000000400
 SigIgn:    0000000000001000
 SigCgt:    0000000180014e47
 CapInh:    0000000000000000
 CapPrm:    ffffffffffffffff
 CapEff:    ffffffffffffffff
 CapBnd:    ffffffffffffffff
 Cpus_allowed:  3
 Cpus_allowed_list: 0-1
 Mems_allowed:  1
 Mems_allowed_list: 0
 voluntary_ctxt_switches:   1215
 nonvoluntary_ctxt_switches:    11
Signal: 6
Uname: Linux 3.2.0-53-lowlatency-pae i686
UserGroups:

This could have all your passwords in it be careful with this information:

CoreDump: base64
.
.
.
core dump looks like
aASDFNFOSIefnsldgfnsweifnLEGNi43ng3gSNSDLgn483LNdg43ls
WO$EIGNOIDGNW$INGLSDKGNSLDIGNO$WIGNLRSIGN*RW(GNDKJNLGD
*TNOIDUGNSKJDGNKSDGNSIUEGFBSGUDB*SDgUSHNEUGBSD&GSAUBSD
.
.
.

Well Ubuntu had designed a sequence for you also. It's named as Debugging Program Crash.
Edit  I just heard about a program named as volatility and it's available for Ubuntu, you can install with
sudo apt install volatility

Volatility Framework - Volatile memory extraction utility framework
The Volatility Framework is a completely open collection of tools, implemented in Python under the GNU General Public License, for the extraction of digital artifacts from volatile memory (RAM) samples.

For more information


Chrome indicator not being displayed in the system tray anymore I'm using Ubuntu 14.04 with Unity front end. Last time I checked, google chrome stable used to have an indicator icon on the system tray. If chrome was closed using the cross button, it would minimize to the tray. But now that indicator is not being displayed anymore. Clicking the cross button is completely quitting chrome. How can I bring that feature back?

Start Chrome again and right click on the icon in the system tray. In the opening menu activate the background process.


Is it possible to undo a file rename using Nautilus? Sometimes I want to rename a file that has quite a technical, complicated name by appending a date or some other information to it. Because the name can be complex, it can be problematic if the name is erased. When renaming a file using the "Rename..." option of a file's context menu in Nautilus, how can one undo the changes to a file name? The natural Ctrl+Z does nothing to revert the name, whether one is in the process of typing the new name or whether the name has been saved.

While you are still editing the file name, press Esc to cancel the renaming without applying any changes. (You can still see the original name in the status bar in the lower right corner)

Once you confirmed it, you still can revert it with Ctrl+Z or through the
Menu > Undo Renaming.
This seems even to work after the Nautilus window was closed and reopened.

Screenshot failed with open menu. Sorry! :(

Simply confirm the file name change, then go to Edit → Undo Renaming. ctrl+Z also works but you first have to confirm the file name change.


Good and easy way to share files on local machine I would like to have a directory that has following properties:

Many users can copy files into it
These files can be deleted/changed by these users (user A can delete/modify file that was copied into this directory)

it cant be done using normal file permissions (because permissions are retained on copy).

Here is what I found on the net:

brainstorm idea
blueprint

Some use cases:

Sharing music on local machine
Simple git repository sharing (just make a bare repository writeable to many people) --- i know that there are solutions like gitosis
Allow many developers to modify test instance of php app without giving them root (i guess they would copy files) --- I'm leading a team of nonprofit junior developers and I need to keep that one simple!

EDIT

AFAIK setting SGID bit is not enugh, it only affects newly created files --- and basic workflow for these use cases ivnolves copying and other operations (which cleave file's gid unchanged)

Access control lists

The straight answer is access control lists (ACLs). Yeah, you can find a counterexample, but they're good enough in practice (unlike mere group writability which requires that users think about it all the time). What they do require is that the system administrator (root) define the groups, if you want files to be shared only by a named group (root can choose to delegate, for example by accepting groups from LDAP, but that's another story).

You do need participating users to have a umask of 022. If they create non-world-readable files routinely, this scheme won't work. But if they have a restrictive umask, it's presumably because they don't want to share files anyway.

Enabling ACLs

Ubuntu doesn't enable ACLs by default, so there's a one-time admin requirement. Edit /etc/fstab using your favorite editor, and change every line corresponding to a filesystem where you want to share files: add acl to the options. (Make sure not to change any other line, and not to use an editor that wraps long lines.) Here's an example line with the acl option added:

UUID=5e1ec7ed-face-dead-beef-c011ec7ab1e5  /  ext4  errors=remount-ro,acl  0 1

For the option to take effect the first time, use a command like the following (for each filesystem):

sudo mount -o remount,acl /

Install the ACL tools from the acl package.

Setting up the shared directory

To have files shared by the group mygroup:

setfacl -m group:mygroup:rwx /path/to/shared/root
setfacl -d -m group:mygroup:rwx /path/to/shared/root

If people create files and copy them to the shared directory, the files will be world-readable (because of the umask) and anyone in the group can add and remove files (because the group is group-writable). People can't edit each others' files, but that's a good thing or you'd run into editing conflicts straight away.

If you don't have a unix group, you can add users one by one:

setfacl -m user:bob:rwx /path/to/shared/root
setfacl -d -m user:bob:rwx /path/to/shared/root

Version control

If you do want people to be able to edit files in place, you also need something to prevent editing conflicts. That's version control.

You don't need any of this to share a git repository. You know there are solutions like gitosis, so use them.

You could combine shellholic's solution with a cron job that updates the gid for all files in that folder every 15 seconds or something similar.


How to dim OLED laptop screen? I have x1 yoga OLED and screen is always at max brightness. From what I've read since it's OLED the usual dimming doesn't work but this command is needed:

xrandr --output eDP1 --brightness .5

warning: output eDP1 not found;

ignoring xrandr: Need crtc to set gamma on

I know is an old post but I was having the same issue with a Gigabyte OLED laptop.

Your command is almost good except for the eDP1. If you  run xrandr without arguments, you should find a line with something similar to eDP. In my case was eDP-1-1. Try running your command with this new name. It worked for me.

Try this:

xrandr --verbose |egrep '(Bright|Gamma)'

then

xrandr --output VGA1  --brightness .75

Alternatively

echo "7" > brightness where 7 is the brightness value obtained from

# cat brightness


How can I import output from a command as a command in Bash? System

Linux hosek 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Issue

I need to get output as commands, in a bash script, for storing variables.

Example

sed -n '/# Main configuration./,/# Websites./p' webcheck-$category.cfg | sed '1,1d' | sed '$ d'

This command returns these lines:

email_sender='some@email.com'
email_recipients='another@email.com'

How can I read/run these output/lines as commands in script? Is storing this output to the file and then read it by source command only way?

I tried | source at the end of the command, but it reads only from files.

I tried echo at the beginning, but that had no effect.

Thanks.

As pLumo showed you, you can indeed source them. However, I would recommend against this. If you have something like this:

source <(sed -n '/# Main configuration./,/# Websites./p' webcheck-$category.cfg | sed '1,1d' | sed '$ d')

echo "$email_sender"

Then, a year later when you come back and look at this script, you will have no idea where this email_sender variable is coming from. I suggest you instead change the command and use one that returns only the variable's value and not its name. That way, you can easily keep track of where each variable comes from:

email_sender=$(grep -oP 'email_sender=\K.*' webcheck-$category.cfg)
email_recipients=$(grep -oP 'email_recipients=\K.*' webcheck-$category.cfg)

bash read builtin handles things like this nicely.

read -d '' -r email_sender email_recipients < <(
  grep -oP 'email_sender=\K.*' webcheck-$category.cfg;
  grep -oP 'email_recipients=\K.*' webcheck-$category.cfg
)

read reads lines from stdin into variables. -d '' turns off whitespace splitting, except for newlines. -r disables \ escapes.

cmdA < <(cmdB) works similarly to cmdB | cmdA, except in the former cmdA is run in ~this~ shell, instead of a subshell, which is required for read to work as expected.


Grub error minimal bash like line editing is supported This question is similar to this one but I have a slight modification.

In that question their Ubuntu opens after typing exit in the command window at which point the error is displayed. After selecting again the OS again, the Ubuntu is opening without any issues.

However, for me Ubuntu is not opening - even after clicking exit in the command window, where the error is displayed, and selecting the Ubuntu os again.

please refer to the link provided below if you have come across the same grub error.
        http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/

The above link will provide you a clear solution of the error that you occured and how to sove it.This worked for me and hope it will work for you too.


Overwrite previous output in Bash instead of appending it For a bash timer i use this code:

#!/bin/bash
sek=60
echo "60 Seconds Wait!"
echo -n "One Moment please "
while [ $sek -ge 1 ]
do
   echo -n "$sek "
sleep 1
   sek=$[$sek-1]
done
echo
echo "ready!"

That gives me something like that

One Moment please: 60 59 58 57 56 55 ...

Is there a possibility to replace the last value of second by the most recent so that the output doesn't generate a large trail but the seconds countdown like a real time at one position? (Hope you understand what i mean :))

Basically the same as aneeshep's answer, but uses Return (\r) rather than Backspace (\b) because we don't know if the length will always be the same, e.g. when $sek < 10.

Also, your first echo should use $sek, not hard-code 60.

Finally, note the space after the ....

#!/bin/bash
sek=60
echo "$sek Seconds Wait!"
while [ $sek -ge 1 ]
do
   echo -ne "One Moment please $sek ... \r"
   sleep 1
   sek=$[$sek-1]
done
echo
echo "ready!"

Countdown timer:

MIN=1 && for i in $(seq $(($MIN*60)) -1 1); do echo -n "$i, "; sleep 1; done; echo -e "nnMessage"

and the 'normal' stopwatch is:

START=$( date +%s ); while true; do CURRENT=$( date +%s ) ; echo $(( CURRENT-START )) ; sleep 1 ; echo -n  ; done

control+c to stop


Does anyone know how I can set the safe-volume for headphone in KDE? I dont even know if this is the right term "safe-volume"....but I have just changed to KDE and before I used MATE. In MATE when I plugged in my earphones.....the system immediately set the volume to, more or less, 60%. Which was great to protect my ears from loud noise if I previously had the volume set to 100%.

Is there a way to set this in KDE?

UPDATE. I have found a solution. veromix widget in KDE can be set for headphones.

Alsa is the underlying control for all of the sound on your computer.

The alsamixer command can adjust all of the "gains" on each of the sound devices. It's a command line command and it will present a visual picture.


unable to find except package when I try the command

sudo apt-get -y install gcc make linux-headers-$(uname -r)  except

I get the following error message

E: unable to locate package except.

How to resolve it?

It is "expect" not except

try apt-get install expect

it is there in ubuntu/debian. I did same but it was misspelled by me, :)


How do I overcome these package dependency problems? I upgraded to 11.10 and lost power during the upgrade.  After bringing the box back up, I attempted to continue the upgrade and at one point did a partial upgrade to resolved dependency issues that I thought at the time were related to may failed upgrade.  Now I have a working system for the most part.  The problem is I can not install the 'acroread' package anymore because of dependency errors:

~ $ sudo apt-get install acroread
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 acroread : Depends: nspluginwrapper but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

~ $ sudo apt-get install nspluginwrapper

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nspluginwrapper : Depends: nspluginviewer (= 1.4.4-0ubuntu3)
E: Unable to correct problems, you have held broken packages.

 ~ $ sudo apt-get install nspluginviewer

R

eading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nspluginviewer:i386 : Depends: libgtk2.0-0:i386 (>= 2.8.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I am running 64-bit but it seems acroread needs some 32-bit libraries that are not able to be installed.  In my reading, I've found that there were some changes to multi-arch packages.

Does anyone know how I can repair my system to get around this problem?

Try sudo apt-get install -f. It will probably give some suggestions about removing and installing packages, do what seems reasonable. If that doesn't help, try booting into recovery mode and choosing the "fix broken packages". If that doesn't work... I don't know, I'd reinstall Ubuntu if I were you. (This is a good reason to always have /home on a separate partition!)

The latest release added multiple architecture support.  32 bit libraries are added as 32 bit libraries.  I suspect you need to install the ia32-libs-multiarch.  Try these commands:

sudo apt-get install ia32-libs-multiarch:i386
sudo apt-get check

Caught me by surprize.  Also I found aptitude hasn't been updated to support the change.


Balance of GSM USB Modem using USSD Are there some tools or commands I can use to send USSD codes for checking balance and data balance of the GSM SIM Card in my USB modem (Mobile broadband dongle)?

These are some Apps with USSD balance check support:
Prepaid Manager

Prepaid Manager is an applet for the GNOME Desktop that allows you to check and top up the balance of GSM mobile prepaid SIM cards. It is a simple and minimalistic app with USSD balance check and topup being all that it does. But on the flip side, it is a very dated application and haven't received any new updates in a long time. And if your provider isn't supported, you'll have to manually configure it as described on their homepage. To install, click here:

Or run the following command:
sudo apt install prepaid-manager-applet

Modem Manager GUI

Modem Manager GUI is a complete solution to manage and monitor mobile network based modems. It packs quite a lot of features, and USSD support is just one of them. For a complete list of features, visit their official homepage. To install, click here:

Or run the following command:
sudo apt install modem-manager-gui

V Mobile Broadband

V Mobile Broadband is the original Vodafone Mobile Connect software for Linux rewritten to be compatible with Network Manager by Vodafone's open source Betavine Connection Manager team. Unfortunately, it doesn't seem to be very actively maintained at the moment and isn't available in Ubuntu repos. However, you may try your luck building the project from source. Check out their GitHub page.
Warning: v-mobile-broadband depends on wader, which replaces Ubuntu's default modemmanager. So, if you encounter problems with the new setup and decide to uninstall v-mobile-broadband, don't forget to reinstall modemmanager package.

Sources

In Ubuntu, is there an application like “Huawei Mobile Partner” for broadband dongle modems?

You can use the open source virtual PBX solution FreeSwitch together with its extension GSMopen to send USSD commands [source].

For example, if the USSD code to get your balance is (say) *901#, you would execute:

chat SMS|interface3|ussd|*901#

There are simpler solutions in the other answers of course, but in case you use GSMopen anyway (… for example because it's the only way to do GSM voice calls under Linux …).


Firefox application associations not working in the 'Downloads' window No matter what changes i make to file associations (actions) in the 'Applications' tab in Firefox, they're totally ignored.
For example, i set .wmv and .avi files to open with 'smplayer' but when i download a file and double-click on it (through the 'Downloads' window), it keeps opening with Totem player.

The default file associations through nautilus ('open with' tab) work fine, i.e. i've set smplayer as the default player and when i double-click a video file it open correctly.

I've tried to delete and recreate mimetypes.rdf but that didn't help.

Any ideas on what else should i check?

UPDATE: Ever since Firefox 18, Firefox has GIO support instead of GnomeVFS support, so the workaround below shouldn't be necessary anymore. If anyone's still hitting this issue in recent Firefox versions, this will be unlikely to fix it.

So, take the rest of this post with a grain of salt...

The fix

This fixes it for me:

cd .local/share/applications/
ln -s mimeapps.list defaults.list

and finally, restart Firefox.  When it comes up again, its Download Manager should invoke the correct program (as specified in the .list files referenced above).

Details

Firefox (up through trunk nightlies as of this post) currently uses GnomeVFS API to ask "What app should I use to open files with this mimetype?"  However, GnomeVFS has become deprecated in favor of GIO.

Nautilus (I'm looking at ver 2.32.2.1) now uses GIO to register user-specified default handler-applications (like smplayer in your case).  GIO and GnomeVFS use different files to manage their settings, but the files are apparently in the same format (at least similar enough for the above "ln" hack to work for me. :))

(I've investigated this in a bit more detail on a Mozilla bug report.)

There is nothing to do with firefox.Because the file is already downloaded. if you want to open downloaded .wmv and .avi files with smplayer you can do it like this. right click on any .wmv file and select 'Open With' --> 'Other Application...' and select your favorite application(In this case smplayer) from the list and check the 'Remember this application for "WMV video" files' check box. do the same for .avi files also.

Or if you want to open files from firefox's save dialog box with your desired application just follow this article: http://support.mozilla.com/en-US/kb/Managing%20file%20types
Hope this helps


How can I speed up the GUI? I would like to ask if there are some possibilities for speeding up Ubuntu a little.
For example I do not need windows content to be visible while moving them, nor I need
animations when launching the animations etc.

Thanks guys.
I actually changed to ubuntu 2d and turned off everything there was to be found in bunch of tutorials. I was just wondering if it was possible to find some kind of options like that which are available for ex in windows: fit for best performance.

As for my graphics card I have ATI Radeon X2100 (integrated with mainboard). lspci | grep VGA writes that my card is found and compatibile. I have installed open source drivers, so I assume my card works, however when checking system properties it says that graphics card is undefined. So does it work or not? How to check it?

Does your system has enough hardware resources? You can use light weight desktop manager like LXDE instead of Gnome / Unity. If you still prefer using Gnome / Unity then, you can use it without any effects (you can choose these options from the login screen). That is, Unity 2D:

How do I install and switch to the Unity 2D desktop?
How do I install LXDE / Lubuntu?
How to revert to GNOME Classic Desktop?

apart from above answers u can do the following it helped me a lot :
    install Preload can drastically improve your overall Ubuntu Unity performance.
Preload monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times.  The only downside is that, installing Preload sometimes results in an increase of system boot time. There was a slight increase but nothing significant as far as I am concerned.
 to install Preload it is in Ubuntu repositories by default so you can use synaptic package manager. or just type in ur terminal
 sudo apt-get install preload. and hit enter


"Aw, Snap!" Chrome Web Store (Chromium) While trying to load the Chrome Web Store (I am using Chromium), I get to see the store for a split second before getting the "Aw, Snap!" page. Any suggestions?

I too am experiencing this, but on 14.04 LTS.

I've raised this with Chromium as a bug, as appears connected to the v38 upgrade of Chromium that appeared in the Ubuntu repos on 10th/11th November.

See https://code.google.com/p/chromium/issues/detail?id=432488

Maybe add your details to that bug report, to see where our configurations match.

(To comply with Chromium bug reporting requirements, you should also verify that it's not an issue with an existing extension, or corrupt profile data, by starting Chromium with a blank profile and seeing if the problem still persists)

UPDATE
Appears fixed now in Version 40.0.2214.94 (I'm now on 14.10, but I think the same version is now in the official release for 14.04)

The Chromium bug is still active as there are other issues, but majority of causes seem cured.

I had the same problem with Version 39.0.2171.65 Built on Ubuntu 14.04, running on LinuxMint 17.
Finally I installed Chrome, and then the extensions that I added on Chrome also appeared on Chromium.
If this can help.....


How to kill proccess that spawns several java programs that each take a port I have a program .sh that spawns several child proces like so:

javac *.java
rmiregistry 3300 &
sleep 5
java Node 3300 3001 1 &
sleep 1
java Node 3300 3002 1 &
sleep 1
java Node 3300 3003 1 &
sleep 1
java Node 3300 3004 1 &
sleep 1
java Node 3300 3005 1 &

Now When I run this in a terminal screen I would like to be able to do something like ctr-c to stop this. However when I do it does not release the ports taken by the Nodes. Is there any way to make sure that when I ctr-c the ports are unbound or is there a shortkey that also frees up the ports used by the child processes? Or do I have to use a separate kill command?  Also note that the nodes can and do launch multiple threads themselves (from within java).

The way to kill all the jobs launched by a process is to use the process group ID (pgid). The simplest way to see that it to launch your script in the background:

$ launch_java.sh &
[1] 25649

The number printed above is the PID of the launch_java.sh which is also the group ID since that launches the rest. Alternatively, you can find it through ps:

$ ps -a -o pgid,command | grep java
25649 java Node 3300 3002 1

The 1st field is the pgid. Once you have that, you can use kill to kill it and all its children:

kill -TERM -25649

As explained in man kill:

          -n     where n is larger than 1.  All processes in process group
                 n are signaled.  When an argument of  the  form  '-n'  is
                 given,  and it is meant to denote a process group, either
                 a signal must be specified first, or the argument must be
                 preceded  by a '--' option, otherwise it will be taken as
                 the signal to send.

use ps -aef or ps -aux command to find PID of  parent of children and kill it by kill -9 PID .


My screen goes black when loading youtube I'm using ubuntu 14.04. Everytime I load youtube (and some other sites that use flash) the screen goes black.

If you frequent a lot of flash sites, and you have no issues with using non-free software (not as in price, but as in source), you can use pepperflash with chromium.

From Software & Updates make sure that (multiverse) is enabled

Launch a terminal (ctrl+alt+t)

 sudo apt-get update
 sudo apt-get install pepperflashplugin-nonfree

It will take a little bit to download the files and install. I usually keep chromium closed while installing, but I'm not sure if it is required. With pepperflash you should have no problems with flash sites on chromium.

try this. worked for me. http://www.solveyourtech.com/turn-hardware-acceleration-google-chrome/

I'm using ubuntu 14.04. Everytime I load youtube (and some other sites that use flash) the screen goes black.


How do I stop Apache2 from automatically starting on boot? How do I stop Apache2 from automatically starting on boot? I can't seem to find an option that disables the automatic start-up when I turn on the machine.

you could simply disable it by:

sudo update-rc.d apache2 disable

and then if you would like to enable it again:

sudo update-rc.d apache2 enable

depending on the project i am working on, it is  handy to have the service conveniently available, if i wish to re-enable it.

Thought I'd just add to the answers by @gsullins and @tomodachi, for future readers who used the accepted answer.

If you've already used:

sudo update-rc.d apache2 remove

You can use the argument defaults to add apache2 back into the autostart

sudo update-rc.d apache2 defaults

Then you're able to enable/disable

sudo update-rc.d apache2 disable
sudo update-rc.d apache2 enable


sudo doesn't ask for a password, even after multiples reboots I haven't edited my sudoers, but I don't have to enter the password when running sudo in the command line. I can run any sudo command without entering the password, by just opening the terminal, even after rebooting the system, how can I stop this?

uid=1000(ktcool) gid=1000(ktcool) groups=1000(ktcool),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare)

Use visudo to edit your sudoers file and look for NOPASSWD: - that's the directive disabling the user password prompt (you NEVER have to enter the password of the target user, i.e. the root password). Simply removing that directive (including the colon at the end) should require you to re-enter your password to use sudo (unless you used it recently, then it's still cached, you can clear this using sudo -k)

sudo -i
is the way to go if
you don't want to be typing a
password every now and then while
doing modifications in your
system (or other systems), and
you don't want to modify any
system files.
It will switch you toroot  using
your sudo  user password,
when you close the console or
type exit you are back to your
normal user.
hopes this works ,
regards:)


Root password needed When I first installed Ubuntu 13.04 from a USB stick I was asked to fill in for user username and password so I set one on my own. When I run Ubuntu I click log in but it automatically logs me in as user so I can't type my username. As a result, in order to run certain apps or set up my network I'm asked to type the root password for authentication. I don't wanna log in as a superuser. Please note that I'm a newbie to Ubuntu.

Okay, there is a difference between your password and the root password (the password of the account "root").

When you first installed Ubuntu, you specified your username (let's say you chose Ele) and your password; this is the password that you would use to log in. Since you have Ubuntu to log in automatically, you won't be asked for this password when booting Ubuntu.

The default installation of Ubuntu makes your user an admin; that is, it makes you able to install and remove applications and all that. The password that is asked when you install/remove components is usually your password, Ele's password. Take a look at these screenshots:

This program is asking you to Enter your password, so this would be the password of Ele, that you used to install Ubuntu, which is the same password you use to log in.
If you did not set a password when you were installing Ubuntu (and I think this is where your problem is Ele), then you need to set a password for your user. To do so, simply type the following command (commands can be typed in a terminal which you can open by Ctrl+Alt+T):

passwd

And enter your new password. Note: you won't see any stars *** or anything; don't worry, just continue typing.

Now, let's look at another kind of prompt that could ask you for a password:

This program is asking you to Enter the administrative password, which is the root password, the superuser password, the password of the account "root". This password is NOT set by default.
It is generally not advisable to set a root password unless you really need to, because it essentially opens doors to lots of accidental, harmful tasks. But, if you really want to set the root password, you would do this:

sudo passwd root

It will first ask you to enter your password, in order to carry out this command (because you typed sudo). Then, it will ask you to specify a new root password.

If your account does not have a password set in the first place, this command will not work, because you are performing a sudo command, which will require your password first.

Note1: if you have set a root password and you want to remove it and go back to how it was, do this command:

sudo passwd -dl root

It will, again, ask you for your password, because you are doing a command that starts with sudo. This command deletes the password and locks the root account.
Note2: you should rarely see this second screenshot, the one that's asking for the root password. Usually, you'll be asked to enter your user's password. That is how Ubuntu is set up, so that you don't need to log in as the root (superuser) to perform administrative tasks, you only "borrow" the root privileges by using the command sudo.

Type the following in the command line:

  sudo su

Then generate new password for root:

  passwd


Why is Ubuntu Mate using Google DNS servers? Update: Looks like it's avahi-dnsconfd that's adding 8.8.8.8 and 8.8.4.4 to my /etc/resolv.conf file. I found this in /var/log/syslog:

Jan  4 17:00:21 freewill nm-dispatcher: req:1 'up' [ens33]: start running ordered scripts...
Jan  4 17:00:21 freewill avahi-dnsconfd[3579]: New DNS Server 8.8.4.4 (interface: 2.IPv4)
Jan  4 17:00:21 freewill avahi-dnsconfd[3579]: New DNS Server 8.8.8.8 (interface: 2.IPv4)

How can I make Ubuntu fetch DNS servers from DHCP only and not use Avahi (mDNS) for fetching DNS servers?

I am testing out Ubuntu Mate 16.04.1 LTS, and having trouble because something keeps adding Google's DNS servers to /etc/resolv.conf:

josh@freewill:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.100.1.1
nameserver 8.8.4.4
nameserver 8.8.8.8
search my.domain.name

I don't want 8.8.4.4 nor 8.8.8.8 in /etc/resolv.conf because that breaks my local network: My local DNS server (10.100.1.1) serves DNS for local NATed services which don't have public DNS records.

If I manually edit /etc/resolv.conf and remove the Google DNS nameservers, they get added back again by a reboot or resolvconf -u

NetworkManager does not have 8.8.8.8 nor 8.8.4.4 listed under Additional DNS Servers so that's not the cause.

The system has three ethernet interfaces, only one is connected. It's on a network with a DCHP server that provides DNS information. Contents of /etc/network/interfaces is:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

I have run grep -R '8\.8\.8\.8' /etc and there's no other reference to 8.8.8.8 in any config file. Nothing under /etc/resolvconf refers to Google DNS servers, either!

Why is Ubuntu Mate adding Google DNS servers to /etc/resolv.conf and how can I make it stop? For now, I've done sudo rm /etc/resolv.conf; sudo cp /run/resolvconf/resolv.conf /etc/resolv.conf; sudo chattr +i /etc/resolv.conf but I know that in the future this will bite me...

After much investigation (with help from @Terrance) I discovered that Ubuntu Mate is using avahi-dnsconfd and some other device on my network (possibly a Raspberry Pi) was broadcasting Google's DNS servers over mDNS / Bonjor / Avahi.

avahi-dnsconfd was picking this up and when avahi-dnsconfd.action ran, it was calling resolvconf to add the DNS servers is discovered over mDNS to /etc/resolf.conf

I disabled avahi-dnsconfd using:

sudo systemctl stop avahi-dnsconfd.service
sudo systemctl disable avahi-dnsconfd.service

for good measure I also edited /etc/default/avahi-daemon and set AVAHI_DAEMON_DETECT_LOCAL=0 (because I know my network doesn't have unicast DS servers that serve the .local TLD)

You don't edit the /etc/resolve.conf file directly, it's done when you call resolvconf - u.

You should edit the file:

/etc/resolvconf/resolv.conf.d/head

instead.

Make sure that you create a backup first in case anything goes wrong:

sudo cp /etc/resolvconf/resolv.conf.d/head /etc/resolvconf/resolv.conf.d/head.backup

Then edit it to add your DNS nameservers. This is my one, using openDNS (recommended):

bitofagoob@me:~$ cat /etc/resolvconf/resolv.conf.d/head

    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 208.67.222.222
    nameserver 208.67.220.220

Then run resolvconf - u and the nameserver info will be copied from the /etc/resolvconf/resolv.conf.d/head file to the /etc/resolv.conf file.

The system needs to set it up this way for it to be valid.


Installing Chrome OS Desktop Environment on my 32bit computer This question says that it's possible to install Chrome OS as a desktop environment to Ubuntu but it's only available for 64bit PCs. Would it work on my 32bit PC? I just want to try it. It doesn't need to be perfect. What are the limitations of such an installation?

first install 64-bit ubuntu, 32-bit or not

then

http://www.omgubuntu.co.uk/2012/11/how-to-run-chromeos-in-ubuntu

fix issues by

Google-chrome which is needed to run this build of chromium os must share some features, including sandbox(a hunch). Open Nautilus using sudo power. Browse to filesystem to /opt , there are two folders of our concern chromeos and google. Open google in new tab copy all the contents of /opt/google/chrome folder and paste into /opt/chromeos. nautilus will give you the folder and file conflict notification. MERGE FOLDER BUT SKIP FILES.It will only copy missing files. Now you have chrome-sandbox in chromeos. Now exit and remove the line "--disable-setuid-sandbox /" in chromeos file located in usr/sbin/chromeos if you have edited before. Delete Chrome-os folder in home and start a fresh copy typing chromeos in terminal.

creds to paudelanup


How to display network traffic in the terminal? how to display the actual network traffic (wireless) in a terminal?

Additionally: Is it possible to add this info to the chart of top?

Here are some nice tools in the Ubuntu repositories for command line network traffic monitoring:

bmon -  shows multiple interfaces at once

slurm - has nice colored graphs

tcptrack  - A favorite. Tells how much bandwidth is being used and also what protocol (service/port) and destination the transmission is taking place to.
Very helpful when you want to know exactly what  is using up your bandwidth

For me, Slurm worked well:

Install:

sudo apt install slurm

List interfaces

ifconfig

Monitor interface (change eth0):

slurm -i eth0


Ubuntu 13.04 battery indicator problems I installed ubuntu 13.04 with no problems but in the last 2 days the power indicator is screwing up. it says charging when i pull the cord out and when i put it in sometimes it says no charging. Sometimes it charges and sometimes it doesnt. just today my laptop died wile plugged in. with low screen brightness and no programs open and almost nothing running in the backround. please help

I just had the same problem today and was able to fix it by removing the hdd from the system and then putting it back in.... (i tried about 20 different things) but it worked and my battery is now happy and healthy charging away again

you could try deleting or overwriting your battery stats, normally you can do this by putting your computer on the lowest power settings and litting it tottally die.

then put it back on normal power, and charge it to 100% with the laptop on (i reccomend an hour longer than after it says 100%) and then let it discharge again

note there is no garuntee on this and i suggest trying other answers first as this takes ages and sometimes (more than most in my experience) does not work haha


How to install cmake 3.2 on Ubuntu Default cmake version of 14.04 is 2.8. How can I install cmake 3.2 and replace the default one? Or how can I upgrade 2.8 to 3.2?

Either use a PPA or compile it yourself:

Installation by a PPA (Upgrade to 3.2)

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update

When cmake is not yet installed:

sudo apt-get install cmake

When cmake is already installed:

sudo apt-get upgrade

Compile it yourself

Currently, the latest version is 3.2.2, the following instructions based on this version. You should therefore check this URL and adjust the file name accordingly.

sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
tar xf cmake-3.2.2.tar.gz
cd cmake-3.2.2
./configure
make

Now you can have to choose an installation type to decide, I recommend installing with checkinstall, as this creates a DEB package.

With checkinstall

sudo apt-get install checkinstall
sudo checkinstall

With make install

sudo make install


Installing Windows after Ubuntu Currently I have Ubuntu 14.04 LTS installed on my PC, but unfortunately there are some programs, which do not run on Ubuntu even with Wine and there are no good alternatives available.

Therefore I want to additionally install Windows now.
This [https://help.ubuntu.com/community/WindowsDualBoot] article and many others recommend to first install Windows and then Ubuntu, an option that I do not have unless I can somehow back-up and transfer this current system.

It speaks of some advantages to virtualizing the other OS, but due to lack of knowledge, I do not really know what that means and what would be the best option in my case.

I plan to use Ubuntu 95% of the time and Windows only for few programs, that don't run on Ubuntu.

What do you recommend and how do I go about it?

Best regards and thanks for any advice!

Markus

Do not be afraid of virtualization. I know it sounds scary, but I promise it is not. Here are the steps:

Install virtual box: sudo apt-get install virtualbox
Run virtual box: virtualbox command.
Click on "New". The default will be Microsoft Windows, I believe. Choose the correct version.
Click through the wizard. It is very simple. For RAM, it depends how much your system has. For Windows, maybe give 4GB RAM if you can afford.
At some point, you will need to select the Windows install image. This should be an .iso that you have saved on Ubuntu somewhere of your Windows installation disk. That is the .iso that you want to boot to when you first start the virtual box that you created.

Hopefully you don't need Windows for long :). It is such a great feeling when you no longer depend on that last program. But I know it is difficult and sometimes beyond your control. I just wish you good luck that the day arrives.

There are some of the stuff you will need Windows so I will say better to have Windows. If you install some image in VM Player - it has limited license of 6 months and not everything works as expected within O/S image.
Other option - buy an inexpensive Windows laptop - there are many within $400 range.
Best bet is to install Windows along side Ubuntu. Make sure that you are backing up all your important data.


How to make a sound once a process is complete? I have started a long process through a terminal. Is it possible to make the Ubuntu terminal make a sound once the process is complete? This way, I don’t need to keep checking, but will instead be notified through a sound.

I use

make; spd-say done

Replace "make" with whatever long-running command you use.

I created a simple and almost-native script that plays Sound and displays a Notification with a Given Message and Time for Ubuntu (Gist):

#!/bin/sh

# https://gist.github.com/John-Almardeny/04fb95eeb969aa46f031457c7815b07d
# Create a Notification With Sound with a Given Message and Time
# The Downloaded Sound is from Notification Sounds https://notificationsounds.com/

MSSG="$1"
TIME="$2"

# install wget if not found
if ! [ -x "$(command -v wget)" ]; then
    echo -e "INSTALLING WGET...\n\n"
    sudo apt-get install wget
    echo -e "\n\n"
fi

# install at package if not found
if ! [ -x "$(command -v at)" ]; then
    echo -e "INSTALLING AT...\n\n"
    sudo apt-get install at
    echo -e "\n\n"
fi

# install sox if not found
if ! [ -x "$(command -v sox)" ]; then
    echo -e "INSTALLING SOX...\n\n"
    sudo apt-get install sox
    sudo apt-get install sox libsox-fmt-all
    echo -e "\n\n"
fi

# download the noti sound if this is first time
# add alias to the bashrc file
if ! [ -f ~/noti/sound.mp3 ]; then
    echo -e "DOWNLOADING SOUND...\n\n"
    touch ~/noti/sound.mp3 | wget -O ~/noti/sound.mp3 "https://notificationsounds.com/wake-up-tones/rise-and-shine-342/download/mp3"
    sudo echo "alias noti=\"sh ~/noti/noti.sh\"" >> ~/.bashrc
    source ~/.bashrc
    echo -e "\n\n"
fi

# notify with the sound playing and particular given message and time
echo "notify-send \""$MSSG\"" && play ~/noti/sound.mp3" | at $TIME

How To Use?

First Run - Setting Up:

Create a new Directory at your home and call it noti

mkdir ~/noti

Download noti.sh  and extract it to the above noti dir.
Open Terminal and Change Directory to noti

cd ~/noti

Make noti.sh executable by issuing:

sudo chmod +x noti.sh

Run a Test like this:

sh ~/noti/noti.sh "Test" "now"

Examples

noti "Hello From Noti" "now +1 minute"
noti "Hello From Noti" "now +5 minutes"
noti "Hello From Noti" "now + 1 hour"
noti "Hello From Noti" "now + 2 days"
noti "Hello From Noti" "4 PM + 2 days"
noti "Hello From Noti" "now + 3 weeks"
noti "Hello From Noti" "now + 4 months"
noti "Hello From Noti" "4:00 PM"
noti "Hello From Noti" "2:30 AM tomorrow"
noti "Hello From Noti" "2:30 PM Fri"
noti "Hello From Noti" "2:30 PM 25.07.18"

For Notifying The Finish of Process (example)

sudo apt-get update; noti "Done" "now"


How can I tell Ubuntu to do nothing when I close my laptop lid? I would like closing the laptop lid to be a no-op. How can I do that?

For 13.10 - 20.04.1:
To make Ubuntu do nothing when laptop lid is closed:

Open the /etc/systemd/logind.conf file in a text editor as root, for example,
 sudo -H gedit /etc/systemd/logind.conf

If HandleLidSwitch is not set to ignore then change it:
 HandleLidSwitch=ignore

Make sure it's not commented out (it is commented out if it is preceded by the symbol #) or add it if it is missing,

Restart the systemd daemon (be aware that this will log you off) with this command:

sudo systemctl restart systemd-logind

or, from 15.04 onwards:
sudo service systemd-logind restart

See also: Ubuntu Server 13.10 now goes to sleep when closing laptop lid
For GNOME Users:
If you are using GNOME (the default in 18.04+), then you can do this easily without changing system settings by using the "Gnome Tweak Tool". It can be installed from the Ubuntu Software Store (It is called GNOME Tweaks).  Or if you prefer the console: sudo apt-get install gnome-tweak-tool
Run it after installing, then under Power, Turn off the setting to do nothing when lid is closed. I tested this on Ubuntu 18.04 and it works.

For 12.10:

Edit /etc/UPower/UPower.conf and add IgnoreLid=true to the bottom.

This method no longer works in Saucy. I am unsure about 13.04.


USB-live does not save files between sessions I created a USB-stick with Ubuntu, using the recommended tool "Startup Disk Creator" and the image for Ubuntu 13.10. The very simple interface looks like this:

There can't be much to misunderstand in this GUI. I have chosen to create a USB stick with a live version of Ubuntu, which will save files and settings from session to session, on the USB drive, right?

Well, it just doesn't save anything. I go in, create a file on Desktop, restart and it's gone.

I did the whole procedure three times, i.e. first creating the USB, then testing if I could save.

Have I misunderstood something?

Bug 1159016 is for broken presistence on UEFI machines.

The live media has two boot mechanisms, syslinux for non-UEFI and grub for UEFI machines.

The persistence mechanism is simply a word "persistent" on the kernel boot command line, and while the syslinux boot works with persistence, the word was missed in the grub.cfg file.

You can add it yourself. Edit the grub.cfg (usbpen/boot/grub/grub.cfg) file and add persistent just before the file= on the vmlinuz lines.  And yes, your desktop will be part of the things which will be saved when things are working.

E.g.

menuentry "Try Ubuntu without installing" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi persistent file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
    initrd  /casper/initrd.lz
}

ISO formats changed about 14.04, making changes as suggested above more difficult (editable FAT filesystems can no longer be used on the USB).  The best current way to make a persistent USB is to use the mkusb tool from mkusb download site.  The mkusb-installer should set things up for you.

Live USb is actually an installation media. It has a standart setup.

You should use it to install Ubuntu in a different USB/HDD. When you choose to try it, it always open as a fresh ubuntu from a standart setup.

At the picture I saw, You created a live (installation media) from the .iso file to the Kingston Data Traveller.

Now you should (can) use it to create Ubuntu OS with the install choice to a new usb.


wifi problem on MacBook pro early 2015 running Ubuntu LTS 16.04 Abstract:

Ubuntu detects wireless interface, but menu does not show any wireless network.

Details:

I have installed Ubuntu on MacBook pro early 2015. The appropriate drivers for my wifi are installed (according to this question WIfi Issues with Macbook Pro Retina Early 2015 (12,2) on Ubuntu 15.04). My device is

~$lspci -nn | grep 0280
03:00.0 Network controller [0280]: Broadcom Corporation BCM43602 802.11ac Wireless LAN SoC [14e4:43ba] (rev 01)

and it seems, that Ubuntu sees wireless interface

~$ sudo lshw -C Network
*-network
   description: Network controller
   product: BCM43602 802.11ac Wireless LAN SoC
   vendor: Broadcom Corporation
   physical id: 0
   bus info: pci@0000:03:00.0
   version: 01
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list
   configuration: driver=wl latency=0
   resources: irq:18 memory:c1400000-c1407fff memory:c1000000-c13fffff
*-network
   description: Ethernet interface
   product: NetXtreme BCM57762 Gigabit Ethernet PCIe
   vendor: Broadcom Corporation
   physical id: 0
   bus info: pci@0000:0a:00.0
   logical name: ens9
   version: 00
   serial: ac:87:a3:38:54:a8
   size: 1Gbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 duplex=full firmware=57762-a1.10 ip=130.223.51.185 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
   resources: irq:19 memory:cda00000-cda0ffff memory:cda10000-cda1ffff memory:c1a00000-c1a0ffff

Therefore I do not get, why the menu with possible connection does not show any wireless networks (only Ethernet cable). I also installed next to unity KDE, and in the both cases, the list is blanc.

I also tried to install what is recommended here, Ubuntu can't detect wifi networks on macbookpro 13.3 but without any change of output (it is different wifi if I understood right, not wonder it has not worked).

I reinstalled OS and then this solution https://askubuntu.com/a/624746/492421 have worked. I am sorry, but my question is a duplicate.

Connect to the internet using LAN/Phone USB tethering. Then issue the following commands.

sudo apt install b43-fwcutter firmware-b43legacy-installer
sudo modprobe brcmfmac
sudo modprobe brcmutil
sudo modprobe brcmsmac


Beep in shell script not working? I'd like to use a beep sound in a shell script. Unfortunately none of the methods I found via Google work for me.

I tried

echo -e '\a'

echo -ne '\007'

and the command beep after I installed it via apt.

What could be the reason?

Not being a fan of the pcspkr beep, I use a beep from one of the system sounds with the installed pulseaudio server's paplay command.

First find a sound you like (you can browse /usr/share/sounds for some available ones for example) and create a reference to it

export BEEP=/usr/share/sounds/ubuntu/ringtones/Harmonics.ogg

Then have it available as a command

alias beep='paplay $BEEP'

Now just run beep whenever you need it. For example, to alert you when a command is finished:

find . | grep treasure ; beep

It might be to late BUT, for the guy in the future looking for this:

printf '\x07'


Ubuntu installation issue I am installing Ubuntu 12.04 LTS. It is stuck at a point where it says "Downloading Language Packs..." Time in it is randomly changing. It has been over 2 hours, since it is downloading.
Is there any way to skip this downloading with out terminating installation.

Further info: I am installing through DVD, if that matters at all, and  have active internet connection that is working good (checked it in my friend's laptop, since it is shared, download speed about 50kbps)

I got the solution...
At the place where it says "Downloading language packages", there is a arrow to the left of message.

By clicking on array, there appears a small window at bottom and a bottom at right most side at the level of "Downloading language packages" that says "Skip", by pressing that button one can skip that step.

I cant paste a screen shot,as system is installing Ubuntu.

I recently installed Ubuntu 12.04 and it took me about an hour to completely download and install those language packs. I have connection with downloading speed of 100Kbps. I think you'll have to wait for the language packs to download. It's very irritating but you have to bear it (like I did) :)


How to re-enable the systray (indicator panel) after latest updates After Suttleworth's bizarre decision to hard-code the whitelist for the systray, a developer created a patch to allow people to continue to use applications that use the systray with Ubuntu.

Unfortunately, the patch's creator is now too busy to maintain it. This means that since the latest updates earlier this month, the whitelist no longer works (again).

Canonical's "solution" was to instruct us to raise a bug report for each application that doesn't work, but of course those bug reports have been ignored.

So…

How can I re-enable the systray? Its absence is creating difficulties for me.

I am using Ubuntu 14.04 64-bit.

Answering the question by @GGleb

Command

gsettings list-recursively net.launchpad.indicator.systemtray

Results

net.launchpad.indicator.systemtray disable-indicator false
net.launchpad.indicator.systemtray started-the-first-time false
net.launchpad.indicator.systemtray static-x 0
net.launchpad.indicator.systemtray static-y 0
net.launchpad.indicator.systemtray tray-is-static false

I notice that tray-is-static toggles when I middle-click the icon.

Try using the Indicator Systemtray Unity (for Ubuntu 14.04 - 15.04):

Indicator, when clicked, shows the tray.

Also there is a display mode "separately from the indicator" - on top of the panel like a dock. In this mode, the position can be changed by scrolling the mouse over the indicator. To change the mode position: press the middle mouse button on the indicator.

Installation in the terminal:

sudo apt-add-repository ppa:fixnix/indicator-systemtray-unity
sudo apt-get update
sudo apt-get install indicator-systemtray-unity

You must then log out and again log in using your user.

https://github.com/GGleb/indicator-systemtray-unity

To remove this package (with its configuration files!!!):

sudo apt-get --purge remove indicator-systemtray-unity

I suspect this would not be recommended (for the reasons given below) but here's my way around things (assuming that you're already using gurqn's systray-trusty ppa):

sudo apt-get -s purge unity unity-services libunity-core-6.0-9

sudo apt-get install unity=7.2.4+14.04.20141217-0ubuntu1-systray-ppa1 libunity-core-6.0-9=7.2.4+14.04.20141217-0ubuntu1-systray-ppa1 unity-services=7.2.4+14.04.20141217-0ubuntu1-systray-ppa1

sudo apt-mark hold unity unity-services libunity-core-6.0-9

The last command should ensure that these packages are not updated without your explicit consent in the future (you'll still have the option to mark the packages for install manually in the update-manager).

Be warned: doing this may break things in the future, and you may miss out on important security updates.  Personally, though, to get a functional systemtray back, it's a risk I'm willing to take.

Note that if you've installed @GGleb's indicator app previously, you'll also need to remove that package, and then manually delete a file:

sudo rm -rf /etc/profile.d/UNITY_PANEL_TRAY_DISABLE.sh

(this file should be automatically removed when uninstalling that package, but for some reason is not ...)


how to make Samsung CLX-3185 scanner-part work? I have the Samsung CLX-3185 printer/scanner. The printer-part works fine using 3175 drivers found by (Xubuntu/XFCE) printer setup wizard. However it does not seem to recognize the scanner part. Xsane does not find the scanner. Is there a setup HOWTO for this anywhere that I could use?

Instructions how to set-up samsung CLX-3185FW.

Source: baltas125@ubuntuforums. Originally taken from:  bchemnet.

From the 1st link:

After executing instructions I have successfully installed CLX-3185FW over the network. It prints and scans over the network. I have made it on Ubuntu 11.10, 32bit.

Before installing you MUST REMOVE any other previously installed drivers for Samsung.

Step 1 (edit sources):

sudo gedit /etc/apt/sources.list

Add lines:

#samsung drivers
deb http://www.bchemnet.com/suldr/ debian extra

Step 2 (install authentication key) :

wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -

Step 3 (update sources):

sudo apt-get update

Step 4 (install packages):

Open ubuntu software center and install one by one all packaged that start with samsungmfp-, excepting:

first install packages which do not have the word "legacy";
do not install packages which offer you to remove any other packages;
Do not install samsungmfp-parallel it should only be installed if your printer is actually connected via a parallel port;

Step 5a (check if you are in lp group). Run in Terminal:

cat /etc/group | grep lp

If your account name is next to lp, everything is ok, else add yourself to lp group, e.g. execute Step 5b.

Step 5b (add yourself into lp group if needed):

sudo usermod -a -G lp USERNAME

(more information about groups here)

That's it! Now you can search for your printer in network and add it as clx-3180 series and it will work.

P.S. Previously I have made some changes to some files. But I do not know if it has any impact. If you have executed the five step above and still no luck, try making those changes:

/etc/sane.d/xerox_mfp.conf

lines added

#Samsung CLX-3170fn & CLX-3175FW
usb 0x04e8 0x342a

In ...

/etc/sane.d/xerox_mfp.conf

lines added:

#Samsung CLX-3185FW
usb 0x04e8 0x343d

In ...

/lib/udev/rules.d/40-libsane.rules

lines added:

# Samsung CLX-3185FW
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="343d", ENV{libsane_matched}="yes"

You don't need all that stuff. Add the repo, then:

apt-get update

And install these 2 packages:

sudo apt-get install samsungmfp-scanner samsungmfp-netdiscovery

That's all you need.. at least for Ubuntu 12.04 that is all you need. I successfully printed a test page and scanned a document.


How can I remove Ubuntu 11.04? When I turn on my computer there is no boot menu to chose Windows XP or Ubuntu I don't know why. I can't access Windows XP and this Ubuntu 11.04 is slow on my computer & I don't want it. In Windows XP there is no in add/remove programs entry for Ubuntu, and my local disk where is installed Ubuntu is now smaller. I cannot recover that free space and I cannot delete that partition, so I need help.

You need to tell us how you installed Ubuntu. If you  did a 'wubi' install 'inside' windows using the exe on the cd, then there Should be a entry for ubuntu in the add/remove program settings tool in windows.

If you booted a cd and did a normal install, then you would need to delete the ubuntu partitions, and reinstall the windows bootloader.  Then resize or repartition the hard drives to get the space back where windows can use it.

Use TestDisk
It has a boot disk option that will re-write the MBR
http://www.cgsecurity.org/wiki/TestDisk_Download


Unable to install DIA on Ubuntu 13.04 I tried to install DIA from the Software Center and from the Terminal (dia and dia-gnome), but it didn't seem to work. I couldn't find DIA in the Application Menu and I also couldn't find it by searching.

Any ideas?

Dia cannot be found in the application centre. You have to launch by typing the command dia from the terminal or from Alt+F2.

I think this is a bug in 13.04.

Hope this helps.

Dia is an editor for diagrams, graphs, charts etc. There is support
  for UML static structure diagrams (class diagrams),
  Entity-Relationship diagrams, network diagrams and much more. Diagrams
  can be exported to postscript and many other formats.

This package contains the GNOME version of Dia.

To install Dia-Gnome

Source:Ubuntu Apps Directory


Ugly fonts in NetBeans Is there a way to fix the ugly fonts in NetBeans that REALLY WORKS on Ubuntu 13.04 and NetBeans 7.3.1? I tried everything I could find on this topic but nothing worked for me.

Please don't tell me to do any of these, as I've tried them all:

https://askubuntu.com/a/65194/31521 (fonts are bigger but still ugly)
https://askubuntu.com/a/60920/31521 (doesn't change anything, same with _JAVA_OPTIONS)
https://netbeans.org/bugzilla/show_bug.cgi?id=215785#c7 (fixed in NetBeans 7.2.1)
Switch to Oracle JVM (absolutely no changes)

Also I'm not interested in just changing the editor font as that doesn't really solve the problem.

This should fix ugly fonts in Eclipse/Netbeans/Jetbrains:

sudo apt-get remove fonts-unfonts-core

Best,
M

Simplest way I found is using the Nimbus lnf through the build in Options

Options > Miscellaneous > Windows > Preferred look and feel: [ Nimbus ] (needs restart)

Don't try to change the lnf with the --lnf Nimbus command line switch. Also do not use the Dynamic Look and Feel Changer Plugin, which will destroy the Coloring of Nimbus in netBeans


Unknown encoder 'libvo_aacenc' I get this error when I try to convert an wmv to 3gp using this command:

ffmpeg -y -i "inputvid.wmv" -vf scale=352:288 \
       -f 3gp -vcodec h263 -r 15 -b:v 200k \
       -acodec libvo_aacenc -ac 2 -ar 32000 -b:v 64k \
       "outputvid.3gp"

(The command is actually derived from  Mobile Media Converter 1.8.2 which recently fails on each conversion and I'm trying to troubleshoot.)

I have made the latest stable ffmpeg (version 0.10.8-7:0.10.8-1~raring1) using these instruction.

I appreciate your hints to either install libvo_aacenc, or some other codec to make conversion possible.

This solves it for me:

sudo apt-get install libavcodec-extra

Maybe this post has an answer, but for Googlers...

It's Easy
Only Follow the next instructions
Open the terminal
cd ~
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
export PKG_CONFIG_PATH
./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" \
   --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs="-ldl" --enable-gpl \
   --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
   --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab --enable-libvo-aacenc --enable-version3
(IN this part you have been enabled the libvo-aacenc & the version 3 of the same)

make
make install
make distclean
hash -r
Your converter is ready.


How to run "sudo apt-get update" through proxy in commandline? In my office i want to update and download through (wget) and here they are using proxy?

How can i do this by commandline?

In some releases sudo is configured in such a way that all environment variables all cleared when running the command. To keep the value for your http_proxy and fix this, you need to edit /etc/sudoers, run:

visudo

Then find a line that states:

Defaults env_reset

and add after it:

Defaults env_keep = "http_proxy ftp_proxy"

Things will start working as expected.

Thanks to kdogksu in the Ubuntu Forums for finding the solution for this.

In order to not only fix apt-get but also graphical X11 utils as e.g synaptic,mintintall, ...) the following line in /etc/sudoers should do the job :

Defaults env_keep = "http_proxy https_proxy ftp_proxy DISPLAY XAUTHORITY"

If it is a temporary configuration, you could try this:
sudo bash -c 'http_proxy="http://< proxy_host >:< proxy_port >/" apt-get update'

You need this, because the environment variable needs to be defined for the "root" account. Doing and export before should not work.

For a permanent configuration, you will have to modify a system file. This is already described in the following answer about How to check Network proxy is really applied?.


Meizu Pro 5 Ubuntu edition - temperature units How I can change temperature units from Fahrenheit to Celsius on the Weather scope?

The unit of temperature in the weather scope and the weather part in the today scope is related to the language setting of your phone (System Settings - Personal: Language & Text - Display language).

There is only one issue, and this has been reported as a bug already (as pomsky pointed out in his comment), for which however a work-around is available:
Up until OTA-8, choosing English-Canada gave us the chance to have the phone set to English and still showing temperatures in Celsius. Since OTA-9 this is not working anymore.

Work-around, if you want your phone to be set to English using Celsius as unit for temperature: Switch your language to English-Australia.

Go to your apps scope, click on weather, go to the gearwheel symbol in the upper right corner.

You can find the Celsius setting under 'units.


Error When Installing Anything Every time i try to install wine in the terminal i get these errors

Reading package lists... Done
Building dependency tree
Reading state information... Done
wine is already the newest version.
The following packages were automatically installed and are no longer required:
  acpid:i386 dh-apparmor libc6-dev:i386 libmail-sendmail-perl
  libsys-hostname-long-perl libxv1:i386 libxvmc1:i386 linux-libc-dev:i386
  make:i386 po-debconf
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up libssl1.0.0:i386 (1.0.1f-1ubuntu9.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package libssl1.0.0:i386 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libpam-gnome-keyring:amd64 (3.10.1-1ubuntu7.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package libpam-gnome-keyring:amd64 (--configure)
 subprocess installed post-installation script returned error exit status
Errors were encountered while processing:
 libssl1.0.0:i386
 libpam-gnome-keyring:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

And when i try to install it in the Ubuntu Software Center i get a error saying "requires installation of untrusted packages" and i have to keep pressing exit to get it off my screen. One time i almost got it to work on installing wine in Ubuntu SoftWare Center but in progress it kept saying "Waiting For Apt-Get To Exit. Can someone please help me with my issue? Thank you

I think your System Might be Broken

This might Fix your Problem

First REBOOT

Then Open A Root Terminal and then follow these commands

nano /etc/apt/sources.list

And Then Paste this To your Existing Source List (CONTAINS FROM VIVID VELVET)

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ vivid main restricted universe multiverse

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu utopic partner
deb-src http://archive.canonical.com/ubuntu utopic partner

Then Execute These Commands

sudo apt-get update
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get upgrade

Maybe for New Distribution Updates

sudo apt-get dist-upgrade

This is for the Purpose of Re Installing Wine

sudo apt-get remove wine
sudo apt-get purge wine
sudo apt-get autoclean
sudo apt-get install wine


What is hardware enablement (HWE)? I see the linux-hwe-generic package as part of the kernels you can install in Ubuntu.

What is hardware enablement (HWE)?

Brand new hardware devices are released to the public always more frequently. And we want such hardware to be always working on Ubuntu, even if it has been released after an Ubuntu release. Six months (the time it takes for a new Ubuntu release to be made) is a very long period in the IT field. Hardware Enablement (HWE) is about that: catching up with the newest hardware technologies.

Now, how does Ubuntu want to reach the goal of Hardware Enablement? Using rolling releases for the kernel: as soon as a new kernel is released, it is packaged for Ubuntu, tested (via the proposed pocket and special Q/A methodologies), and made available to Ubuntu users. This method has of course some disadvantages: releasing a new kernel too quickly may introduce some bugs and issues, and may not be suitable for the enterprise.

The solution? Offering different kernels for different users. Therefore Ubuntu will offer at least two kernels: the General Availability (GA) kernel, i.e. the most stable kernel, which does not get updated to point releases; and the Hardware Enablement (HWE) kernel, i.e. the most recent kernel released. This is why you are seeing both the linux-generic and the linux-hwe-generic packages.

Finally, if you are interested in developing or testing the newest kernel technologies, look at the Ubuntu Hardware Debugging web site.

References:

https://wiki.ubuntu.com/Kernel/LTSEnablementStack
https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack

Ubuntu 16.04 and later
The 18.04.2 and newer point releases will ship with an updated kernel and X stack by default for the desktop. Server installations will default to the General Availability (GA) kernel and provide the enablement kernel as optional.
The 18.04 HWE Stacks will follow a new Rolling Update Model as documented at Ubuntu Rolling LTS Enablement Stack wiki.
Installing the HWE stack is simple.
20.04-21.04
sudo apt install --install-recommends linux-generic-hwe-20.04

16.04/18.04
Desktop
sudo apt install --install-recommends linux-generic-hwe-"`lsb_release -r -s`" xserver-xorg-hwe-"`lsb_release -r -s`"

Server
sudo apt install --install-recommends linux-generic-hwe-"`lsb_release -r -s`"

Source: revised from Ubuntu LTS Enablemen Stack wiki


How to create a user who can only access one directory? I'm running Ubuntu Server 12.04. I was wondering how I can set up a user to only access one directory.  For example, I want to create a user 'brad' and want him to only have access to /var/www/brad. There, he can add and edit files as he pleases.  Also, how could I give him access to phpmyadmin to create db's?

sudo adduser brad
sudo chown brad:brad /var/www/brad

man adduser and man chown for more information and advanced options. Notice the chown above will only give ownership of the directory, use -R flag to do it recursively. Also notice no other user except brad will have ownership of said directory. You might need to change permissions for other users with chmod. Read about file permissions here.

You can also do:

sudo chown me:brad /var/www/brad

So you are the owner and brad is the group which has access to it (brad is the only member of said group). Or the other way around:

sudo chown brad:my_group /var/www/brad

Notice www-data might need access to said folder (and sub-directories and files) for the webserver to function properly.

  Also how could I give him access to phpmyadmin to create db's?

You should configure that in your webserver / through phpmyadmin. If permission is denied for some reason, just adjust it with chown or chmod.


Using Bumblebee with Wine Erro I've been trying to run a windows program with wine using optirun.

However when i do:

sudo optirun wine PROGRAM_NAME.exe

I get the following output:

wine:/home/USERNAME/.wine is not owned by you

Why won't it run?

Thank you.

The sudo is causing it to run as root, not as fawkes5. Instead run optirun wine PROGRAM_NAME.exe. If you need sudo to run optirun then follow this guide to give yourself permission to run it without sudo. Specifically you should run:

$ sudo groupadd bumblebee
$ sudo usermod -a -G bumblebee $USER

then log out and back in.

If you still cant get it to run, I have run it fine using crossover. The free trial is available in Software Center or you can buy it from codeweavers.com
Please note: Bumblebee is NOT officially supported by codeweavers, but IT does run!


What package is right for my computer? I am running on Ubuntu 11.10 32 bit, and I am wondering what packages of software I should download; namely, RPM, DEB, or TAR GZ. I have encountered having to choose from this list while trying to download avast! internet security and Adobe Flash Player.

Ubuntu (like Debian, on which Ubuntu is based) uses .deb packages. HOWEVER, I don't recommend downloading packages and installing them outside of the Software Center if you can help it. Ubuntu Linux is different from Windows or Mac in that regard. You can use the Ubuntu Software Center to search for and install packages, or command line tools like apt-cache and apt-get if you're feeling geeky.

For example, to get the Adobe Flash Player, simply install it via the Ubuntu Software Center. You could additionally install Ubuntu Restricted Extras, which will install other common proprietary media formats like MP3 as well.

As for Avast, it doesn't seem to be in the repositories, but perhaps you could find a suitable alternative such as ClamAV. Also, remember Anti-Virus protection isn't generally needed on a Linux system in the same way it is needed on a Windows system. I run Clam on Linux file and email servers simply to keep viruses from getting passed on to Windows machines that may connect.

Hope some of this helps you.

i think linux don't need to have antivirus, because when you want to install software, your OS inform you and want to get admin password from you, linux just need backup!
you can convert .rpm onto .deb, but not recommended
and you can convert .run onto .deb ...
by this action you can download any thing you want


Can anyone point me to a guide for installing Ubuntu 12.04 LTS on to a USB Thumb Drive? I am currently looking to change my home NAS from FreeNAS to Ubuntu server 12.04 LTS.
I have had a look but all the guides I can find are about making a live USB not a USB with the Full install on it.

Does anyone know of an easy to follow guides out there for;

Making a "full install" for Ubuntu server 12.04 to a USB thumb drive using a windows 7.
Installing the necessary packets to make Ubuntu work as a NAS
Setting up a RaidZ ZFS pool.
Installing Samba and setting up a share with a password?

Post was edited to clarify what I was after.

You can install to a USB flash drive the same way you'd install to any external drive. Probably only minimal special guidance is needed in this situation.

Make sure the external drive that you want to install Ubuntu Server on is attached. If your computer has trouble booting from other installation media when it is, then you can defer this step to immediately after the system starts to boot from the installation media in step 2.
Boot the server install CD/DVD/USB. (If this is a live USB, then of course it must be a different drive from the USB drive you're installing on.)
Select the external drive to install to.
As part of the installation, you are asked to specify where the GRUB boot loader should be installed. Make sure it is at least installed to the master boot record of the external drive itself. You will probably not want to install it anywhere else.

In particular, please note that if the newly installed server system's GRUB is installed to the MBR of an internal hard drive, then whether or not any other Ubuntu system is installed on the machine, no system will be able to boot when the flash drive is not attached. You don't want that. (You can fix it by reinstalling your OS's boot loader to the MBR of the internal drive, but it's best simply to avoid it altogether.)
To boot the new system, you must select the drive it's on as the boot device.

This server system may or may not be highly portable, depending on how much you configure it to be dependent on other features of the machine on which it is installed:

You should make sure the swap partition (and as discussed above, the boot loader) is also on the USB flash drive!
By default, drives in /etc/fstab will be listed using their UUID's (which can be viewed by running sudo blkid). If you keep it that way when adding any new entries or modifying existing ones, your system will be much more portable, because it will be much more resilient to changes in the way devices are numbered, which often happens when hardware is substantially changed.
If you install the 64-bit version, it will use large amounts of RAM more efficiently, and for high-performance server needs, this is typically recommended. However, the 64-bit version of Ubuntu (server or otherwise) will not run at all on a machine with a 32-bit processor.

Finally, you may want to consider alternatives to attempting to create a portable server system. For example, you might be better off installing Ubuntu Server to a virtual machine. This is automatically portable. One of the disadvantages of running Ubuntu Server from flash storage is that, if you have a very large amount of writes (which occurs in many though not all server applications), the USB flash drive will wear out muc faster than a traditional magnetic hard drive (and I believe also faster than an SSD).

Your question carries 3 questions in itself
There is an easy way to make a "full install" or"persistent mode install"
1.If you are using a windows system to make the install use "universal usb installer" see http://www.pendrivelinux.com/
2.If you are using a ubuntu system to make the install use Multi system available at the same site.
There is a nice article here How do I install Ubuntu to a USB key? (without using Startup Disk Creator)


Is Ubuntu a distro with Nautilus included? This is what I'm told to download "You will need a working Linux Distro with Nautilus". I've never used Linux and know nothing about it.

I've got a Windows 8 on my computer. Do I make this a dual boot system, and can I install it to a USB 3 32Gig Flash Drive and run it from that?

To answer your first question (the other question is already covered in more than one place on this site), yes, Ubuntu includes Nautilus, which is part of Gnome, which is what Ubuntu is based on.

Download an Ubuntu iso, but not a KDE version (or Nautilus won't be installed).

Burn it to dvd.

Reboot computer with dvd in driver.

Now, you have Linux without installing.  Give it a test drive.

Nautilus is the program used to find files.  It's that window that pop up that allows to navigate in and out of directories and see files that are in them.  You can drag and drop files to other windows.

If you want to install to a usb:

Boot Ubuntu DVD, or if already running Ubuntu live go to next step,
open terminal.
enter: sudo apt-get update
enter: sudo apt-get usb-creater (hit tab to see which is for your system before hitting enter)
Finish with this tutorial: https://help.ubuntu.com/community/Installation/FromUSBStick


Problem opening .sh file I'm trying to install Torchlight from the Humble Indie Bundle 6. The installation file is an sh file.
When I try to run the sh file I get this output.

[ user@pc:~/Desktop$ sudo sh ./Torchlight-2012-09-26.sh
[sudo] password for user:
Current temporary directory (usually /tmp by default) does not seem to be executable!
Please specify an alternative path by using the --target option.]

How do make the tmp dir executable or specify an alternate path?

I'm running ubuntu 12.10

Your /tmp folder sounds like it is a separate filesystem mounted with the noexec option.

This is an intentional security measure to prevent the execution of programs written to the /tmp folder, but it's not the default setup of Ubuntu.

The script suggests a workaround - use the --target option to specify a different folder.

e.g.

mkdir ~/tmp # Make a temp folder in your home folder
sudo sh ./Torchlight-2012-09-26.sh --target ~/tmp # Tell the installer to use it
rm -rf ~/tmp # remove it afterwards

run this in terminal :

mount -o remount,exec /tmp /var/tmp


I can shutdown Ubuntu system without closing all running programs.I think this should not happens When I shutdown Ubuntu system, it does not restrict me, but allows me to shutdown my system without closing all programs.
Why it doesn't restrict me to close all programs?

Ubuntu will send the SIGTERM signal to allow running applications to gracefully terminate and close their open processes. Only if an application does not listen to SIGTERM it may be killed.

In case a running application needs user interaction (test this with an opened unsaved document from LibreOffice) the shutdown will be halted until the user interacted.

On a multi-user system a user-initiated shutdown will be halted as long as other users are logged in. We need root privileges to still be able to shutdown. Then the SIGTERM signal will be sent to all open applications in all running sessions.

If is supposed that after a timeout (90 s) the user or the applications did not react on the SIGTERM signal SIGKILL should be issued which only then should lead to loss of unsaved data. The default KILL timeout for SIGTERM issued by upstart is much shorter (5 s).

  Testing on present release showed however that we can always shutdown without being prompted for saving our other other logged in user's unfinished work. As this indeed may lead to data loss I consider this a bug:

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1281058

shutdown does its job by signalling the init process, asking it to
  change the runlevel.  Runlevel 0 is used to halt the system.

So when run level changed to 0 i.e init 0. init get killed . Actually init is the parent process of all processes running in system. if parent process died then all child process will become zombies i.e they are not real process and not considerable.

i.e all are closed.

Read its Man-Page , All you have to do is some research on shutdown process.


Midori crashes randomly and often in 14.04 This is getting worse by the day....clicking on a link does not work, but right-clicking 'open in new tab' works! Sometimes after opening the page, the screen dims, and Midori crashes...Seems to happen more often these days... the last one came up with message that 'your system does not have enough memory to report the problem to developers'.

Other than mail I don't leave any application running, usually.

Except Skype which I started leaving it on..the past few days....I don't know if Skype is messing up ...

Do not maximize midori. It crashes in this mode. With a small window it won't crash.

I hope this is helpful.


LVM: unable to create snapshot due to failed merge of prior snapshot I inadvertently created a situation where I deleted an LVM snapshot that was pending a merge (yes - bonehead move). Now I can neither finish the merge nor create a new snapshot on the original logical volume.  When I try to create a snapshot I get the following:

root@ubuntu:~# lvcreate -s -n snap -L 15g /dev/sysvg/syslv
   Snapshots of an origin that has a merging snapshot is not supported

and in dmesg I see the following logs:

Nov 21 20:32:47 ubuntu kernel: [  721.210733] device-mapper: snapshots: Snapshot is marked invalid.
Nov 21 20:32:47 ubuntu kernel: [  721.211641] device-mapper: snapshots: Snapshot is invalid: can't merge
Nov 21 20:32:47 ubuntu kernel: [  721.233283] Buffer I/O error on device dm-4, logical block 16
Nov 21 20:32:47 ubuntu kernel: [  721.233289] Buffer I/O error on device dm-4, logical block 16

This is not surprising as I did an lvremove of the snapshot (oops).  If I do an lvscan I get the following output:

root@ubuntu:~# lvscan
  ACTIVE            '/dev/uservg/userlv' [931.50 GiB] inherit
  inactive Original '/dev/sysvg/syslv' [152.77 GiB] inherit

And lvdisplay shows

root@ubuntu:/# lvdisplay /dev/sysvg/syslv
  --- Logical volume ---
  LV Path                /dev/sysvg/syslv
  LV Name                syslv
  VG Name                sysvg
  LV UUID                stuff here
  LV Write Access        read/write
  LV Creation host, time hades, 2014-07-09 14:56:49 +0000
  LV snapshot status     source of
                         pre-x [INACTIVE]
  LV Status              available
  # open                 0
  LV Size                152.77 GiB
  Current LE             39108
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:3

So the snapshot status is INACTIVE and is trying to merge but I have no idea how to make LVM try to stop attempting the merge.  I can mount and use the logical volume without apparent problem, but I really would like to be able to take a snapshot (which is why I wanted to use LVM in the first place!)

I think that I need to us a lower level tool like dmsetup to accomplish this but I am not sure how to use this tool and would prefer not to blow away root if possible (not the end of the world, but would prefer not too).  With dmsetup I have the following info:

root@ubuntu:/# dmsetup status /dev/sysvg/syslv
0 320372736 snapshot-merge Invalid

and

root@ubuntu:/# dmsetup info /dev/sysvg/syslv
Name:              sysvg-syslv
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      252, 3
Number of targets: 1
UUID: stuff here

I have looked extensively on the intertubes and either my google kung-fu is slipping or I have reached toxic levels of caffeine (or both) and can't find much.  Does anyone have any advice about how to restore LVM  snapshoting for me?

System:

root@hades:~$ uname -a
Linux hades 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

LVM info:

root@ubuntu:/# lvm version
  LVM version:     2.02.98(2) (2012-10-15)
  Library version: 1.02.77 (2012-10-15)
  Driver version:  4.27.0

TIA.

chooks

No one, including the LVM mailing list, was able to offer even a single suggestion, so I "solved" my problem with LVM by getting rid of it.  I switched to btrfs when I upgraded my root hard drives.

I thought LVM was pretty stable and maybe it is, but being able to break a key feature on casual use with no one seeming to know how to fix it really turned me off to the technology. I am sure it works great for lots of people. Not sure if btrfs is much more stable, but the impression I get is the community is much more responsive and at least I don't have to screw around with installing mdadm and rescanning physical/logical volumes if I need to boot from USB.

For the record, upgrade/migration to btrfs was super smooth and I had a mirrored raid configuration up in no time.  My /home was on a separate drive so once I used aptik to reload all my software everything came back up with a few very minor hiccups (e.g. needing to downgrade a package).  All in all, one of the easiest migrations I have ever done.

So sorry to end it LVM.  It's not you, it's me. I know that btrfs is younger and maybe sexier and there's a chance that she will go crazy and leave me with a big hole in my data at some point.  But we're happy together and that's important to me. I know that you have a ton of guys wanting you out there, so I'm sure you'll bounce back. After one or two good, meaningless fsck's you'll forget we even had a thing. Au revior, ma cherie.

Try

# vgscan
# vgchange -ay

The problem can occur when lvm2-monitor.service is disabled.


recordMyDesktop stopped working after upgrade I've done the upgrade to Ubuntu 10.10 from Ubuntu 10.04, and recordMydesktop don't work now. If I start it from command line it seam to work, but the interface don't start and I have this error:

    Initial recording window is set to:
X:0   Y:0    Width:1680    Height:945
Adjusted recording window is set to:
X:0   Y:0    Width:1680    Height:944
Your window manager appears to be Metacity

Initializing...
Buffer size adjusted to 4096 from 4096 frames.
Opened PCM device default
Recording on device default is set to:
1 channels at 22050Hz
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
Capturing!
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.
X Error: BadAccess (attempt to access private resource denied)
Bad Access on XGrabKey.
Shortcut already assigned.

Thanks fot the answers, proprably my problem it's for a dirty upgrad from Ubuntu 9.10 to 10.04 and now the upgrade to the 10.10. IMHO, the problem is in the applet bar up-right, time ago after an update I've lost the Shutdown menù.

I will formatt and install a clear 10.10 version from ISO.

Recrod myDesktop save in ogv with Theora codec and it's a best quality that I never seen, converting it in a sequence of image, there isn't blur and you can use they for a textual tutorial.

There are lot alternatives to recordMyDesktop .I am using 'XVidCap' to record my desktop. nice app output can be saved in MPEG and AVI formats. It is available in the software center


Why doesn't php (cli) have a default memory limit? After coming across a server that had an Out of Memory issue from a commandline php-script, I discovered that default (vanilla 12.04 LTS server install) the cli php.ini does not have a memory limit set.

myname@servername:~$ php -i | grep memory_limit
memory_limit => -1 => -1
myname@servername:~$

This was a brand new 12.04 install, choosing 'LAMP' during installation, especially set up for testing this default value.

This surpised me, and I'm wondering why this is so, and even if this is deliberate?

You can restrict your commandline scripts with max-execution-time
"This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. When running PHP from the command line the default setting is 0.
...
You can not change this setting with ini_set() when running in safe mode. The only workaround is to turn off safe mode or by changing the time limit in the php.ini."