Upgraded to Ubuntu 14.10 and *everything* lags Yesterday, I upgraded my Lenovo Thinkpad X1 Carbon (2013) from Ubuntu 14.04 to Ubuntu 14.10. Since then, everything lags, from applications when opened (or 'drawn back in the background' for an overview of all open applications) to password entry on log-on. Even Google Chrome: youtube videos stutter. Also, when typing this, I feel a bit of a lag. Does anybody experience the same? Maybe under different hardware? [I used the standard software updater to update]

I have a new carbon. I had slow redrawing of windows and other problems, although no particular problem with video. Fixed with: https://wiki.archlinux.org/index.php/Intel_graphics#SNA_issues

If you are experience issues with SNA, try using UXA instead, which can be done by creating an X configuration file containing the following:

/etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
EndSection

EDIT: DO NOT USE THIS SOLUTION. SNA has been fixed. Upgrade your kernel (at least 4.0 probably) and video card drivers (>=2.99.917 i think) instead.

I recently updated to 14.10 too.  I'm using a lenovo ideapad and it has worked fine.  To fix your problem I would recommend changing startup applications, lowering swappiness, and other minor speed fixed you can find on google.  If this dose not work I would suggest making a Ubuntu 14.10 bootable USB and completely reinstalling your operating system.  Good luck!


Why doesn't running "sudo shutdown now" shut down? When I issue the following:

sudo shutdown now

..my newly commissioned Ubuntu 14.04 server doesn't shut down. It stops with the following message:

* Stopping System V runlevel compatibility
Give root password for maintenance:
(or type Control-D to continue):

If I type in the root password, the machine simply sits there at the shell prompt.

Traditionally, the command sudo shutdown now will take you to the runlevel 1 (recovery mode); this will happen for both Upstart and SysV init.
To get what you want, i.e., to shut down the computer properly, you need to give the -h switch to shutdown.

One thing to note here is that halt will close all the processes, turn off the CPUs and return the control to a ROM monitor of the mainboard needing the user to press the power button to get the power supply turned off, whereas poweroff after turning off the CPUs will simply turn off the power supply resulting in a proper shutdown.

The -h switch of shutdown will either halt or poweroff the computer, the decision will be taken by the system although in Ubuntu I have seen that it would normally poweroff the machine. To be sure of that, you can use the -P switch with shutdown to poweroff the computer.

To summarize, here are the commands available to poweroff (not halt) a computer:

sudo shutdown -h now
sudo shutdown -P now
sudo poweroff
sudo halt -p
sudo init 0

The poweroff and halt commands basically invoke shutdown (except for the poweroff -f). sudo poweroff and sudo halt -p are exactly like sudo shutdown -P now. The command sudo init 0 will take you to the runlevel 0 (shutdown).

Now what if you want to shut down forcefully, i.e., you don't want to wait for processes to close normally? In that case you can use:

sudo poweroff -f

This will not use shutdown. Rather, it will invoke the reboot(2) system call (used for reboot, poweroff & halt) to power off the computer instantly.

I've always used the following

sudo shutdown -a now

or to reboot immediately after shutdown

sudo shutdown -r now

Looking at the shutdown help option it doesn't list -a as a proper command, but I could have sworn a long time ago -a was abort or something like that. Anyways I've kept using that and it it has worked all these years, but it looks like shutdown -h now is the correct option.


How to create a restricted SSH user for port forwarding? ændrük suggested a reverse connection for getting an easy SSH connection with someone else (for remote help). For that to work, an additional user is needed to accept the connection. This user needs to be able to forward his port through the server (the server acts as proxy).

How do I create a restricted user that can do nothing more than the above described?

The new user must not be able to:

execute shell commands
access files or upload files to the server
use the server as proxy (e.g. webproxy)
access local services which were otherwise not publicly accessible due to a firewall
kill the server

Summarized, how do I create a restricted SSH user which is only able to connect to the SSH server without privileges, so I can connect through that connection with his computer?

TL;DR - go to the bottom of the answer, "Applying the restrictions"

Adding a restricted user consists of two parts:
1. Creating the user
2. Configuring the SSH daemon (sshd)

Configuring sshd

The best place to get known to the possibilities of SSH is by reading the related manual pages:

ssh(1)
ssh_config(5)
sshd(8)
sshd_config(5)

Where can SSH client perform actions?

Before you can restrict something, you need to know the features of SSH. Spitting through the manual pages yields:

Shell commands execution
File upload through sftp
Port forwarding

The client forwards an (un)used port to the server
The server forwards his port to the client
The server forwards a port of another host to the client (proxy-ish)

X11 forwarding (display forwarding)
Authentication agent forwarding
Forwarding of a tunnel device

From the Authentication section of the manual page of sshd(8):

  If the client successfully authenticates itself, a dialog for preparing
  the session is entered.  At this time the client may request things like
  allocating a pseudo-tty, forwarding X11 connections, forwarding TCP
  connections, or forwarding the authentication agent connection over the
  secure channel.

  After this, the client either requests a shell or execution of a command.
  The sides then enter session mode.  In this mode, either side may send
  data at any time, and such data is forwarded to/from the shell or command
  on the server side, and the user terminal in the client side.

Options for restricting SSH features

Files and their options that alter behavior are:

~/.ssh/authorized_keys - contains keys which are allowed to connect which can be given options:

command="command" - The command supplied by the user (if any) is ignored. Note that the client may specify TCP and/or X11 forwarding unless they are explicitly prohibited. Note that this option applies to shell, command or subsystem execution.
no-agent-forwarding - Forbids authentication agent forwarding when this key is used for authentication.
no-port-forwarding - Forbids TCP forwarding when this key is used for authentication
no-X11-forwarding - "Forbids X11 forwarding when this key is used for authentication."
permitopen="host:port" - Limit local 'ssh -L' port forwarding such that it may only connect to the specified host and port.

~/.ssh/environment - This file is read into the environment at login (if it exists). Environment processing is disabled by default and is controlled via the PermitUserEnvironment option
~/.ssh/rc - Contains initialization routines to be run before the user's home directory becomes accessible.
/etc/ssh/sshd_config - the system-wide configuration file

AllowAgentForwarding - Specifies whether ssh-agent(1) forwarding is permitted.
AllowTcpForwarding
ForceCommand - "Forces the execution of the command specified by ForceCommand, ignoring any command supplied by the client and ~/.ssh/rc if present. The command is invoked by using the user's login shell with the -c option."
GatewayPorts - "Specifies whether remote hosts are allowed to connect to ports forwarded for the client. By default, sshd(8) binds remote port forwardings to the loopback address. This prevents other remote hosts from connecting to forwarded ports. GatewayPorts can be used to specify that sshd should allow remote port forwardings to bind to non-loopback addresses, thus allowing other hosts to connect."
PermitOpen:

  Specifies the destinations to which TCP port forwarding is
  permitted. The forwarding specification must be one of the
  following forms:

PermitOpen host:port
PermitOpen IPv4_addr:port
PermitOpen [IPv6_addr]:port

  Multiple forwards may be specified by separating them with
  whitespace. An argument of 'any' can be used to remove all
  restrictions and permit any forwarding requests.  By default all
  port forwarding requests are permitted.
  PermitTunnel - Specifies whether tun(4) device forwarding is allowed. The default is 'no'
  X11Forwarding - Specifies whether X11 forwarding is permitted. The default is 'no'

  Applying the restrictions

Modifying the system-wide configuration file /etc/ssh/sshd_config allows the configuration be applied even if password-based authentication is applied or if the restrictions in ~/.ssh/authorized_keys are accidentally removed. If you've modified the global defaults, you should uncomment the options accordingly.

Match User limited-user
   #AllowTcpForwarding yes
   #X11Forwarding no
   #PermitTunnel no
   #GatewayPorts no
   AllowAgentForwarding no
   PermitOpen localhost:62222
   ForceCommand echo 'This account can only be used for [reason]'

Now add a user:

sudo useradd -m limited-user

The option ForceCommand can be omitted if the shell is set to a non-shell like /bin/false (or /bin/true) as /bin/false -c [command] won't do anything.

Now the client can only connect to port 62222 on the loopback address of the server over SSH (it will not listen on the public IP address)

Disabling AllowTcpForwarding would also disallow the use of -R, thus defeating the use of such a restricted account for forwarding a single port. PermitOpen localhost:62222 assumes that port 62222 on the server is never in use because the client can happily connect to it and listen on it too.

If TCP forwarding is allowed in the system-wide configuration and disabled password-based authentication, you can use per-key settings as well. Edit ~/.ssh/authorized_keys and add the next options before the ssh- (with a space between the options and ssh-):

command="echo 'This account can only be used for [reason]'",no-agent-forwarding,no-X11-forwarding,permitopen="localhost:62222"

Verify

To be sure that it works as expected, some test cases need to be run. In the below commands, host should be replaced by the actual login if it's not set in ~/.ssh/config. Behind the command, a command is shown that should be executed on either the client or server (as specified).

# connection closed:
ssh host
# connection closed (/bin/date is not executed):
ssh host /bin/date
# administratively prohibited (2x):
ssh host -N -D 62222 # client: curl -I --socks5 localhost:62222 example.com
ssh host -N -L 8080:example.com:80 # client: curl -I localhost:8080
sftp host
# should be possible because the client should forward his SSH server
ssh host -N -R 8080:example.com:80 # server: curl -I localhost:8080
# This works, it forwards the client SSH to the server
ssh host -N -R 62222:localhost:22
# unfortunately, the client can listen on that port too. Not a big issue
ssh host -N -L 1234:localhost:62222

Conclusion

Checklist: The SSH user should not able to:

execute shell commands - done
access files or upload files to the server - done
use the server as proxy (e.g. webproxy) - done
access local services which were otherwise not publicly accessible due to a firewall - partially, the client cannot access other ports than 62222, but can listen and connect to port 62222 on the server
kill the server - done
(note that these checks are limited to the SSH server. If you've an other vulnerable service on the machine, it could allow a possible attacker to run commands, kill the server, etc. )

Try command="exit"
That would force users to use this command to portforward
ssh -NfR EXTERNAL_PORT:localhost:INTERNAL_PORT usr@server -i key


Ticking sound on speakers There's a really annoying ticking sound coming from my speakers that started yesterday. When you plug headphones in, it comes through the headphones too. Any idea what it could be?

usually a ticking sound is caused by a capacitor going bad or an arcing across circuits in your sound chips.  It is highly unlikely to be caused by software. I am a repair technician and I have frankly never seen ticking caused by software. Try checking the speakers plugs and see if they are seated properly in the motherboard jacks. Are they clean? Do you get strange sounds when you touch them? Clean the plugs with a napkin before reinserting them. Try hooking your speakers to another computer to see if they have a bad capacitor making the ticking. Look inside your computer and see if any wires are laying on the motherboard. If you are using a soundcard, unplug it and very gently clean the gold connectors with a soft pink eraser then reseat it.
Is there a lot of static in the area around your computer? Fluffy pile carpet or anything like that? I always recommend to people that they buy a can of anti static spray and use it once in a while all around their computer if they have any carpeting. And very lightly mist the computer housing as well. Static can wreak havoc with soundcards and motherboards.

Just wanted to share this since this thread is the first that appeared when I Googled "Ubuntu ticking"... This is a known issue with Ubuntu and some Intel hardware.  I had this issue on my Acer netbook and also on a Toshiba laptop, both exhibited the same symptoms and the problem was not present with Windows installed.  Check the post below for a fix, it worked for me on both devices.

https://askubuntu.com/a/195800


Ubuntu Gnome 15.10-16.04 Dell XPS15 9530: Bluetooth doesn' work Device loaded  with Ubuntu Gnome works perfectly with one exception: bluetooth. I cannot get any response from Broadcom 4352. Tried to replace driver (see there) -no success. Any advice would be appreciated.

Replacement firmware with newer driver solved the problem (see for instance here). Just be careful with names: The new driver should have the same name as the old one.


slow boot boot 19.10 (tried almost everything) I previously had Ubuntu 18.04 along with Windows 10, after having many problems I decided to install Ubuntu 19.10, but one of the main problems (boot time) was still happening, I have tried almost everything with no solutions. It's really weird since my laptop is new and shouldn't have any troubles.
systemd-analyze time
Startup finished in 3.449s (firmware) + 48.782s (loader) + 5.522s (kernel) + 52.274s (userspace) = 1min 50.028s
graphical.target reached after 52.206s in userspace

systemd-analyze blame
     29.319s plymouth-quit-wait.service
      8.752s NetworkManager-wait-online.service
      8.734s snapd.service
      8.325s dev-sda5.device
      8.277s systemd-journal-flush.service
      6.499s networkd-dispatcher.service
      6.000s ModemManager.service
      5.693s udisks2.service
      4.703s accounts-daemon.service
      4.134s NetworkManager.service
      3.867s e2scrub_reap.service
      3.645s systemd-fsck@dev-disk-by\x2duuid-86D3\x2dF64F.service
      3.387s secureboot-db.service
      3.344s grub-common.service
      3.257s dev-loop2.device
      ...

EDIT I:
Things I have tried so far: fresh installs many times, edited grub file with "quiet splash noresume", disabled some processes that were taking a long time, and most of the common solutions that somebody could find on internet.
Results of: cat /proc/swaps && free -m
Filename                Type        Size    Used    Priority
/swapfile               file        947128  0       -2

              total        used        free      shared  buff/cache   available
Mem:          10969        1603        8030         124        1336        8958
Swap:           924           0         924

Result of systemd-analyze critical-chain
graphical.target @52.206s
└─multi-user.target @52.206s
  └─kerneloops.service @31.766s +1.015s
    └─network-online.target @31.601s
      └─NetworkManager-wait-online.service @22.848s +8.752s
        └─NetworkManager.service @18.711s +4.134s
          └─dbus.service @18.704s
            └─basic.target @18.474s
              └─sockets.target @18.474s
                └─snapd.socket @18.310s +163ms
                  └─sysinit.target @18.286s
                    └─apparmor.service @15.427s +2.858s
                      └─local-fs.target @15.423s
                        └─boot-efi.mount @14.946s +477ms
                          └─systemd-fsck@dev-disk-by\x2duuid-86D3\x2dF64F.service @10.828s +3.645s
                            └─dev-disk-by\x2duuid-86D3\x2dF64F.device @10.826s

EDIT II:
Outputs after sudo systemctl disable NetworkManager-wait-online.service
systemd-analyze time
Startup finished in 4.261s (firmware) + 12.044s (loader) + 4.338s (kernel) + 40.317s (userspace) = 1min 962ms
graphical.target reached after 40.276s in userspace

systemd-analyze blame
     18.691s plymouth-quit-wait.service
     10.686s dev-sda5.device
      9.799s snapd.service
      9.379s configure-printer@usb-001-002.service
      6.580s systemd-journal-flush.service
      5.879s udisks2.service
      5.620s networkd-dispatcher.service
      4.928s ModemManager.service
      3.954s NetworkManager.service
      3.906s accounts-daemon.service
      3.855s e2scrub_reap.service
      2.898s apport.service
      ...

I know nothing about Ubuntu but I need it running properly for many courses. I really hope for someone to help me, thanks.

As described in this answer:

What does NetworkManager-wait-online.service do?

A considerable amount of your boot time can be saved with the command:

sudo systemctl disable NetworkManager-wait-online.service

systemd-journal-flush.service : Try to clean the journal logs with

sudo journalctl --rotate
sudo journalctl --vacuum-time=1s

more info here Root drive is running out of disk space. How can I free up space?


Dual Booting Samsung ATIV 9 I've been trying to install Ubuntu 13.10 on my new Samsung ATIV 9 and I'm running into some problems with the BIOS. I've followed the guides saying to disable SecureBoot, select CSM (Compatibility Support Mode) option, and turn off Fastboot, but I'm still having some issues. I am trying to setup my BIOS to read from a USB first, but when I go to Boot Priorities, I only have the option to launch Windows or to Disable the boot. How can I add Boot from USB to this list?

I had this problem too. "USB" does not have to (and may never) appear on the boot menu. As far as I can remember you should disable the fast boot and secure boot options on the Boot page in BIOS. (I think they are the last two items on the list). You may have to choose "Disable" in the boot priority menu as well. Then try booting from USB.

Now something very important. You should choose UEFI not CMS. Look here: Dual boot Ubuntu+Windows 8: Ubuntu won't show up

Make sure you have taken BIOS update from Samsung. Setup your BIOS setting for boot to CSM only. Insert a bootable ubuntu usb stick and reboot. It should boot from usb now.


Shutdown my system in 30 minutes with telinit If I want to shutdown my system in 30 minutes with telinit, how could I do it? I know that with shutdown is easier but just for knowing it.

Using at:

at now + 30 minutes <<<'telinit 0'

Or use sleep 30m; telinit 0.

telinit itself cannot do this. You will have to use other tools in combination. at and sleep both allow you to cancel the operation (with atrm for at and CtrlC for the other).

As a suggestion, not addressing to your question directly. Even at command is not installed by default and  sleep with telinit is a great chioce: If you want to try another tool other than telinit, you could try reboot with at:

echo reboot | at now +30 m


Script to display all terminal colors Throughout the internet I have seen many people with scripts that prints out a bunch of stuff in all the colors defined in ~/.Xdefaults. However when I try to use these, I always get   error: Bad Substitution. Does anyone have a working script that does the same thing?

It should end up looking something like this:

Here is my solution with Bash only:

for x in {0..8}; do
    for i in {30..37}; do
        for a in {40..47}; do
            echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "
        done
        echo
    done
done
echo ""

One-liner:

for x in {0..8}; do for i in {30..37}; do for a in {40..47}; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo ""

Here's a picture in Cygwin:

Refer https://askubuntu.com/a/396555/41013
That will print the following output with formats like BOLD ,UNDERLINE , Highlighting and colors.


Ubuntu 14.04, wifi connection but no Internet, no usb recognized, can't shut down or restart properly Sometimes Ubuntu is amazing, other times it makes me want to rip my hair.

So I have a laptop, hp pavillon g6 séries with Ubuntu 14.04 installed from a couple months ago, after struggling with the installation, finally got something workable, everything was fine until today I was going to connect my USB mouse and didn't work, so I tried rebooting but i got stuck in the little dots shutting off, so I held the button 5s, now, not only the USB ports don't work or the reboots / shutdown, now I'm connected to my wi-fi but can't open any pages.

Help, request me any information you might need but do so indicating step by step, because i'm not very good with Linux.

You didn't include much about your problem and given that you claim not to be very good with Linux, I would recommend the following:

Create an Ubuntu live USB using another computer with Windows or Ubuntu.
Use it to backup all your data.

Unplug your new USB mouse and connect your laptop to internet with an ethernet cable.
Open a console and type the following to upgrade to Ubuntu 15.04

sudo do-release-upgrade

Hopefully your problem will go away after the upgrade.


Java version for Ubuntu 14.10 What version of Java should I load onto my Ubuntu 14.10 O/S. Also if there is a specific process needed to install same please provide explicit instructions as I am first learning to use Linux?

sudo apt-get install openjdk-7-jre

 sudo apt-get install openjdk-7-jdk

Here More help for installing java in ubuntu


Cannot import gnuradio. Is python set correctly? When launching gnuradio companion it gives this error message:

Cannot import gnuradio.

Is the python path environment variable set correctly?
    All OS: PYTHONPATH

Is the library path environment variable set correctly?
    Linux: LD_LIBRARY_PATH
    Windows: PATH
    MacOSX: DYLD_LIBRARY_PATH

I do have python 2.7.3 installed.
I installed gnuradio using binaries .deb file from the website below::::
http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki/GNURadio_Linux
I do not think the problem from GNURadio something it should be done with those libraries...

In what must be my 6th distinct attempt in as many months to setup and run GNU Radio on Windows, I have finally succeeded! I admit I'm a little delirious with joy and disbelief.  I'm answering here because I was getting the exact same error you are, and I suspect you're having the same problem despite the different platform.

What worked for me (after installing GNU Radio binaries from Ettus, including adding it to the path, and installing Python 2.7):

Set PYTHONPATH=[your Python install]\Lib\site-packages;[GNU Radio install]\lib\site-packages
pip install pygtk
pip install numpy
pip install lxml
pip install Cheetah

(Note: on Windows, pip installs must be run from elevated command prompt "Run as administrator")

I figured out the problem by launching Python interactively and trying the failing statement from gnuradio-companion.py manually, from gnuradio import gr which gave me ImportError: No module named numpy.  That's when it clicked that the module loading was failing while loading its dependent modules, and pip to the rescue to solve that!

I also have been plagued by this problem.  I have a solution that works for me, but I am at a loss to explain why it works.  I stumbled upon it entirely by accident.

At a shell prompt type:

CODE
export PYTHONPATH=/usr/local/lib64/python2.5/site-packages
CODE

Yes, even though I have Python 2.7 installed, and the diectory is, in fact, named "python2.7".  Set the environment to look for "python2.5"

Giving the "env" command at the terminal shows that the "PYTHONPATH" is now set to look for "python2.5"

Now, gnuradio-companion starts up without the error dialog.


How can I get a complete list of non-standard repositories in use? While doing some support audits I'd like to know what would be the most efficient/compact way to get a list of all extra reporitories being used on a given Ubuntu workstation using command line (not via the GUI tools). So far I am using:

diff'ing a standard sources.list file against the workstation's
examining files under cat /etc/apt/sources.list.d

Any other ideas on how to best go about this ?

To examine the files under /etc/apt/sources.list.d, you could use:

cat /etc/apt/sources.list.d/*.list | grep -v "^#"

This reads out the contents of all the files there and then cuts out all commented out lines. This way you only get the repositories that are actually in use.

If you open software-properties-gtk, the Other Software tab will show a list of the extra repositories being used.

software-properties-gtk can be opened by opening Update Manager and selecting settings, or opening the Software Center, Edit -> Software Sources ...


How do I find where an application is installed? I installed wireshark recently. I have no idea in which directory it was installed, but it's not in /opt.

How do I find where it's installed?

Assuming you installed it from the repos:

$ dpkg -L wireshark wireshark-common
/.
/usr
/usr/bin
/usr/bin/wireshark
/usr/share
/usr/share/menu
/usr/share/menu/wireshark
/usr/share/pixmaps
/usr/share/pixmaps/wsicon32.xpm
/usr/share/applications
/usr/share/applications/wireshark.desktop
/usr/share/doc
/usr/share/doc/wireshark
/usr/share/doc/wireshark/copyright
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/48x48/apps/wireshark.png
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/wireshark.svg
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/wireshark.1.gz
/usr/share/doc/wireshark/changelog.Debian.gz
/usr/share/doc/wireshark/README.Debian

/.
/usr
/usr/bin
/usr/bin/editcap
/usr/bin/text2pcap
/usr/bin/dumpcap
/usr/bin/rawshark
/usr/bin/mergecap
/usr/bin/capinfos
/usr/share
/usr/share/doc
/usr/share/doc/wireshark-common
/usr/share/doc/wireshark-common/README.Debian
/usr/share/doc/wireshark-common/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/wireshark-common
/usr/share/man
/usr/share/man/man4
/usr/share/man/man4/wireshark-filter.4.gz
/usr/share/man/man1
/usr/share/man/man1/mergecap.1.gz
/usr/share/man/man1/capinfos.1.gz
/usr/share/man/man1/dumpcap.1.gz
/usr/share/man/man1/editcap.1.gz
/usr/share/man/man1/text2pcap.1.gz
/usr/share/man/man1/rawshark.1.gz
/usr/share/doc/wireshark-common/changelog.Debian.gz

locate keyword is best choice to check the installation directory of the program, look at the initial lines in the result of locate wireshark, and it will tell you all you require.


Error: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu \ xenial \ stable' invalid I was following instructions (https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce-1) to try install Docker CE on VirtualBox running Ubuntu 16.04.3.  Then when I tried to set up the stable repository on step 4 by doing:

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

I got

Error: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu \ xenial \ stable' invalid

Can someone please help?  I am new to programming but online search doesn't appear to show anything directly relevant.

That command is incorrectly line-wrapped which introduces line breaks and backslash characters where there should be none. The correct command would be:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

However, you still need to find and remove the previously added bogus entries. One way to find the files is via grep:

grep -ne '^deb.*docker.*\\' /etc/apt/sources.list{,.d/*.list}

I assume you know how to edit or remove files owned by root.

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" this errored for me CICD with -- deb invalid.
Then changed to ,
add-apt-repository 'deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable'
worked for me. (that is, changed " to ')


Is there a way to see how many downloads have been made for a folder publicly shared on Ubuntu One? Is there a way to see how many downloads there have been for a public folder?

I'm sharing something on Ubuntu One that I want to be able to track the quantity of downloads.

No, at the moment you cannot track the number of downloads of files that you share publicly.

It is not implemented in Ubuntu One and I cannot find it on the feature roadmap so I would not expect it. It is just something that is not so much requested, I would say.

You're providing much too little information. You tagged this windows, are you hosting or downloading the files in windows? At any rate, not knowing anything about the software or files you want to share, all I can recommend at this point is finding a web-based file hosting site that you feel comfortable using. I found this article mentioning 20 of them, but unfortunately the only one that was explicitly described to track downloads was upload-this.com (which seemed to be down at the time of writing), though sendspace.com seems to be up and their slogan mentions "track & share big files". If it's just a matter of sharing files I recommend using a website to host your files.

A much more complicated solution would be to set up a webserver yourself (there are many well documented blogs on how to do this with Ubuntu) and use some of the webserver's tracking tools to check the traffic of those files.


Why my Ubuntu 14.04 does not detect home Wifi? I have installed ubuntu14.04 in my system. I am unable to detect wifi in my system. How to solve this issue?

Thanks in advance.

If you are person using ubuntu 16.04 who landed on this page like me, I leave the below link that solved the problem for me as a reference:

https://askubuntu.com/a/764120/658492

Solution: sudo service network-manager restart

Go to System Settings->Software&Updates->Additional Drivers

There you will find "broadcam wireless driver" and enable it

you should connect with ethernet cable before doing this.


mv: Directory not empty I want to move content of a directory within another directory with the same folders.

Here's an example:

I have ./backup wich have the directories base and test. Now I want to move these directories in ./backupArchives.

I use this:

mv ./backup/* ./backupArchives

but I got the error

mv: cannot move './backup/base' to './backupsArchive/base': Directory not empty

I tried using --force, but no luck. Is there a way to move it when folders already exists?

Note: I just want to merge contents, there's no overwriting.

Though its man page doesn't document it, mv will refuse to rename a directory to another directory if the target directory contains files. This is a good thing in your case because you turn out to want to merge the content of the source into the target, which mv will not do.

Use rsync -a backup/ backupArchives/ instead. After that rm -rf backup/*.

Instead of using rsync, you also can do the classical

(cd backup && tar c .) | (cd backupArchives && tar xf -)

which earns you more geek points.

When moving directory during a script execution, you need to consider non-existing or empty directories, and also force override and removal without confirmation:

# If old directory exists, and isn't empty
if [[ -d old_dir ]] && [[ -n `ls -A old_dir` ]] ; then

  # Make a new directory (skip if already exists)
  mkdir -p new_dir

  # Copy all files to the new directory (-afr : Keep attributes, Force overwrite, Recursive copy)
  cp -afr old_dir/* new_dir/

  # Remove old directory
  rm -rf old_dir
fi


Touch Screen Clicks Repeatedly on Press - Can't Drag Ubuntu 12.04 LTS recognizes my touchscreen correctly. Tapping the screen sends the correct ABS coords and BTN_TOUCH.

The problem is that BTN_TOUCH is set to a 1, then immediately set to a 0 even though my finger never leaves the screen. This means that trying to drag something causes hudnreds of "click" events. I've looked through dozens of posts about evdev, xserver, xconfig, etc.

How can I make BTN_TOUCH stay a "1" as long as my finger is held down?!

Installing the touchscreen drivers should solve the problem. Google the touchscreen company followed by "Linux Drivers" and install them.


Some times when i close the lid of my laptop I get black screen I bought a LENOVO G50-70 59-440027 laptop.
some times I close the lid and when I open it up again I get black screen and the only way to see my screen is to power cycle the laptop.

I personally had this issue solved with a driver update (on a laptop with mixed Intel / nVidia graphics; I updated both the Intel and the nVidia drivers).

If this doesn't solve the problem for you or you can't update the drivers for any reason, the best I can give is a better workaround, i.e. once opened the lid to switch to a TTY with Ctrl+Alt+F1 and then to switch back to the X environment with Ctrl+Alt+F7.

Update to the latest 16.3 graphics Radeon Crimson. It will work.

http://www.amd.com/en-us/innovations/software-technologies/enhanced-media/radeon-software


Disabling bash history index in terminal When I SSH into somewhere, I see something line this in the terminal:
[504]%

Looking it up, looks like its my bash shell history. How can I disable this index display and show the current working directory instead?

On the target system (the one you SSH into), find out where the bash variable PS1 is being set (grep PS1= .bash*), read man bash, the PROMPTING section, and set PS1 the way you want to.


How do I convert epub to mobi using calibre? How do I convert epub to mobi using Calibre for this?

Yes, Calibre package contains a script called ebook-convert to convert ebooks between formats. You can install Calibre with

sudo apt-get install calibre

then

ebook-convert "book.epub" "book.mobi"

NB: Other formats are supported, too:

ebook-convert "book.azw3" "book.pdf"

Yes, you can use Calibre for epub to mobi conversion. They declare mobi as supported output format in their FAQ.

I don’t think there’s anything Ubuntu-specific in the question, so it would probably belong somewhere else.


MySQL error: The partition with /var/lib/mysql is too full! I get this error when trying to start MySQL: The partition with /var/lib/mysql is too full!

Here is the output of df -h:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       455G   77G  356G  18% /
none            4,0K     0  4,0K   0% /sys/fs/cgroup
udev            1,9G  4,0K  1,9G   1% /dev
tmpfs           387M  1,3M  386M   1% /run
none            5,0M     0  5,0M   0% /run/lock
none            1,9G  1,2M  1,9G   1% /run/shm
none            100M   28K  100M   1% /run/user

This shows that the partition is nowhere near full.

I finally fixed it by running sudo /etc/init.d/mysql start. I just had to insert sudo in front of the command.

Run the command sudo apt-get --reinstall install mysql-server to re-install MySQL. It will re-create the missing directories and allow you to start the server again.


How do I install an older version of Mercurial for TortoiseHG? I wish to install TortoiseHQ to use with Bitbuket in Ubuntu, but I cannot work out how. I am using the latest version of Ubuntu 12.04 at the time of this post.

I used these commands to install TortoiseHQ:

$ sudo add-apt-repository ppa:mercurial-ppa/releases
$ sudo add-apt-repository ppa:tortoisehg-ppa/releases
$ sudo apt-get update
$ sudo apt-get install tortoisehg
$ sudo apt-get install qct vim emacs kdiff3 kompare meld xxdiff tkcvs mgdiff

I am sure that this is how I had installed it last time, only a few weeks ago (setting up a mate's laptop now), but when I try to run TortoiseHQ workstation, I get this error:

** Mercurial version (2.2.1).  TortoiseHg version (2.3)
** Command: log
** CWD: /home/itisme
** Encoding: UTF-8
** Extensions loaded:
** Python version: 2.7.3 (default, Apr 20 2012, 22:39:59) [GCC 4.6.3]
** Qt-4.8.1 PyQt-4.9.1
This version of TortoiseHg requires Mercurial version 2.0.n to 2.1.n, but found 2.2.1

So I guess I need to install an older version of Mercurial, but I do not know how. Also, the context menus in the UI file browser are not showing up.

Any ideas?

I had the same problem.

Installing Mercurial from ubuntuupdates.org

and then installing tortoiseHg using sudo apt-get install tortoisehg solved my problem.

Installing TortoiseHg using sudo apt-get install tortoisehg solved my problem.


Nautilus stops working in 14.04 I'm using ubuntu 14.04 LTS. Sometimes when I start my computer , it shows

  System Error , Natilus Stops Working.

And while I typed sudo nautilus from terminal, it shows

(nautilus:4260): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

Is this may be a problem? If so, how can i fix it?

Open a terminal window and copy/paste these commands, one by one:

sudo apt-get remove nautilus
sudo apt-get install nautilus
sudo apt-get install samba

Nautilus is looking for samba which seams that it is not installed

Install samba

sudo apt-get install samba


Help needed on installation of Ubuntu server (precise pagolin) When the installation of the base system of Ubuntu server has reached 80%, it tells me to insert a disc called "Ubuntu server 12.04.4 LTS Precise Pangolin-Release i386 (20140204)" in /media/ cdrom/

What should i do?

Thanks in advance.

I had the same problem using a burned DVD.
Using that one DVD I was able to install on one machine perfectly but installation on a second machine crapped out at 80% like the above. I doubled checked the md5sum, CD integrity, and even burned another DVD and still no dice.

To solve I burned on to a CD instead and installed perfectly on the second machine...go figure!


Version of Java not matching up I installed Sun Java Jre 6 from the source. According to the icon under the Applications menu, it is called "Sun Java 6". Yet, the java -version command yields:

java version "1.5.0"
gij (GNU libgcj) version 4.5.4

First off, why is Java not 1.6? Also, what is gij?

I figured it out. I ran

 sudo update-alternatives --config java

and found that my java was not selected. I selected it and now java -version returns 1.6.

Just follow these simple steps:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin

Ubuntu doesn't ship Sun Java because it's not totally free.

There's more information here. I suggest you read it.


Can't access GRUB when dual booting Currently dual booting with Win8 and Xubuntu 17.04, in legacy mode. However I cannot get GRUB to prompt unless I load YUMI first, then get redirected to GRUB. I have tried disabling Hibernation mode and Fa st Startup mode. When looking at the boot order from BIOS, I see an entry for Windows Boot Manager but nothing for Linux. What else can I try?

You should probably install your linux distro in the same mode as your windows. Since it's Windows 8, it is probably in UEFI mode. Therefore, it might work when you install linux in UEFI mode as well.

At first you want to make sure that:
*secure boot is off
*fast startup is disabled before installing linux os (no need of disabling hibernation)
*create new patition from windows using "disk management"
*You should enter to "live boot install"

Suppose after doing above method, if you can't access grub then try press Esc when starting the OS.
If Esc key is not working. Then enter into Linux OS installig. Installing After installing, don't immediately shutdown installing. Open the terminal and enter:    sudo update-grub


Find and replace text within multiple files I want to know how I can find and replace a specific text in multiple files like in Notepad++ in the linked tutorial.

e.g.: http://cybernetnews.com/find-replace-multiple-files/

Here I use sed to replace every occurrence of the word "cybernetnews" with "cybernet" in every file with the extension, c, in the directory, /home/user/directory/.

find /home/user/directory -name \*.c -exec sed -i "s/cybernetnews/cybernet/g" {} \;

A more generic variation where you search recursively from the directory of execution and operate on only regular, readable, writeable files:

find ./ -type f -readable -writable -exec sed -i "s/cybernetnews/cybernet/g" {} \;

Another program is Searchmonkey.

  SearchMonkey is a light-weight Gtk application that aims to replace the cumbersome find/grep with a slick user interface that quickly provides a mark-up showing locations and quantity of text matches. The goal is to provide a simple to use and accessible search tool for end-users, and software developers alike.


Diskfilter writes are not supported > What triggers this error? This message occurs when leaving the Grub menu and before the Ubuntu splash screen.

How do I fix the problem to clear the message?

And what doe is it mean?

error:  Diskfilter writes are not supported

System boots and seems to work just fine.

It's a BUG!
This is a bug that occurs in the most recent version of Ubuntu Server LTS (Ubuntu Server 14.04 LTS), when you create the boot partition (or the root partition, when the boot partition doesn't exists) inside a LVM or a RAID partition.
You can get more info about this bug in Ubuntu Launchpad: Bug #1274320 "Error: diskfilter writes are not supported".
Update: This bug is already fixed in Ubuntu Server 14.04 and some newer Ubuntu versions. Probably, you only need to run apt-get upgrade.
Why does this bug occur?
When the system is booting, GRUB reads (load_env) data in /boot/grub/grubenv. This file is called GRUB Environment Block.
From the GRUB Manual:

It is often useful to be able to remember a small amount of information from one boot to the next.
[...]
At boot time, the load_env command (see load_env) loads environment variables from it, and the save_env (see save_env) command saves environment variables to it.
[...]
grub-mkconfig uses this facility to implement GRUB_SAVEDEFAULT

This behavior can be founded in /etc/grub.d/00_header (update-grub uses this file to generate the /boot/grub/grub.cfg file):
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi

The problem is that the save_env statement only works in simple installations (you can't run save_env inside a RAID or LVM disk). From the GRUB manual:

For safety reasons, this storage is only available when installed on a plain disk (no LVM or RAID), using a non-checksumming filesystem (no ZFS), and using BIOS or EFI functions (no ATA, USB or IEEE1275).

The GRUB recordfail feature uses the save_env statement to update the recordfail state (see Ubuntu Help - Grub 2, "Last Boot Failed or Boot into Recovery Mode" section). However, in Ubuntu 14.04 (and in recent Debian versions), the save_env statement (inside the recordfail feature) is used even if GRUB is installed in a LVM or a RAID.
Let's see the lines from 104 to 124 in /etc/grub.d/00_header:
if [ "$quick_boot" = 1 ]; then
    [...]
    case "$FS" in
      btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs)
    cat <<EOF
  # GRUB lacks write support for $FS, so recordfail support is disabled.
  [...]
  if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi

GRUB correctly skips the recordfail feature when using unsupported filesystems (btrfs, zfs, etc), but it doesn't skip LVM and RAID at any moment.
How does GRUB protect itself from writing inside RAID and LVM?
To read/write correctly in a filesystems, GRUB loads an appropriate module.
GRUB uses the diskfilter module (insmod diskfilter) in RAID partitions, and the lvm module in LVM partitions.
Let's see the read/write implementation of the diskfilter module:
apt-get source grub2
vim grub2-2.02~beta2/grub-core/disk/diskfilter.c

I'm pasting the code here (lines from 808 to 823). The warning showed in this question appears at line 821:
static grub_err_t
grub_diskfilter_read (grub_disk_t disk, grub_disk_addr_t sector,
                  grub_size_t size, char *buf)
{
  return read_lv (disk->data, sector, size, buf);
}

static grub_err_t
grub_diskfilter_write (grub_disk_t disk __attribute ((unused)),
             grub_disk_addr_t sector __attribute ((unused)),
             grub_size_t size __attribute ((unused)),
             const char *buf __attribute ((unused)))
{
  return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
                 "diskfilter writes are not supported");
}

The grub_diskfilter_read function is implemented (and GRUB can read RAID filesystems). However, the grub_diskfilter_write function raises a GRUB_ERR_NOT_IMPLEMENTED_YET error.
Why does using quick_boot=0 solve the problem? And why is it the wrong solution?
If you look one more time in the /etc/grub.d/00_header code, you will see that the recordfail featured is only used when quick_boot=1. So, changing quick_boot from 1 to 0 disables the recordfail feature, and disables writes in the RAID/LVM partition.
However, it'll disable many other features too (run grep \$quick_boot /etc/grub.d/* and you'll see). More yet, if one day you change your /boot/grub directory to outside the RAID/LVM, the recordfail feature will still disabled.
Summarily, this solution unnecessarily disables features, and it's not generic.
What is the correct solution?
The correct solution should consider disable the save_env statements when GRUB is inside LVM or RAID partitions.
One patch was proposed in the Debian Bug Tracker system to implement this solution. It can be found in: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754921
The idea behind this patch is:

Run a grub-probe --target=abstraction "${grubdir}" command to get what kind of abstraction modules GRUB uses to read/write files in the /boot/grub directory;
If GRUB uses the diskfilter or lvm module, skip the recordfail save_env statement and write an appropriated comment in the /boot/grub/grub.cfg file;

For example, # GRUB lacks write support for /dev/md0, so recordfail support is disabled.

How to apply the correct solution?
If you don't want to wait for this patch be applied by the Ubuntu/Debian guys in the official code, you can use my patched 00_header:
# Download
wget https://gist.githubusercontent.com/rarylson/da6b77ad6edde25529b2/raw/99f266a10e663e1829efc25eca6eddb9412c6fdc/00_header_patched
# Apply
mv /etc/grub.d/00_header /etc/grub.d/00_header.orig
mv 00_header_patched /etc/grub.d/00_header
# Disable the old script and enable the new one
chmod -x /etc/grub.d/00_header.orig
chmod +x /etc/grub.d/00_header
# Update Grub
update-grub

I think this error occur because of raid or LVM partition .

For a temporary fix for this problem  :

Edit :/etc/grub.d/10_linux

Replace 'quick_boot="1"' with 'quick_boot="0"'

Then :

sudo update-grub


How can I make keyboard shortcuts register on key release, rather than on key press? I want to have shortcuts like in Windows; Super opens the start menu, Super+S opens a search window, Super+E opens Thunar, etc.

I know how to set keyboard shortcuts, but when I set Super to open whiskermenu, whiskermenu also pops up in every other instance of Super+* shortcuts. I think this is because XFCE registers the shortcuts as they come, rather than waiting for simultaneous release (like in Windows).

How do I set that up?

You can achieve it this way:**

Install xbindkeys
sudo apt install xbindkeys

Run the command:
xbindkeys --key

In the white box that appears, Press your key combination. Example Win + E will return the following :
"(Scheme function)"
    m:0x50 + c:26
    Mod2+Mod4 + e

Now copy the last (or last second) line and use it as given below.
In newer versions before you need to do this, which let you jump the next step:

Please, create one with 'xbindkeys --defaults > /home/$USER/.xbindkeysrc'.
or, if you want scheme configuration style,
with 'xbindkeys --defaults-guile > /home/$USER/.xbindkeysrc.scm'

Create a new file .xbindkeysrc in your home Directory
touch $HOME/.xbindkeysrc

Open it
nano $HOME/.xbindkeysrc

Enter your required command and keys as given below
"nautilus"
    release+Mod2+Mod4 + e

(Note: Don't forget release , Replace "nautilus" with any command.)
Similarly add all the requires command-key combinations one below the other

Now add xbindkeys to xinitrc:
sudo nano /etc/X11/xinit/xinitrc

add xbindkeys to the starting (1st line or before . /etc/X11/Xsession)

Reboot your system and you should get expected behavior
TIP: Make sure you don't set conflicting configurations in xbindkeys and your GUI method provided by your DE
For more examples, man xbindkeys.

You can fix it by install patched XOrg

sudo add-apt-repository ppa:nrbrtx/xorg-hotkeys
sudo apt update && sudo apt upgrade -y


Ubuntu One for Android without Google play Is there a way to get the Ubuntu One apk file? My Android device is not supported by Google.

You can use F-droid. An Open Source alternative for Google Play:

F-DROID

On App just search for Ubuntu or Ubuntu One. But unfortunately i could not find Ubuntu One Music on it.

If you mean the Ubuntu One Files for Android app download it from

https://launchpad.net/ubuntuone-android-files/trunk/1.2.7/+download/u1f-1.2.7-google.apk

If you want all the releases download it at

https://launchpad.net/ubuntuone-android-files/+download


Is there a program like Microsoft Paint? Greetings, I'm slowly getting used to Ubuntu; for I've been a Windows user as long as I've used any computer. I'm hoping someone can suggest a good graphics software.

I'm simply looking for one that works close to Microsoft Paint.
Does Ubuntu offer anything like it?

The closest MS Paint clone is Pinta.  I regard it as vastly superior to MS Paint, but it retains its simplicity.

It isn't Paint exactly but I really like Inkscape.  It is a vector graphics editor.

Maybe that is more than you want.

http://sourceforge.net/projects/inkscape/

Its also in the repository


Really verbose way to test Git connection over SSH? When using GIT, I have problems with using GIT over SSH, and since it works just fine both from work, and at home with a different modem, it's obviously my home modem that is acting up. I have no problems connecting over HTTP.

So, I'm assuming it is an SSH problem, but I'm no expert at using it directly. Is there any command I can run which sets up a "test" connection, and lets me know exactly when and where along the line the problem occurs?

Pretty much all "larger" commands (such as fetch, clone, or push with much data) from git (even when run with -v) just "hang" in the middle of connecting remotely with no indication as to why they have stopped, so they are of no use.

Is there any way I can get more details on what is happening in the SSH connection?

Environment variable

From Git version 2.3.0, you can use the environment variable GIT_SSH_COMMAND and pass the -v verbose argument like this:

GIT_SSH_COMMAND="ssh -v" git clone example

To be extra verbose, make it -vvv:

GIT_SSH_COMMAND="ssh -vvv" git clone example

Git config

From Git version 2.10.0, which will in Ubuntu 17.04's repos, you can save this configuration globally, or per repo as in this example:

git config core.sshCommand "ssh -vvv"
git pull

I don't see a way to tell git(1) the external command to use for ssh(1), but as a workaround, simply rename /path/to/ssh to /path/to/ssh.orig, create a shell script wrapper /path/to/ssh, and add in the -v flags:

$ sudo mv /usr/bin/ssh /usr/bin/ssh.orig
$ sudo vim /usr/bin/ssh
$ cat /usr/bin/ssh
#!/bin/sh

if [ -x /usr/bin/ssh.orig ]; then
    exec /usr/bin/ssh.orig -v -v -v "${@}"
fi

$ sudo chmod a+x /usr/bin/ssh

I get verbose output when executing git commands operating over an ssh transport.  Once done debugging, delete the script and restore /path/to/ssh.orig to /path/to/ssh.


Apache server on Localhost stops working, logs show a segmentation fault, and connections get "Connection Reset" errors After searching throught the internet for a while and trying all the fixes i've found(edit httpd.conf, vhost conf file, firewall) but still can't fix this error.

My server ran incredibly good yesterday and most parts of today, but at a certain time, it crashes and won't responds even after several restarts of the server and even the OS.

The server doesn't respond to only one script so it seems, and this is the script I need to run and debug.

The last time it crashed, PHP gave an error due to memory limit being reached, the error when I try to load the specific page: ERR_CONNECTION_RESET

EDIT:
While checking my error.log file I saw:

child pid 3549 exit signal Segmentation fault (11), possible coredump in /etc/apache2

Maybe this'll help you guys out

Hope you guys can help me out with this weird problem

Segmentation faults usually indicate problems in the program that's running, either in the application that Apache is serving or in Apache itself.

What you need to do is check if your scripts or web applications are triggering such segmentation faults.  That's harder to trace.

If serving even plain static content causes the segmentation fault too, then you need to file a bug against Apache as it is misbehaving and may have a bug in it.

On local #TYPO3 projects the generated temp files could be the reason. Clear all caches on typo3temp folder was the answer for me ;)


Unable to locate package phpmyadmin on Ubuntu Server 18.04 Whenever I try to install phpmyadmin on my ubuntu server 18.04 I get the following errors

sudo apt install phpmyadmin php-mbstring php-gettext
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package phpmyadmin
E: Unable to locate package php-mbstring
E: Unable to locate package php-gettext

Most threads I ca find suggest reupdating and upgrading using apt, but doing so doesn't do anything, also I get that error on the fourth line

Err:5 http://ppa.launchpad.net/nijel/phpmyadmin/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.83 80]
Hit:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 http://download.webmin.com/download/repository sarge Release
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/nijel/phpmyadmin/ubuntu bionic Release' does not have a Release file.

Can someone help with this?

This worked for me:

sudo add-apt-repository universe

Then:

sudo apt install phpmyadmin

I have precisely the same issue. Tried sudo apt install phpmyadmin (with and without php-gettext and php-mbstring which I installed separately as I am using php7.1) but always get E: Unable to locate package phpmyadmin

and for the add-add-repository

E: The repository 'http://ppa.launchpad.net/nijel/phpmyadmin/ubuntu bionic Relea                        se' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disa                        bled by default.

Also tried downloading the package from a mirror but got nowhere with that either.

Is the ppa broken and is there another solution or workaround or something I can do to help resolve this issue?


How do i stop Ubuntu from asking for a password to decrypt my drive on start up? Ubuntu keeps asking for me to decrypt my drive on start up. This is expected, because I had set up full-disk encryption.

How do I stop this now?

Unfortunately you can't stop it.
When this encryption has been only applied on your home folder it is possible.


What command should I type to run Chrome from the terminal? I have remote box accessed by VNC and jwm desktop.
No menus, not desktop icons, only a terminal window.

I have downloaded Chrome's .deb package and installed it.

How can I run it from the terminal window?

Well simply typing google-chrome works fine for me. It might not work if you installed Chromium. chromium-browser is for Chromium.

For Chrome:

google-chrome

For Chromium:

chromium-browser

However if it's a remote box... At least via ssh you must use -X when option connecting to be able to run windowed apps. Like this:

ssh -X username@server.lt

Type

google-chrome-stable

I use this command and it works for me. I too installed it using the .deb package. So this should work for you too. Typing an url after the command opens the url.


Prevent user from executing history -c command in shell Is it possible to prevent specific user from executing history -c command in shell.

history command is a bash builtin command (you can find it somewere at the line 4348 in man bash). So you can use something like this in this case.

What you can do is to harden /home/username/.bash_history by making it append-only:

sudo chattr +a /home/username/.bash_history

Also, you have to harden history environment variables by adding the following lines to /home/username/.bashrc:

shopt -s histappend
readonly PROMPT_COMMAND="history -a"
readonly HISTFILE
readonly HISTFILESIZE
readonly HISTSIZE
readonly HISTCMD
readonly HISTCONTROL
readonly HISTIGNORE

Source: https://superuser.com/questions/308882/secured-bash-history-usage.

As an alternative to Radu's answer, this will chown all the bash related files to root then give other users read only access (except .bash_history and .bashrc, for which they will have read and append premissions)

Add these lines to $HOME/.bashrc:

shopt -s histappend
readonly PROMPT_COMMAND="history -a"
readonly HISTFILE
readonly HISTFILESIZE
readonly HISTSIZE
readonly HISTCMD
readonly HISTCONTROL
readonly HISTIGNORE

Then execute these commands in a terminal:

sudo chown root /home/$USER/.bash_history
sudo chown root /home/$USER/.bash_profile
sudo chown root /home/$USER/.bash_login
sudo chown root /home/$USER/.profile
sudo chown root /home/$USER/.bash_logout
sudo chown root /home/$USER/.bashrc

sudo chmod o+rwt     /home/$USER/.bash_history
sudo chmod o+rt,a+x  /home/$USER/.bash_profile
sudo chmod o+rt,a+x  /home/$USER/.bash_login
sudo chmod o+rt,a+x  /home/$USER/.profile
sudo chmod o+rwt,a+x /home/$USER/.bash_logout
sudo chmod o+rwt,a+x /home/$USER/.bashrc

sudo chattr +a /home/$USER/.bash_history
sudo chattr +a /home/$USER/.bash_logout
sudo chattr +a /home/$USER/.bashrc

Warning: Not tested at all, this is provided with ABSOLUTELY NO WARRANTY!


How do I load abobe flash? Possible Duplicate:
  How do I install Adobe Flash player?

I am very new to ubuntu. So far I am happy with it but I need to learn how to download flash. Well, I have downloaded it but I don't know what to do next. Or another opensource program that works. I am running ubuntu 11.04 and firefox. There is much to learn and just need a little direction. Thank you for your help.

There are plenty of results if you google for 'install adobe flash ubuntu'.
You downloaded the .deb file, then use Software Center to install it. Or use sudo dpkg -i path_to_the_flash_deb_file. Make sure you downloaded the correct version (32bit/64bit) for your OS architect.

The easier way is to install the Ubuntu restricted packages from the Ubuntu software center.

On the software center just search for Ubuntu restricted and you get it directly! You will have Flash, Java and many other "licence restricted" packages in one shot!


Broken Ubuntu 13.10 Installation I upgraded from 13.04 to 13.10 and shutdown my computer and now it boots to a blank screen everytime. The only thing there is a cross shaped cursor. I can boot to terminal using ctrl+alt+f1.

Boot repair did nothing (paste.ubuntu.com/6358039) and when I tried to re-install using a live CD the installation was not detected so I have no option to keep my files.

Is there anyway I can repair without losing my files in my home folder? Thanks.

Your system partition is broken. Boot on an Ubuntu 13.10 disk, choose "Try Ubuntu", and fix your system files this way: https://help.ubuntu.com/community/UbuntuReinstallation

Upgrading from 13.04 to 13.10 isn't supported natively, due to the way that unsupported releases are strung together.

Ideally, you should do-release-upgrade from the current version to the latest version, as each step will (in theory) do upgrade steps needed.

The other alternative is to do a fresh install using a currently supported release, and restore from backup.

It's generally a very bad idea to attempt to upgrade from one unsupported release to another.


How can I use my Garmin device in Ubuntu? Specifically, I have a Garmin Forerunner 305 (a GPS-enabled, hear-rate-monitor for runners).  I plug it in to the USB port and it is not recognized by Ubuntu at all.  I'd like to be able to have it recognized, so that I can pull the exercise record from the watch.  This would allow me to upload it to the Garmin Connect website, or perhaps use a Linux exercise software option.  I'd also appreciate suggestions for exercise software to use with the Garmin.

Maybe these will help you connecting to your Garmin device.

First, use Software Manager or sudo apt-get from the terminal to install the garmin-forerunner-tools package.
Next sudo vi or sudo nano or sudo gedit /etc/udev/rules.d/51-garmin.rules and
add the content SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666" as detailed in http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=124627
Reboot
Plug in your garmin 305 and make sure it is powered on.
Type garmin_get_info and you should see xml output
Create a container directory for example mkdir garmin and cd into it
Type garmin_save_run and it will create subdirectories for each year and the months under each year and finally track/workout files under each month, each in gmn format.
You can convert each to gpx format if you wish by using garmin_gpx ... very nice.

Thanks much to txwikinger.


Full screen game not running in full screen, under wine? I can't seem to play Grim Dawn (only game I'm currently playing) in full screen: even though it's in full screen selected inside the game, it's in a window. It's problem because it cuts part of the image: from both bottom as well as right side.

Here's a screenshot with the problem:

as can be seen, it cuts part of the bottom as well as a sizeable chunk from the right size.

Here's a pic taken from the net of this screen,

so that you can see how much is being cut off.

The workaround is to select the 2nd highest resolution. it works because I can see the whole picture but that's because, even though it's supposed to be in full screen, it's actually on a window. That's not full screen at all.

I have less then 2 months experience using Linux and I chose Ubuntu 16.04. please keep that in mind when posting solutions to this problem because I may not know how to implement them.

this is why the game is in a window:

If play-on-linux allows it. open the wine configuration for the prefix where the game is installed and uncheck Emulate a virtual desktop

Note: if this is a steam game, Steam has a linux version.

I really thought i had tried this before (ravery's fix), as can be seen in this pic.

Turns out it was the wrong winecfg, which is why it didn't work.

Just tried it via PlayonLinux instead of from the terminal and finally FINALLY i get to play the game in full screen!!!

This problem seems solved!


Have lampp use PHP code in a directory not under /opt/lampp I have my lampp installed in the default /opt/lampp directory and the PHP code is in the htdocs folder. Now, to edit any of the files I have to use sudo permissions and have to type my password (or use sudo -i) which I do not want to do.

All I want is to know if I can somehow make lampp use the code that is residing in a folder not located under /opt/lampp/. I tried giving full path and using a '..' relative path - both did not seem to work.

Or is it okay to do my work in /opt/lampp/ folder by using sudo all the the time?

To actually answer your question although I believe using lampp is not a good thing:

Try to use a symbolic link. Change into your htdocs directory and do something like sudo ln -s /home/<your user name>/Documents/my_website my_website where ~/Documents/my_website is a directory in which you can put all your PHP scripts. Make sure this folder exists. This is now tested and it works for me.

lampp is the most stupid thing I know. There are dozens of web servers you can install using the package management, for example apache's httpd. All you have to do is install apache2  and php5 . Then do sudo a2enmod userdir and sudo /etc/init.d/apache2 reload. Now you can put all your PHP scripts in ~/public_html/ and access it on http://localhost/~<your user name>/


Is it possible to edit grub.cfg? I wish to change a menu entry in grub.cfg, for example:

From

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu is wonderful'

To

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu is world famous'

Edit /etc/grub.d/10_linux instead and run sudo update-grub when you are done. This is a more reliable method, otherwise every time you upgrade to a new kernel your /boot/grub/grub.cfg will be overwritten and you will lose your changes.

Or you can use Grub Customizer. To install it:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

yes you can edit this file /boot/grub/grub.cfg


How to roll-back or downgrade kernel on 14.04 (re: Wine stopped working)? With a recent update (I'm on 14.04 LTS), Wine suddenly stopped working. It turns out this has already been reported at WineHQ where the related bug reports are linked.

The advice there is to downgrade the kernel while awaiting the fix, referring users back to their distros on advice for doing the "downgrade". There are quite a few Q&As about this, but the 14.04 specific ones don't appear to meet this need. (And the "similar questions" in the sidebar are often quite old.)

How should the kernel be safely downgraded while not prohibiting automatic updates (to catch the fix which is surely coming soon!)?

The problematic update in my case appears to be this one:

2015-07-28 14:08:18 upgrade linux-libc-dev:amd64 3.13.0-58.97 3.13.0-59.98

When you first boot up your machine you should see the grub boot menu. At the grub boot menu choose the older Kernel you want to boot to - Once you have chosen the Kernel you want to keep and you have booted into it

uname -r

will tell you what kernel you are currently running on (measure twice cut once)

dpkg -l | grep linux-image
dpkg -l | grep linux-headers

will tell you what kernels/headers are saved on your system - I will also delete the headers - though they dont take up too much space i still purge them, why have them if I am deleting the kernel?

Be advised that it is important to NOT delete the Kernel you are running i.e uname -r  Deleting these kernel and header entries will make your system unusable

then just delete the ones you dont want:

sudo apt-get purge

I will copy the output of dpkg -l | grep linux-image to a text document so that it is an un-messy process and i can clearly choose what i want to delete vs save

an example of what the full command will look like:

sudo apt-get purge linux-image-3.16.0-41-generic linux-image-3.16.0-41-lowlatency linux-image-extra-3.16.0-41-generic

sudo apt-get purge linux-headers-3.16.0-41 linux-headers-3.16.0-41-generic linux-headers-3.16.0-41-lowlatency

an example of what the output of dpkg -l | grep linux-headers will look like:

jason@casa-wesella:~$ dpkg -l | grep linux-headers
ii  linux-headers-3.16.0-41                     3.16.0-41.57~14.04.1                    all          Header files related to Linux kernel version 3.16.0
ii  linux-headers-3.16.0-41-generic             3.16.0-41.57~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-3.16.0-41-lowlatency          3.16.0-41.57~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-3.16.0-43                     3.16.0-43.58~14.04.1                    all          Header files related to Linux kernel version 3.16.0
ii  linux-headers-3.16.0-43-generic             3.16.0-43.58~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-3.16.0-43-lowlatency          3.16.0-43.58~14.04.1                    i386         Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii  linux-headers-generic-lts-utopic            3.16.0.43.34                            i386         Generic Linux kernel headers
ii  linux-headers-lowlatency-lts-utopic         3.16.0.43.34                            i386         lowlatency Linux kernel headers

Just edit the grep config file to set a specific kernel as the default:
Manually Setting a Specific Kernel as the Default

To manually set a specific kernel to boot, the user must edit the /etc/default/grub file as the superuser/root.

sudo nano /etc/default/grub

The line to edit is the GRUB_DEFAULT=0. After setting this line to the desired setting (see below), save the file and update the GRUB 2 configuration file using the following command:

sudo update-grub


Virtualbox not seeing any usb devices in the usb filters settings I was following this question but found a problem.
Use my webcam with Ubuntu running in VirtualBox

I used guvcview to test the camera, it works. I installed the 12.04 virtualbox release from their website and installed the extension pack. But when I click the usb with the green plus sign it says no devices available.

This may help you access the USB devices in your guest OS hosted in Ubuntu
First install dkms :

sudo apt-get install dkms

Next install Gnome-System-Tools

sudo apt-get install gnome-system-tools

Now launch the application - Users and Groups. If you're using unity you can do this by tapping the Super key and type user then click Users and Groups icon to start up the User Settings.
Click Manage Groups, find vboxusers, click properties, add your own user name and any other desired users to the vboxusers group. Click Ok.
Next you'll have to log out (sudo restart lightdm if you're using this DM) and back in. Now start VirtualBox and proceed with adding the USB devices.

Try this.  Once in VirtualBox, click on Devices --> USB Devices --> click on your desired USB device.  Do you see the desired device?


What's the meaning of version numbering of Ubuntu? What's the meaning of the numbering for different versions? Do they signify something?

Ubuntu follows a regular 6 month release cycle. The version numbers are formatted in Y.MM (10.04: April, 2010). Every two years there is a Long Term Support (LTS) version release which will be officially supported for two more years.

The last LTS was 12.04, the current LTS is 14.04, and the next LTS is 16.04 - the three releases between these LTS releases culminate into the next LTS, ideally viewed as "6-month baby releases that piecemeal towards the next LTS".

Typically after each non-LTS release a point release is made for the current LTS designed to maintain stability and backport changes keeping an LTS release 'supported' These are denoted as a third version number (12.04.[1-4]).

This chart and more information can be found on the Ubuntu Wiki: LTS article.

The first number is the two last digits of the current year.


Why can other users see the files in my home folder? I just added a new, underprivileged "desktop user," and I was surprised to discover that it can see the files in my home folder.

What is the rational for setting up such lax permissions?

A Public folder exists in your Home directory (/home/user) for sharing files with other users. If an other user wants to get access to this Public folder, the execute bit for the world should be set on the Home directory.

If you do not need to allow others to access your home folder (other humans or users like www-data for a webserver), you'll be fine with chmod o-rwx "$HOME" (remove read/write/execute from "other", equivalent to chmod 750 "$HOME" since the default permission is 750). Otherwise, you should change the umask setting too to prevent newly created files from getting read permissions for the world by default.

For a system-wide configuration, edit /etc/profile; per-user settings can be configured in ~/.profile. I prefer the same policy for all users, so I'd edit the /etc/profile file and append the line:

umask 027

You need to re-login to apply these changes, unless you're in a shell. In that case, you can run umask 027 in the shell.

Now to fix the existing permissions, you need to remove the read/write/execute permissions from other:

chmod -R o-rwx ~

Now if you decide to share the ~/Public folder to everyone, run the next commands:

chmod o+x ~ - allow everyone to descend in the directory (x), but not get a directory listing (r should not be added)
find ~/Public -type f -exec chmod o+r {} \; - allow everyone to read the files in ~/Public
find ~/Public -type d -exec chmod o+rx {} \; - allow everyone to descend into directories and list their contents

If you are use GNU coreutils (e.g. on Ubuntu, not on a embedded system having only busybox), then the previous two commands using find and chmod can be replaced by this single command that recursively makes folders and files readable (and additionally adds the execute (descend) bit for directories only):

chmod -R o+rX ~/Public

If you really need a high level of security: please re-install and make sure to choose the option to encrypt your entire disk. This will require a passphrase to even start the machine. You may of course also encrypt your home folder once more on top of this, with some performance degradation; though not noticeable for normal use.

Please note, that encrypting your home folder will disable applications like Dropbox. Dropbox is not secure storage that respects privacy anyway, so that may be a trite point. However, if you do need secure and private storage in the cloud, I would personally recommend MEGAsync since only you would have the keys to access the data.


Error 1962: no operating system found after installing 12.04 (Lenovo ThinkCentre) I just installed a fresh copy of 12.04 on a new Lenovo ThinkCentere from a USB drive, and when I restarted after installation, the boot sequence didn't find the OS. Instead I got the 'no operating system found' error. When I started Ubuntu from the USB, I could see the HDD and that it had all the installed files. I just couldn't boot into it. It appeared that GRUB was not at the right place... or that there was something funky with the MBR. What is the simplest way to fix these sorts of errors?

Thank you,

EDIT: It appears the problem might have to do with UEFI and GRUB...

Ok...this took a lot longer than it should. But here it goes:

Installing 12.04 on a 64 bit system that supports UEFI booting like the thinkcentere will create three partitions on the system: a FAT partition for EFI, the ext4 partition for ubuntu and some swap. However, restarting the machine, I was not able to boot at all. Initially, the Intel Boot agent would kick in and try to boot from the network. Even if you turn that off, as indicated later, it still doesn't boot. It says no operating system found.

Now here are the things I tried that didn't work for me:

Change the SATA controller type to IDE Using a boot repair disk (it
doesn't know how to handle EFI with GPT partitioning)
Changing the order of the boot sequence to put HDD first
Changing the boot mode from UEFI, to Legacy or to Auto
Recompiling GRUB2 and putting it in the UEFI paritition, as indicated here:https://help.ubuntu.com/community/UEFIBooting

The first good direction I got was from this thread:http://ubuntuforums.org/showthread.php?t=1896052  People were having problems with earlier versions of Ubuntu. One of the suggested solutions is to install 10.04 first, and update from there.

What this really does is forget UEFI altogether, and create just two partions..the ext4 for ubuntu 10.04 and swap. You could then upgrade to ubuntu, which keeps the same partitioning. A couple things to note...mind your architectures, since this particular machines support 64 bit or 32 bit, so the 10.04 you install first should have the architecture you intend to keep. Also, your network card will likely not work on the 10.04 kernel, so you will have to upgrade from the cd by installing the alternate iso. Follow these instructions: https://help.ubuntu.com/community/PreciseUpgrades#Upgrading_Using_the_Alternate_CD.2BAC8-DVD .

What I did instead was, First installed 10.04, then install ubuntu 12.04 again, but go to 'do something else' on the partitioning page...and i simply chose to reformat the main ubuntu parition and leave the swap as is (mind you, after 10.04 you probably have only those two partions on the HDD you installed the ubuntu on). [in retrospect, I could just have created those partions without installing 10.04, it seems]

Once installation is done,  I restarted, but was greeted with an error "invalid arch independent ELF magic". Looking this up indicated that grub was probably from a previous version of ubuntu,and needs to be installed again. I had to boot from the liveCD/USB again, and reinstall grub2 (you can follow these steps:https://help.ubuntu.com/community/Grub2/Installing#Reinstall_from_the_LiveCD)

Alright, now restart again. It should boot, but I got some errors at the begining which said "no suitable mode found" and "no graphics mode found". Apparently, this is something simple that has to do with fonts. Found this bug report https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/699802 and then used the workaround on comment #24 and viola. Now the system boots into 12.04 with no errors...it is using legacy booting...but it working for now at least.

I believe this can be fixed in the installation process of 12.04, but things are this way for now.

I had this problem with an ECS A75 board which BIOS was based on Lenovo. Apparently, most of Lenovo BIOS have this little issue that makes the UEFI boot always seek for the boot folders with same structure as in Windows 8.

I lost 3 days trying to figure out how to make Red Hat 6.5 boot properly after installation. Ok, RHEL have outdated Kernel and Ubuntu 13 already changed this, but in case someone still needs this solution, here goes how i solved it:

Boot to Live Ubuntu and then mount the boot partition;
Inside this partition there is one only folder, named [EFI]. Inside [EFI] folder, a subfolder named [REDHAT], containing the files [grub.conf] and [grub.efi]. Probably in Ubuntu this subfolder is named [UBUNTU];
On [EFI] folder you should duplicate the subfolder, whatever it is, and then rename this copy as [BOOT];
Now, inside the newly renamed [BOOT] folder you should rename the files to [Bootx64.conf] and [Bootx64.efi];
Unmount the partition and try to boot to your system now.

Let us know if this works for your problem.


youtube-dl not working since Ubuntu 16.04 upgrade I recently updated my ubuntu from 15.10 to 16.04 and since then youtube-dl does not work. I get the following error

youtube-dl https://www.youtube.com/v=KV2ssT8lzj8
  Traceback (most recent call last):
    File "/usr/local/bin/youtube-dl", line 7, in <module>
      from youtube_dl import main
    ImportError: No module named 'youtube_dl'

Many users on similar QA all had problems because they didn't follow the official installation instructions.

If you used apt-get, remove the old version like this :

sudo apt-get autoremove --purge youtube-dl

Install the new one by using these commands :

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Try again  : youtube-dl https://www.youtube.com/watch?v=KV2ssT8lzj8

source

Did you try reinstalling youtube-dl ?
And after reinstalling try this command

youtube-dl -cit https://www.youtube.com/watch?v=50VWOBi0VFs

Hope it helps


How to make my screen brightness not change when I plug my laptop in I do not want my laptop to change brightness when my laptop power is plugged in or unplugged. I set my brightness based on how bright my surroundings are. If I am in a dark room, I set my brightness very low and when I plug my laptop in the brightness gets set to maximum which feels like sticking my eyes in boiling lava.

In System Settings ▸ Brightness and Lock the Dim screen to save power checkbox is unchecked.

My laptop is an HP Mini 110

In case it is an acpi issue I have put my acpi-support file here
[link removed because it expired]

I tested a solution that works fine for me.
One solution is to add a script file in /etc/pm/power.d/

Just creates a file

sudo vi /etc/pm/power.d/run_after_pwrmanagmt.sh

Then writes this code into this file :

case "${1}" in
    true) #battery_mode
        xinput set-int-prop 12 277 8 2 3 0 0 1 3 2
        echo 4000 > /sys/class/backlight/intel_backlight/brightness
;;
    false) #ac_mode
        xinput set-int-prop 12 277 8 2 3 0 0 1 3 2
        echo 4000 > /sys/class/backlight/intel_backlight/brightness
esac

Now, you need to give execution rights to this file by typing

sudo chmod +x /etc/pm/power.d/run_after_pwrmanagmt.sh

Now it should work fine, just test to plug/unplug your computer.
Note that you can do similar things after a suspend (/etc/pm/sleep.d/run_after_sleep.sh), that's how I found out this solution... You will find information on the web...

Note that xinput is just a command for my trackpad to set the middle button working... You should skip the two lines xinput if not needed (or adapt ).
For the value 4000, it may be diffrent for each screen, you should first see what is your max value with the command cat /sys/class/backlight/intel_backlight/max_brightness

Hope this helps, and that the moderator will not delete this post since this is an answer and not a question.
Thanks

Under "brightness and lock" in the system settings, remove the checkbox from "Dim screen to save power".

This will keep your screen at the same brightness all the time, instead of dimming it when running on battery power and making it brighter when it's on mains power.

You should still be able to adjust the screen brightness manually as you desire in order to save power or when you need more light.

If your "brightness and lock" settings do not have this option, then you have a different issue, so let us know.


How to fix slow wireless with Intel 4965 AGN? Possible Duplicate:
  Slow wireless with an Intel 4965

We run Ubuntu 12.04, 32bit, with the current kernel 3.2.27-generic on an MSI EX700.

I've already added the 11n_disable=1 tweek, without whcih, wireless has been unusable.

Now, it works OK, but speedtest shows:

Windows XP - down 11.68mbps, up 2.07mbps

Ubuntu 12.04 - down 2.06mbps up 2.0mbps

We've disabled ipv6, tried static and dinamic IPs, tried both swcrypto=0 and swcrypto=1 options, none of whcih made any difference.

The problem may be the symptom of high packet loss. For example, here's the output of iwconfig after booting and testing the speeds:

wlan0     IEEE 802.11abg  ESSID:"amu"
      Mode:Managed  Frequency:2.462 GHz  Access Point: 00:78:9E:FA:32:C8
      Bit Rate=54 Mb/s   Tx-Power=15 dBm
      Retry  long limit:7   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=58/70  Signal level=-52 dBm
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:11  Invalid misc:3627   Missed beacon:0

I've posted a help request before with lots of technical info and outputs.

(answer in progress)

The iwl4965/iwlegacy driver has had a number of regressions in the past, but they've usually been fixed.

The high invalid misc number may be related to your low throughput.

Please try/test/answer a couple of things, and ask me for a howto when needed:

Do you experience this problem with the Ubuntu 12.04 Desktop Live CD (which runs kernel 3.2.0-23, IIRC)?
Can you try using wicd instead of NetworkManager?
Can you compile and try the latest iwl4965 driver from the compat-wireless tree?
What is the manufacturer/model number of your router?
Does your laptop have bluetooth?

There seems to be no fix. Replace it with the same form factor if you can find it.

Intel Pro 4965AGN is old (about 2007 or so), and apparently, it had this problem on Linux for many years. It is unlikely that Intel will ever fix the driver for such an old piece of hardware, that it hasn't been able to fix thus far. I'd imagine this task is of a very low priority on the maintainers' to do list,if it's on the list at all. It is unfortunate, because Intel branded wireless cards used to have good Linux support, and were known to work out of the box.


Create default home directory for existing user in terminal How do I do this?
I created a user without a home directory and now I want to create one. Not just a folder called new_user, I want the default home directory with all it's folders and hidden files, etc.

Use the following (as root, or with sudo if not root):

mkhomedir_helper username

For this to work, folder /home/username must not exist.

For X-related folders (Desktop, Downloads, etc), you will need to login in a graphics environment; they will be automatically generated the first time you login.

All you need realy is the home folder to make it work. As root,

cd /home
cd mkdir username
chown username username
chgrp username username

Logging in with the first time should create all necessary files, that seems to be those:

drwxr-xr-x 16 fotanus fotanus 4096 Jun  4 17:46 .
drwxr-xr-x  9 root    root    4096 Jun  4 17:43 ..
drwx------ 11 fotanus fotanus 4096 Jun  4 17:46 .cache
drwx------ 13 fotanus fotanus 4096 Jun  4 17:46 .config
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Desktop
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Documents
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Downloads
drwx------  3 fotanus fotanus 4096 Jun  4 17:46 .gconf
drwxrwxr-x  2 fotanus fotanus 4096 Jun  4 17:46 .gstreamer-0.10
-rw-------  1 fotanus fotanus  334 Jun  4 17:45 .ICEauthority
drwxr-xr-x  3 fotanus fotanus 4096 Jun  4 17:45 .local
drwx------  4 fotanus fotanus 4096 Jun  4 17:45 .mozilla
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Music
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Pictures
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Public
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Templates
drwxr-xr-x  2 fotanus fotanus 4096 Jun  4 17:45 Videos
-rw-------  1 fotanus fotanus   55 Jun  4 17:45 .Xauthority
-rw-------  1 fotanus fotanus  711 Jun  4 17:45 .xsession-errors


How can I elevate nautilus privileges to move or copy a folder as root? Say I have a folder open in Nautilus that's in my /home/user/temp directory. I'd like to move a folder from there to my /opt directory (it's a program). Is there a way I can elevate the copy command up to a sudo so that I can copy the folder without having to start a new instance of Nautilus from the command line?

As far as I can say, based on what I know and have experienced:

sudo is used for command line applications/commands and gksudo is useful when you try to run a program using the Run Application dialog window by pressing Alt+F2.

I have read that gksudo is just the graphic version of sudo.

Anyway, you can both drop sudo nautilus and/or gksu nautilus in a terminal for the purpose to do what you wish, having the same effect both commands. But if you want to omit the terminal and you wish to run it directly with the "Run Application" dialog window, just press Alt+F2 and write gksu nautilus, after which you will be prompted to enter your password, then the nautilus file browser will open with root privileges.

Additionally, you can achieve to open files/folders as root with a single click by using the "Open as Administrator" option via right click. Which in any case will open a new nautilus instance for the given folder and will open files as root, this may also open/run applications as root but I haven't tested it yet.

You can get the "Open as Administration" option in your contextual menu by installing nautilus-gksu via command line: sudo apt-get install nautilus-gksu or by using synaptic as shown in the next image:

Good luck!

Another easy way is

sudo gnome-open foldername

Or I would recommend installing nemo file manager. It has 'open as root' in its right click context menu


Wifi issues after installation on Lenovo Y700 So I was able to successfully install Ubuntu 15.10 However I have run into the error of having no WiFi. The ethernet cable works but it seems that the wifi is not possible to reach. This is my network adapter...i believe

Network controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)
Subsystem: Intel Corporation Device [8086:1010]
Kernel driver in use: iwiwifi

Your wireless adapter is hardware blocked by rfkill, because of a tricky Lenovo UEFI firmware.

This issue has been fixed in upstream kernels, but the fix did not reach Ubuntu yet.

You can fix it by running

sudo tee /etc/modprobe.d/blacklist-ideapad.conf <<< "blacklist ideapad_laptop"

Reboot and enjoy.

When you upgrade to Ubuntu 16.04, remove this config by

sudo rm /etc/modprobe.d/blacklist-ideapad.conf

But likely the fix will reach the Ubuntu 4.2 kernel too.

There are two main driver packages for Broadcom networking hardware.  One is "firmware-b43-installer" and the other is "bcmwl-kernel-source".  At this point you should reference this post:
Installing Broadcom Wireless Drivers.  It has a nice table that someone has put together to show you how to identify your Broadcom chip's PCI.ID number, and which driver you will need based on what chip you have.  Don't worry if your chip doesn't show up, you can always just try one driver, and if it doesn't work, remove it and try the other.

Gain Inetnet access (if possible):

The first thing to do is to try to gain access to the Internet via a wire.  If you can plug up to your modem|router and gain access to Ubuntu.com then it will make your life much easier by avoiding the whole catch-22 section at the end of this post.

Installing the bcmwl-kernel-source package:

If you cannot gain Internet access via wire, then insert your Ubuntu installation media.  The required package should be available on the install media.
Open a new terminal window (control+alt+T)
Type: sudo apt-get install bcmwl-kernel-source
Type: sudo reboot

If that worked for you, then you're good to go and can stop here.  If that didn't work, or if the hardware seems flaky after you use it for a while, then you'll need to remove the bcmwl-kernel-source package before continuing on with these instructions:

Open a new terminal window (control+alt+T)
Type: sudo dpkg --purge bcmwl-kernel-source
Type: sudo reboot

Installing the firmware-b43-installer package:

NOTE: Installing this package requires Inetnet access.  There is a Broadcom firmware file needed by the installer that is not available on the Ubuntu install media.  If you can plug up to your modem|router by wire and surf the Internet then you're golden.  Otherwise you've got a catch-22 situation, and you'll have to stop here and skip down to the catch-22 section below.

If you DO have network access via wire:

Open a new terminal window (control+alt+T)
Type: sudo apt-get install firmware-b43-installer
type: sudo reboot

If you can get online and everything seems stable, then great.  You can stop here.  Otherwise, if, for whatever reason, you decide to go back to the bcmwl-kernel-source package, then you'll first need to remove the firmware-b43-installer package before proceeding:

Open a new terminal window (control+alt+T)
Type: sudo dpkg --purge firmware-b43-installer
Type: sudo reboot

Catch-22:

If you're in the unlucky situation of being one of the few users who cannot get online via wifi nor wire, then you'll have to get your hands dirty to continue.  I have a full set of instructions written up that can guide you through replicating by hand what the firmware-b43-installer package would have done for you, but apparently it "looks like spam", so I wasn't able to post it.  Let me know if you wind up in this nasty situation and I'll see if I can post it somewhere else.

Good luck!


How to copy paste contents in the vi editor I tried using Ctrl + V for pasting contents in a vi editor document, but Ctrl + V is not interpreted as a paste.

First, make sure you're in edit mode (press i). Then you can paste with Ctrl+Shift+V, if you're in a terminal emulator like gnome-terminal (or select "Paste" from the right-click menu).

You can also type :set paste in vim before you paste to disable automated indenting, etc. Then :set nopaste after you've pasted the content.

Also check this question on stackoverflow.com for more information.

If you want to copy/paste lines in vim (as opposed to pasting clipboard content), you'll want to check out the yank command. Here is a cheat sheet that might help.

If you're root: Ctrl+Shift+V

If you're not-root: Center click the mouse.


Command to call shutdown-restart menu on Ubuntu Budgie 17.04? I want to activate the shutdown menu with a keyboard combo on my Budgie desktop. What is the command to bring up the menu?

Ctrl+Alt+Del will bring up the shut down menu on many desktop environments, including KDE, MATE and Cinnamon.


Can I play Windows (Steam) games on Ubuntu? I am downloading Ubuntu and I really want to play Windows games from Steam but I don't want it to replace my OS.

You can install Ubuntu along side Windows and boot into either one when you turn on your computer. But that is beside the point. (You will probably NOT want to replace Windows if this is your first time installing Ubuntu.). Just select 'Install Ubuntu alongside Windows X' in the installer.

You can run Windows steam games on Linux through WINE. Though it will be a huge amount easier just running Linux Steam games on Ubuntu, it IS possible to run some of the windows games (though it may be slower). I think there are instructions here: https://developer.valvesoftware.com/wiki/Steam_under_Linux#Step_2:_installing_steam.

Basically you want to run this in a terminal (for Ubuntu 18.04+):

sudo apt-get install wine winetricks
winetricks steam

Note that for Ubuntu 16.04 and earlier, winetricks is a dependency of wine. You can do do this instead, and it'll be equivalent:

sudo apt-get install wine
winetricks steam

I don't think wine slower than other stuff like playonlinux or crossover (what is free on Deepin Linux).

Alot games not running on wine either,i guess mostly the new games but alot running what is older game with wine, also work dosbox or pcsx (PlayStation emulator) no problem.


Network connection on an Acer Aspire 5253? I bought an Acer Laptop 5253-BZ893 and i got Ubuntu 10.10 installed with no problem.

The only problem i have is, that i get no network connection options, wired or wireless. I just get

  No Network Devices Available

The computer came with Windows 7 installed and I am able to connect to my wireless network fine using Windows.

I can not figure out why I can't get a network connection in Ubuntu. Any suggestions?

well, you may be using the desktop edition. in ultimate edition you will be having both drivers installed on it. i used ubuntu 10.04 desktop and ultimate edition.but only wireless driver is missing in desktop. wired connection  is working fine. in ultimate edition both are working fine.you have two solutions i think

simply change the version of ubuntu or install ultimate edition.

2.else install the driver for wired connection after downloading it from windows.
and then wireless driver can be installed by giving the following command in a terminal
sudo apt-get install driver
(here driver should be replaced with the name of the driver for ubuntu 10.10)
it will ask for administrator password. give it. after that it will connect to internet automatically(with the wired connection) and will install the drivers for you.


Wastebin full error in Kubuntu I'm trying to delete files from a USB flash drive and I get the following message:

  The wastebin has reached its maximum size!
  Empty the wastebin manually.

There are no files in the wastebin and the Empty button is greyed out.

How can I solve this? Also is there a way to change the amount of data that the wastebin can hold?

Try to remove .Trash* (where * stands for some other chars) on a usb stick:

rm -rf /media/$USER/<USB mount name here>/.Trash*

(if You have an older kubuntu, say 12.04, the path to USB stick won't contain $USER).

If it wouldn't help try to remove Trash folder at home:

rm -rf ~/.local/share/Trash


Samsung 700Z broken by Precise install I tried to install Precise from DVD media and got to the point where the Ubuntu logo is on screen indicating the the installer is loading.

At that point the screen went dark. After some time I rebooted the machine. To my dismay the machine would no longer start (Powers on but but no bios start up screen, I can hear initial hard drive spin which soon dies).

This is a new machine (less than 2 months) and I have had no previous indications of defects before this incident. In other words, I am convinced the Ubuntu install had something to do with the failure of the machine.

Has anyone else had this problem with this model machine? Is this known to happen with precise or other versions of Ubuntu?

There is no solution to this problem for a Samsung 700Z. Basically don't install Ubuntu on this machine. If you do you risk the install hanging and leaving your machine in a broken state. You will have to open your machine to remove the DVD and battery (voiding you warranty) or sending it in for repair. IMHO Ubuntu should have a "install at your own risk" warning clearly posted somewhere on their site.


Installing PHP 5.5 on 15.10 I've tried multiple ways to install PHP 5.5 including various PPAs etc however every time it always installs 5.6.

Is there a reliable way to to install without having to compile from source?

Use the ppa:ondrej/php5 repository. It only has php 5.5 as you can see from https://launchpad.net/~ondrej/+archive/ubuntu/php5/+index?batch=75&memo=75&start=75 page.