Display Brightness Scaling is Incorrect on a VAIO CW

From the information you've given us, it appears that you need to change your GRUB settings.

To do that, open up a terminal and run the following commands:

gksu gedit /etc/default/grub - what that command will do is open Gedit in "Sudo Mode" and have the GRUB configuration file open.

Then, change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"

Then, run sudo update-grub and reboot. Brightness problem should be solved.


You're installing Ubuntu the day after a release, and you've probably checked the boxes to update from the internet, so the installer is downloading updates and language packs.

The main repositories get hammered the day of a release and the following days. The reason your timer is going up and down is because your download speed is varying, and the reason it's taking ages is because the repository is overloaded.

Either start again and don't check the boxes to update components from the internet, or tough it out and wait for it to finish.

If you start again, you can change your software source to a less crowded one using the "Software Sources" tool after installation, and get your updates in the usual manner. There's a wizard that will pick a good repository for you in that tool, or if your ISP offers a mirror (e.g. http://ubuntu.virginmedia.com ) that's probably the best choice.


Muon Software Center is (not yet at least) an all-purposes package manager: it's mainly meant to explore and easily install full applications, sort of avoiding the view of the thousands of dependencies and libraries included in the repositories.

If you try to search for any lib* package in Muon Software Center, even when you type the full name of a package in the repository, it will not find it.
Ubuntu Software Center, on the other hand, has this capability.
I guess that Muon Software Center only selects a range of applications to include and search through.

So if you want to install a specific package (even when an application) you're safer by using Muon Package Manager instead, which is the equivalent of Synaptic shipped by default on Kubuntu, or sudo apt-get install as already suggested.


fresh Ubuntu 16.04. Mouse and Keybord freeze every 1 seconds of inactivity

Looks like package "laptop-mode-tools" is guilty. I just reinstall distribution and omit this package, and till now everything is ok.


Most likely you would need to configure your Syslog daemon to capture what your looking for and then use a log parsing tool such as logwatch or Sawmill. I included a couple of links that may help. I would recommend installing Syslog-NG and then using the front-end tools in the 'debianadmin' link below.

https://help.ubuntu.com/community/LinuxLogFiles

http://www.debianadmin.com/syslog-ng-web-interface-front-end-or-gui-tools.html


After messing with DEs, DMs, panel, icon size and greeter are messed up. How can I fix this?

You have Unity Tweak Tool select panel tab and check the Transparency level if its value is at zero then try to switch to an another theme and then switch back to ambiance theme and check the result.


cannot access crontab after changing uid

Your permissions are incorrect for the crontab file.  What it should be is like the following:

-rwxr-sr-x 1 root crontab 35984 Feb  9  2013 /usr/bin/crontab

To set your crontab to the above permissions, first change the ownership:

sudo chown root:crontab /usr/bin/crontab

Then set the permissions:

sudo chmod 2755 /usr/bin/crontab

That should set your crontab to the correct permissions to run.

EDIT:

Also, take a look at the /var/spool/cron/crontabs/ folder, you should see something similar to the following:

terrance@terrance-ubuntu:~$ sudo ls -al /var/spool/cron/crontabs/
total 16
drwx-wx--T 2 root     crontab 4096 Dec 17 22:08 .
drwxr-xr-x 3 root     root    4096 Dec  1 07:24 ..
-rw------- 1 root     crontab 1185 Dec 17 22:08 root
-rw------- 1 terrance crontab 1130 Dec 17 21:47 terrance

Pay attention to your username.  If it doesn't have the proper ownership, change it by typing in the following:

sudo chown username:crontab /var/spool/cron/crontabs/username

And if permissions need to be set on that file:

sudo chmod 600 /var/spool/cron/crontabs/username

Hope this helps!


It's just the new theme of the Yaru icons theme. (You may have installed communitheme). Your system is just updated to use the new theme.

https://www.linuxuprising.com/2020/01/new-folder-icons-aubergine-as-second.html


How to create two users who can read files of each other?

The classic way to do this is to make sure that both users belong to the same group. Then, you change the ownership of their files to that group. So, for example, to create bob and alice and allow them to read each other's files:

Create the group that both users will belong to

sudo addgroup users

Create the users, setting users as their primary group

sudo adduser --ingroup users alice
sudo adduser --ingroup users bob

That's it. Now, any files created by alice or bob will belong to the users group and since both users belong to that group, they will both be able to read them:

alice@foo $ echo "hello" > ~/file
alice@foo $ ls -l file
alice@oregano ~ $ ls -l file
-rw-r--r-- 1 alice users 6 May 11 16:12 file

and

bob@foo $ cat ~alice/file
hello


upgrade ubuntu 19.10 but still kernel 5.0.0-31-generic

linux-generic 5.0.0.31 is the kernel for 19.04 and you are using 19.10 which currently has linux-generic 5.3.0.21.24. Unless Canonical Livepatch Service is enabled, after the kernel is updated it is used for the first time the next time Ubuntu reboots or cold starts. Since there are limitations to the kernel livepatch technology, some Linux kernel code paths cannot be safely patched while running. There may be occasions when the traditional kernel upgrade and reboot might still be necessary.

If you keep the working 5.0.0.31 kernel and wait a few weeks the boot problem will probably be solved by a kernel update. Until then you have a working kernel, a bootable system and time to wait to see if the problem will go away by itself.

You can mark the kernels you want as hold or unhold using apt-mark.

sudo apt-mark hold kernel-version

From man apt-mark:

hold
    hold is used to mark a package as held back, which will prevent the
    package from being automatically installed, upgraded or removed.

unhold
    unhold is used to cancel a previously set hold on a package to
    allow all actions again.

After you unhold linux-generic you can upgrade it with the following command:

sudo apt upgrade linux-generic


Architecture parameter ignored by apt-get

From apt-get(8) (emphasis mine):

  -a, --host-architecture

  This option controls the architecture packages are built for by apt-get source
  --compile and how cross-builddependencies are satisfied. By default is it not set which
  means that the host architecture is the same as the build architecture (which is defined
  by APT::Architecture). Configuration Item: APT::Get::Host-Architecture

The -a option is not honoured by the install option. With Multi-Arch, and the download option, you can use:

apt-get download wvdial:powerpc

This requires you to have the PowerPC architecture added to the list of supported architectures. Since Ubuntu only provides packages for i386 and amd64, this is still not going to work though. You may have more success with manually retrieving the package from Debian as they support more architectures than just i386 and amd64: http://packages.debian.org/wvdial


How to suspend the machine from command line in LXDE

You can suspend from the terminal with:

sudo pm-suspend

In some cases, calling pm-suspend directly can cause problems with wi-fi drivers and other programs. Moreover, the man page for pm-suspend says that while it is ok to call it from the command line, it's normally intended to be called through your desktop power manager.

The man page adds that when called from the command line, "it is not guarenteed that all of your programs in your desktop session keep working as expected."

Most of the problems seem to be from services or modules not stopped or unloaded before the suspend. For a good discussion of this issue, along with ways to work around it, see Suspend to Ram in the Arch wiki.

The Arch Wiki also suggests allowing a particular user to run pm-suspend without sudo through visudo to add the following line to /etc/sudoers:

username  ALL = NOPASSWD: /usr/sbin/pm-suspend

LXDE uses the xfce4-power-manager, which uses pkexec to call pm-suspend. pkexec allows execution of a program as another user, in this case root.

The authentication is handled by polkit. It would normally prompt for a password, but as I learned from pkexec with no password it is possible to suppress this through a file in /usr/share/polkit-1/actions.

There's a file there called org.freedesktop.upower.policy (upower is involved in calling pm-suspend but I left it out for simplicity).

This file contains the line <allow_active>yes</allow-active>, which is what allows the action to proceed without asking for a password.

Power-related actions are much more complicated than locking the screen or bringing up the menu. It may be better to use the suspend option in the power manager.

If your suspend function-key works, you might find that convenient. If it doesn't appear to work at first, check the settings in the power manager. In Lubuntu, the sleep button is not set to suspend by default.

You may also enjoy working through the issues at the Arch page in order to use pm-suspend directly. But be careful. I've used the command directly on several other laptops with no problem. On this particular laptop (Lenovo S10-3) it killed the wifi driver. I had to unplug the CMOS battery to get it working again.


Firstly open the terminal and type

  sudo apt-get install cryptsetup

Now retry mounting your encrypted drive.
Hope that helps.


In the first command, $USER is the UNIX user (probably your currently logged in account). This isn't correct, you want to specify the web server user and assign permissions to them, since that's the user that will actually need to read this data. For Apache, the default web sever user is www-data so the second command is the correct one.

However, if you named your web server user something else, let's say webadmin then you'd want to do:

sudo chown -R webadmin:webadmin /var/www/your_domain


How to shut down the 70+ systems by the one remote machine?

This works here:

ssh {user}@{ip-adres} sudo poweroff

It will ask twice for a password unless you copy the ssh key to your remote computer and make poweroff accessible by non root user.

Make it a loop for all IP's you need (pseudo code->)

for host in {ip1, {ip2}, {ip3} ; do ssh $host poweroff ; done

Or even easier... clusterssh

  ClusterSSH (cssh, crsh, ctel) allows you to control multiple ssh, rsh or telnet sessions from a single input window. You can also configure clusters of machines for easy invocation and interact with individual terminal windows during a session.


Enlarge (re-size) /boot using Xubuntu 13.10, preparing to install 14.04

It sounds like you need to resize your boot partition to make room for the new install. To do this, you need boot from the live cd, select GParted. From the drop down box on the upper right, select your boot partition. Right click on it to unmount it and the resize it from there. Make sure to save your changes and from there you can continue the install.


Disable the desktop effects:

We have three computers with the same chipset and the very same problem at work.

20 PCs, 3 of them with the intel 945 chipset... the three of them have issues. They constantly freeze. We tried to boot in Ubuntu Classic, but it doesn't change anything.

Just stick to 10.04 and disable the desktop effects.


Google Chrome Installation Not working Properly 20.04

I will tell you how I'm installing Chrome on all of the distros, most importantly for you, on Ubuntu 20.04; and hopefully it'll be useful to you.
Usually, I go directly to Chrome download link. When the installer (.deb) is downloaded, I just go double click on the file and it's usually taken care of. I understand why would you use terminal, but in this particular case, I recommend downloading .deb installer directly from the Google Chrome website, instead of using ubuntu software, snap store or terminal.


dual boot-ubuntu and windows partition problem

Giuliano, you don't mention how it is that you are trying to install Windows into your computer. Does it have a CD drive? If so, you must insert the intallation CD and press  or  while booting to enter the BIOS config and enable boot from CD (do not set it as default boot medium) and then  or  to access the boot menu. Boot from the Windows CD. It's possible to make a bootable USB drive too but I won't dwelve into it. It will be required later.

What is VERY IMPORTANT is that previously you must make a partition for Windows. This is probably the culprit.

To do this you must first use Gparted to reduce the Ubuntu partition and make way for a Windows partition. !! SAVE THE CHANGES!! Then you create a new NTFS partition in the empty space. For good measure, format it as NTFS.

For good measure, in case something goes wrong, download the image of the Ubuntu you are running and make a live CD or USB drive. In any case you will need it to repair GRUB after you install windows.

Shut down the computer and boot into the Windows CD. You will be able to install it into the empty NTFS patition. After Windows is installed, you will find that you lost the ability to boot into Ubuntu; Windows will have overwritten the boot sector.

To remedy this, boot with your Ubuntu Live CD (or better yet your bootable Ubuntu USB). To reinstall GRUB follow this link: http://www.webupd8.org/2009/12/how-to-recover-grub2-linux.html. If you have a Live USB and allowed some space on it to install some programs, find "Grub-Customizer" with a G search and install it in your USB Drive. It has a nice and intuitive graphical interface and will allow you to repair grib in a minute. Choose your default boot system and you're done.

If you need more detailed explanations, let us know where you're stuck.


Please try a driver parameter. From the terminal:

sudo modprobe -r ath9k
sudo modprobe ath9k blink=1

Does that correct the LED behavior? If so, I will edit this answer to make it permanent. If not, we'll try something else.


# delete wrong symlink
sudo rm /usr/bin/python3

# install deleted python version
sudo apt install python3.6

# create symlink again
sudo ln -s python3.6 /usr/bin/python3

There is a good chance this will work out.

Please refrain from deleting important binaries in future.


It seems that you have wrong contents of your /etc/apt/sources.list.

1.Please replace your lines with Gedit - sudo gedit /etc/apt/sources.list

deb http://ca.archive.ubuntu.com/ubuntu/ xenial multiverse main universe restricted
deb http://archive.canonical.com/ xenial partner

with these correct lines:

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted multiverse universe
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted multiverse

2.save resulting /etc/apt/sources.list
3.run sudo apt-get update
4.install latest updates with sudo apt-get upgrade
5.install your software with sudo apt-get install mysql-workbench


How to change the header title and help message in GRUB menu?

You can try to edit the grub2 source code to modify those strings (Header,Footer etc).

NOTE: I recommend you to do this in a Virtual Machine or in a Test Machine to see is everything is OK. (In this example I'm running Ubuntu 12.04 with grub2 1.99-21ubuntu3.10).

1) Make sure you have enable the Source code repository.

Open the Ubuntu Software Center.
In the Menu Bar choose Edit -> Software Sources. Click to enable "Source code repository".
Just in case I use the "Main Server" to Download.

Open a Terminal window Ctrl+Alt+T and type:

sudo apt-get update

2) In the Terminal type the following to install the necessary packages.

sudo apt-get install build-essential quilt

3) Install build dependencies.

sudo apt-get build-dep grub2

4) Create a folder to download the source code.

mkdir ~/Downloads/src

cd ~/Downloads/src

5) Download the source code & Export variables.

apt-get source grub2

export QUILT_PATCHES=debian/patches

export EDITOR=gedit

6) Create the patch and edit the source code.

cd grub2-1.99

quilt new 99_custom-header-footer.patch

Edit the main.c file

quilt edit grub-core/normal/main.c

As an example I changed the line 214
From:
  const char *msg = _("GNU GRUB  version %s");

To:
  const char *msg = _("My Custon Grub Title");

Edit the menu_text.c file

quilt edit grub-core/normal/menu_text.c

Edit the "Strings" (Pink Color) According to your needs.

Only as an example I changed the lines 159 & 160
From:
  const char *msg = _("Use the %C and %C keys to select which "
          "entry is highlighted.\n");

To:
      const char *msg = _("You can write a text message here according \
to your needs...\n");

And the lines 187 to 189
From:
(_("Press enter to boot the selected OS, "
   "\'e\' to edit the commands before booting "
   "or \'c\' for a command-line.\n"),

To:
        (_("You can put a message here... to press \
a key to boot the OS.\nOr a Help text... etc."),

7) Build the deb packages.

quilt refresh
fakeroot dpkg-buildpackage

NOTE: This may take awhile.
8) Install the deb packages.

cd ..

sudo dpkg -i grub-pc*.deb grub2-common*.deb

9) Finally you can Restart your machine to see the changes.
Before:

After:

Hope this helps.


Fans Spin Irregularly Dell M4600 Precision 11.10

Are you running with dual displays?  If so, do you see the same problem if you just use the laptop LCD?

The nvidia card has several power settings (google PowerMizer), and it automatically assumes the highest power setting when running with dual displays.  This generates a lot of heat, causing the fan to cycle on.  (You can watch the temperatures rise in the nvidia-settings tool.)

Unfortunately there's no way (that I know of) to get around this, since it's embedded in the nvidia drivers.  (Although you could play with fan control utilities if you're brave.....)


How do I change the default boot entry wih EasyBCD and skip a extra reboot.

Did you try to change the default Boot entry?

Also, I don't think that using a EasyBCD would have been necessary. I'm not sure, but I think the extra reboot when you choose Ubuntu comes from that.


Problem installing Linux in ASUS R510VX-DM534

There appears to be a known bug with the intel PCIe chipset, not limited to 8086:a112, that people workaround using either pci=nomsi or pci=noaer kernel boot parameters.

Check it out here PCIe Bus error severity=Corrected

That will hopefully clear the error spam for you, and perhaps enable you to progress further with installing a different distro on your laptop.


VirtualBox Windows Key Pass Through To Gnome

Yes.  Open the VirtualBox Manager window, and go to "File" menu, "Preferences" (Ctrl-G).

Under "Input", uncheck the box labeled "Auto Capture Keyboard".  There is no need to restart the VM if it's running, so this can be changed "on the fly".


Difference between mac and desktop version of Lubuntu

Apple is a hardware company with proprietary hardware. The Mac version of Lubuntu has Mac's specific firmware and drivers loaded on the kernel while the desktop version of Lubuntu does not.


How to modify the default position of desktop icons

Perhaps you have the option for "auto aligning" activated (sorry I don't know how it's the name in English).  If you turn off this option you can set the icons where you want.


Gamepad Controller issues on Ubuntu 12.04+

One way to fix your problems is to use xboxdrv:

http://pingus.seul.org/~grumbel/xboxdrv/

It's a userspace driver for the Xbox360 controller that allows you to configure and remap your controller, so that triggers are handled as buttons instead of axis and things like that, the --trigger-as-button option is what you want.


I have removed my password now what should I answer when it asks for password?

Have a look at our guide on how to reset your password using recovery mode, it's fairly simple and should solve your problem :

Have a look at this page on my website for more details.


Ubuntu Touch - Shutdown sometimes rebooting phone

I know about this bug. This often happens with me, when I had a long session with my phone and especially when there were many progress with the Unity 8 gui e.g. switching between staged and windowed mode. In these cases the display server seems to work optically properly, but for real it runs laggy. You sometimes reconize it by failing updates and installations. When you press shutdown, not your phablet reboots (there's not the initial bootscreen) but just the display server (lightdm). But the error persist. My only known possibility getting out of this loop is a hard power off by pressing the on button about ten seconds or so. I also hope this bug will be removed in the future.

Hope I can 'help' you.


Where do I get a package for GNU Parallel?

In 13.04, you can install with apt-get:

sudo apt-get install parallel
sudo rm /etc/parallel/config

The second line is necessary because GNU parallel is installed in --tollef mode (if anyone can provide a rationale for this, I'd like to know).

In 14.04, the config file is apparently no longer included, since the --tollef option was removed from the GNU parallel source entirely: http://lists.gnu.org/archive/html/parallel/2013-02/msg00018.html


Ubuntu 18.04.1 NordVPN does not operate correctly

There are 2 ways to connect to NordVNP, depends if you have a free or a paid accout.

Using the command line interface:
Download the application from here:
https://support.nordvpn.com/#/Connectivity/Linux/1182453582/Installing-and-using-NordVPN-on-Linux.htm
Follow the instructions and you succeed within minutes.
Using OpenVPN:
This needs the password and username of a paid account.
Instructions:
https://support.nordvpn.com/#/Connectivity/Linux/1061938702/How-to-connect-to-NordVPN-using-Linux-Network-Manager.htm


Problem downloading files from Ubuntu One cloud

You need to download the 32 bits version from here:

https://help.ubuntu.com/community/U1/Downloader/All/Architectures

Or in terminal, just follow these instructions:

Download the file with wget

wget 'http://ubuntuone.com/u1-downloader/u1-downloader-32b.tar.gz'
Next, run this command to uncompress the program:

tar zxf u1-downloader.tar.gz
Go to the program's newly-created directory by running:

cd u1-downloader
Start the program by running:

./u1_downloader

You’ll be prompted for your credentials: enter your email and hit enter, then type in your password and hit enter. If needed, you'll be asked for your 2-factor authentication code as well.

Your files will start downloading and will be saved in the u1-files directory (you can access this folder with the file manager)


How to create a restricted SSH user for port forwarding?

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. )


Mismatch in screen dimensions for Lubuntu when connecting via HDMI to projector

Here are my own experience, since I run Lubuntu and have three monitors.

sudo apt install arandr

After that, look in Lubuntu Menu:

At Preferences menu, go to Monitor Settings
Enable all monitors Lubuntu has detected (mark these checkbox at left)

Open arandr (it's locates at Preferences sub-menu) and build your own scheme.
Save your scheme at place you can find (i suggest ~/mx) and close arandr

When monitor scheme at sometime goes weird, just

press CtrlAltT
type bash ~/mx.sh

If you prefer, you can set this script to run at session login.
Or customize a shortcut to make your work easier


Edit Audio: Delete a 6+2 channel audio to 2 Channel only

Even when this question seems to be related to audio, you are referring to an AVI, which is indeed a video file.

However, transcodification can be done by several applications which features GUI and command line.

I prefer -of course- those which feature a GUI, of which I can mention: Mobile Media Converter (only for 32 bit systems), Transmaggedon, SoundConverter and many more.

SoundConverter (SoundKonverter also in KDE) will allow you to extract the audio from a video source.

Official Websites:

Mobile Media Converter -->
http://www.miksoft.net/mobileMediaConverter.htm
Transmaggedon -->
http://www.linuxrising.org/
SoundConverter -->
http://soundconverter.berlios.de/

When transcoding, you can choose several parameters like: Audio and Video format, Audio and Video bitrate and a few more options (at least in the advanced options of Mobile Media Converter)


Is it safe to access files from Windows 7 partition on Ubuntu partition (all on same HDD)

Safety is relative, not absolute; thus, there is no correct "yes/no" answer to your question.

Many people use the NTFS-3g driver that Ubuntu provides for accessing NTFS volumes without problems; however, that driver is a third-party reverse-engineered implementation, and problem reports (including reports of data loss) do occasionally crop up. Furthermore, Linux doesn't recognize the NTFS security model, so if you make a habit of regularly accessing your Windows boot partition from Linux, you run some risk of accidentally trashing things because of an errant command.

Of course, even Windows-only installations also encounter filesystem corruption, accidentally-deleted files, and so on. It's unlikely to be as safe to access an NTFS volume from Linux as it is from Windows, though. Unfortunately, I know of nobody who's attempted to quantify the risk, so it's impossible for me to say how much that risk increases. Does the risk of data loss in a year increase from 0.10% to 0.11%, from 1% to 50%, or something else? I don't know.

In any event, my recommendation, if at all possible, is to use a separate data-exchange partition, and leave the Windows boot volume unmounted in Linux. FAT is the safest and fastest filesystem for this purpose, at least from a Linux perspective; but FAT has file-size limitations and isn't as flexible in Windows.


Problem with Ubuntu 12.04 boots after video drivers update

I figured this out from another thread.

After you've booted, press Ctrl+Alt+F1, and login using your credentials.

Remove all the nVidia drivers that you installed.

sudo apt-get --purge remove nvidia-*

Install the drivers again:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings

But I still have problem with video drivers - my computer sometimes freezes when I use LibreOffice. I unistall and install video drivers and LibreOffice and still nothing.


Firefox starts with last session. How can I change that?

Go to Edit > Preferences. In the General tab you have the startup options near the top.

You can choose to either recover session or go to homepage, or a blank page.


How do I get Ubuntu working on a Nexus 7 (2013)?

Best answer (for now):

from: https://lists.launchpad.net/ubuntu-phone/msg03337.html

  We'll still just support the old Nexus 7 for now, as we first need to
  start the port for the latest device. It should work, but the main
  problem is that the device is based on Android 4.3 by default, so it
  requires us to make our layer compatible with that as well (at least
  the 4.3 based binaries).

  Don't have the device, so can't give more details, but don't see why
  not (we would at least have the same possibility to distribute
  binaries, so we could also produce such a build once the port is
  done).

Update, 27-Feb-2014:

I have Ubuntu Touch 14.04 beta (build 209) running on my ASUS Nexus 7 (2013), 16GB, WiFi device. (I also updated my LG Nexus 4, 16GB smartphone, to build 209, using same method.)

I used the new ubuntu-device-flash tool. The code itself is based on the (fairly new) AOSP ('Android Open Source Project') 4.4.2 source code, and is a major improvement over earlier efforts.

Be patient.

The instructions on 'Install' page are partially updated, but do show how to do the install.

Flashing a phone/tablet with Ubuntu

Once I have this repeatable, I will post details (if 'Install' page not updated) ..


How to startx with "-logverbose 6" arguments?

I like fossfreedom's answer but it isn't what I have done in the past. It might work but I'm not sure keeping the old X instance around is a good thing. Here's what I would do:

After Ubuntu loads to a graphical desktop, drop back to a TTY, log in and run:

sudo stop gdm   # lightdm instead of gdm on 11.10
sudo startx -logverbose 6

It's practically the same, you're just cleaning up the old instance of X before you run the debug instance.


This helped me.

echo "nameserver 8.8.8.8" > /etc/resolv.conf

or

echo "nameserver 8.8.8.8" > /run/systemd/resolve/stub-resolv.conf


acer e14 e5-474g not detecting wireless on Ubuntu 15.10

I reinstalled the machine with 16.04 general release. Did an update, still didn't work. About 2 weeks ago, ie abt the last week of july 2016, i did another update. Honestly, i don't know what happened, but the machine started to detect other wifi SSIDs around. I configured my SSID which is hidden & it worked; at least with 2.4G Wifi! I don't remember if the 5G wifi was ever working, but at least i have a working wifi which i'm quite happy about! Typically, Atheros wifis "Just work," not sure watt was in the updates, but thanks whoever put it there!


How to get the package versions corresponding to Unity 7 launcher applications?

You can query Unity using its python API, the following command will find all the corresponding desktop files and will query dpkg to know the package providing them:

python3 -c 'from gi.repository import Unity; a = Unity.AppInfoManager.get_instance(); \
[print(a.get_path(app)) for app in  Unity.LauncherFavorites.get_default().enumerate_ids()]' | \
xargs dpkg -S 2>&1 | \
grep -v "no path found matching pattern" | \
awk -F: '{print $1}' | \
xargs dpkg-query -W

On my system it returns:

bzr-explorer    1.3.0-2
firefox 30.0+build1-0ubuntu0.14.04.3
geany   1.23.1+dfsg-1
gnome-terminal  3.6.2-0ubuntu1
nautilus    1:3.10.1-0ubuntu9.1
pidgin  1:2.10.9-0ubuntu3.1
qtcreator-plugin-ubuntu 3.0.1+14.04.20140415-0ubuntu1
synaptic    0.81.1ubuntu1
thunderbird 1:24.6.0+build1-0ubuntu0.14.04.1
unity-webapps-googlecalendar    2.4.16+14.04.20140409-0ubuntu1


How do I force Rhythmbox to automatically organise my music files into folders?

This feature is not built into Rhythmbox by default and not among the default set of plug-ins. However, there is a third party plugin for rhythmbox that provides this functionality.

To get it working, you have to install two new packages, [download][1] the plugin and install it manually.

Install python-eyed3 and gir1.2-notify-0.7 from the Ubuntu Software Centre.
Download the plugin called "File Organizer" from the Rhythmbox Third Party Plugins page and extract the contents of the tar.gz file.
Give execution privileges to the file called INSTALL by following these instructions, then run it by double-clicking on it.
Open Rhythmbox and activate the plugin by choosing Edit -> Plugins, and checking the box next to the "File Organiser" entry.

You can now right-click on a track in Rhythmbox (or select multiple tracks) and click "Organize selection" to rename and arrange the track(s) into folders.

You can change the naming scheme and folder hierarchy under the Music tab in the normal Rhythmbox preferences dialogue.


bumblebee::Cannot access secondary GPU - error: Could not load GPU driver

This is copied from github user ArchangeGabriel:

For your current issue, the fact is that the nvidia kernel module and driver have changed their name on Ubuntu in this new 304.22 version. So you have to edit (with sudo rights) /etc/bumblebee/bumblebee.conf and do the two followings things :

Replace Driver= by Driver=nvidia
Replace KernelDriver=nvidia-current by KernelDriver=nvidia

Then reboot, and you should be fine for optirun.

//end quote.

So the answer suggested of editing KernelDriver is correct, but needs 1 extra step due to the name change. In likelihood you probably have nouveau kicking around somewhere on your system which is overriding the nvidia driver when bumblebee goes to autodetect (if Driver= is left blank it tries to autodetect with nouveau winning out where you actually want nvidia).

I had the same problem as you, tried this more-complete answer and now bumblebee / optirun work just fine. Hope it works for you, too.


Cannot Install Team Fortress 2, home folder too small?

I have answered a similar question here yesterday, that I think should also help with your problem. Please let me know if you need more help.

If you have not "mounted" the other part of the HDD (that is you can't access it in Ubuntu) please add that information, so that I can take that into account in answering the question.


EFI boot Ubuntu 14.04 on a Mac without rEFInd

This process will wipe OS X and any other data you have on the machine. Please make sure to backup your system before proceeding.

You may wish to create a recovery disk so that you may restore OSX at a later date, if required.

Create a Live USB with Ubuntu

Refer to this page for detailed instructions. UNetbootin is recommended since it is cross plaform and provides a Graphical User Interface (GUI).

NOTE - Do NOT use the +mac version since it does not support EFI boot.

Boot from the Live USB

The trick to booting from USB on Macs is to hold down the option key as soon as you power on the device. Select EFI Boot from this menu.

Ubuntu should now boot up from the USB. Install Ubuntu using the Erase and use Entire Disk option.

Firstly, when you reboot/power on your Mac, you will see the grey screen of the Mac bootloader for about 30s, and then a gently flashing folder with a '?' inside. If you insert the installer USB now, it should boot. If not, try holding the power button to force the power off, and then follow the USB booting instructions to bring it up.

Boot Manually from Your Hard Drive

At this point the system is unbootable because the Mac bootloader expects the EFI partition to be formatted as HFS+, the typical Mac filesystem, while the Ubuntu installer actually formats it as VFAT.

In this step we'll instruct GRUB on the Live USB too boot off of your newly installed Ubuntu on the hard drive. – This will requires some serious typing, but after having booted this way we'll be ready to set up automatic boot in the next step.

If you’re using the desktop installer, hold the shift key to bring up the GRUB bootloader menu.

When you see the GRUB boot menu, don't select any of the entries. Instead, press C to bring up the GRUB console.

At the grub console, type ls

grub> ls
(memdisk) (hd0) (hd0,msdos) (hd1) (hd2) (hd2,gpt3) (hd2,gpt2)
(hd2,gpt1)

You may not get exactly the same results as this, but you’ll have some similar options.

Now, find the partition which contains your user's home directory.

grub> ls (hd2,gpt2)/home
rohith/

Keep trying until you find it.

The result from the last step has two parts: (hdX,gptY). You need to keep the hdX part, but go through all the gptY options looking for a /boot/grub directory.

grub> ls (hd2,gpt2)/boot/grub
unicode.pf2 [...] grub.cfg

Now you want to set this as your root for further commands.

grub> set root=(hd2,gpt2)

The only way to boot properly is to use the UUID of the drive.

grub> ls -l (hd2,gpt2)

Note down the UUID. You'll have to type it manually in the next step.

grub> linux /boot/vmlinuz〈Tab here!〉.efi.signed root=UUID=〈the UUID from above〉

The GRUB console can do tab completion, so if you just type out the vmlinuz part and hit tab, then hit . and tab again, you won't have to type the whole file name. make sure that the efi.signed part is present.

Now, set the initial RAM disk

grub> initrd /boot/initrd〈Tab here!〉

You should be able to boot off your hard drive the command

grub> boot

Setting up Automatic Boot

You have now booted into your newly installed Ubuntu. Next step is to make boot automatic and pain free, by reformatting the /boot/efi partition to the HFS+ file system that Mac expects, and allowing you to boot straight off of it.

1. Installing Extra Packages

Now, open a terminal and type

sudo add-apt-repository ppa:detly/mactel-utils
sudo apt-get update
sudo apt-get install mactel-boot hfsprogs gdisk grub-efi-amd64

2. Reformatting the EFI Partition

Run mount to get a list of mounted filesystems, and look for anything mounted at /boot/efi. Unmount it.

sudo umount /dev/sda1

We now use gdisk to delete the VFAT partition and create an HFS+ one

sudo gdisk /dev/sda

(Note that there is NO number at the end of that disk name!)

Press p

Confirm that the first partition has type EF00. Now we delete that EF00 partition.

Press d

Create a new HFS+ one in its place.

Press n

Press enter for the first and last sector options.

Enter AF00 for the filesystem code.

Use the p command to double-check your changes, and then w to write.

Now we have an unformatted HFS+ partition. Format it with:

sudo mkfs.hfsplus /dev/sda1 -v ubuntu

3. Updating the Filesystem Table

Edit /etc/fstab

sudoedit /etc/fstab

Delete the lines that refer to /boot/efi using Ctrl+K.

Now, type the following commands -

sudo bash -c 'echo $(blkid -o export -s UUID /dev/sda1) /boot/efi auto defaults 0 0 >> /etc/fstab'
mount /boot/efi

4. Installing GRUB on the HFS Partition

sudo bash -c 'echo "This file is required for booting" > /boot/efi/mach_kernel'

Install GRUB and 'bless' the filesystem.

sudo grub-install --target x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
sudo hfs-bless "/boot/efi/System/Library/CoreServices/boot.efi"

EDIT Some Troubleshooting: When following these instructions on Ubuntu 14.04 Trusty Tahr, I got the following error message from grub-install

Installing for x86_64-efi platform.grub-install
error: Can't create file: No such file or directory.

After running it again with strace I determined that it wasn't looking for a file called /boot/efi/mach_kernel, but a file called /boot/efi/EFI/ubuntu/mach_kernel and after creating that file, and re-running grub-install everything seems to work. END EDIT

5. Removing the Boot Delay

To set the default EFI boot entry, run

sudo efibootmgr

Get rid of the extra entries -

sudo efibootmgr -b xxxx -B

where xxxx is the boot number obtained from sudo efibootmgr

Now, set the default entry -

sudo efibootmgr -o xxxx

The system should now be bootable!

CREDITS

Jason Heeris - For his original post, the PPA used.

Rohith Madhavan - For the post on Ask Ubuntu, minor modifications.


ubuntu 18.04 netplan support ppp interface with specific ISP provider

Netplan does not support integration with ppp.  Ifupdown continues to be supported in Ubuntu 18.04 for such use cases.


Cannot locate Ubuntu Software Center via Firefox to open APT links

TL;DR: You need to locate the /usr/share/software-center/software-center file.

I ran the which command, and it showed it was in /usr/bin/software-center but even showing hidden files it's not there. So I check the link that was there labeled "software-center", and it showed it went to /usr/share/software-center/software-center and it was a Python script.  Well I tried to choose that when clicking on a link, and it opened as it should, so I guess that's it, or at least it works.  It even shows in Firefox's settings under the Application tab.


I can't format the usb flash memory stick

Your device /dev/sdc1 is a Read-only, unmount the disk on Gparted and format.

Gparted-Example


Take the first n files from a directory starting with a particular letter in alphabetical order to another directory

Instead of parsing find output (very bad idea), you can take advantage of the fact that for loops over files in an ordered way:

i=0; for b in /path/to/files/b*; do (( ++i < 4 )) && echo mv -v -- "$b" /path/to/destination; done

Remove echo after testing to actually move the files.
Here it is with ugly comments:

# set a variable to 0 so we can increment it
i=0
# glob for the files starting with b
for b in /path/to/files/b*; do
   # test how many times the loop has been run and if it's less than 4...
   (( ++i < 4 )) &&
     # ... then move the files*
     echo mv -v -- "$b" /path/to/destination
done

*This won't happen until you remove echo from the start of the line - instead it will echo out which files will be moved and where (expand the variables for each iteration)

I don't know if this works in tcsh, but it works in bash, so might help other Ubuntu users who mainly use bash


How to draw a picture with text in the center of that via command-line?

What about this command:

convert -background black -size 800x480 -fill "#ff0080"  -pointsize 72 -gravity center label:'Ask Ubuntu' output.png

By using above command you create an empty .png image which its background color is black.

-background color
   set the background color.
   the default background color (if none is specified or found in the image) is white.

The created image size will be 800x480(width[xheight]).

-size width[xheight][+offset]
   set the width and height of the raw image.

-fill color
   color to use when filling a graphic primitive.

This option accepts a color name, a hex color, or a numerical RGB, RGBA, HSL, HSLA, CMYK, or CMYKA specification. See Color Names for a description of how to properly specify the color argument.

For example,

 -fill blue
 -fill "#ff0080"
 -fill "rgb(255,0,128)"

Enclose the color specification in quotation marks to prevent the "#" or the parentheses from being interpreted by your shell.

To print a complete list of color names, use the -list color option.

-pointsize size
   pointsize of the PostScript, OPTION1, or TrueType font.

-gravity type
   sets the current gravity suggestion for various other settings and options.

Choices include: NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast. Use -list gravity to get a complete list of -gravity settings available in your ImageMagick installation.

label:'your Text Here' write your text into image.png.

Also see more examples.

See full command-line options


This does not work on Linux for the moment. See this question:
Unable to do group video call and group screen share using Skype 4.3

or this Skype forum:
http://community.skype.com/t5/Linux/Skype-4-3-0-37-There-s-no-screen-sharing-and-video-chat-in-the/m-p/3558973#M10792


Can not select all by mouse under list view in Nautilus

Since items are ordered in a list, folder/file data is presented in columns and rows. In a list, there is no empty space around the items, and the rows are stretched as far as the right side of the window, so no, it is not a bug that you cannot simply drag to select; you will alway "hit" another item when you start dragging, that is how it should be.

You can of course select items by either Ctrl+A (select all), Ctrl+click (to add clicked item to selection) or click / Shift+click (to select a part of the list), but that takes indeed the keyboard.


How to change default screen layout on Lubuntu?

Lubuntu uses LXDE (Lightweight X11 Desktop Environment) which has built-in an application called LXRandR. It creates an autostart script for you.

To update the settings, simply run lxrandr in your command-line, edit your preferred screen layout and save the result.

The autostart script is saved within ~/.config/autostart/lxrandr-autostart.desktop. It uses xrandr command to set all up. To understand how the xrandr command works, I recommend you to read the ThinkWiki tutorial.


AMD-INTEL hybrid graphics on Ubuntu 16.04


What does it contain in linux manual's section 9 of Kernel routines

If you have apt-file on your system, you can check what packages would place manpages in section 9:
$ apt-file search /usr/share/man/man9 |
    awk -F: '{seen[$1]++} END{for(p in seen) print p ": " seen[p]}'
open-vm-tools: 1
freebsd-manpages: 1934
librheolef-dev: 1
ax25-tools: 3

By far the majority are from the freebsd-manpages package, whose description is

Description: Manual pages for a GNU/kFreeBSD system
 This package contains a selection of manual pages from FreeBSD that are useful on a GNU/kFreeBSD system:
  2 = System calls (functions provided by the kernel)
  4 = Special files (usually found in /dev)
  9 = Kernel routines

So, unless you are running a GNU/kFreeBSD port, you should not expect to see any kernel routine manpages in Section 9.


Shotwell does not copy, but imports files without copying

When you import a folder with pictures into Shotwell it gives you two options:

In the first case, Copy Photos, Shotwell will store a local copy of the pictures in your computer. Thus, if you import from a removable drive, you will always have a copy of them available.

In the second case, Import in Place, shotwell will only create links to the pictures, thus if you unplug a removable drive with the pictures they will not be available.

If you want to preserve your structure of folders for your pictures I recommend that you copy your pictures manually to your hard drive (Pictures folder is a good option). After that you can Import in Place from shotwell (does not make sense to have 2 local copies of your pictures) and you will have them available. Shotwell will still classify them by date (default), but then you can 'Tag' your pictures if you want to arrange them in a different order (e.g. 'my birthday').


MSI laptop with amd switchable graphics and ubuntu 11.10

You can follow this thread.

Let us know if it worked. Good luck.


Enable the universe repository.

sudo apt-get install software-properties-common
sudo apt-add-repository universe

Open a terminal and execute

sudo apt-get install wine


What are proper permissions for localhost php files? Getting 403 error

My understanding of how www-data fits in is that none of the files or directories are owned by that user.  It is the user that Apache runs as, and the whole point is that www-user has reduced privileges, and doesn't own the files or have permissions to change them.

The actual owner should be either you or root, I believe, so www-data will then have read-only privileges, not rwx.

Did you create a link in /var to /home/richardmandx/Dropbox/www?  I don't understand why you'd do that.  What I do for my personal test server is to simply create the virtual server in ~/www, by editing /etc/apache2/sites-enabled/000-default, and either change /var/www to /home/me/www, or add more virtual servers in whatever directories I want to use.

Edits:

If this is a home server without general outside access, I think it's easiest for developing to change the local server from /var/www (owned by root) to your home directory/www, or something similar.  You could probably just as well change the owner of /var/www from root to yourself, giving r-- permissions for group/others.  This is the normal permissions when root is owner.

Making yourself the owner makes it much easier to edit files, as you won't need to copy back and forth, or use sudo. Another option is to mount /var/www in a directory you own, but you might need to give extra options for the permissions.  This is probably easier than it might sound.

If you do have outside access, you would probably do best to leave things as they are normally set up.  I have a clean, default server on a test 12.04 VM, set up using the standard install, which works fine.  /var/www is owned by root, with permissions 'drwxr-xr-xfor the directory, and-rw-r---r--` for the files.  There is no www-data shown anywhere, as it should be, if my understanding is correct.  You don't want outsiders to have to many permissions, so www-data is a limited user for Apache that meets that requirement.  It has less authority than you do.

If you want to use your home directory, then the simplest, cleanest way is to edit /etc/apache2/sites-enabled/000-default, and change all (or at least the innermost) occurrences of /var/www to whatever directory you choose, and then restart Apache.  You can add any number of virtual web sites to the inner part of configuration, similar to this one, with any name you want and a matching directory.  I create sites with a name like "mysite.dev", and on any machine that accesses it, I make an entry in /etc/hosts with something like 192.168.1.111  mysite.dev.  Apache will then take that name, look it up to get the directory for the virtual site, and open it.


What is the correct way to install Maven and Eclipse?

In addition to installing the maven package and the eclipse package, and all their dependencies, you need to install the m2e extension. The best way to do this is using the Eclipse Marketplace, but the marketplace is not installed by default in the Ubuntu package.

Install the Eclipse Marketplace

Open Eclipse, go to Help -> Install New Software...
Select All Available Sites in the Work with dropdown menu.
Wait for the list of software to populate; sometimes it takes a very long time.
Expand the General Purpose Tools group, and tick Marketplace Client.
Click Next, and again, accept the terms and conditions and click Finish.

This will install the marketplace. You will need to restart Eclipse for the change to take effect.

Install m2e

Open Eclipse, go to Help -> Eclipse Marketplace...
Wait for it to finish loading.
Enter "maven" in the search box and press return.
Click the Install button next to Maven Integration for Eclipse by Eclipse.org (NB: there is a similar item above called "Maven Integration for Eclipse WTP" by Red Hat, Inc; this is not the correct one).

Again, you will need to restart Eclipse for this to take effect.


Unreachable unallocated space: resize & move partitions or fresh ubuntu install?

The Windows 7 part...

Note: Windows 7 is no longer supported

/dev/sda2 is FULL!
Boot into Windows 7
Start the Disk Management utility
Extend /dev/sda2 (C:) partition to give it more room

The Ubuntu part...

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition
a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

Backup your important Ubuntu files
boot to a Ubuntu Live DVD/USB
start gparted
delete partitions /dev/sda5/6/7 and /dev/sda3 (you won't be able to boot at this point)
resize /dev/sda4 left side towards the left to the desired partition size
click the Apply icon
quit gparted
start the Ubuntu Installer from the desktop
do NOT manually partition the unallocated space, let Ubuntu do its own partitioning
reinstall Ubuntu using the "along side Windows" option
reboot into Ubuntu
restore Ubuntu files from previous backup


Switching from LightDM to the "older" GDM is very easy, and need not even involve opening a terminal.

  Note:

  If you need/want to do this from a terminal (e.g. recovery console), please scroll below the screenshots for a how-to.
  Also, the "new" GDM is not covered here because it is not officially available for 12.04 and the unofficial packages do not work for most users.

Easily switch to GDM with the Software Centre

Open the Software Center, type "gdm" in the search box, and click on Install as shown below, or click on this button: gdm

After you enter your password, you will get the configuration screen shown below. Change lightdm to gdm and click on Forward:

Restart your computer, and you should now have the "old" GDM login screen; note that you can still select from any available session, including Ubuntu (3D), Ubuntu 2D, Gnome, Gnome Classic, etc.

Switch to GDM via the terminal

Open a terminal with Ctrl+Alt+T if you are on the desktop and not in the recovery console.
Type sudo apt-get install gdm, and then your password when prompted or run sudo dpkg-reconfigure gdm then sudo service lightdm stop, in case gdm is already installed.
A "Package Configuration" dialog will be displayed; click OK to proceed to the below screen. Use the arrow-keys to select gdm instead of lightdm, press Tab to move to OK, and press Enter.

Reboot the computer (you can do this with sudo reboot if in the recovery console).


Web browsers working very slowly in Ubuntu 16.04 guest OS in VMware

To improve web browser performance in the Ubuntu 16.04 guest OS allocate enough virtual hardware resources in the VMware settings for the Ubuntu 16.04 guest OS.

2 CPUs instead of 1 CPU
at least 2GB of base memory
at least 20GB virtual hard drive
more graphics memory than the bare minimum amount

As a rule of thumb the base memory allocated to the guest OS should not exceed 50% of the available physical RAM. If you are running multiple guest OSs at the same time, the base memory allocated to all of the currently running guest OSs together should not exceed 50% of the available physical RAM. If you assign too much memory to the virtual machine, the machine may might not start.

If the host OS is also Ubuntu, install Open VMware Tools for virtual machines hosted on VMware. It is a suite of virtualization utilities and drivers to improve the functionality, user experience and administration of VMware virtual machines.

    sudo apt install open-vm-tools-desktop


Which distro should I use on an IBM ThinkPad T41 for speed?

I had this same Thinkpad model before switching to W510. I ran Unity 2D from 11.10 and didn't experience dramatic lags and graphical performance issues. Metacity is very efficient and doesn't consume much resources.
Because it's very easy to switch to Unity at login time I recall that Unity was a bit slow and Compiz consumed a lot of memory compared to total amount I had.


How to pass phone number to phone application from scope

You are able to do it by specifying a tel: URI in a actions preview widget's url, e.g.:

var actions_widget = new scopes.lib.PreviewWidget("actionsId", "actions");
actions_widget.add_attribute_value(
  "actions",
  [
    {
      "id": "call",
      "label": "Call",
      "uri": "tel:+555555555"
    }
  ]
);

in the run() callback as you create a PreviewQuery


Slow desktop performance in Ubuntu 11.04-11.10 with proprietary AMD-drivers

with the proprietary drivers, do 2 things.

install compiz-settings-manager and disable "Sync to VBlank" in the OpenGL plugin, inside ccsm (CompizConfig-Settings-Manager)
enable "Tear Free" in the AMD Catalyst Control Center.


Confusion regarding fglrx in ubuntu 12.10

I don't use a 4xxx series card but there is a new PPA available for the purpose you describe.

instructions here: http://www.ubuntuvibes.com/2012/10/how-to-install-amd-catalyst-legacy.html


I've found the solution using tar which will keep the sparse file size!

Thanks everybody :)


Ubuntu 19.10 - Thinkpad X395 Ryzen freezes at login if unplugged

I experienced the same problem when logging in without power plug on a thinkpad with amd. I don't have a solution for the problem but i have a workaround:

Before logging in just switch to terminal with ctrl-alt-F2 then ctrl-alt-F7 and switch back with ctrl-alt-F1. If you login then the login doesn't freeze. Still not sure why it behaves so strangely.


How to filter & kill some java processes using terminal?

pkill -f 'java.*(core|nimbus)'

I don't have a Java setup like yours but I do run a load of Django applications on my server. Similar situation in that they all look like UWSGI processes. Here's a chunk of ps aux | grep uwsgi:

oli       7201  0.0  1.0  70324 20936 ?        S    12:54   0:00 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/asvsforms/uwsgi.ini
oli       7202  0.0  1.0  70336 20956 ?        S    12:54   0:00 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/bnc/uwsgi.ini
oli       7203  0.0  1.0  70456 21016 ?        S    12:54   0:00 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/cleanup/uwsgi.ini
oli       7204  0.0  1.0  70272 21068 ?        S    12:54   0:00 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/emwill/uwsgi.ini
oli       7205  0.0  1.3  88336 28124 ?        S    12:54   0:00 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/qi/uwsgi.ini
oli       7206  0.0  1.0  70256 20996 ?        S    12:54   0:00 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/sbaccuracy/uwsgi.ini

You can awk that down (you don't need grep and awk) but jave a look at pgrep!

$ pgrep -af 'uwsgi.*cleanup'
7203 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/cleanup/uwsgi.ini
7217 /web/venv/bin/uwsgi --include /web/django-uwsgi.ini --ini /web/cleanup/uwsgi.ini

It's the -f which is really required here. This expands the pattern search to the whole command line used to run something. Without it it'd only be searching the first part. The -a is just here to output the full line.

Anyway, to kill that, we just switch to pkill which is practically the same command. It doesn't have the same output features but that's not what it's designed for. And that leads us back to the top of the answer.

If you're going to insist on filtering ps, please don't use ps|grep|grep|awk|egrep|awk|xargs kill or whatever has now been suggested. It just looks silly. A single awk can do all the filtering.

ps aux | awk '/java.*(core|nimbus)/ {print $2}'

Additionally, you can send the list to kill from directly within awk:

ps aux | awk '/java.*(core|nimbus)/ {print $2 | kill}'

I'd still pick pgrep and pkill though.


Setting up Django and Posgtresql on ubuntu

You need to provide details in settings.py. This is the part which you have to configure

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': '',                      # Or path to database file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}

Please refer http://www.djangobook.com/en/2.0/chapter05.html#configuring-the-database

EDIT:

This is your settings.py file with out the comments.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2'
        'NAME': 'blank_db',
        'USER': 'postgres',
        'PASSWORD': 'thepasswd',
        'HOST': '',
        'PORT': '',
    }
}

You are missing a comma at the end of ENGINE entry


I had to boot from Windows, to be able to repair NTFS partition, and it was successfully. I deleted the folder that causes problems.


try run this command in terminal

sudo apt-get update

and

sudo apt-get upgrade

after that install your desired apps.

if not fixed try comment again here.

I hope it can help


Heroes of the Storm on Ubuntu 18.04 64-bit

I made it work properly with PlayOnLinux. Tested on Linux Mint 20 and Ubuntu 20.04.

Linux Mint 20
5.4.0-42-generic
nvidia-driver-440-server (440.95.01-0)

Install PlayonLinux from Software Manager
Open PlayOnLinux > Games > Install HOTS
Follow the installation steps. When game is installed exit from Battle.net launcher, make sure it is exited, not just closed.
In PlayOnLinux select HOTS > Configure
Configure Wine > Libraries Add d3dcompiler_47 and d3dx11_42 (both should be set as native). Close wine config.
Switch to Install components and find and install DXVK_171. Ignore the warnings.
Enjoy.


First, make sure that pm-utils is installed.
sudo apt install pm-utils.
Then,edit the logind.conf file.  You should always back up a critical file before changing it.
sudo cp /etc/systemd/logind.conf  /etc/systemd/logind.conf.back.
Now, edit the file.
sudo gedit /etc/systemd/logind.conf
You'll see some lines like this.

#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288

What you have to do is to remove the # from some of the lines and change it’s value to

HandleSuspendKey=suspend
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend

Now, restart your system and see if your laptop goes into suspend.


How does your computer get its IP address? If it is via DHCP, then you need to allow UDP replies to port 68 (or from port 67, see later on):

sudo iptables -A INPUT -p udp --sport 67 --dport 68 -m state --state RELATED,ESTABLISHED -j ACCEPT

If your objective is to just allow website browsing, then the connection would always be initiated from your end so you only need to allow the related traffic back in (in this example the assumption is that eth0 is your NIC name):

sudo iptables -A INPUT -i eth0 -p tcp -m multiport --sport 80,443,8080 -m state --state ESTABLISHED,RELATED -j ACCEPT

Now, you may or may not need to allow the local interface (depends on what you are doing with your computer):

sudo iptables -A INPUT -i lo -j ACCEPT

In the end , you can combine some of these things and end up with:

sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A INPUT -i eth0 -p udp -m multiport --sport 53,67 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -i eth0 -p tcp -m multiport --sport 53,80,443,8080 -m state --state ESTABLISHED,RELATED -j ACCEPT

I coded this on one of my test computers and it worked fine (the SSH port 22 stuff is for me, because I don't actually sit at that computer):

#!/bin/sh
FWVER=0.01
#
# test extremely basic 2015.06.10 Ver:0.01
#
#     run as sudo
#

echo "Loading test rule set version $FWVER..\n"

# The location of the iptables program
#
IPTABLES=/sbin/iptables

#Setting the EXTERNAL and INTERNAL interfaces and addresses for the network
#
EXTIF="eth0"
EXTIP="192.168.111.140"
UNIVERSE="0.0.0.0/0"

#Clearing any previous configuration
#
echo "  Clearing any existing rules and setting default policy to ACCEPT.."
$IPTABLES -P INPUT DROP
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
# Delete user defined chains
$IPTABLES -X
# Reset all IPTABLES counters
$IPTABLES -Z

echo about to load rules.

$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -m multiport --sport 53,67 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p tcp -m multiport --sport 53,80,443,8080 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p tcp --dport 22 -j ACCEPT

echo Test rule set version $FWVER done.

I made it start automatically via my /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
pre-up /home/doug/test_iptables_06

# The primary network interface
auto eth0
iface eth0 inet dhcp

Note that more typically, users will merely allow whatever related traffic back in, with a more generic rule (using the variables names of my script above):

$IPTABLES -A INPUT -i $EXTIF -s $UNIVERSE -d $EXTIP -m state --state ESTABLISHED,RELATED -j ACCEPT

EDIT:

Sometimes to help understand / debug adding some logging can help. For example:

echo about to load rules.

$IPTABLES -A INPUT -i lo -j LOG --log-prefix "ILO:" --log-level info
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -m multiport --sport 53,67 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p tcp -m multiport --sport 53,80,443,8080 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -j LOG --log-prefix "IDROP:" --log-level info

echo Test rule set version $FWVER done.

then observe /var/log/syslog for the entries. Be careful with logging, so that you don't flood the log file.


How do I disable MoinMoin such that MediaWiki will start working again

In the guide I used there was an instruction to add the following lines to the end of /etc/apache2/apache2.conf:

#
#  MoinMoin WSGI configuration
#
# you will invoke your moin wiki at the root url, like http://servername/FrontPage:
WSGIScriptAlias /   /usr/local/share/moin/moin.wsgi

# create some wsgi daemons - use these parameters for a simple setup
WSGIDaemonProcess moin user=www-data group=www-data processes=5 threads=10 maximum-requests=1000 umask=0007

# use the daemons we defined above to process requests!
WSGIProcessGroup moin
<Directory "/usr/local/share/moin">
    Options All
    AllowOverride All
    Require all granted
    Allow from all
</Directory>

simply adding # to the start of them (making them recognized by apache as comments not instructions to follow) gets MoinMoin disabled and MediaWiki back to functioning normally. To get MoinMoin back simply remove the added hashtags.


How to set borders around windows in 14.04?

I appreciate the work around provided by the first answer.  However, I was very specifically looking for a method of using the actually components as provided by the distribution if it exists.

At present you can copy your favorite theme from /usr/share/theme to ~/.theme.  Name the theme folder something different from what it was named in the /usr/share/theme.  This way when you select your chosen them you'll find it by the name you called the folder.

Example:

$ cp -R /usr/share/themes/Radiance/ ~/.themes/MyRadiance

This is a per-user operation and doesn't require elevated access.

Now you can edit the gtk-3 folder of that new directory to make your borders any way you want them.  You can also customize other components of the theme.

The borders can be resized by editing the UnityDecoration features of the unity.css file located in the apps folder:

~/.themes/MyRadiance/gtk-3.0/apps/unity.css

To change the borders change the 0's to a different number of the parameter:

-UnityDecoration-extents: 28px 0 0 0;

You'll find many other editible features in the gtk-3.x folder.

For other features of the borders such as color, text, etc... take a look at Unity/Theming at:

https://wiki.ubuntu.com/Unity/Theming

I appreciate the previous workaround.  But I hope many can benefit from using the feature as distributed by the OS developers.

Oh yea, to use this newly edited theme you'll have to install the unity tweak tool.

$ sudo apt-get install unity-tweak-tool

Note:
I already linked this question to a similar question about Ambiance configuration.  This resolution can easily be applied to any modern Ubuntu theme... not just Ambiance (or the Radiance reference mentioned in this particular instance).


Use Xephyr

sudo apt-get install xserver-xephyr

Start Xephyr

Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 &

The ":1" = your display (displays are numbered starting with 0)

-ac = disable access control restrictions= allow you to forward X

-screen 1280x1024 = screen size

-br = black background

-reset -terminate= Xephyr should automatically close when the last X client is killed, does not always work.

2> /dev/null redirects error messages.

Set your display (for X)

DISPLAY=:1.0

ssh into your chroot (you may need to install ssh server, you may also wish to look at LXC )

ssh -XfC -c blowfish user@server xterm

or use any other graphical tool you wish.

See also

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

https://help.ubuntu.com/lts/serverguide/lxc.html


Simple piplines and text tools will do the job:

walt@bat:~(0)$ grep -E -o 'Mapping filepath: [^*]+' Data.file | cut "-d " -f3
map_leaf_M_BAN.AC.txt
             # Note the following regexp is fixed below - user's file had a TAB
walt@bat:~(0)$ grep -E -o 'Total number seqs written +[0-9]+' Data.file | awk '{print $5}'
32310

Since the file contains a TAB character (from the comment),

$ grep "Total number seqs written" split_library_log.txt | cat -t
Total number seqs written^I32992
Total number seqs written^I38519

The second grep command should be

 grep -E -o 'Total number seqs written[[:space]]+[0-9]+' Data.file | awk '{print $5}'

Of course, read man grep;man cut;man awk;man 7 regex.


Ubuntu won't recognize external after used on Windows

unfortunately the drive itself was not savable in its original state.

ended up having to use easeus on a windows computer to save the files to a different drive.  saved files and folders w/original name and structure.


Can't manage to set brightness on desktop Ubuntu 14.04

Unsurprisingly, there is not a single driver to change backlighting for all hardware.

Apparently xbacklight tries to set it through acpi_video0, which may not be the right one for your setting.

Your xdotool command tries to set it by simulating a keyboard touch press, I guess there are many reasons it could fail (and no error, since the keypress was simulated anyway).

The last command indicate that intel_backlight is probably not the right driver either.  BTW, sudo tee commands can be dramatically harmful for your system, be sure to understand exactly what they do before applying them.  Here it is supposed to replace the whole content of the /sys/class/backlight/intel_backlight/brightness file with 400 (which in this case is a good thing to try, provided the file exists).

Check which folders are in /sys/class/backlight/ and try to adapt the last command to the folders that are actually there.

But the issue may be elsewhere, you may want to check this answer.

[Credits.]


Failure to boot after upgrade from 10.10 to 12.04

Line 159.xxx kvm_intel: unknown parameter 'nested' says it all. You are attempting to do nested virtualization, i.e. run a virtual machine within another virtual machine (aka hypervisor), on a physical machine with an Intel processor. KVM supports this experimentally, but your kernel needs to have KVM with that support enabled. It looks like yours does not.
Please see this tutorial for details on how to enable it.


There is a http 200 response to http uploads via a website using chromium. If the web server isn't responding then it's either failed or the web server is broken.

You could use firebug to see the http messages using it's net tab:


Is there an easy way to log all activity that a shell script does?

There is a very easy and handy way:
Using script to make typescript of terminal session

Start the command script
If the argument file is given, eg script ~/tmp/output, script saves the dialogue in this file. If no filename is given, the dialogue is saved in the file typescript

Start your script or what ever you want to start

If your script is finished, stop script via Ctrl-D

Check the output in the default output file typescript

To start your command in one step with script, use the parameter -c
-c COMMAND
    Run the COMMAND rather than an interactive
    shell. This makes it easy for a script to capture
    the output of a program that behaves differently
    when its stdout is not a tty.

The usage of scriptinside your script makes no sense because script forks the shell or starts a new shell.

If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most shells set this variable automatically).


What is PPA for Firefox Developer Edition in Ubuntu 19.04

Install the Firefox Developer Edition, formerly know as Aurora, like so:
sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora
sudo apt-get update
sudo apt-get install firefox


Kubuntu 15.10 | Wine | cannot import dll :isskin.dll

The error message:    cannot import dll :isskin.dll is created
  through the missing dll library. on a baremetal wine install its
  installed with winetricks through the console by executing
  winetricks vcrun6sp6.

In playonlinux you can install libraries when creating or editing a VM - the library name to install to solve the issue is vcrun6.

Same for directX - the game installer of direcX 9c did not work, thus i skipped it on the second try.

The playonlinux library d3dx9 seemed to work as the game started and i was able to play. The physx game installer did work.

Wine version tested is 1.9.7 on a x64 VM manually created with playonlinux.
To install a custom version of Wine with playonlinux go to "top menu" -> tools -> "Manage Wine Versions" -> select x86 or x64 as per your needs and proceed with the desired version.

To edit the installed libraries, wine settings and versions of an existing VM for to "Configure" on the second bar menu in playonglinux.

To create teh desired custom VM go to: "Install" on the second bar menu and navigate to the lower left corner to "Install a non-listed program" - > create a new VM and checkmark "Use another version of wine" and "install some libraries" - proceed as described above.

When closing the game you often receive a message that the game has crashed which is bogus as you just closed it :)

This should work for most applications - as there are many settings as the wine version and libraries working together its a tricky territory - i fiddled it by just trying out - in the end i would have installed a windows dualboot with ubuntu in the same amount of time.

The OS was Kubuntu 15.10 and playonlinux from the repositories.


System hangs on "Open document" right click context menu (Xubuntu)

So I have found the answer, after a extensive search on the internet and some helpful topics on Thunar. For the "Create document" right click context menu, Thunar looks in your /home/templates folder. So if you have this folder filled with random stuff (like I did, icons, other folders, backgrounds), Thunar will try to load all those items and hang/stall.

So the best solution, is to have your templates directory clean and only with a few necessary .odt, .doc or .txt extensions in it.


Ubuntu 16.04 Wireless Networking Troubles

I was facing a similar issue. After a lot of browsing, i found a way to fix the issue. I am using HP Pavillion N15 with Mediatek 7630E wireless card in Ubuntu 16.04 LTS

Download this file:
https://github.com/neurobin/MT7630E/archive/release.zip

This is the driver that will be required. Extract the files in the download directory.

Open Terminal ( ctrl + alt + T)

Enter the following commands ( Please make sure you have extracted the files in the download folder. The name of the extracted folder should be "MT7630E-release"):

cd ~/Downloads/MT7630E-release

You should now see that the directory has changed.

Enter this command:

sudo make dkms

The driver package should be installed in a minute or two.

Reboot your system, and you should see that the wireless networks are now showing.

Hope this helps. :)


How do I correctly set up partitions during installation of Lubuntu 20.04.2 LTS?

I was also in the same question and I have installed Ubuntu 20.04 in GPT. I choosed the install Ubuntu alongside Windows and the partitions were handled by itself. I was also confused about swap. Now I have 4GB ram and 2GB swap. I just gave 200GB and let it do handle its partition size.


Missing tray icon indicator in recent Spotify versions?

It appears that the tray icon cannot be enabled for the 1.0.x client at this time. The issue appears to be longstanding, and is so mentioned at the Spotify community forums: "Linux Spotify client 1.x now in stable"

Regarding bugs/issues in 1.0.23:

  Most of these we want to fix, but others (like missing tray icon) we probably won't.

For now, Spotify is not willing/able to devote enough development resources to the Linux client. I have remained on the "spotify-client-0.9.17" package, while periodically checking the functionality of the 1.0.x testing releases (I have both the "stable" and "testing" repositories). The '0.9.17' client is disappointingly flakey sometimes (esp. "Spotify Helper" processes), but it still gives me a tray icon and panel info/support with 14.04.


Why there is no 32bit EFI boot available on current ISOs?

I can't speak to the thinking of the Canonical team that makes these decisions, but my understanding is that it all boils down to the Frankeinstein-monster nature of Ubuntu installation media (and Linux installation media generally). In brief, Linux distribution maintainers don't like creating more installation media images than they must, so they go to great lengths to create images that can be burned to CD-R or written to USB flash drives; and that can boot in both BIOS mode and in EFI mode. Doing this means that they have to take advantage of quirks of these various media, and the whole thing barely hangs together. The trouble with 32-bit EFI support is that one of these contortions (providing multiple El Torito images) pushes many middle-aged 32-bit BIOSes past their breaking points. In other words, a 32-bit BIOS/EFI boot medium won't work on many BIOS-based computers. Thus, to support a 32-bit EFI installation, the distribution would need to create a separate boot image specifically for that target. For more on the technical details, see Matthew Garrett's blog post on the subject.

As a practical matter, see this question/answer for some pointers on getting a 32-bit EFI-mode installation started:

32-Bit UEFI Boot Support

It can be done (I've done it several times myself), but it's not very well-documented.


Ubuntu 18.04 - cannot find EurKey keyboard layout even tough it is installed

You find it in a sub menu if you select English (United States).

Edit:

For that to work, you need to open Tweaks (the gnome-tweaks package), go to Keyboard & Mouse, and make sure that the Show Extended Input Sources option is ON. Then, after next reboot you should find the EurKEY layout in Settings.

The command line equivalent is:

gsettings set org.gnome.desktop.input-sources show-all-sources true


You need to apply the ISO to your DVD, not burn the ISO as a data file. Most burning suites will have an option like create dvd from disc image, that is what you'll need to choose, then browse for the ISO, insert a blank DVD, and click burn. You will then be able to boot the DVD, and install Ubuntu.


I have installed CCSM, and toggled OpenGL plugin  off and on there. Then did it with unity plugin. It helped.
The error seems to be reproducible on several PC, including fresh install of Ubuntu. Video card version does not matter, though.


Alt-Key stopped working in gnome-terminal after upgrade to Ubuntu 19.04

The Alt-# shortcuts start working again when I disable "Enable mnemonics" for some reason. The menu shortcuts don't work with the menu bar hidden anyway, so I don't miss that setting.


Open the sshd config file with vi, press / and type 'Root' and hit enter. That will search for the next occurrence of the word, 'Root'. Press n to repeat the search and find the next occurrence. Repeatedly hit n to find the statement you are looking for. It should be 'PermitRootLogin' followed by 'no'. There is also a setting to allow root login only with ssh keys, 'without-password'.


Can I install Ubuntu on logical partition under an extended partition while triple booting windows, Ubuntu and Kali Linux?

Yes, you can!
See this answer for details.

Also, consider using a GPT disk, since all of your operating systems seem to support it!


If the previous recommendations have not worked, you might want to try the following:

Reinstall the operating system.

After installation, open a terminal and type:
sudo apt-get update
sudo apt-get upgrade

In a terminal type:
sudo add-apt-repository ppa:graphics-drivers/ppa

In a terminal type:
sudo apt-get update

In a terminal type command:
sudo apt-get install nvidia-driver-340 nvidia-settings

(340 being the Nvidia driver version you need to install and currently the only drivers version that supports legacy hardware such as yours)
6. Reboot your machine.
7. Check if the Nvidia driver is installed.
Open a terminal and type:
    lsmod | grep nvidia

You should see something like this:
nvidia_uvm            671744  0
nvidia_drm             49152  2
nvidia_modeset        843776  3 nvidia_drm
nvidia              13123584  85 nvidia_modeset,nvidia_uvm
drm_kms_helper        155648  2 i915_bpo,nvidia_drm
drm                   364544  6 i915_bpo,drm_kms_helper,nvidia_drm


You can use Startup Applications
xrandr doesn't require sudo permissions so you can place your script in Startup Applications. Generally only use cron boot scripts for jobs requiring sudo powers.

New Script
The original answer was a reference. This new answer uses the reference and takes out unnecessary code. Then OP code is added to the bottom of the new answer.

Use sudo -H gedit /etc/cron.d/start_screen and insert these lines:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@reboot   root    /usr/local/bin/screen.sh

Save the file. There is no need to mark it as executable.
Note: The PATH command is very important as cron has limited PATH knowledge and may not find the commands such as /usr/bin/who or /usr/bin/awk.
Contents of /usr/local/bin/screen.sh
#! /bin/bash

# NAME: screen.sh
# PATH: /usr/local/bin
# DESC: Set screen to brightness .5 to confirm it can be done.
#       Ask Ubuntu question: https://askubuntu.com/questions/1102389/xrandr-not-working-on-crontab/1102436?noredirect=1#comment1817209_1102436
# CALL: called from `/etc/cron.d/start-screen`
# DATE: Created December 17, 2018.

#!/bin/bash

export DISPLAY=:0       # For xrandr commands to work.

# wait until user signs on to get .Xauthority file settings.
UserName=""
while [[ $UserName == "" ]]; do
    sleep 2
    logger "screen.sh slept 2 seconds waiting for login"
    UserName="$(who -u | grep -F '(:0)' | head -n 1 | awk '{print $1}')"
done

sleep 30
logger "screen.sh slept 30 seconds waiting for other xrandr tasks to finish"

xhost local:root
export XAUTHORITY="/home/$UserName/.Xauthority"

xrandr --output eDP-1-1 --brightness .5

I have tested this on my machine and it works perfectly. You will want to make the following changes:

Change /usr/local/bin/ to /avvio/
Remove or reduce sleep 30. I need it because I have existing eyesome.sh cron job that sets brightness based on internet daily sunrise and sunset times for my city.
Replace the last xrandr line with your three xrandr lines of code

Verify results
There are logger commands in the script. This will let you see it is working by using:
$ journalctl -b -xe | grep screen.sh
Dec 17 14:25:56 alien CRON[1170]: (root) CMD (   /usr/local/bin/screen.sh)
Dec 17 14:25:58 alien root[1728]: screen.sh slept 2 seconds waiting for login
Dec 17 14:26:00 alien root[1790]: screen.sh slept 2 seconds waiting for login
Dec 17 14:26:02 alien root[1973]: screen.sh slept 2 seconds waiting for login
Dec 17 14:26:04 alien root[2070]: screen.sh slept 2 seconds waiting for login
Dec 17 14:26:06 alien root[2300]: screen.sh slept 2 seconds waiting for login
Dec 17 14:26:36 alien root[5355]: screen.sh slept 30 seconds waiting for other xrandr tasks to finish

Original Answer
Cron's @reboot option runs soon after machine is booted and before user is logged in. xrandr commands won't work until user is logged on. You can use this code from eyesome and adapt to your purposes:

export DISPLAY=:0       # For xrandr commands to work.
SpamOn=0                # > 0 = number of times to spam in loop.
SpamCount=5             # How many times we will spam (perform short sleep)
SpamLength=2            # How long spam lasts (how many seconds to sleep)
SpamContext=""          # Why are we spamming? (Login, Suspend or Lid Event)
                        # Future use: "DPMS Change" ie Monitor on or off.
WaitForSignOn () {

    # eyesome daemon is loaded during boot. The user name is required
    # for xrandr external monitor brightness and gamma control. We must
    # wait until user signs on to get .Xauthority file settings.

    SpamOn=10       # Causes 10 iterations of 2 second sleep
    SpamContext="Login"
    TotalWait=0
    [[ ! -f "$CurrentBrightnessFilename" ]] && rm -f \
            "$CurrentBrightnessFilename"

    # Wait for user to sign on then get Xserver access for xrandr calls
    UserName=""
    while [[ $UserName == "" ]]; do

        sleep "$SpamLength"
        TotalWait=$(( TotalWait + SpamLength ))

        # Find UserName currently logged in.
        UserName="$(who -u | grep -F '(:0)' | head -n 1 | awk '{print $1}')"
    done

    log "Waited $TotalWait seconds for $UserName to login."

    xhost local:root
    export XAUTHORITY="/home/$UserName/.Xauthority"

    if [[ "$fUseDbusMonitor" == true ]] ; then
        echo "$UserName" > "$EyesomeUser"
        sync -d "$EyesomeUser"      # Flush buffer immediately
    fi

} # WaitForSignOn


You can try to contact PPA owner to get scripts released for 18.04 LTS.

But temporarily you can try to install them manually from PPA:

cd ~/Downloads
wget http://ppa.launchpad.net/martin-ueding/stable/ubuntu/pool/main/t/thinkpad-scripts/thinkpad-scripts_4.11.0-0ubuntu1_all.deb
sudo apt-get install ./thinkpad-scripts_4.11.0-0ubuntu1_all.deb

Then check its functionality by yourself.

Note: I'm unable to install both thinkpad-rotate and thinkpad-scripts in the same time because of the error:

The following packages have unmet dependencies:
 thinkpad-scripts : Breaks: think-rotate (<= 3.3) but 3.2-0ubuntu4 is to be installed

so thinkpad-scripts replaces think-rotate.


Are there cases where vi is the only option?

Inside the Ubuntu ecosystem, I do not think this case can even exist, as vi would at least be a vim-tiny, which is already a “real vim” far from “real vi.”
In the context of resource limited embedded systems,  which are not normally Ubuntu, you may just have a vi that turns out to be a link to busybox. And not space left.  Then, vi is the only option.
Apart from that, I think situations where vi the only option are not very common at all today, even outside the Linux world.
But there can easily be situations where vi is the only option you can plan for,
the only option that certaily will exist in some future situation — which will happen inside a customer’s over-chilled server room, most probably.
Imagine you are called by a customer:

Customer: I need to get this configuration fixed! Now!! I don’t know how, but I can tell you where the configuration file is. Can you help me!?!
You: Ok, what kind of system is that running on?
Customer: Oh, it's on server foo, ahh... it's running... can't remember, something with "ix" in the end, or mayeb with "ux"...

No problem, by now, you know there will be vi!


curl --resolve option not working: "Hostname was NOT found in DNS cache"

After trying this with other domain names, I found that the issue was being caused by the domain names not matching in the --resolve option and the URL (one had www, the other didn't). User error!

Incorrect:

curl -s -S -I -H "Host: example.com" --resolve example.com:80:1.1.1.1 --verbose http://www.example.com/

Correct:

curl -s -S -I -H "Host: example.com" --resolve example.com:80:1.1.1.1 --verbose http://example.com/


Can I view Firefox history with the terminal?

This page describes what user-specific information is stored by Firefox and where. (And this is what Mozilla's help has to say on viewing .sqlite files.)

It lists three types of history:

Bookmarks and Browsing History: The places.sqlite file contains all your Firefox bookmarks and the list of all the websites you’ve visited ...
Autocomplete history: The formhistory.sqlite file remembers what you have searched for in the Firefox search bar and what information you’ve entered into forms on websites ...
Download history: The downloads.sqlite file remembers what you have downloaded. ...

As you can see, all three histories are not simple text files but database files in sqlite format.

One way to view .sqlite files is by using sqlite3 (sudo apt-get install sqlite3).

Open a terminal and cd to the folder containing what you want to view. In my case, that is ~/.mozilla/firefox/w4wcp85s.default.

ls *.sqlite lists the sqlite files.

Run sqlite3 places.sqlite (if places.sqlite is what you want to view). You'll see something like this:

$ cd ~/.mozilla/firefox/w4wcp85s.default
$ sqlite3 places.sqlite
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

Now, there are several things you can do. (Use Ctrl+D to exit sqlite3).

For example, typing .tables and pressing Enter gives me:

sqlite> .tables
moz_anno_attributes  moz_favicons         moz_items_annos
moz_annos            moz_historyvisits    moz_keywords
moz_bookmarks        moz_hosts            moz_places
moz_bookmarks_roots  moz_inputhistory
sqlite>

To view the contents, type SELECT * FROM table_name; (where table_nameis the name of the table you wish to view; note the ;) and press Enter. It's quite likely that the output won't be understandable but that is not the fault of sqlite3.

To show you an example that does provide decent output, look at stylish.sqlite (if you use the Stylish extension):

$ ~/.mozilla/firefox/w4wcp85s.default $ sqlite3 stylish.sqlite
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
style_meta  styles
sqlite> SELECT * FROM styles;
6||||YouTube|/* AGENT_SHEET */
/* ▓▓ NIGHTSHIFT - eye care:                                 ▓▓
   ▓▓_http://userstyles.org/styles/18192/nightshift-eye-care_▓▓ */

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document regexp("https?://www.youtube.com/.*")  {
body,html {min-height: 100%!important; }
html, body{background-color:#111!important}

You can do everything in just one non-interactive command if you know exactly what you want. Read The sqlite3 command line tool for more on sqlite3.

$ sqlite3 stylish.sqlite "SELECT * FROM styles;" > ~/Desktop/filename.txt

will do the needful in the example given and tee will let you see the output on screen as well:

$ sqlite3 stylish.sqlite "SELECT * FROM styles;" | tee ~/Desktop/filename.txt

(Thanks due here.)


What is the current state of the planed features of Ubuntu-Touch

The latest information about development is available here. For your specific question, either the implementation is in private pages not accessible. The link above was the raring status, so it could be a bit old.


How can we install all the necessary dependencies for a package so that we can build it?

Packages explicitly list what they depend on in a special file in the package itself (more information here). That's what the package manager uses to figure out the full set of dependencies. And yes, it downloads them from the repository.
You can only use it for valid package names that are known to your package manager (since it needs to access the file that lists the dependencies), i.e. found in the repositories that you have enabled on your system.


NAS won't auto-mount at boot + qBittorrent issues

You have three questions here that really should be posted separately.

For the issues with mounting the NAS..
If the NAS is sharing via SMB, you shouldn't need to account for whatever filesystem it's running on a client machine - the NAS box will handle the filesystem overhead. Adding an entry in /etc/fstab to connect to the NAS at boot should solve the problem of getting the volume to mount. Read the fstab documentation here on how to configure.