Run a shell script as another user that has no password I would like to run a script from the main ubuntu shell as a different user that has no password.

I have full sudo privileges, so I tried this:

sudo su -c "Your command right here" -s /bin/sh otheruser

Then I have to enter my password, but I am not sure if that script is now really running under that user.

How can I confirm that the script is really running under that user now?

You can do that with su or sudo, no need for both.

sudo -H -u otheruser bash -c 'echo "I am $USER, with uid $UID"'

The relevant parts of man sudo:

-H   The -H (HOME) option requests that the security policy set
     the HOME environment variable to the home directory of the
     target user (root by default) as specified by the password
     database.  Depending on the policy, this may be the default
     behavior.

-u user     The -u (user) option causes sudo to run the specified
      command as a user other than root.  To specify a uid
      instead of a user name, use #uid.  When running commands as
      a uid, many shells require that the '#' be escaped with a
      backslash ('\').  Security policies may restrict uids to
      those listed in the password database.  The sudoers policy
      allows uids that are not in the password database as long
      as the targetpw option is not set.  Other security policies
      may not support this.

su can only switch user without providing a password if you are root. See Caleb's answer

You can modify the /etc/pam.d/su file to allow su without password. See this answer.

If you modified your auth file to the following, any user that was part of group somegroup could su to otheruser without a password.

auth       sufficient pam_rootok.so
auth       [success=ignore default=1] pam_succeed_if.so user = otheruser
auth       sufficient   pam_succeed_if.so use_uid user ingroup somegroup

Then test from terminal

rubo77@local$ su otheruser -c 'echo "hello from $USER"'
hello from otheruser

You can use sudo to do this. First, you need to modify the /etc/sudoers file to add a rule that allows the hudson user to become the other user for the script in question. Let's assume you have a user1 account that needs to run /usr/local/bin/my_script.sh.
Run visudo to modify the sudoers file.
Then, use the following sudo command to run the script from hudson.
It's very important that you use visudo to modify the sudoers file in order to check the file for errors before putting it in place. Also, I'd suggest a quick read through man sudoers in order to clearly understand what the above does before adding it to your configuration.


Is there a plugin for Rhythmbox to exit on close? Is there a way for me to get Rhythmbox to exit when I press the exit button?  If not, is there a way to remove the exit button all together?  I keep getting tripped up trying to close the music player.

I feel silly posting on something that has been raged about like this, but I can't find a way to change it.  By now, I thought someone would have made a plugin for it.

Close-on-Hide External Plugin
Well, I took up the challenge and wrote an external plugin that does just this - clicking the close button (window "x" button) really does mean quit.
In the default way of working, Ubuntu has a specific patch to ensure that when music is playing, clicking the close button minimizes the application.
The reason for this is that some people like music to be playing, but they don't actually want to see the application visibly on the desktop.  Control of rhythmbox then passes to the Sound Indicator.
However, for those that do not like this behaviour, you cannot by default quit the application via the close button when something is playing.
how to install for RB3.0 and later
sudo apt-get install git
cd ~/.local/share/rhythmbox/plugins
git clone https://github.com/fossfreedom/close-on-hide

Start rhythmbox and enable the "close-on-hide" plugin in the plugins menu (Tools - Plugins menu)
If you are using RB2.99 and earlier - edit the .plugin file in the close-on-hide folder and change the line Loader=python3 to read Loader=python

In ubuntu 14.04 I have to open a terminal window while the rhythmbox window is still visible and type:

xkill

Hit enter and move the mouse cursor which has now turned into an X, over the rhythmbox window and click.  This will kill rhythmbox.

It is still a bit of messing around just to kill a program so I have installed Amarok which does what I want it to do when I hit quit.


How do I force SSH to only allow users with a key to log in? I tried following the instructions here:
http://lani78.wordpress.com/2008/08/08/generate-a-ssh-key-and-disable-password-authentication-on-ubuntu-server/

to only allow users with a public key on the server to authenticate, but I can't get SSH to disallow logging in with only a username/password.

Here is my sshd_config file - am I missing anything? I already tried restarting SSH and the computer itself.

# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile        %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM no

By default PasswordAuthentication is set to yes, so explicitly commenting it in /etc/ssh/sshd_config and restart sshd has no effect.

You'll need to explicitly set PasswordAuthentication no to allow only Public Key Authentication.

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no

PubkeyAuthentication yes

  NOTE (man sshd_config): PasswordAuthentication specifies whether password authentication is allowed. The default is yes.

And restart sshd

for sysvinit service ssh restart
for systemd systemctl restart sshd.service.

Additionally, it is best practice to use the following directives (in order) DenyUsers AllowUsers DenyGroups AllowGroups for finer SSH access control granularity and flexibility. ->
Reference: man 5 sshd_config ---> Ubuntu openssh man page does not include this any more as it absorbs openssh upstream docs (but FreeBSD, EL 7, 8 man page still have them).

Last but not least

  NOTE: be careful with setting UsePAM no as that way password locked user accounts (this is different from disabled / expired user accounts -> man passwd and man usermod) will NOT be able to login even if they have public key authentication configured in ~/.ssh/authorized_keys.

from https://www.ssh.com/ssh/copy-id#sec-How-ssh-copy-id-works: Generally, the user's home directory or any file or directory containing keys files should not be writable by anyone else. Otherwise someone else could add new authorized keys for the user and gain access. Private key files should not be readable by anyone else.

Try with sudo chmod go-rwx /home/username/ replacing username as appropriate.


Would Ubuntu TV work outside USA when installed on a PC? I've seen the blurbs about Ubuntu TV being able to receive from cable and it has EPG and so on, and I'd love to install it on a regular PC that is currently running Windows Media Center.

I don't merely want to have a media player; I specifically want to be able to watch and record live TV via a tuner expansion card. I have tried installing MythTV earlier, but I failed miserably because the instructions I used were US-centric but I'm in Austria (Europe). I couldn't find a way to make the TV tuner work right.

I'm concerned that this time, again, Ubuntu TV will only work really well in the USA.

Given that I'm in non-US country "X", what are my chances of getting Ubuntu TV to work well, specifically with regard to receiving local-region EPG data and also aerial and cable TV signals in PAL and DVB-T formats?

Firstly, UbuntuTV is currently a demonstration product. However, Canonical is a UK-based company with international appeal - the screenshots of the demonstration EPG have UK channel logos in them. The UK is in the process of converting to entirely digital TV broadcasting, so it would be odd for it not to be supported in the finished product.

As a UK MythTV user for over 5 years, DVB-T has worked really well for me. I found it much easier to set up than analogue tuner cards, especially in more recent releases of MythTV. It's also far less CPU hungry than using analog tuners.

My current MythTV installation is still running off the Mythbuntu Jaunty (9.04) release at this current time, and I'd expect it was even easier in newer releases. I'd encourage you to give MythTV another try, since UbuntuTV will not be released for some time.

My guess is that it would work almost anywhere considering that Canonical is a international company and Ubuntu is a international community.


Cannot Boot After 15.10 Upgrade [AMD graphics driver problems] I'm in desperation mode. I upgraded to 15.10 last night, via sudo do-release-upgrade. I did nothing else at the time. It passed without incident.

Then it asked to restart. I pressed Enter. It rebooted, went to the Ubuntu load screen, and hangs.

I pressed Ctrl+Meta+F2 to view the command line. It says...

fsck from util-linux 2.26.2
/dev/sda1: recovering journal
/dev/sda1: clean, 995697/3871592 files, 52624527/154846720 blocks

...and stays there forever. I can get to recovery mode, but none of the options help (I ran them all). I can get to root terminal, but I don't know what to do from there.

I have backups, but I also don't want to spend a week setting up my system all over again.

How do I fix this?

This turned out to be related to Bug #1493888. I use fglrx as my graphics driver, and according to the offical Changelog for Wily Werewolf, that is not compatible at this time.

There are workarounds in the comments of the bug on Launchpad, but it did not work for me personally. I will be downgrading for the time being.

UPDATE: I'm now working just fine on Ubuntu 15.10. Apparently, fglrx will not be supported in Ubuntu 16.04, so moving away from that proprietary driver is ideal if at all possible.

  WARNING: Before you start in on all this jazz, make sure your graphics card actually is supported by xserver-xorg-video-ati. To
  find your graphics card model, run...

  $ lspci -nn | grep VGA

  Your model is towards the end of the line. Then, check the list on
  the official Ubuntu wiki for your model. You may need to ignore
  the letter at the end of the model; mine was a Radeon HD 6520G, but
  I had to search the page for only 6520.

The lack of screen resolution options on the open source xserver-xorg-video-ati driver stems from the fact that, if fglrx is present on the system at all, it will massively interfere with xserver-xorg-video-ati.

If anyone else hits this problem, you can purge fglrx from TTY or recovery mode root. Then, reinstall the open-source drivers.

$ sudo apt-get remove --purge xorg-driver-fglrx fglrx*
$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver xorg-core
$ sudo dpkg-reconfigure xserver-xorg

Reboot your computer, and you'll find that the problem has resolved.

you should reinstall your desktop.
prees ctrl+alt+f1 or some Fi (i<7)

login with your user and pass.

if you use uinty write here :

sudo apt-get install --reinstall ubuntu-desktop

if use Gnome :

sudo apt-get install --reinstall ubuntu-gnome-desktop

Also, see this bug report that solve problem by upgrading :

  https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/552018


How to detect which init script starts zram? Due to a zram bug leading to machine lock-ups, I've had to disable zram.

I thought dpkg --purge zram-config as well as commenting any reference out of /etc/rc.local would do the trick, but the module (and its ominous dmesg warnings Buffer I/O error on device zram0, logical block 257912) keeps getting loaded.

I've grepped /etc/init and /etc/init.d for zram and there were no matches. I've even redefined mkswap to log how it was called (because the "buffer errors" occur when mkswap touches protected memory) -- amazingly I didn't get any calls. So I can't figure out what configures zram (calling mkswap + swapon).

I've taken to breaking the zram.ko to stop its loading. But I would still like to figure out what specific init script loads it. Any ideas?

Note that I'm looking for answers about how to track down which init or startup script configures zram -- I know very well that the bug might already be fixed, that you can disable zram in several ways etc, and such answers would be off-topic.

Try this (adapting the initrd location):
$ mkdir /tmp/x
$ cd /tmp/x
$ zcat /boot/initrd.img-3.8.0-31-generic | cpio -i
$ grep -lR zram .
./scripts/init-top/compcache
./lib/modules/3.8.0-31-generic/kernel/drivers/staging/zram/zram.ko
./lib/modules/3.8.0-31-generic/modules.dep
./lib/modules/3.8.0-31-generic/modules.dep.bin
./lib/modules/3.8.0-31-generic/modules.order
./sbin/compcache-enable
./etc/udev/rules.d/80-compcache.rules

The second last is the culprit, the last one shows the calling parameters. The script /etc/init/zram-config.conf wants to make one zram device per core, the one above is making a single one with 50%.
I can confirm that the last sector is bad in /dev/zram, probably an off-by-1 bug. A system with zram and the default settings will crash when it tries to use that sector. The options I see:

Add swapoff /dev/zram0 to /etc/rc.local (Most basic).

Blacklist zram (But will this unload it first? Because it's loaded in the initial ramdrive).
Otherwise, if you want to use the zram, you must add -c to the relevant mkswap, and hope for the best, i.e., that everything works apart from the last sector. Reference: this post

Add the -c to sbin/compcache-enable from inside the initrd image and repack (lost with kernel upgrades).

Add -c to /etc/init/zram-config.conf. You also need a swapoff and rmmod before its modprobe, because the zram is already set when it runs, so setting the size will fail.

I chose 3 for now, but dmesg is still polluted with those Buffer I/O errors. I'll be watching for crashes, now at least I know where they come from.

I prefer to have ZRAM off, since I already use a disk partition for swap.  I'm on 13.10 on one machine and 12.0.4 on another.

I would suggest another possible change to /etc/init/zram-config.conf, to stop zram swaps completely.  Assuming you're using the default Runlevel of 2, change the line:

start on runlevel [2345]

to

start on runlevel [345]

I've used the same trick on /etc/init/tty1.conf, to leave bootup console messages for view.r.


How to take screenshots of sections of the screen? On Mac OS X, there is a handy key combo for taking a screenshot of any arbitrary rectangle section of the screen(Command-Shift-4).

Is there something similar(maybe Compiz plugin) for Ubuntu/Gnome?

Press shift + printScr and then a click drag to select the area you want a screen shot of

It is possible that the key combination shift+PrntScreen may not be the short cut to do this, then -

Open System Settings (also known as gnome-control-center)
Go to Keyboard
Click the shortcuts tab
Click on screen shots
Click on the key combination corresponding to "take a screenshot of an area"
Press the desired keycombination ( such as shift + printScreen )
use the key combination, your cursor arrow turns to a '+' like sign.
click and drag to select the area you want a screen shot of.

Command line interface way( i.e through terminal)(you need dconf-editor for this) -

open terminal using ctrl+alt+T
enter gsettings get org.gnome.settings-daemon.plugins.media-keys area-screenshot to get the key combination currently assigned to get a screen shot of an area.
If you want to change it entergsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot "[<Shift>Print']"
Simly replace "[<Shift>Print']" with your desired key combination.

This is a link to ubuntu wiki about keybindings and is handy

Note: I have tried this method on Ubuntu 13.04, and I remember using it on Ubuntu 12.10. I know very little about the possibility of using these ways in Ubuntu versions before that..

you could "map" a key combo to do a gnome-screenshot -w to grab a window or gnome-screenshot -i for interactive options.

and of coure, PrintScreen key grabs everything. :)

Someone else may have a better way.


add-apt-repository not adding packages? I want to install SafeEyes on Ubuntu 17.10. Following the instructions from the official website.

First I execute sudo add-apt-repository ppa:slgobinath/safeeyes, then sudo apt update. Among the output is: Hit:9 http://ppa.launchpad.net/slgobinath/safeeyes/ubuntu artful InRelease.

However, if I subsequently try sudo apt install safeeyes I get a Unable to locate package error.

I have never had any trouble using external ppa's in the past (although I've done it only a couple of times) and I am not too familiar with how apt actually works, so the following is just a guess.
After googling a bit, I inspected /var/lib/apt/lists/ and noticed there is only a single file corresponding to safeeyes: ppa.launchpad.net_slgobinath_safeeyes_ubuntu_dists_artful_InRelease, whereas other repositories also have some file *_binary-amd64_Packages. I searched the safeeyes file with grep for "Package: " but got nothing. I suppose this is the problem?

Is add-apt-repository failing to add the proper sources? I tried removing and re-adding the ppa, without success. I also checked the Issues tab on the safeeyes github page, but there were no other complaints, so I guess the problem is with me.

First, add-apt-repositories adds repositories to the list of sources, and never packages.
Second, there are no packages for 17.10 in ppa:slgobinath/safeeyes, which is why nothing gets installed.

This PPA does not provide packages for Artful (17.10). Among currently supported Ubuntu releases, it only provides packages for Xenial (16.04).


How do I install Guest Additions in a VirtualBox VM? I've recently installed Ubuntu on Oracle's Virtualbox.  Now I want to install the guest additions.

I started up my Ubuntu guest OS, clicked "Devices" and chose "Install Guest Additions". Nothing happened, and I don't see the CD icon on my desktop.

How can I make this work?

If you have trouble installing Ubuntu in a VirtualBox VM, because the installer window does not fit the low resolution screen size, you can move the window with Alt+F7.

Installing Guest additions from the repositories

In case we have installed the OSE edition of Virtual Box from the repositories we can add the guest additions from the repositories in the guest. This will install guest additions matching the Virtual Box version as obtained from the repositories. It is not recommended to install these in newer releases of Virtual Box as obtained from the Oracle repository (see below).

Alternatively we can install the package virtualbox-guest-additions-iso in the host Ubuntu.

sudo apt-get install virtualbox-guest-additions-iso

The .iso file with an image of the OSE edition of the guest additions CD will install in the host directory /usr/share/virtualbox/VBoxGuestAdditions.iso. Mount this .iso file as a CD in your virtual machine's settings. In the guest you will then have access to a CD-ROM with the installer.

Installing Guest Additions from Virtual Box Manager

In case the Guest Additions fail to build we may have to install the Linux kernel headers (see How do I install kernel header files?) or build-essential  tools in addition. It is also recommended to have dkms  installed (see below - Note 4). You can run this command in a terminal to install both:

sudo apt install build-essential dkms

Selecting Devices -> Install Guest Additions (or press Host+D from the Virtual Box Manager) the Guest Additions CD .iso will be loaded but not installed in your guest OS. To install we need to run the installer script VBoxLinuxAdditions.run as root or from the Autorun Prompt (see below).

GNOME Shell

To install the Guest Additions we will have a CD icon on our desktop as soon as the virtual drive is mounted:

Next step is to run the autorun.sh script (as root) on this mounted CD by opening the drive and clicking on the "Run Software" button. This will build and install the vbox kernel modules needed.

Unity

The guest additions is mounted as a virtual CD visible on the launcher:

In case the system is set up to autorun a CD it should just open the following autorun dialogue (if not select the CD symbol, choose open, then choose Open Autorun Prompt)

After having entered your credentials for root access the guest additions will build as seen from the terminal output:

Press Return to close the terminal.

  Note 1
  Guest Additions need a reboot of your guest OS to take effect.

  Note 2
  In some systems the Virtual Box Guest Additions CD icon may not be shown on the desktop, but will be accessible from the Places menu. If the CD still was not there you may have to manually add the VBoxGuestAdditions.iso as a CD-ROM in the Virtual Box Manager Storage menu.  In an Ubuntu host the disk image is in /usr/share/virtualbox/VBoxGuestAdditions.iso.

  Note 3
  In some systems (e.g. when running Xubuntu guests) we may not have an Autorun Prompt for the mounted CD. Then we can install the guest additions by opening a terminal on the mounted guest additions .iso to run sudo ./VBoxLinuxAdditions.run. In Lubuntu or Ubuntu Server guests we additionally need to install the GNU C compiler (gcc ) and the make  utility in the guest system to be able to compile the guest additions.

  Note 4
  Running DKMS in the guest OS will keep Guest Additions installed after a guest kernel update. It is not a prerequisite for Guest Additions but if used it should be installed before we install the Guest Additions.

Installing Guest Additions from a Terminal

In case Guest Additions are not installed properly we may not be able to boot to the GUI. In this case we need to boot holding the Shift key to access the Grub menu where we access a root shell as depicted in the following question (we do need to mount the filesystem read/write to proceed):

How do I boot into a root shell?

The Guest Additions .iso file needs to be installed on /dev/cdrom from the Virtual Box Manager (see above). We then may install Guest Additions by typing the following commands:

mount /dev/cdrom /mnt              # or any other mountpoint
cd /mnt
./VBoxLinuxAdditions.run
reboot

Remove Guest Additions

In case something went wrong with installing the guest additions, or the guest OS can not boot after installing we may have to remove the additions. This can also be done from a root shell by running an uninstallation script located in the guest /opt directory.

cd /opt/<VirtualBoxAdditions-x.x.xx>/
sudo ./uninstall.sh

Replace x.x.xx with your current version of guest additions.

Open Ubuntu in VirtualBox. Open FireFox and go here:
http://download.virtualbox.org/virtualbox/

Find your version of Virtualbox and click the link to open it.

Download your version of VBoxGuestAdditions (iso):

Open it in Archive manager and extract files.

Run: sudo VBoxLinuxAdditions.run

Reboot.

This works if you can't open the iso file in VirtualBox (ISO9660 error).


Why don't I have the option ''Install Ubuntu alongside'' my other systems? Why don't I have this option?

here's my disk layout

sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5b53cc54

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT
/dev/sda2          409600  1153767021   576678711    7  HPFS/NTFS/exFAT
/dev/sda3      1216962560  1250050047    16543744    7  HPFS/NTFS/exFAT
/dev/sda4      1250050048  1250261679      105816    c  W95 FAT32 (LBA)

Disk /dev/sdb: 4005 MB, 4005527552 bytes
32 heads, 63 sectors/track, 3880 cylinders, total 7823296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20d8782d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     7822079     3911008+   c  W95 FAT32 (LBA)

The ubiquity installer offers to Install inside Windows when it cannot install alongside. i.e. when you already have 4 primary partitions used. This means that splitting the Windows partition is not possible.

If you select this option, it copies wubi.exe to the Windows Startup folder, so that when you next boot Windows it will automatically run Wubi.

Since you don't want to install with Wubi, you'll need instead to remove one of the primary partitions, and try installing again.

Here is an example of what ubiquity shows (although in this case the user has Windows XP, not Windows 7):

If you are using Windows 8, disable Secure UEFI boot. Also, it's a bit difficult. The new system doesn't allow installation alongside Win8 easily. Make sure boot mode is Legacy.


setting up ssh-copy-id on ubuntu I'm trying to setup ssh-copy-id on ubuntu I need a second opinion on this, is this a missing .pub path or wrong settings for ssh

sammy@samuel-pc:~$ cat ~/.ssh/id_rsa.pub
cat: /home/sammy/.ssh/id_rsa.pub: Permission denied
sammy@samuel-pc:~$ ssh-copy-id root@67.205.154.128

/usr/bin/ssh-copy-id: ERROR: failed to open ID file '/home/sammy/.pub': No such file
    (to install the contents of '/home/sammy/.pub' anyway, look at the -f option)
sammy@samuel-pc:~$ cd .ssh
-bash: cd: .ssh: Permission denied

sammy@samuel-pc:~$ sudo ls -l ~/.ssh/id_rsa.pub
[sudo] password for sammy:
-rwxr-xr-x 1 sammy sammy 397 Jul 12 20:25 /home/sammy/.ssh/id_rsa.pub

I've also tried sshing from my computer, but the authentication was broken and I tried to fix it but it fails

samuel@samuel-pc:~$ ssh-copy-id sammy@pluscolor.co.ke
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
sammy@pluscolor.co.ke's password:
sh: 1: cannot create .ssh/authorized_keys: Permission denied

Result from sudo ls -lsa ~/.ssh

sammy@samuel-pc:~$ sudo ls -lsa ~/.ssh
[sudo] password for sammy:
Sorry, try again.
[sudo] password for sammy:
total 28
4 drw-rw-rw- 2 sammy sammy 4096 Jul 13 21:25 .
4 drwxr-xr-x 9 sammy sammy 4096 Jul 19 23:55 ..
4 -rwxr-xr-x 1 sammy sammy  790 Jul 13 21:35 authorized_keys
4 -rwxr-xr-x 1 sammy sammy 1675 Jul 12 20:25 id_rsa
4 -rwxr-xr-x 1 sammy sammy  397 Jul 12 20:25 id_rsa.pub
4 -rwxr-xr-x 1 sammy sammy 1024 Jul 13 12:48 .id_rsa.pub.swp
4 -rwxr-xr-x 1 sammy sammy  222 Jul 12 20:21 known_hosts

and result for ls -ld ~/.ssh

sammy@samuel-pc:~$ ls -ld ~/.ssh
drw-rw-rw- 2 sammy sammy 4096 Jul 13 21:25 /home/sammy/.ssh

How can I get right access for ssh in the server?

The following command should fix the permission problem of your ~/.ssh folder

chmod 700 ~/.ssh

This will allow read/write/execution to the folder - only for the owner (yourself)
execution means - change directory

The following command will set the correct permission of the files inside the ~/.ssh folder

chmod 400 ~/.ssh/*

The files in ~/.ssh folder should have owner read-only permission
chmod 400 set the owner read-only permission

After you fix the ~/.ssh folder/files permission  you can try to execute again the ssh-copy-id command

So your issue is caused by a few errors in your file permissions.

First: Your directory has no executable flag which means your system can not actually change into it and access the files inside of it. This should fix that.

chmod +x ~/.ssh

Afterwards you will need to adjust your permissions of the files of the public keys and private keys, which should only be readable by your user and not anything by any other user. Which you accomplish with:

chmod 400 ~/.ssh/*

This should fix your issue. Sometimes ssh is really picky and can cause still errors if your /home/user is still writable by the group/others. So for safty remove write permission from the home for group and others aswell.

chmod go-w ~/

This should fix your issues.


Samba shares won't automount on boot from fstab I have FSAT setup to mount a CIFs share, but on boot up the share never gets mounted. However, if I run mount -a after boot up, it mounts everything just fine.

Here's what my fstab looks like. Ignore the commented ones... I just did a few for testing purposes right now.

//192.168.1.97/media /mnt/samba cifs credentials=/home/xbmc/.smbcredentials,rw,file_mode=0777,dir_mode=0777,sec=ntlm,auto 0 0
#//192.168.1.97/media/TV\040Shows /home/xbmc/TV\040Shows cifs credentials=/home/xbmc/.smbcredentials,rw,file_mode=0777,dir_mode=0777,sec=ntlm,auto
//192.168.1.97/media/Movies /home/xbmc/Movies cifs credentials=/home/xbmc/.smbcredentials,rw,file_mode=0777,dir_mode=0777,sec=ntlm,auto 0 0
//192.168.1.97/media/Music /home/xbmc/Music cifs credentials=/home/xbmc/.smbcredentials,rw,file_mode=0777,dir_mode=0777,sec=ntlm,auto 0 0
#//192.168.1.97/media/3\040-\040My\040Pictures /home/xbmc/Pictures cifs credentials=/home/xbmc/.smbcredentials,rw,file_mode=0777,dir_mode=0777,sec=ntlm,auto
#//192.168.1.97/media/XBMC /home/xbmc/Admin cifs credentials=/home/xbmc/.smbcredentials,rw,file_mode=0777,dir_mode=0777,sec=ntlm,auto

Have seen a few things on the internet where it was believed its because the share isn't available yet (i.e. wifi not connected yet, etc) when it's attempting to mount.

Is there anyway to confirm that's the problem,
IF so, is there a solution? Is there some way to put a delay in fstab? Or how might i write a script to run mount -a a certain amount of time after boot?

Found the option _netdev from a little research, included that in fstab but still the same result.

Try to add _netdev (with the underscore) to the options. For example the first line in your fstab becomes:

//192.168.1.97/media /mnt/samba cifs credentials=/home/xbmc/.smbcredentials,rw,_netdev,file_mode=0777,dir_mode=0777,sec=ntlm,auto 0 0

According to the manpage of mount this will delay mounting until the network is up.

I had the same problem with my two media hard drives when I was setting up my Ubuntu system. This is what I had to do to get them auto-mounted (all done from terminal):

Made a backup of the fstab file - "sudo cp /etc/fstab
/etc/fstab.bak"
Had to get the UUID of each drive I wanted to auto-mount "sudo
blkid"
Opened up the fstab file to do some editing - "sudo nano /etc/fstab"
Added the following line to the end of the file for each hard drive
I wanted to auto-mount - "uuid=UID PATHMOUNT FILESYSTEM
uid=1000,gid=1000,umask=0022,sync,auto,rw 0 0"

!-!-EXAMPLE-!-! -  UUID=3087106951A1FA7A  /media/Z-Movies-1TB ntfs
uid=1000,gid=1000,umask=0022,sync,auto,rw 0 0

Saved the fstab file.
Reboot the computer.


Language Deutsch (Schweiz) as Sprache The language installed is Deutsch (Deutschland) and the regional language is Deutsch (Schweiz).
I want to have as language Deutsch (Schweiz), but I do not succeed to get it. When I choose as language Deutsch I always get Deutsch (Deutschland). Please help.

It's because there is no separate Swiss German translation in Ubuntu, so I'm afraid there is not much I can do to help.

WHAT? You're kidding!

Go to: Systemeinstellungen -> Texteingabe

Look for German (Schweiz), klick it and you're done!


How to run Terminal as root? When we want to run a programs as root we use sudo, gksu, gksudo and etc. Now my question is how do we can run a Terminal as the root user in Terminal?

I tried with using gksudo terminal and gksu terminal but nothing happens. and by running sudo terminal I get error sudo: terminal: command not found.

The default terminal emulator on Ubuntu is the GNOME Terminal. It's located at /usr/bin/gnome-terminal and can be run with the gnome-terminal command.

What You Really Want

What you probably want is a shell running as root, as though it were produced from a root login (for example, with all the environment variables set for root rather than for your user).

Assuming that's what you want, as steeldriver has suggested, just run:

sudo -i

You'll have a root shell in which commands you enter will be run as root (without having to precede them with sudo).

But if you really want to run the graphical terminal emulator application as root, read on. I present two ways: with gksu/gksdo, and with the sudo command.

With gksu/gksudo

Since you have the gksu  package installed, you can run gnome-terminal as root with either of:

gksu gnome-terminal

gksudo gnome-terminal

(Since gksu is set to sudo-mode in Ubuntu by default, these should be equivalent.)

Running gnome-terminal as root without a controlling non-root terminal:

Virtually every desktop environment provides a facility to run a command without having to open a terminal (which would then, if closed, usually cause the command to be terminated).

This is usually achieved with Alt+F2. A textbox labeled Run command (or similar) will appear and you can enter your command.

For example, it looks like this in Unity:

And like this in MATE (GNOME Flashback/Fallback, Xfce, LXDE are similar):

Note that this works with gksu and gksudo because they use a graphical authentication dialog. If you were to press Alt+F2 and run sudo ..., you would then be unable to interact with the password prompt.

With sudo

If you don't have the gksu package and you won't want to install it, you can use:

sudo -H gnome-terminal

The -H flag is important because it sets the HOME environment variable to /root instead of your own user's home directory. You should not use sudo gnome-terminal as it can break the gnome-terminal configuration belonging to the non-root user. For more information about this, see:

RootSudo on the Ubuntu help wiki
Why should users never use normal sudo to start graphical applications?

(sudo -i gnome-terminal is also okay.)

Getting rid of the controlling non-root terminal:

If you (1) open a graphical terminal, (2) run something like sudo -H gnome-terminal in it, to create a new graphical root terminal, and (3) quit the original non-root graphical terminal ...then the root graphical terminal quits as well.

This is because the root graphical terminal is sent SIGHUP when the terminal that owns it is exited.

To prevent this, you might think you could instead launch the graphical root terminal with:

sudo -H gnome-terminal &

But this will only work if sudo doesn't have to prompt for a password. If it does, you won't see the password prompt.

One way to work around this is to use:

sudo -v
sudo -H gnome-terminal

sudo -v exists for just this purpose. As explained in man sudo, it "update[s] the user's cached credentials, authenticating the user if necessary."

Note that this will still not work if run directly from your desktop environment's Alt+F2 "run command" box, because you still need a terminal to enter your password for sudo -v.

Or you can do it in what might be called the traditional way, by suspending the job after it starts:

Run sudo -H gnome-terminal from the original non-root graphical terminal.
Enter your password as prompted by sudo. The graphical terminal will start.
Still in the non-root terminal, press Ctrl+Z to suspend the root terminal. While the root terminal is suspended, you can't use it; its interface will not respond to your actions.
Quit the controlling non-root terminal with exit. The graphical root terminal job will be both unsuspended and disowned by the non-root terminal, automatically.

In short:

sudo -H gnome-terminal
^Z
exit

But suppose you wanted to keep using the original, non-root terminal too. Then you could run bg N, where N is the graphical root terminal's job number, to resume the job in the background. You can run jobs to find N but you probably won't have to--that number was shown as [N] when you pressed Ctrl+Z. For example:

ek@Ilex:~$ sudo -H gnome-terminal
[sudo] password for ek:
^Z
[1]+  Stopped                 sudo -H gnome-terminal
ek@Ilex:~$

You can start an interactive shell with:

sudo -s

For more information do:

man sudo

and read the -s --shell section.


Be notified (e.g. mail) of unsuccessful FTP login attempts to my server I have a server I log in to with FTP. I'd like to know of a way to be notified of fraudulent login attempts.

Install fail2ban in order to ban and send emails

here is how you can install this software :

Open up a terminal (CtrlAltT)
type : sudo apt install fail2ban sendmail (being on an updated system is of importance)
then allow SSH access through UFW and then enable the firewall:

ufw allow ssh
 ufw enable

the default configuration should be adequate all that is left to do is configure your mail

source : https://www.linode.com/docs/security/using-fail2ban-for-security/#ubuntu

#!/bin/sh
HOST='IP_address'
USER='USER_NAME'
PASSWD='Pa$$word'

OUT="$(ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put /test.txt
quit
END_SCRIPT
)"

if [ -z "$OUT" ]; then
    echo "Uploaded successfully"
else
    echo "Uploading failed"
fi
echo $OUT

exit 0

Hi,
MR.venkat try to add send commands in if else block to send mail. Hope this code helps you out.


13.04 black screen when waking up from suspend I just installed Ubuntu 13.04 on my Lenovo g580.

When running pm-suspend or closing the lid, the laptop suspends just fine. However when I re-open the lid or press a button, it wakes up (fans start running), the screen remains all black (no mouse pointer or anything) and I am forced to reboot.

Sometimes I can hear a sound that I think is the ubuntu login prompt, suggesting that the laptop is running and that the problem is with the monitor.

I have no full-screen applications or external devices plugged in at the time of suspend.

How can I diagnose and fix this problem?

Here is a copy of my /var/log/syslog after a reboot after a failed suspend-wakeup:
https://gist.github.com/anonymous/5690306

try Ctrl + Alt + F6 and after return to tty7 with Ctrl + Alt + F7 (the default terminal for desktop manager) or increase brightness monitor.

I had this problem as well.  Very frustrating.  I started using fgrlx-updates driver.  This has fixed the problem for me.  This can be found in Software & Updates and then Additional Drivers.  I stopped using Ubuntu for a while because of this, but I'm glad I found this fix.  Hope it works for you.


Dual boot partition issue After a failed upgrade to Ubuntu 16.04, I reinstalled from a live CD. I believe this resulted in the creation of another partition duting the reinstall. In addition, I am no longer able to boot my Windows OS and can only boot into 16.04, however I am still able to access files from Windows as well as my initial installation of Ubuntu.

    Device          Start        End    Sectors   Size Type
    /dev/sda1        2048    2050047    2048000  1000M Windows recovery environment
    /dev/sda2     2050048    2582527     532480   260M EFI System
    /dev/sda3     2582528    4630527    2048000  1000M Lenovo boot partition
    /dev/sda4     4630528    4892671     262144   128M Microsoft reserved
    /dev/sda5     4892672 1732583423 1727690752 823.8G Microsoft basic data
    /dev/sda6  1866801152 1919229951   52428800    25G Microsoft basic data
    /dev/sda7  1919229952 1953523711   34293760  16.4G Windows recovery environment
    /dev/sda8  1732583424 1733070847     487424   238M Linux filesystem
    /dev/sda9  1733070848 1737070591    3999744   1.9G Linux swap
    /dev/sda10 1737070592 1737072639       2048     1M BIOS boot
    /dev/sda11 1801070592 1866801151   65730560  31.4G Linux filesystem
    /dev/sda12 1737072640 1801070591   63997952  30.5G Linux filesystem

UPDATE:

I ran an Ubuntu live-CD to use boot-repair. Here is my BootInfo URL

UPDATE #2
After boot-repair, I was able to access Windows using the grub menu. However, I was unable to access my Ubuntu filesystem. Using Disk Manager in Windows, I deleted partitions sd8-12 and extended sd5.

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

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

What you'll need:

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

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

bootrec /fixboot
bootrec /fixmbr
bootrec /rebuildbcd

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

sudo grub-install /dev/sda

That's all


Uninstall filemanager-actions I have done
sudo apt-get remove filemanager-actions

and
sudo apt-get remove nautilus-actions

But I still have that Filemanager-Actions actions menu in my Nautilus menu. How to remove that menu item? I have logged out and in, and have restarted my laptop, but no use.

U should not remove file manager
But If u want to remove it

sudo apt-get install filemanager
sudo apt-get purge filemanager
sudo apt-get install nautilus-actions
sudo apt-get purge nautilus-actions


No internet (Wi-Fi and Ethernet) on latest version of Ubuntu It's been 12 hours and I'm still here trying to make internet work with Ubuntu so I hope you can help me somehow.. I'll start with my specs:

Foxconn G33M
Realtek RTL8110SC Ethernet Controller

I can tell the LAN cable is not the problem since I tested it with a different pc with Windows installaed and it works. I tried unplugging everything from the pc, keeping the power button pressed for 30 seconds, waiting 3-4 minutes with all the cables plugged off, I tried installing the latest version of the drivers, the previous version of these, I tried manually installing packages with errors since I don't know what dependencies they need. I tried using a wi-fi dongle, it can connect with my router but there is still no internet. I tried re-installing Ubuntu and same problems. I don't know what to do right now

This is a screenshot of my latest try http://i.imgur.com/gU9293E.png

And these are previous screenshots (before I decided to reinstall Ubuntu): http://i.imgur.com/NFp3ivl.png and [can't post more than 2 links..] http://i.imgur.com/n5ZVpCR.png

edit: this is the output -> http://i.imgur.com/RwTyjAs.png oh and I have no network-manager since a guy made me uninstall it for some reason

03:02.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet [10ec:8167] (rev 10)
Subsystem: Foxconn International, Inc. RTL-8110SC/8169SC Gigabit Ethernet [105b:0cea]

Try running

  sudo modprobe r8169

to activate the driver. Restart the machine and see if it works.

If it doesn't, you can download the driver from Realtek.

http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=4&PFid=4&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8110SC(L)

Download the file LINUX driver for kernel 3.x and 2.6.x and 2.4.x

There's a Readme file with instructions on how to install the driver. Read carefully, it shouldn't be that hard.


How to compile bcmwl-ubuntu? Running on kernel < 4.0 I used the precompiled bcmwl-kernel-source from the repository without any problems. Now I updated my Ubuntu 14.04.2 LTS to kernel 4.0.0-040000-generic where the package isn't supported yet.
I found this bugreport where the author describes that there is a patched version for kernel 4.0 on github.

Unfortunately I'm unable to compile it via make all. It gives me the following error:

user@computer:~/Downloads/bcmwl-ubuntu$ make all
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Verzeichnis »/usr/src/linux-headers-4.0.0-040000-generic«
wird betreten CFG80211 API is prefered for this kernel version Using
CFG80211 API   LD
/home/user/Downloads/bcmwl-ubuntu/built-in.o make[2]: *** Keine
Regel vorhanden, um das Target
»/home/user/Downloads/bcmwl-ubuntu/src/shared/linux_osl.o«,
benötigt von »/home/user/Downloads/bcmwl-ubuntu/wl.o«, zu
erstellen.  Schluss. make[1]: ***
[_module_/home/user/Downloads/bcmwl-ubuntu] Fehler 2 make[1]:
Verzeichnis »/usr/src/linux-headers-4.0.0-040000-generic« wird
verlassen make: *** [all] Fehler 2

Can anybody please advice me how to compile it or tell what I'm doing wrong?

build-essential is version 11.6ubuntu6
Wifi-Card is a BCM4352 802.11ac Wireless Network Adapter

Thank you!

In the meantime i created a ppa where one can easily install a Kernel 4.0 compatible version of the bcmwl package on Ubuntu 14.04, 14.10 and 15.04.

sudo apt-add-repository ppa:longsleep/bcmwl
sudo apt-get update
sudo apt-get install bcmwl-kernel-source

So if you do not want to compile it yourself, grab it from there.

Check the ppa repository yourself at:  https://launchpad.net/~longsleep/+archive/ubuntu/bcmwl

You don't need to compile it, longsleep uploaded a deb file here


How to turn off ATI Radeon HD 7730M (on Dell inspiron 7520)? I'm new to Linux, and I've just installed Ubuntu on my Dell inspiron 15R Special Edition.

The ATI Radeon HD 7730M is running by default, instead of the on-board intel HD Graphics 4000. I searched as much as possible on the internet and found no solution so far. I believe someone would help me here.

The ATI driver available at Ubuntu Additional Drivers don't install correctly. To fix this issue, install the latest stable version from the ATI suporte site and you'll get the AMD Catalyst Control Center, a GUI with an option to Switchable Graphics.

To install it, follow the instructions below.

1) First, check the software sources, then paste this command into the terminal to install the dependencies:

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

1-A) ONLY IF you have a 64 bit system, do this EXTRA step:

sudo apt-get install ia32-libs-multiarch:i386 lib32gcc1 libc6-i386 ; cd /usr ; sudo ln -svT lib /usr/lib64

2) Paste these commands into the terminal to create a new folder and download the latest catalyst driver:

 mkdir ~/amd-catalyst-driver; cd ~/amd-catalyst-driver/
 wget -c wget -c http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-12.10-x86.x86_64.zip
 unzip amd-driver-installer-catalyst-12.10-x86.x86_64.zip

3-A) IF you have Intel HD graphics AND discrete ATI GPU, then do this, click NEXT > NEXT > etc (and reboot):

 sudo sh amd-driver-installer-catalyst-12.10-x86.x86_64.run

3-B) ONLY IF you have just the ATI Graphics card, then try to do this instead, but it could take a while:

 sudo sh amd-driver-installer-catalyst-12.10-x86.x86_64.run --buildpkg Ubuntu/precise
 sudo dpkg -i fglrx*.deb

4-A) Overwrite the /etc/X11/xorg.conf file(anyway):

 sudo amdconfig --initial -f

4-B) Force the use of the new xorg.conf file:

 sudo amdconfig --input=/etc/X11/xorg.conf --tls=1

6) Reboot the computer and you're done:

 sudo reboot

7) To verify your installation, in terminal type:

 fglrxinfo ; fgl_glxgears

8) To switch between the GPUs, run one of the following commands and re-start X to take effect

8-A) Activate discrete GPU (High-Performance mode), must re-start X to take effect

 sudo aticonfig --px-dgpu
 fglrxinfo ; fgl_glxgears

8-B) Activate integrated GPU (Power-Saving mode), must re-start X to take effect

 sudo aticonfig --px-igpu
 fglrxinfo ; fgl_glxgears

SOURCES:

http://blog.wapnet.nl/2012/07/ubuntu-12-04-install-ati-videodrivers/
http://wiki.cchtml.com/index.php/Hardware
http://support.amd.com/br/gpudownload/linux/Pages/radeon_linux.aspx
http://forums.linuxmint.com/viewtopic.php?f=191&t=112234
http://ubuntuforums.org/showthread.php?t=1930450

Enter your bios and change to 'switchable graphics' or 'fixed mode'.

Find a linux based ATI Radeon driver support from dell


How do install a Adobe flash player in Ubuntu 13.10 for Chromium I have just downloaded install_flash_player_linux.11_x86_tar.gz from the Adobe website. How do I install this package or any other package not found in the Ubuntu Software Center.
I have used sudo apt-get install ubuntu-restricted-extras.
Rebooted and flash is not working.

Try running

sudo apt-get update

after enabling the restricted repository but before running

sudo apt-get install ubuntu-restricted-extras

try flash player in software Center and install it , it works for me . on chromium and firefox both.


Launcher, menubar, toppanel and window borders disappeared in Ubuntu 16.04 I tried all the stuff available in the following links.

Unity doesn't load, no Launcher, no Dash appears

https://ubuntuforums.org/showthread.php?t=2278870

Unity Launcher and Top Panel disappeared in 14.04

Launcher, menubar and window borders disappeared in Ubuntu 16.04

Launcher disappeared

But to my bad, nothing worked.

using ccsm, I enabled unity plugin.
once i close the ccsm and open again, I am seeing it is uncheck again.

Could some one help ?

I have stumbled upon the exact same issue! I upgraded from 14.04LTS to 16.04LTS about a month ago, and everything went very well. Recently, however, no dash or window border anymore!

I have tried, as suggested in several posts, to reset config:

dconf reset -f /org/compiz/
setsid unity

I tried to reinstall unity and compiz,

sudo apt-get autoremove --purge ubuntu-desktop compiz* unity*
sudo apt-get install ubuntu-desktop compiz unity

I have tried to remove config files from local user hidden dirs,

sudo service lightdm stop
rm ~/.config/dconf/user
rm -fr ~/.cache/compizconfig-1
rm -fr ~/.compiz
rm -fr ~/.Xauthority
rm -fr ~/.config/autostart
sudo service lightdm start

Similarly, I enabled the Unity plugin in CCSM but this is not permanent since, when re-opening CCSM, the Unity plugin appears unchecked, even when opened with admin. rights.

Sadly, all of these attempts failed in restoring dash and window borders. I guess this is an issue with compiz, the window manager, but I have no idea how to fix it. Any ideas welcome ;)


xdg-email can't find thunderbird Clicking a mailto link in chromium-browser it executes

xdg-email mailto:example@example.com

(or maybe without "mailto:", which seems to be the same thing). In my case this opens kmail instead of thunderbird, and if I purge kmail it just opens nothing (throwing "Could not find 'kmail' executable." in terminal). Of course I made thunderbird my standard mail application, and

xdg-open mailto:example@example.com

does open thunderbird correctly. How can I fix xdg-email (or worse, make chromium use xdg-open instead)?

PS: I found this hack, but there should be a clean way, don't you think?

You could try reinstall both, and then again set the default, and type this in the terminal:

sudo apt-get install thunderbird

sudo apt-get install kmail

and then enter this

sudo dkms-reconfigure chromium

and it might work fine this way.


How secure is an encrypted LUKS filesystem? I recently installed 11.10 on a fresh disk using entire disk encryption.  Can someone tell me how secure the encryption algorithm is?  Has there been any recent breaches with said algorithm?  I use a 36 character random passphrase so I know thats not a weak link.  What are the chances my client's data could be compromised if the hard drive was stolen?

Yes, it is secure. Ubuntu uses AES-256 to encrypt the disk volume and has a cypher feedback to help protect it from frequency attacks and others attacks that target statically encrypted data.

As an algorithm, AES is secure and this has been proved by crypt-analysis testing. The weakness actually lies within the cypher and the software to pass it the keys. Specifically lies in the keystore (which is stored in the header of the volume), the keystore is secured by a passphrase. Passphrases are of course open to some attacks such as dictionary/brute force (if this was successful, it would decrypt the keystore). Using long "complex" non-word passwords would reduce the chance of this happening.

The only other possibility to decrypt is using recording devices or social engineering to determine your passphrase.

In short, your computer is reasonably safe unless you are subject to serious organised cyber crime or Government investigation!

LUKS encryption method is potentially unsafe, at least in the way it handles the encryption process. Lets give it the benefit of the doubt the algorithms are safe and we can compare them to algorithm code that has been audited. Putting that aside, as a user, you aren't allowed to create a key that encrypts your data.  That's like telling someone, hey, I'll make up a password that encrypts your bank account, not you.  But, I'll be so nice to let you make up a password that encrypts my password. There is the security weakness with LUKS as I see it.

LUKS uses a Master Key or what they call a Unified Key. This key is generated using the 'random' and 'urandom' programs installed on the Linux system. If these programs are compromised in some way, your Master Key becomes weak. No matter how strong your password is, the Master Key creation method creates a vulnerability.

Compare this to TrueCrypt who mysteriously shutdown during the biggest leaks against US spying. TrueCrypt volumes that have been properly encrypted according to TrueCrypts documentation, have not been broken into.  The government threw all the tax payers money at TrueCrypt volumes and could not break them. This is legal record. https://en.wikipedia.org/wiki/TrueCrypt#Legal_cases (TrueCrypt is 4th Amendment Approved)

TrueCrypt allows the user to create the Master Key. During volume creation TrueCrypt allows the user to move the mouse around in the TrueCrypt interface for as long as they like which randomly manipulates the value of the Master Key being created. That puts the power of chaos in the users hand where it belongs. LUKS does not allow this easy programmatic feature.


On Ubuntu 20.04 how do you open a port in the firewall Googled and found nothing recent. I did find docs on ufw and I ran:
thomas@Westeros:~/git/heavyweight-software$ sudo ufw status verbose
[sudo] password for thomas:
Status: inactive

So I'm thinking it isn't running ufw anymore. I can ping my computer, but I can't connect to it on my development web server port 4200. Can't find any docs on ubuntu site either.

Finally found the answer here: https://www.cyberciti.biz/faq/how-to-configure-firewall-with-ufw-on-ubuntu-20-04-lts/
The answer appears to be that ufw is disabled by default and there is a default policy in place that doesn't use that. So I ran:
sudo ufw enable

And then ran
sudo ufw allow 4200

now sudo ufw status verbose returns me the information I wanted to see.
Additionally, https://stackoverflow.com/questions/43492354/how-to-allow-access-outside-localhost taught me to run ng serve --host 0.0.0.0 to serve my angular app outside of localhost.

sudo ufw allow 4200
This will open port 4200


Ububtu upgrade stuck at the time of Unpacking fonts-sil-padauk During the installation of the upgrade from 12.10 to 14.04 the installation is stuck at "Unpacking fonts-sil-padauk (2.80-2) ...".

What should I do now?

Boot up your computer, a GRUB 2 boot menu should come, like this:

This is localised in my computer, screenshot taken via QEMU-ing into actual system.
Hit e here. It should be something like this:

 Replace the slightly underlined part by:
single if your init is Upstart, or systemd.unit=emergency.target if your init is systemd(You can learn what your default init is by issuing file /sbin/init, it is /lib/upstart/upstart if you use upstart, /lib/systemd/systemd or /lib/systemd/uselessd if you use systemd). Hit F10 after you finish editing.

If you can bring up the emergency terminal using these and using systemd as init: something like this should come up:

Hit ReturnEnter here, if asked, provide the root password.
Unfortunately I cannot take a Upstart screenshot now.
Type in dpkg --force-overwrite --configure -a after getting root@hostname# prompt.

Unfortunately Erkin's answer doesn't really help in the more specialized case of going from 12 to 14 on an ARM stick computer (CX-919) in my case.  The distribution is a special case, and there is no GRUB.

I too was stuck at "Unpacking fonts-sil-padauk (2.80-2)" for hours.  This was via the popup window that informed me 14.04 was available as opposed to via a do-release-upgrade on the commandline.  Sigh, ubuntu and its bloatware font libraries.

SSHing into the stick, I see from "top":

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 277 syslog    20   0   32264   3892    892 S 123.6  0.2 181:43.21 rsyslogd
5169 root      20   0  104620  62876  36620 R  99.7  3.0 199:01.31 trusty

The update is giving my cores a good workout.

Looking at dmesg:

[48920.554276] __find_get_block_slow() failed. block=22654, b_blocknr=3726175160
[48920.554295] b_state=0x00000029, b_size=4096
[48920.554306] device blocksize: 4096
[48920.554319] __find_get_block_slow() failed. block=22654, b_blocknr=3726175160
[48920.554337] b_state=0x00000029, b_size=4096
[48920.554348] device blocksize: 4096

So, this seems to possibly be hardware related.  When I check available disk space, it is completely full now, but I cannot be certain if that is due to the errors or if I didn't have enough space for the upgrade (1.9 GB was free ahead of time).  Still, it is peculiar that my upgrade died at the same install point.

My advice, check you available disk space and dmesg for clues.


how do i access wd elements 2 tb external hard drive from my lenovo y50 running ubuntu 15.04 64 bit i just got this external hard drive but for some reason whenever i plug it into my computer, Ubuntu doesn't recognize it. however, when i switch over to windows, my laptop can recognize it just fine

If you mean that you can put media on the drive from windows then you have already formatted otherwise do that.

If you have formatted already then check /media for your hard drive.

if this doesn't work go to terminal after plugging in the drive and type lsusb or fdisk -l and you should see your drive here with the name Western Digital or something of the like.

After this you can take 2 approaches, first is to just type mount -a and it should be mounted in /media/your-hard-disk and you should be able to access it.

second is to create a directory at /media with mkdir /media/name and use your result from the fdisk -l command here by typing mount -t /dev/sdb1 /mount/name -o uid=1000,gid=1000,utf8,dmask=027,fmask=137 where sdb1 can be what you see in fdisk -l results.

if you have an error pop up with mount -a then edit it into your answer so i can help but do a simple search for the error because most likely there is a problem with your ubuntu which has already been discussed elsewhere.

Check here for more info: https://help.ubuntu.com/community/Mount/USB

BTW: make sure that your drive is getting enough power if your ubuntu is installed on a different machine for windows. Hard drives are power hungry and do not start if they do not get ample power. After rereading your device i see that it is a laptop so this is possible, google for power issues with hard drives for more info about this issue

It sounds like you may need to reformat you external hard drive.
It will be one of 2 format types but I can't remember which one you need of the top of my head.
It will either be FAT32 or NTFS.
When you format with windows it will give you a drop down menu.
Try both I think you need FAT32 but if this does not work try NTFS.
Good luck


How do I repair a Fat 32 Filesystem Partition "input/output error" Some how the partition (Dev/sda2) partition got deleted.  So I use TestDisk to bring it back... The first time I did it it erase the whole hard drive... The second time it did restore the partition which is good.  But now it is giving me a error massage when I try to open it in Files(Gnome).

IF you need it in text here: Error when getting information for file '/media/ubuntu-gnome/Backup/User': Input/output error

Try running

sudo dosfsck -r

a few times and see if that fixes things.  Good luck.

Repair the file system
It seems your file system is corrupted.
You can attempt to fix it by executing this command in your Terminal:

sudo fsck -y /dev/sda2

Replace /dev/sda2 with the appropriate partition you want to fix.


Internet extremelly slow UBUNTU 13.04 Alfa Awus036h I have a peculiar problem. Presently I have Win7, Backtrack 5r3, and freshly installed Ubuntu 13.04.

I have Alfa Awus036h as my 2nd usb Wifi card. Both backtrack and this new Ubuntu recognize it straightaway and use appropriate driver. When I connect to the INTERNET the connection is slow and sometimes no connectivity at all, but it doesn't drop IP address or anything, connected at all times. When I am  in windows the the card is flying, never any issue, going fast. But in Backtrack & Ubuntu it's incredibly slow. When I try to ping any website, or even my defaul gateway I get like 70-80 percent packet loss. Basically when I browse the net it's way slower than 3g snail. What's strange is when I use the card in Backtrack for Pen-testing it works like a charm! So I know know.

Thanks for the help.

Use: sudo iwconfig wlan1 rate 5.5M auto

and it will work.


Missing icons for headless Xfce session via VNC I've set up a new server running a fresh installation of Ubuntu Server 13.04. I've installed xubuntu-desktop and tightvnc. My ~/.vnc/xstartup configuration file contains the following:

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
# /etc/X11/Xsession
startxfce4 &

The VNC server appears to running fine, and I am able to connect to port 5901 successfully using the TightVNC Java client.

My concern is that a lot of icons in the GUI are broken/missing, as shown in this screenshot:

Am I missing some commands in my xstartup file?

Ideally, I would like to be able to have the GUI be the default Xubuntu session (with the Xubuntu theme, etc) and not a bare-bones Xfce session.

Update:

For reference, opening the XFCE appearance settings, it shows that the Greybird theme is selected and the icon set is elementary Xfce.

I had the exact same issue and finally managed to resolve it. The weird thing was it is simply the order of these two lines in the configuration file.

# Starting X session must come before export statement
/etc/X11/Xsession

# This line comes second
export XKL_XMODMAP_DISABLE=1

You can try installing the Greybird theme which is the default theme in Xubuntu with the command:

sudo apt-get install shimmer-themes

Then choosing "greybird-git" (not Greybird!) from the XFCE settings

For the icon theme, use this command:

sudo apt-get install xubuntu-icon-theme

Then choose the "Elementary XFCE Dark" theme (or similar) from the XFCE settings


Getting Bose USB speakers to run through USB without crackling I know there is a similar post here:  USB Bose speakers with ubuntu 12.04
But it hasn't been resolved/answered and I've learned a little more about the problem, so I thought I'd start a new thread on it.

I'm hoping someone can help me to get my Bose USB speakers to run through USB without crackling in Ubuntu 12.04
They are these speakers:
http://www.bose.com/controller?url=/shop_online/digital_music_systems/computer_speakers/companion_5/index.jsp

Using the "sound" gui in 12.04, I have Output set to "Bose USB Audio."  It often starts the subwoofer at maximum volume for some reason I don't understand.

The main problem is that playing video in Firefox or Chrome (both) eventually causes the sound to die (go completely silent).  At other times, (like if I play an .avi file) the sound crackles or is garbled, but I can still make out the words people say fine.

It appears to be a pulse audio issue, but I've tried all the workarounds I've seen posted here, on ubuntuforums.org, and also on a few other sites, and nothing seems to work.  I've make some followup posts but no one has responded.  I can turn off my onboard sound in my system bios, but that doesn't seem to help.  I've modified a .conf file, but that didn't work either (changing -2 to -1 to and deleting a couple lines so USB would load, but like I said, it's not that the sound won't work at all, it's that it seems to get overloaded and stop working).

Of particular interest, I have noticed that (a) the more tabs I open at once with video playing, the faster the sound goes silent and (b) I sometimes get sound when I move the mouse around the screen or when I scroll webpages.

Additionally, after working to solve this problem at some length, I seem to have introduced a new (though minor) issue:  Now when I'm booting into ubuntu (when the splashscreen is on) I get some high pitched squealing sounds.  They go away when my login comes up, but it would be nice to eventually get rid of this too.

Thank you for your help.

I posted a log file from my audio from during the problem (from working to non-working state) in the first link I copied above.

This happens with Fedora F17 as well, and Debian and all the distributions I have tried. When pulseaudio is disabled (ALSA-only), then there are no problems with audio.

Pulseaudio is the problem. I have also observed it is related somehow to AUDIO VOLUME as well.

Installing bluedevil works for me. For more info, pls follow the link: http://forums.fedoraforum.org/showthread.php?t=302559


Ubuntu 14.04 download page I found a link to download ubuntu for
Ubuntu on HP ProLiant DL380 G7
on this link:
http://www.ubuntu.com/certification/hardware/201403-14898/
but, when trying to download this software, I get this error:

Not Found

The requested URL /releases/trusty/ubuntu-14.04-server-amd64.iso was not found on this server.

Does someonw know why?

Cause they messed up the URL. It should be http://releases.ubuntu.com/releases/trusty/

What you are looking for is:
http://releases.ubuntu.com/releases/trusty/ubuntu-14.04.1-server-amd64.iso

Because 14.04 is end of life now. (extended support) the link to download is here:
http://releases.ubuntu.com/14.04/


Install ubuntu overwriting an old Windows8 trial partition On my desktop I have two partition containing both windows8, one of them is an expired trial. I'm a windows based developer and I want to learn even some Linux development stuff, so I want to install Ubuntu and overwrite that expired Window 8 version. At present when my computer boot there is  a dual boot that let me to choose from which win8 start. Can I use the same dual boot to choose between windows and ubuntu? Do I have to remove that dual boot ( don't know how, but will investigate ) before installing Ubuntu? Can I reuse the already present boot manager and must overwrite the useless partition with Ubuntu?

Personally, i whould remove the expired windows partition and use wubi from the good one to install ubuntu, this way you won't have to worry about grub or annything you dont have the old windows and you whould even be able to delete ubuntu from the software manager in the working windows !

http://www.ubuntu.com/download/desktop/windows-installer


BASH script to set environment variables not working I've written the following script to set some environment variables when needed.

#!/bin/sh
export BASE=/home/develop/trees
echo $BASE
export PATH=$PATH:$BASE
echo $PATH

Below the command and the results I can see on my terminal: the script runs, but the variables are not set at the end.

~$: ./script.sh
/home/develop/trees
/bin:......:/home/develop/trees
~$: echo $BASE

~$:

What's wrong?
Thanks in advance.
Mirko

export exports the variable assignment to child processes of the shell in which the export command was ran. Your command-line environment is the parent of the script's shell, so it does not see the variable assignment.

You can use the . (or source) bash command to execute the script commands in the current shell environment and achieve what you want, e.g.

source ./script.sh
echo "$BASE"

Will produce

/home/develop/trees

The source command, often seen in scripts, is a bash synonym for ., which is part of the POSIX standard (so . is available in dash, for example, but source isn't).

. ./script.sh     # identical to "source ./script.sh"

(. script.sh and source script.sh will first look for script.sh in PATH, so it's safer to specify the path to script.sh.)

I often want to set an environment variable without hassle.

Here is what I add to my .bashrc to implement this convenience.

defect() {
    if [ $1 ] && [ -z $2 ]
    then
        eval 'export DEFECT=$1'
        return 0
    else
        echo 'Usage: defect {number}'
        return 1
    fi
}


How does the installer know what machines are on my network? I have a home network with a few Linux boxes and a Windows XP laptop. I shut down a CentOS machine, removed the hard drive, installed a new hard drive, and then started a clean install of Ubuntu 12.04. When it came time to set the hostname, I entered the same hostname I'd been using for this machine, and the installer warned me that there already was a machine with that name on the network. How did it know that?

All of the machines (except that XP laptop) have fixed IP addresses, with all of the addresses listed in all of the /etc/hosts files, so there's never any nameserver lookups for these machines.  Also on the net is a DSL modem that runs DHCP, and a Linksys wireless router configured to just be a wireless access point, no DHCP, and with an IP address that doesn't conflict with the DSL modem.

It's also true that the XP laptop has the IP addresses listed in I forget which file, so that it doesn't do nameserver lookups for my home machines either, but I don't think that that laptop was even running when I did the install.  The installer was happy to let me insist on using the hostname I wanted, but I'm really curious to know how this information was available to the installer.

Based on a launchpad entry it appears that avahi may perform a scan of the network.
http://bit.ly/1eqBSRr

If I was going to do it as a user, I'd be using nslookup to confirm the local name server didn't have an entry for the host.


UBUNTU 14.04LTS Cannot Mount my SD Card So, I am pretty new to Linux and just installed UBUNTU 14.04 LTS. I've had no issues so far with anything that I could not find answers to here. However, I inserted my 32Gb SD Card into my SD card slot (I've verified on a Windows machine that the card does in fact work) and received the following message:

Error mounting /dev/sdb1 at /media/cj/4421-0000:
  Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,
  iocharset=utf8,namecase=0,errors=remount-ro,umask=0077"
  "/dev/sdb1" "/media/cj/4421-0000"' exited with non-zero exit status 32:
  mount: unknown filesystem type 'exfat'

To be quite honest, I have no clue what any of this means. There are other links to this question that I did try but could not get any of them to work.  I have a Dell Inspirion and a clean install of UBUNTU 14.04LTS.  Can anyone decipher this and tell me what I need to do to mount this SD card correctly?

I think the FS format is in exFAT - a filesystem that I think Ubuntu doesn't agree with all too well (though Windows doesn't mind it). Try placing the format of the SD card as NTFS; I haven't had any NTFS problems with Ubuntu (though I was using 12.04).

I had the same issue, albeit on Linux Mint.

I installed "exfat fuse" and am now able to mount my 128GB SDcard.


How can I check the folder permissions in ubuntu server 12.04? Right now, I know that I can change permissions for example with:

sudo chmod 550 directory

I wonder how I can check the actual folder permission.

You can use the following command:

ls -l directory

or

stat directory

or, if you want to see only the permissions in numeric (octal) format:

stat -c %a directory

"Destination folder is not writable or does not exists."

on Magento 2.3.1 admin on NGINX  Ubuntu 16.04 | AWS Ec2

Solution I Found

cd /var/www/html/pub/media

sudo find . -type d -exec chmod 777 {} \;

add media folder to permissions


Screen tearing while watching video I have a bad tearing while watching video in Ubuntu 11.10. I tried to use both smplayer and vlc, but none of them helped. In fact I see tearing only in rips, there is not such problem while watching Blu-ray movies. Though maybe i'm just not very attentive. Can anybody help me with this? I have 32-bit version of Ubuntu. Videocard is GTX460 768mb.
I use hardware acceleration in players (vdpau). Enabling vsync in CCSM doesn't help.

Yes I finally have a solution for you it took a bit of digging, you have to use CompizConfig Settings Manager.  Go to Utilty > Workarounds, make sure this box is checked:

Also should be checked:

"Don't wait for video sync"
"Force full screen redraws"

Also some other this you could do is in the CCSM go to "OpenGL" click on the texture tab put Best:

Then go to "Composite" and uncheck "detect rate" then crank up the refresh rate to anything higher than it's default that is set at 50 I set mine to anything beyond 60.

 problems. Hope this helped. :)

In order to stop video tearing for the poor newbies to Gnome shell or just Ubuntu 12.04 you must enable yourself to be a super user by typing in terminal.

  $ sudo nautilus

Then go to system folder go to etc folder then scroll down to environment  (Note: this is not a folder but it is a system file, it looks sort of like a page)  Once you click on this you will see this line

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Now just type below that line (or copy and paste)

  CLUTTER_PAINT=disable-clipped-redraws:disable-culling

then type

  CLUTTER_VBLANK=True

This should take care of the tearing.  They don't quite explain how to do this for newbies to LINUX at all, the writers expect every one just to know how to do this because they think everyone is a programmer.

This little patch should take care of everything. One last thing: please restart your computer and then play your movie or youtube vide.


Installing Ubuntu from usb pendrive on hard disk I have downloaded Ubuntu 12.04 desktop iso. I wish to install this on my laptop and replace the existing windows xp (SP3) with ubuntu. Unfortunately I do not have a working CDROM drive  on my laptop.

Is it possible to copy the ISO file on pendrive and then install Ubuntu on hard disk? I don't wish to run Ubuntu off the pen drive and would rather install it on hard disk itself.

Any help would be appreciated.

Yes it is possible to create bootable USB from an ISO within Windows. It is not exactly by copying an ISO to the USB key, however it's almost as simple. The instructions are located here: How to create a bootable USB stick on Windows | Ubuntu

Afterwards you can boot from the USB as if you booted from a CD and proceed to install Ubuntu on your hard disk.

I would be careful about using the Pendrive application.  I pretty confident that the Pendrive installer installed "Funmoods" on my machine.  I was already hesitant to install the application and pressed cancel.

The installer misbehaved and continued to install something.  It messes with every browser that is installed and leaves DLLs in User//Appdata/...


Very slow, intermittent WiFi speeds with 14.04 and Intel PRO/Wireless 5100 AGN [Shiloh] I did a fresh install of Ubuntu 14.04 LTS on the harddisk of a Lenovo Y650 Ideapad laptop.  The wireless adapter is an Intel PRO/Wireless 5100 AGN [Shiloh].

Initially I could not connect to any wireless networks; however, I could see them.  There are no issues when connecting via Ethernet.  I was only able to connect to the wireless network by entering this command in the Terminal:

echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf

The speeds are extremely slow and intermittent.  When I am able to run a speed test, the ping is good (24 to 26 ms) but the download speeds range from 0.15 to 0.30 Mbps.

iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:"PinkRabbit"
          Mode:Managed  Frequency:2.412 GHz  Access Point: E8:40:F2:CD:18:0B
          Bit Rate=2 Mb/s   Tx-Power=15 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-26 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:3  Invalid misc:254   Missed beacon:0

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:23:5a:d2:70:91
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:171 errors:0 dropped:0 overruns:0 frame:0
          TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:15613 (15.6 KB)  TX bytes:15613 (15.6 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1e:65:3e:0c:48
          inet addr:192.168.0.13  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:65ff:fe3e:c48/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9032 (9.0 KB)  TX bytes:16851 (16.8 KB)

nm-tool

NetworkManager Tool

State: connected (global)

- Device: eth0 -----------------------------------------------------------------
  Type:              Wired
  Driver:            tg3
  State:             unavailable
  Default:           no
  HW Address:        00:23:5A:D2:70:91

Capabilities:
    Carrier Detect:  yes

Wired Properties
    Carrier:         off

- Device: wlan0  [PinkRabbit] --------------------------------------------------
  Type:              802.11 WiFi
  Driver:            iwlwifi
  State:             connected
  Default:           yes
  HW Address:        00:1E:65:3E:0C:48

  Capabilities:
    Speed:           1 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    *PinkRabbit:     Infra, E8:40:F2:CD:18:0B, Freq 2412 MHz, Rate 54 Mb/s, Strength       92 WPA WPA2

  IPv4 Settings:
    Address:         192.168.0.13
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.0.1

    DNS:             64.71.255.204
    DNS:             64.71.255.198
    DNS:             8.8.8.8
    DNS:             8.8.4.4

I don't know how much relevant this may be, still an Ubuntu newbie, but I had similar problems with my Ralink 5362 card.

The only thing it seemed to work was the following:

There is a bug in the Debian Avahi daemon in Ubuntu. And to resolve this you need to edit the following file /etc/nsswitch.conf as follows.

Type the following in the command line

sudo -H gedit  /etc/nsswitch.conf

This will open the nsswitch.conf file in the text editor. Then simply change the following line

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

to the below line and save the file.

hosts:          files dns

Reset your internet connection or probably restart your system and your wireless connection should be back on top speed. This worked for me at least.

Try disabling IPv6:
Go to edit network connections, select your connection, go to IPv6 tab, change it to ignore.


Ubuntu sidebar on desktop stopped showing I decided to give Ubuntu a try after all these years using only Windows as OS.

I downloaded that windows installer from their site and installed Ubuntu. Everything went well until I decided to update the drivers and apps. It seems to be a bad idea, because I can't see the sidebar anymore (the one with the "quick launch options") and some graphic elements from the OS are not present, like the top bar with the clock.

Another issue: I always see an error regarding Compiz after a couple of minutes, saying that it stopped responding.

Am I missing something?

I'm using the 12.10 64bit version.

EDIT

I googled about the problem and it seems that Compiz is bugged like hell in 12.10.
I'm uninstalling it and giving 12.04 a try. That's too bad, because I like many features from this version, specially the use and feel. But I can't stand using it without the left bar and a graphic interface at all.

Have you tried to open system settings, select "appearance", then open the "behaviour" tab, and "Restore Default Behaviours"?
If it doesn't work try this:
Press Ctrl + Alt + t
Run unity --reset

If still doesn't work try this:

sudo apt-get install dconf-tools
dconf reset -f /org/compiz/

I had a similar error. The sidebar showed up in the guest session, but not in others. I had removed everything in the ~/.config folder to resolve the issue, following this guide:
How To Fix: No Unity, No Launcher, No Dash In Ubuntu 14.04.

Sidebar showed after that automatically, but it hidden after restart system!

Second way: I created new user by adduser command, and copied my essential files to new user's folder


How to remove the ubuntu name/logo from appearing on top of my desktop background image? Is it possible to remove the  Ubuntu name/logo from appearing on top of my desktop background image? I find it pretty intruding and disgraceful. Thanks!
Here is an example of what I mean. The logo is in the bottom left corner.

Desktop with logo:

Zoom on Desktop with logo:

Right click your desktop and select "Change Desktop Background" then pick any of the images shown which you prefer (or a color) your desktop image to be changed to.

If this answer solved your problem, please feel free to click the up arrow (where an up, down and number are) next to it on the left.

Thanks for the answers!!
The logo was definitely not on the image in the first place.
It seems the problem is that when you find a picture on the net and right click on it and choose 'Set as desktop background' then Ubuntu adds automatically his logo on it.
Because when I followed the instructions given here  meaning I go to Appearance and change it from there, there is no logo! Thats a weird behaviour.
But actually now that I have installed extra software as 'Ubuntu Tweaks' and others the behavior are weird on my desktop.
Thanks again for the help!


Error while installing MegaSync on Ubuntu 20.04 I am trying to install MegaSync on my new ubuntu 20.04 installation =). They already have a version out for ubuntu 20.04. (See https://mega.nz/sync). However, when I try to install it with sudo dpkg -i megasync-xUbuntu_20.04_amd64.deb I get a big list of dependency errors. It seems to me Megasync is missing some packages. However when I open the software updater it says there are no new updates that need to be done. I am not so experienced with Ubuntu yet so any help would be greatly appreciated.

Selecting previously unselected package megasync.
(Reading database ... 195014 files and directories currently installed.)
Preparing to unpack megasync-xUbuntu_20.04_amd64.deb ...
Unpacking megasync (4.3.1-15.1) ...
dpkg: dependency problems prevent configuration of megasync:
 megasync depends on libc-ares2 (>= 1.7.4); however:
  Package libc-ares2 is not installed.
 megasync depends on libcrypto++6; however:
  Package libcrypto++6 is not installed.
 megasync depends on libmediainfo0v5 (>= 0.7.56); however:
  Package libmediainfo0v5 is not installed.
 megasync depends on libqt5core5a (>= 5.12.2); however:
  Package libqt5core5a is not installed.
 megasync depends on libqt5dbus5 (>= 5.0.2); however:
  Package libqt5dbus5 is not installed.
 megasync depends on libqt5gui5 (>= 5.8.0) | libqt5gui5-gles (>= 5.8.0); however:
  Package libqt5gui5 is not installed.
  Package libqt5gui5-gles is not installed.
 megasync depends on libqt5network5 (>= 5.1.0); however:
  Package libqt5network5 is not installed.
 megasync depends on libqt5svg5 (>= 5.6.0~beta); however:
  Package libqt5svg5 is not installed.
 megasync depends on libqt5widgets5 (>= 5.11.0~rc1); however:
  Package libqt5widgets5 is not installed.
 megasync depends on libzen0v5 (>= 0.4.31-2~); however:
  Package libzen0v5 is not installed.

dpkg: error processing package megasync (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 megasync

You have to use apt / apt-get instead of dpkg. They will install dependencies for package:

sudo apt install ./megasync-xUbuntu_20.04_amd64.deb

None of the solutions I found in the web worked so I tried the following:
I downloaded libcrypto++9 from here, and installed it as a .deb.
http://archive.ubuntu.com/ubuntu/pool/universe/libc/libcrypto++/libcrypto++9_5.6.1-6_amd64.deb
The same for libc6 from:
http://ftp.br.debian.org/debian/pool/main/g/glibc/libc6_2.31-4_amd64.deb
Then I downloaded libqt5gui5-gles_5.15.1+dfsg-2_amd64.deb from
http://ftp.br.debian.org/debian/pool/main/q/qtbase-opensource-src-gles/libqt5gui5-gles_5.15.1+dfsg-2_amd64.deb
You should do it with any package that is missing in your own configuration. I recomend this website to find them: https://pkgs.org/


Will all my files be deleted if I choose 'Erase disk and Install Ubuntu' when installing in a VMWare virtual machine? I have downloaded VMWare Workstation Player and Ubuntu .iso file. My PC runs on Windows 10 (this is the only OS of the PC). While installing Ubuntu it asks for the installation type, and I am a little bit confused.

If I choose 'Erase disk and install Ubuntu, will my PC's all my hard drive be formatted, including files stored in the Windows OS, which is not a VM, or VMs see only the storage allocated for themselves?

If I create new partitions via 'Something else' option, will it overwrite my C: and D: disks on Windows OS?

If you are installing Ubuntu on a Virtual Machine, only the drives that are components of the virtual machine can be installed to. You can safely check by selecting the "Something Else" option with the installer. Here's an example in Virtualbox:

As you can see from the size and labeling the disk it's considering is most certainly too small to be an actual drive in my machine. It's a good idea to check the sizes of drives and partitions on your system and be familiar with them to avoid any mistakes. The size will be equivalent to the size you chose when you created the disk file (virtual disk) that the Virtual Machine actually uses.

Another indication that you are installing to a disk file and not a physical drive is that the installer is not providing the option to install alongside your host OS (Windows) as the VM doesn't see it.

I think your question comes in two sets... So I will answer as such:

Yes... If you choose "Erase disk and install Ubuntu" your whole hard drive will be formatted. "Erase disk and install Ubuntu" means you are authorizing the setup to erase your hard drive completely.
It is good to create a partition while you are on Windows OS, and then make use of it through the "Something else" option.

I hope this helps you solve your problem.


Unable to boot on windows after installing ubunu I just intalled ubuntu(the real one) and now i am unable to run on my previous win7.
As far as i know I didn't overwrite the windows partition.
If I try to launch windows it breaks down directly(with safe mode too).
Windows isn't able to start (I even lost access to the f11 menu) and asks me to insert a boot device (which I do not have sine it was pre-installed).

I followed some tipps and installed boot_repair which gives the following output http://paste.ubuntu.com/6525891/ (some EFI detected).
Altough I am a newbie I presume the error is coming from the ubuntu booter.

I am completely lost so thank you for any help :)

Before proceeding to any further make sure the Ubuntu System Architecture you are trying to use is supported by you processor then,

Try Boot-repair  to repair you grub , for doing so you have to boot ubuntu live usb or dvd and after booting click on try-ubuntu.

When desktop screen appears press Ctrl+Alt+t  for opening terminal and run the follwing commands into the terminal -

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

After that the boot-repair window will appear ,in that select Recommended repair option . After completion restart your pc .it will be fixed. If you need assistance clcik on the link mentioned in first line.

hope it will work.

The origin of the error was way more simple... The installation disk my friend gave me turned out to be actually a 32 bit version.
Therefore gnud was 32bits too and unable to run 64bits windows7. One used Bios and the ohter UEFI (as a previous comment explains).

I reinstalled the 64-version and everything works fine.

I am very sorry for having asked while the answer was right in front of my eyes :)
Thank you anyway for trying to help me.

It is a real pleasure to see pople offering help.


Internet not working (local network works) after upgrade to 14.04 I have an internet connection that works through a proxy that requires username & password. After online upgrade to 14.04 from 12.04, I am unable to connect to internet, pinging to popular sites doesn't work. However, I am able to ping to local addresses in my office network. I shall post any more info if needed. I am a networking noob and didn't fiddle with anything in my network settings yet.

Use the following command in terminal(Ctrl+Alt+T)to fix this issue.

sudo dhclient


AMD radeon R7 250 Ubuntu 13.10 Open Source Driver I am using an AMD Radeon R7 250 and I have installed the proprietary drivers from AMD but I would like to try out the Open source driver since I have them on my laptop and that I have good performances. The issue here is that when I uninstall my AMD drivers to get the open source one I am getting some display issues.

My screen get divided in a bunch of tiny blocks that represent my desktop.

So what can I do?

The command-line console is your friend. From your X session, hit ctrlaltF1 (it should also work with F2-F6 or so). That will take you to one of the built in consoles (aka terminals), where you can do the uninstall/reinstall "by hand" using apt-get or whatever.

If you have access to another computer, you could SSH in instead, I think that is set to run on a default Ubuntu install.


permission Denied Error : can't open 'etc/debian_version' Im a student and newbie with Ubuntu.
Im using Ubuntu 20.04.
in my current project im using Workbench for database, but im having this error (permission Denied Error : can't open 'etc/debian_version'), could anyone please help me!!

If you are using a container (Docker) use the IP generated in the docker.
You can view with docker inspect (Container ID). If not, change the file permission with chmod.


How to configure wifi in lenovo G50-70 I have Lenovo G50-70 model laptop  i have installed ubuntu 14.04 LTS wired network is working but wifi not how do i get wifi network?

This laptop has no hardware wifi switch. Kernel module ideapad-laptop does not treat it right. That is why wireless is always blocked by rfkill. This has been reported upstream. For current users this can be fixed by installung a patched module from ppa.

sudo add-apt-repository ppa:hanipouspilot/ideapad-laptop
sudo apt-get update
sudo apt-get install ideapad-laptop

Note for 14.04 users:

The module is built for Ubuntu 14.04.2 with 3.16 kernel. I did not test it with earlier kernels.

To install Broadcom wifi drivers OFFLINE

Insert the install disk/USB Stick
Browse to /pool/main/e/eglibc
Click on: libc-dev-bin_2.19-0ubuntu6.3_amd64.deb and after that installs,
Click on: libc6-dev_2.19-0ubuntu6.3_amd64.deb after that installs...
Browse the disk to: /main/b/bcmwl
Install bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb
You should now have WiFi.