Restrictions to foldernames when acessing servers by webdav?

This is going to be rather Windows oriented.

It is likely you got bitten by the maximum path length since WebDav has some serious limitations...

Avoid using any special characters and spaces in file and/or folder names. Webdav uses HTTP/HTTPS so any special characters and spaces need to be URL encoded adding to the maximum length available. That would be &%#+? *'"></\|: (I might have missed a few ;) ). Those will take up 3 positions as they are processed as %nn; %20 is a space.

The total path length and file length is in theory 256 characters but that excludes UNC prefixes and Webdav prefix; Office for instance only allows 218 chars from Windows itself; so not even from Webdav.

190, 200 characters is probably the maximum limit for path and filename.


It can be done by modifying the /usr/share/applications/ubuntu-tweak.desktop.

Open ubuntu-tweak.desktop in your favorite editor:

gksu gedit /usr/share/applications/ubuntu-tweak.desktop

Under [Desktop Entry] remove "Settings;" from Categories line.

Afterwards run:

sudo update-desktop-database

That's it!


you probably have to run like

cd /mnt/hgfs/my\ workspace/project_1


Ubuntu 16.04 LTS installed on USB key Sandisk 128 G 3.0 --- Using CLONEZILLA for backup

You can restore a cloned backup (in this case an image made with Clonezilla) into a drive of exactly the same size or bigger (but not one single byte smaller), so you cannot restore from the 128 GB USB key to a 120 GB SSD.
Please check with

sudo parted -ls

that the drives have the same physical sector size. Otherwise there will be problems.
If an MSDOS partition table, the cloned copy will work at once.
If a GUID partition table, GPT, there is a backup partition table at the tail end of the drive. If the target drive is not exactly the same size as the source drive, you must repair that backup partition table, and it can be done with gdisk or with the shellscript gptfix, that uses gdisk.


No wifi connection for Centrino Wireless-N + WiMAX 6150

How odd.  It sees the wireless device, and even its connections, but won't connect.  I've heard that a lot lately, but so far only about version 14.04 and 14.10.  Maybe I should just be glad I'm still using 12.04?

I suppose it could be that the default driver your wifi device is using isn't quite right.

Generally speaking, if you are connected to the internet using a wired connection and perform and update, drivers for such hardware will automatically be installed.  Not always but mostly.  It is always my first thing I try.

Have you tried clicking on additional drivers under system settings?


I discovered that the keyboard errors were evident even within the BIOS settings pages. I couldn't very well test the key repeat there, as there is no place to type things, only select settings, but in scrolling through the menus, I noticed the same keyboard freeze issue. Apparently there is a hardware issue at play. I don't think there is anything Ubuntu can do about this. I sent the machine back to Lenovo.


Primary button goes back to default on external mouse

I use a KVM switcher box and so I have the same issue every time I switch since upgrading.
At the moment I have this quick and dirty script.
Run it in a terminal as the logged in user;
xinput list | grep Mouse | sed -nre 's/^.*\sid=([0-9]+)\s.*$/\1/p' | xargs -r -I '{}' echo xinput set-button-map {} 3 2 1

Hope to get something better but should be useful for now.
For completeness, it's worth noting that you can also use the mouse settings UI tool, and change the primary button to right handed and then back to left handed.
UPDATE/EDIT BELOW
I now have a more convenient solution that is automated for each kvm switch, but it's still a hacky/dirty solution, and I run a script after login...
Customise the following for your vendor id and product id, based on output of lsusb. Where the hex number with a colon in the middle is the {idvendor}:{idproduct} for your mouse. Also, as flipjacob adds, customise "Mouse" string in the grep statement to your match what you get from xinput.
Create a file (as root) /etc/udev/rules.d/80-force-left-handed-mouse-on-plugin-event.rules with the following contents
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0047", ACTION=="bind", RUN+="/root/notify-mouse-plugged.sh"

Create the script that it will run (as root) /root/notify-mouse-plugged.sh.
#!/bin/bash

umask 0000
echo $ACTION >> /tmp/mouse-flag
date >> /tmp/mouse-flag

And finally create the script to pick up the 'notification' in the context of the logged in user. I run this after logging in in a terminal and leave it running there.
Listener script $HOME/listen-for-mouse-plugged.sh.
#!/bin/bash

echo "" > /tmp/mouse-flag

tail -qfn 0 /tmp/mouse-flag 2>/dev/null | while read s
do
  #inotifywait -e create /tmp/mouse-flag
  echo reset mouse $s
  xinput list | grep Mouse | sed -nre 's/^.*\sid=([0-9]+)\s.*$/\1/p' | xargs -I '{}' xinput set-button-map {} 3 2 1

  #sleep 5
done

It fires the listener loop 3 times for me, but that is of little consequence for something I hope to throw away soon.


12.04 continuously offering partial upgrade

Run sudo apt-get update && sudo apt-get dist-upgrade in a terminal

NOTE: "dist-upgrade" does NOT upgrade the system to a new version of Ubuntu.

See man apt-get for details

  dist-upgrade

       dist-upgrade in addition to performing the function of upgrade,
       also intelligently handles changing dependencies with new versions
       of packages; apt-get has a "smart" conflict resolution system, and
       it will attempt to upgrade the most important packages at the
       expense of less important ones if necessary. The dist-upgrade
       command may therefore remove some packages. The
       /etc/apt/sources.list file contains a list of locations from which
       to retrieve desired package files. See also apt_preferences(5) for
       a mechanism for overriding the general settings for individual
       packages.


Shell script does not work on crontab but works otherwise

In such case good advice is to export also JAVA_HOME as you use hadoop which depends on java.
But the best is to import/source all the variables from bash_profile

(on the begin of script)

. /path/to/.bash_profile

or

source /path/to/.bash_profile


Deleted old kernels, but boot partition still full

I found out what was wrong!
A couple of days ago, I was playing around with scheduled back-ups in Webmin. I started backing up some data from my server to a USB drive just to see if it worked. Everything worked fine, so I scheduled a complete back-up for the next day. When I checked to see if the back-up had completed, I saw that it hadn't. There was an error message, but I couldn't make sense of it and thought I'd just try doing the backup again another day.
Now I realise that (noob alert!) I had forgot to mount the USB drive on day 2, so when Webmin tried to do what I had asked and couldn't find the destination folder, it apparently just created it in the mount point for my now absent USB drive and started copying until my boot drive ran out of space. When I eventually noticed that the USB drive wasn't mounted, I didn't connect the dots, so I just mounted it normally. As the mount point now contained a huge back-up file that had filled up my boot drive, mounting my USB drive made it invisible. No wonder I couldn't find it :D ! By chance, I just tried searching for large files on the server while the USB drive was disconnected, and there it was! I deleted it, and the problem was solved.


After installing python3.7, virtualenv and pip on newly installed 20.04, terminal window will not open

Python 3.8 is the default version in 20.04 and is the base for many applications. If you absolutely need 3.7 then install it also (preferably locally) but don't downgrade to 3.7.


Krita Animation beta won't install on Xubuntu 16.04 due to missing dependency

The error message in the question says that libgsl0ldbl is an unmet dependency of krita-animation-testing. libgsl0ldbl has been discontinued after Ubuntu 15.10 in the default Ubuntu repositories, so manually download and install the Ubuntu 15.10 version of libgsl0ldbl in Ubuntu 16.04.

Visit the Download Page for libgsl0ldbl_1.16+dfsg-4_amd64.deb on Ubuntu 15.10 64-bit and download the .deb file.
Verify the file you have downloaded with the MD5 or SHA256 checksum on the download page (optional).
Double click on the libgsl0ldbl_1.16+dfsg-4_amd64.deb file to open it for installation in the Software application.
Run the following command to prevent libgsl0ldbl from being automatically installed, upgraded or removed.

sudo apt-mark hold libgsl0ldbl


Is there program that can do a dual screen random slideshow?

I haven't found a single program that can do this but I have achieved the effect I wanted using a combination of two programs which I maximised in the two separate monitors.  The programs I used for this purpose were gwenview and geeqie.  To avoid the top unity bar being visible on one or both screens I did it in this order:

Make sure the two monitors displays are aligned side by side such that the mouse point leaves monitor 1 on the right and enters monitor 2 on the left.
Put the Gwenview window in the display of monitor 1
Put the Geeqie window in the display of monitor 2
Maximise Gwenview and start its slideshow
Maximise Geeqie and if the unity top bar still shows, turn off its slideshow (other wise you're done).
Minimise and maximise Geeqie with the slideshow off.  If the unity top bar is now gone, right click in the Geeqie window and start the slide show from the context menu.

You should now have two different slideshows happening, one in each monitor.


GNOME Input Source switching - I can only switch once using shortcuts?

Have you tried reassigning the same shortcut for Previous Source, in an attempt to blank it?

I remembered seeing this problem a few days ago as well, on a 13.10 fresh installation. Didn't have the keyboard option when I installed over a freshly formatted partition.

Later on, I reinstalled Ubuntu entirely due to another unrelated problem, and this time, I was given the option to set my keyboard. Did so, and the shortcut problem was gone.

Looking back upon this, you might want to try reconfiguring your keyboard settings.

sudo dpkg-reconfigure keyboard-configuration


If you have installed anbox using snap on ubuntu, you can find Android folders at place

  /var/snap/anbox/common/data/media/0

  Note : sudo permission should be required to access above path.


How to change Ubuntu 14.04 drum beat tone?

I found the answer myself. The drum beat tone is actually system ready tone.

So I went to /usr/share/sounds/ubuntu/stereo and renamed "system-ready.ogg" to "system-ready.ogg.old" and copied new sound file.
The new sound file should have the name "system-ready.ogg".

During the next start up the new sound will be heard instead of drum beat.


How to display all .png files using * in terminal

To open all matching files at the same time, in the default application for their respective file type, you can use xdg-open in a for-loop:

for f in life_*.png ; do xdg-open "$f" ; done

Note that because xdg-open opens the file in a separate process and returns immediately, this might open as many instances of your viewer application as there are files matching the pattern in rapid succession, which could strain your system resources.

To open them sequentially, you'd have to call your viewer application directly and in the foreground, so that the next picture only opens as soon as you close the previous instance. In case of the "Eye Of Gnome" viewer eog, you should do:

for f in life_*.png ; do eog "$f" ; done


So, adding add-ons to World of Warcraft works the same on linux as it does as windows. The problem I had, is I installed Diablo 3 first, and by doing that, when I installed WoW, I had to find the WoW file inside the diablo 3 file. then you can navigate through World of Warcraft > interface > addons, and put them there and they work fine!


Trouble Configuring VNC on AWS Ubuntu amd64 (ami-9eaa1cf6) via Win 8 TightVNC

I finally got this to work.

In addition to making sure that the AWS Security Groups allow all relevant ports, I made the following changes to PuTTY (my Windows SSH client):

Enabled X11 Forwarding under PuTTY Configuration --> Connection --> SSH --> X11
Set up port forwarding under PuTTY Configuration --> Connection --> SSH --> Tunnels for 5901

then I could connect with my VNC Viewer set to localhost::5901.


Ubuntu 20.04 LTS ZFS filesystem disk space disappeared

Not enough information provided with the picture we need to know about the pool created.
root@zeus-H370M:~# zpool import -af
root@zeus-H370M:~# zpool status
  pool: WD4
 state: ONLINE
  scan: none requested
config:

    NAME                                        STATE     READ WRITE CKSUM
    WD4                                         ONLINE       0     0     0
      ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E6TYUHK2  ONLINE       0     0     0

errors: No known data errors
root@zeus-H370M:~# zpool list
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
WD4   3.62T  1.20T  2.42T        -         -     0%    33%  1.00x    ONLINE  -

The output of fdisk -l /dev/sd? would be nice, to see if you have another partition on the drive too.


Probably you've messed up your ~/.bashrc file. The way to solve this problem is to edit this file and find which commands inside generates these messages.

The directory /etc/skel contains copies of the files that will be copied into the user's home directory when you create a new user. So you could compare your .bashrc file with the default one in this way:

diff /etc/skel/.bashrc ~/.bashrc

You could copy /etc/skel/.bashrc in your home directory, but, just in case, first create a backup of the existing file:

cp ~/.bashrc{,_old}
cp /etc/skel/.bashrc ~/

Then you could compare the two files and command by command make the necessary changes in the new file.

diff ~/.bashrc ~/.bashrc_old

I would suggest you to un-comment the following in the new ~/.bashrc: force_color_prompt=yes

To apply the new file within the current session
(without start a new terminal) you should source it by one of the following commands: . ~/.bashrc or source ~/.bashrc.

Additionally you could get coloured output of diff by the wrapper colordiff. First install it:

sudo apt install colordiff

Then use it in this way (source):

diff <old file> <new file> | colordiff

Or just use:

colordiff <old file> <new file>


Remote connecting to Ubuntu 18.04 from Windows Remote Desktop: "login failed for display 0"

when posting question, please always specify complete version of the Ubuntu Operating system.   if you are using Ubuntu 18.04.3 (you can check this by typing the following command in a terminal console (lsb_release -sd), this might be a known issue....

Ubuntu 18.04.2 and 18.04.3 are using a new xorg-xserver-xorg-hwe* packages that prevent the installation of the xorgxrdp components of xrdp package.....

Best option -  Install the new xorgxrdp-hwe-18.04 package

Install the new xorgxrdp package by issuing the following command

  sudo apt-get install xorgxrdp-hwe-18.04

This should fix your issue

Dirty fix - Downgrade to previous xorg-xserver-xorg packages

We assume that you have already installed xRDP package and you want to fix it

  sudo apt-get install xserver-xorg-core

  sudo apt-get -y install xserver-xorg-input-all

More info on http://c-nergy.be/blog/?p=13390

Other option - use one of the xrdp installer script

Note : To use this option, please remove the xrdp package you have installed

You can automate the xrdp installation and have it working nicely with Ubuntu Default Desktop using one of the following scripts

  To use Ubuntu repository packages, read instructions and download the
  script at http://c-nergy.be/blog/?p=13933

  To compile from source (easy way), read instructions and download the
  script at
  http://c-nergy.be/blog/?p=13663 Hope this help Till next time See ya

Hope this help

Till next time


What is the difference between wine versions: stable, staging, devel, development?

Here the difference between the packages:

winehq-staging: this is the most recent testing wine version.
winehq-stable: this is the current stable wine version (probably the one you should install)
winehq-devel: this package is used to provide development headers, mostly used by third party software compilation.
wine-development: unsure for this one, but probably helps wine developers to debug EXE running with wine with more debug information.

I can also recommand to use PlayOnLinux that provide automated install of many Windows Application by using the most appropriate wine version.


How can I make the display size smaller than the actual physical screen size?

The option which you are looking for is called "underscan/overscan".

You have two different possiblities.

There is AMD which allows you to handle it with this option:

And Nvidia:

Once you have done the settings on how small you want it to be, there are other options with xrandr to replace your screen on a different positions, if you don't want it to be centered.


Problem with ufw enable: libkmod: ERROR ../libkmod/libkmod.c

I have found out that my issue was related to peculiarities of using Ubuntu in an OpenVZ environment.

I was able to "fix" the problem (I beleive) by following those two resources:

http://blog.kylemanna.com/linux/2013/04/26/ufw-vps/

http://blog.bodhizazen.com/linux/how-to-use-ufw-in-openvz-templates/


"Install" button is disabled in Ubuntu (12.04 LTS) Software Center

I'm guessing here...

Canonical had a server break-in about a week ago.  (You'll notice that ubuntu forums are "down for maintenance" even as I post, while they do damage control.)

I suspect that they also don't currently trust their archive and have taken it down until they can be sure it isn't loading malware on unsuspecting users.

If that's the case, being able to install via sudo apt-get may indicate that they took down the support for the gui tool but forgot to disable the underlying archive service.  You may be loading potentially corrupted software packages that they didn't intend you to be able to access.

If I were in your position I'd stop using anything you installed via apt-get (not uninstalling because it might have a corrupted uninstall mechanism) and hold off on reinstalling until they've vetted the archive - or at least explained it more thoroughly.  Then I'd consider rebuilding the system from scratch, depending on what they say about their findings, and certainly take any mitigating measures they prescribe.


Software & Updates application won't launch after upgrade to 19.04

requests_unixsocket was the problem, and it required idna, which I did not have, solution was sudo pip3 install idna


Try to install the tools pointed out on this website:


Unable to install Ubuntu 13.04 through USB

You might be experiencing the same thing that happened to me  few weeks ago, namely, I had too many partitions. The hard drive can only support 4 partitions, so if you already have 4, you can't install Ubuntu, because it creates another partition to do so. This is very possible if your computer is from HP. My dv6 laptop had 4 partitions: System, C, HP tools and Recovery. I made back up disks, and deleted Recovery, and everything worked fine. If it's not tht, then I have aboslutely no idea.


What disk is it? I would recommend moving all the data off the disk, and doing dd if=/dev/zero of=/dev/xxyy where xxyy is the disk (THIS WILL WIPE IT insecurely). If it gives an error, replace the disk. Otherwise format it and move the data back on (I cannot provide any more support from here because I don't know what to do if it works.)


First download a Ubuntu image (14.04 i386 or your preferred version/architecture)
Then open the Bodhi terminal and type sudo fdisk -l
From this output find your pendrive (by size) and keep in mind its location (i.e. /dev/sdb)
Then run this command: sudo dd if="/PATH/TO/MY/DISK/IMAGE.ISO" of="/dev/sdX" bs=8M
It will not display nothing until finishes.
When finished, restart computer and boot
Warnings:

NEVER put /dev/sda on the dd output, it will overwrite your computer's HDD.
Always put the device without the partition number (i.e. /dev/sdb and not /dev/sdb1)


Global libraries

You can run npm list -g to see which global libraries are installed and where they're located. Use npm list -g | head -1 for truncated output showing just the path.

On Unix systems they are normally placed in /usr/local/lib/node or /usr/local/lib/node_modules when installed globally. If you set the NODE_PATH environment variable to this path, the modules can be found by node.

Non-global libraries

Non-global libraries are installed the node_modules sub folder in the folder you are currently in. You can run npm list to see the installed non-global libraries for your current location.


How to switch paper orientation in Libre office 5? (Ubuntu 16.04)

The first you should open the page settings by path Format-Page-Sheet and change "Scaling mode" to "Fit print range(s) to width/height". In the same tab settings open tab "Page" and replace mark from "Portrait" to "Landscape". Save changes. All must be working good:)
If nothing helps you can open "LibreOffice Help", use F1 and select "landscape printing".


You can use this in the command you use to execute:

echo "php /path/to/script.php" | at 09:00am Jul 15

I don't use PHP but it looks like it then needs to be

exec('echo "php /path/to/script.php" | at 09:00am Jul 15')


How to find which Ubuntu repo a package belongs to

Perhaps using rmadison can help, e.g.

rmadison gcc
 gcc | 4:4.6.3-1ubuntu5   | precise         | amd64, armel, armhf, i386, powerpc
 gcc | 4:4.8.2-1ubuntu6   | trusty          | amd64, arm64, armhf, i386, powerpc, ppc64el
 gcc | 4:5.3.1-1ubuntu1   | xenial          | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 gcc | 4:7.3.0-3ubuntu2   | bionic          | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:7.4.0-1ubuntu2.3 | bionic-security | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:7.4.0-1ubuntu2.3 | bionic-updates  | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:8.3.0-1ubuntu3   | disco           | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:9.2.1-3.1ubuntu1 | eoan            | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc | 4:9.3.0-1ubuntu2   | focal           | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
 gcc | 4:9.3.0-1ubuntu2   | groovy          | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x

or:
madison gcc-9
 gcc-9 | 9-20190402-1ubuntu1  | disco          | source, amd64, arm64, armhf, i386, ppc64el, s390x
 gcc-9 | 9.1.0-2ubuntu2~19.04 | disco-security | source, amd64, arm64, armhf, i386, ppc64el, s390x
 gcc-9 | 9.1.0-2ubuntu2~19.04 | disco-updates  | source, amd64, arm64, armhf, i386, ppc64el, s390x
 gcc-9 | 9.2.1-9ubuntu2       | eoan           | source, amd64, arm64, armhf, i386, ppc64el, s390x
 gcc-9 | 9.3.0-10ubuntu2      | focal          | source, amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
 gcc-9 | 9.3.0-13ubuntu1      | groovy         | source, amd64, arm64, armhf, i386, ppc64el, riscv64, s390x


How can I install the necesarry drivers for my printer without web connection?

You could try to find your driver from this website:

http://hplipopensource.com/hplip-web/install/install/index.html

I can't point you to the exact driver, but you can search it trough the wizard.

Once you're done, copy the .run file to your Ubuntu installation, run it, and follow the instructions:

chmod +x nameofthefile.run

sudo sh nameofthefile.run


Internal microphone is not working after upgrade

I had this "problem" too but in my case was very easy to solve it.

The REAL problem was that my microphone was muted inside the audio input config.
Go there and check if the MUTE 'checkbox' is checked, if it is just uncheck.

I hope that solve your problem.

Good Luck!


You cannot use scopes to "wrap" a website. You would want a simple webapp for that.

Scopes are used for querying and displaying of remote content from a web services API e.g youtube, amazon, or querying a RSS or XML data feed of some kind etc. Scopes provide a way to render the raw data in a clean and consistent way.

If your blog has an RSS feed then you can most certainly create a scope for it. https://developer.ubuntu.com/en/phone/scopes/tutorials/ is the best documentation to get going with scopes.


Doing a quick google search (and some testing), I found out this solution: http://cygwin.com/ml/cygwin/2002-06/msg00594.html

So more or less, set the LS_COLORS environment variable to something like di=31;1 (for red) or di=33;1 for yellow.

Here is a list of colors (the part after di=) you can use: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html

Also, check this out for further information: http://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors


Unity doesn't work on VNC server under 14.04 LTS

This Ask Ubuntu link shows the solution.

Install these packages:

apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

Use this ~/.vnc/xstartup file:

#!/bin/sh

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &


No. The idea behind "sudo" is traceability and accountability. You use 1 account per person per role.  When you have 1 admin account used by 10 people ...

... you will never find the culprit when someone screws up.
... you will need to change the password and notify 9 people of that change.

On a single user machine not so much an issue but Ubuntu/Linux is a multi-user system so we inherited a few of those rules onto the desktop.

  Or is it overkill for day-to-day computing in a home environment?

No, nowadays it is a necessity. Look at that ransomware attack last May. And the ransomware that is hitting servers at this moment. There are also rootkits that try to find holes to get onto system (also not really a problem for you and me since our systems are not worth breaching ;) ).

The user/admin role separation is just 1 of the security measures to prevent unwanted direct access to your system (both physically or remotely). It will not stop someone stealing your machine and rebooting.

It is good practice to keep the current safeguards active.


What owner and mod should I give to /var/www

First, give the ownership to www-root using the command:

  sudo chown -R 'www-data':'www-data' /var/www

Then, give permissions to group members using the command:

  sudo chmod -R g+rw /var/www

Finally add your username to the www-data group using this command:

  sudo adduser your_username www-data

This way, you will be able load on the browser as well as edit the files.


How to ensure user separation on an old school shell server

hidepid

procfs on Linux now supports the hidepid option. From man 5 proc:

hidepid=n (since Linux 3.3)
      This   option   controls  who  can  access  the  information  in
      /proc/[pid]  directories.   The  argument,  n,  is  one  of  the
      following values:

      0   Everybody  may  access all /proc/[pid] directories.  This is
          the traditional behavior, and  the  default  if  this  mount
          option is not specified.

      1   Users  may  not  access  files and subdirectories inside any
          /proc/[pid]  directories  but  their  own  (the  /proc/[pid]
          directories  themselves  remain  visible).   Sensitive files
          such as /proc/[pid]/cmdline and /proc/[pid]/status  are  now
          protected  against other users.  This makes it impossible to
          learn whether any user is running  a  specific  program  (so
          long  as  the program doesn't otherwise reveal itself by its
          behavior).

      2   As for mode 1, but in addition the  /proc/[pid]  directories
          belonging  to other users become invisible.  This means that
          /proc/[pid] entries can no longer be used  to  discover  the
          PIDs  on  the  system.   This  doesn't  hide the fact that a
          process with a specific PID value exists (it can be  learned
          by  other  means,  for  example,  by "kill -0 $PID"), but it
          hides a process's UID and  GID,  which  could  otherwise  be
          learned  by  employing  stat(2)  on a /proc/[pid] directory.
          This greatly complicates an  attacker's  task  of  gathering
          information   about  running  processes  (e.g.,  discovering
          whether some daemon is  running  with  elevated  privileges,
          whether  another  user  is  running  some sensitive program,
          whether other users are running any program at all,  and  so
          on).

gid=gid (since Linux 3.3)
      Specifies  the  ID  of  a  group whose members are authorized to
      learn  process  information  otherwise  prohibited  by   hidepid
      (ie/e/,  users  in this group behave as though /proc was mounted
      with hidepid=0.  This group should be used instead of approaches
      such as putting nonroot users into the sudoers(5) file.

So, mounting /proc with hidepid=2 is enough to hide the details of other users' processes on Linux > 3.3. Ubuntu 12.04 comes with 3.2 by default, but you can install newer kernels. Ubuntu 14.04 and above easily match this requirement.

ACLs

As a first step, remove rwx permissions for others from every home directory (and for group as well, if you require it). I'm assuming, of course, that the folder(s) containing the home directories don't have write permissions to anybody except root.

Then, grant services like the web server and mail server access to the appropriate directories using ACLs. For example, to grant the web server process access to the user home pages, assuming www-data is the user and ~/public_html is where the home page is kept:

setfacl u:www-data:X ~user
setfacl d:u:www-data:rX ~user/public_html

Similarly, add ACLs for the mail processes and the mailbox directories.

ACLs are enabled by default on ext4 at least on Ubuntu 14.04 and above.

/tmp and umask

Another problem is /tmp. Set the umask so that files aren't group- or world-readable, so that users' temporary files aren't accessible to other users.

With these three settings, users shouldn't be able to access other users' files, or examine their processes.


Run OpenGL apps with CUDA with Nvidia Optimus and Bumblebee

I was trying to install CUDA 7.5 on Ubuntu 14.04.3 using runfile installation, because this worked for me starting from CUDA 5.0. I have a laptop with Optimus technology (Nvidia GT520M discrete card + Intel embedded card), thus I had to pass "--no-opengl-libs" flag to installer script. I was following Nvidia guide from here: CUDA_Installation_Guide_Linux.pdf.  Unfortunately this method turned out to be unreliable if I wanted to run OpenGL samples and work with graphics (samples which don't use OpenGL work properly). It gives me an error "cudaErrorDevicesUnavailable". Carefully reading installation guide tells you that CUDA 7.5 works with ubuntu 14.04 and kernel version 3.13! Ok, no problem, I've formatted partition once again and run script... but It didn't work either. And again carefully reading installation guide tells you that using package manager installation type is recommended where possible! So removed runfile installed cuda driver and toolkit and used .deb packages. BAM! and it works like a charm! :)

In conclusion, the easies and probably the safest way of installing CUDA 7.5 on Optimus laptop is:

Install ubuntu 14.04 with 3.13 (trusty) kernel version
Follow Package Manager installation part from Nvidia guide: CUDA_Installation_Guide_Linux.pdf

[EDIT]

Unfortunately it seems that debugging won't work this way...


I'd report this bug for the Linux package.


Unable to connect to internet using Android wifi tethering (hotspot) in Ubuntu 14.04

Open Chrome , go to settings and uncheck

predict network actions to improve page load performance

option. restart chrome. that will fix DNS_PROBE_FINISHED_BAD_CONFIG issue.

If issue still persists , let me know.


chrome needs to restore tabs on every reboot

I too see this problem with chrome not shutting down properly on Ubuntu 17.10.  In my case it turned out to be the forecastfox extension.  When it's running and I close chrome I can see in system monitor that the browser has not shut down completely and problems do occur when I start chrome the next time from chrome crashing to tabs needing to restore.  If I disable forecastfox chrome shuts down fine and I see no problems the next time I open it.


Is it possible to install theme engines? If so, how?

For starters, you could run the following two simulations:

apt-get install -s gtk3-engines*

and

apt-get install -s gtk2-engines*

These commands should indicate engines available to you.

Then you could run:

dpkg --get-selections > ~/Desktop/installed-software

to get a list of software installed on your system and search that file for engines. I did that and have just the following engines because my OS is Lubuntu 12.10 and I haven't installed any extra themes:

  gtk2-engines:i386
  gtk2-engines-pixbuf:i386
  gtk3-engines-unico

You may also want to look at basic theme engines for GTK+:

  GTK-engines is a collection of basic theme engines for GTK+.

  The GTK-engines provide basic themes for GTK. Themes control the user
  interface, providing icons, shadows, text layout, color schemes,
  window decoration and more.

  The basic theme engines are the ones that GNOME produce, though users
  can install (or write and install) others.

  The basic theme engines are very flexible, so many themes can use a
  single engine but still get a unique look and feel.

And from reading here and there, I get the impression that one has to be a little careful in ensuring that the themes one tries matches the GNOME version!

As for where exactly the "engines" are located, I honestly don't know but you could see if you have something like /usr/share/gtk-engines and /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/.


How to prevent Unity from auto-mounting and locking my camera so gphoto2 can work?

There is a way to disable auto-mounting in Gnome. Run dconf-editor and in the section org.gnome.desktop.media-handling you can disable automount option. See this answer.

Unfortunately, this prevents auto-mounting all devices, including flash drives, which is probably not desired. Personally, I have reset the action upon insertion of media with photos to Ask what to do (System-Settings - Details - Removable Media - Photos). That allows to unmount the camera right from the dialog shown after insertion, which saves one click.


Ubuntu 15.04 remastering boot option "text"

I was having the a similar problem just now, updating from 14.04 to 15.04. The answer here helped me:
https://askubuntu.com/a/79682/427786

Specifically these commands:

sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target


lsusb shows this:

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0bda:0138 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 064e:c218 Suyin Corp.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

What more do you need to know?

If you need more there is usbview on sourceforge:  USBView is a GTK program that displays the topography of the devices that are plugged into the USB bus on a Linux machine. It also displays information on each of the devices. This can be useful to determine if a device is working properly or not.

did not try usbview in 11.04 btw


How can I add miniature pictures to XFCE folders?

The so-called "miniature pictures on folders" is unsupported by Thunar, the file manager in Xfce or Xubuntu, according to this thread on Xfce forum as quoted below.

  Unfortunately, Thunar does not support directory thumbnails (ala Windows). There has been some work done, but nothing completed yet.

So you can't add miniature pictures like Windows in Xfce or Xubuntu, yet.


When you run sudo apt-get update (or use the Refresh button in a package manager), a list of packages will get downloaded from the Ubuntu servers. These files are then stored in /var/lib/apt/lists/.

You can safely remove the contents of that directory as it is recreated when you refresh the package lists. If you remove the files, but do not run apt-get update to fetch the lists, commands like apt-cache will fail to provide information (since the cache is empty).

To shrink the directory and speed up fetching package lists, consider disabling some repositories that you do not need (see How to remove a repository?). This includes PPAs (see also How can PPAs be removed?)


You can hide the duplicate icons by using dconf-editor.

Scroll down to com → canonical → unity → devices and enter the UUID of the mount in blacklist.

Mine looks like this.


How can I make Pidgin a single-window application?

I successfully installed window_merge in ubuntu following these  guidelines:

http://tuxdna.in/blog/2014/08/12/single-window-mode-in-pidgin-messenger-using-window-merge-plugin/

I had to install those packages:

pidgin-dev
libgtk-3-dev

I also had to install it in a different way:

sudo make install

Now it works like a charm. Hope this helps.


Upgraded ubuntu from 14.04 to 16.04 lts -Virtual box problem

The answer to your problem lies here under "Note 4":

  Running DKMS in the guest OS will keep Guest Additions installed after a guest kernel update.

I believe your host machine suffers of the same problem!

I'll divide my instructions in two parts: part one for installing virtualbox and part two for installing guest additions.

PART ONE: Installing virtualbox from debian package

I just did this in a fresh Ubuntu Mate installation (much better than the basic distribution!) because Ubuntu Software Center didn't give me the latest version which is 5.1.2.

Next steps in host's terminal:

I followed this link

sudo apt-get update
sudo apt-get install dkms
Download virtualbox-5.1_5.1.2-108956~Ubuntu~xenial_amd64.deb from link (amd64 in filename is NOT for AMD only)
sudo dpkg -i Downloads/virtualbox-5.1_5.1.2-108956~Ubuntu~xenial_amd64.deb

Errors appear so, rebuild

sudo apt-get -f install

Redundant:

sudo apt-get install build-essential linux-headers-$(uname -r)

sudo rcvboxdrv setup

run virtualbox

if message about errors, reconfigure with sudo /sbin/vboxconfig

Finally, add a Virtualbox menu item with this superb tool that only Ubuntu Mate offers(!)-the all mighty alacarte command of previous decade and broken in newer versions of Ubuntu!: System->Preferences->Look and Feel->Main Menu

PART TWO: Installing guest additions

A proper installation is described here although, the writer forget to mention that everything is being executed in the guest!!!

Even so, problems existed in my case so I mixed previous link with this and here the final steps:

Create a Ubuntu guest server graphically or use an existing one with a name, e.g. My Ubuntu Server
copy *.iso to your guest folder My Ubuntu Server

cp /usr/share/virtualbox/VBoxGuestAdditions.iso ~/'VirtualBox VMs'/'My Ubuntu Server'

on Virtual Box Manager (main  window) select the just copied file

In the picture it's obvious that I already did it!

Next steps in the guest's terminal:

sudo apt-get update
you should have dkms:

dpkg-query -s dkms | grep -i status
Status: install ok installed

otherwise

sudo apt-get install dkms

now it's time to rebuild guest additions:

sudo mount /dev/cdrom /mnt

cd /mnt

sudo ./VBoxLinuxAdditions.run

reboot

when logged again run sudo mount | grep vbox
and in my case the shared folder is in /media/sf_shared


If you want to turn off UFW completely and delete all the rules, you can use "reset" command:

ufw reset

Afterwards you can start it again (fresh clean) using:

sudo ufw enable

More info can be found in this tutorial and the official documents


Is Steam Safe? It has its own repositories

Yes
The repo Steam adds is officially maintained by Valve, so it should all be safe. Many people use Steam on Ubuntu daily.


Ubuntu 12.10 After installation (D drive and E drive in Windows System) are missing!

When you are formatting you are not actually destroying data so there are several procedures to recover it. You should ask google in order to find somo easy way... Good Luck


How to tell Xubuntu not to clone but to expand the laptop display to the external one?

If you ran into the same situation like me:

Enter xrandr into your terminal and figure the name of your laptop screen and the name of your external screen. Mine were VGA-0 for the laptop and LVDS for the external one.
While you are on it you can figure the resolutions supported by both devices.
Create an executable script somewhere on your computer and name it e.g. dual_monitor.sh.
Put the following commands into the script. The comments should explain what is for what!

#!/bin/bash

# RESOLUTION SETTINGS
# This sets your VGA1 monitor to its best resolution.
xrandr --output VGA-0 --mode 1280x1024 --rate 60
# This sets your laptop monitor to its best resolution.
xrandr --output LVDS --mode 1400x1050--rate 60

# MONITOR ORDER
# Put the Laptop right, VGA1 monitor left
# xrandr --output VGA1 --left-of LVDS1
# Put the Laptop left, VGA1 monitor right
xrandr --output LVDS --left-of VGA-0

# PRIMARY MONITOR
# This sets your laptop monitor as your primary monitor.
xrandr --output LVDS --primary
# This sets your VGA monitor as your primary monitor.
# xrandr --output VGA1 --primary

Just comment out what you don't want and uncomment what you need and you will be done - after running this script!

I got this solution from here and here.


Xubuntu automatically renames whisker menu to its default "Applications Menu"

I can confirm this behaviour in UbuntuStudio 20.04.

Workaround until the bug is fixed:

I found a file /etc/xdg/xdg-ubuntustudio/xfce4/whiskermenu/default.rc, you can try to edit this file (needs root access). The file might be in a different folder on your system since you use Xubuntu while I use UbuntuStudio. I just searched for whiskermenu in /etc to find the file.

For Xubuntu edit the file /etc/xdg/xdg-xubuntu/xfce4/whiskermenu/defaults.rc. One can also edit ~/.config/xfce4/panel/whiskermenu-1.rc, which would not require root permissions.


Run the following command in terminal:

sudo gedit /etc/default/grub

This opens Grub boot loader config file with text editor.

Do below changes:

Uncomment the line #GRUB_CMDLINE_LINUX_DEFAULT="quiet splash", by removing # at the beginning, which will enable the Ubuntu purple screen.

Change GRUB_CMDLINE_LINUX="text" to GRUB_CMDLINE_LINUX="", this makes Ubuntu boot  into Graphical Mode.

Comment this line #GRUB_TERMINAL=console, by adding the # to the beginning.

After saved the changes, update grub via command:

sudo update-grub

Restart your computer and see the result.

Reference


Create UDEV rule for device with multiple tty ports

Finally figured it out. Using udevadm info /dev/<relevent port> you are able to see the path of the device. For me it was: /devices/3530000.xhci/usb1/1-1/1-1.1/1-1.1:1.0/tty/ttyACM0 for ttyACM0, the port I actually want to map to. This path would be mostly the same for all the ports created except the index in ttyACMx and 1-1.1:1.x will be different. For my device the primary port will always us x = 0 for 1-1.1:1.x.

So, I added a statement to the udev rule: DEVPATH=="/devices/3530000.xhci/usb1/1-1/1-1.*/1-1.*:1.0/tty/ttyACM*". Only the primary port would statisfy this criteria because I listed 1-1.*:1.0.


What is a realistic date for the kernel power regressions fixes?

There is no actual date or any realistic release. Not even in the staging area for the 3.2 version of the Kernel. you can only wait until the diverse groups that are working on this start showing some progress (if any) on this problem which is one of 3 huge ones I see:

Faster Power Consumption
Multiple Problems Related to Intel's New Architecture (Sandy & Ivy Bridges)
Increased Temperature

There are other but this 3 are the ones that affect more users.

I know it has been a long time since this problems appeared (Since the 2.6.38. 2.6.37 was fine), not only for battery drain and temperature but Sandy & Ivy also. The only thing is to wait and know that, since this is an open sourced work, there are thousands of eyeballs looking at the code and trying to help in any way they can to solve the problem.

For what I have read in several places, trying to solve one problem creates others for other users and this is something most developers do not want. They want to solve the actual problem without creating new ones and since Linus Torvald is VERY EXPLICIT in this particular way of working, any added merges to the kernel that fix one of this, or any other for that matter BUT create other problems will not be added to the master kernel. I find this to be a better way of working towards a regression free kernel than as it did not too long ago were an added patch created more problems than it solved.

I will not say that at the end of the 3.2 version or in the 3.3 version, 3.4,...4.0 version this problem will be solved but our only thing right now is to wait or be part of the developers of the kernel and work on that problem.

There are many studies at phoronix about this issue (and other specific stuff like Intel) like:

http://www.phoronix.com/scan.php?page=article&item=linux_mobile_uffda&num=1
http://www.phoronix.com/scan.php?page=article&item=linux_31_power_regress&num=1

So to answer your questions that is in all of us the short answer is: There is no sure date to when this problem will be fixed but it WILL be fixed.

UPDATE

As mentioned by our very own famous user29347 (who we will now call the mistery man) there are 2 Phoronix links that show progress in regards to the Power regressions and other related news but one in particular where is mentioned that there was a Pull a couple of days ago that finally solved this problem in the 3.3 Kernel. This link is: http://www.phoronix.com/scan.php?page=news_item&px=MTA0MTM

So the 3 points mentioned above about power consumption, multiple architecture problems for ivy and sandy bridges, video problems and temperature problems will be solved in the 3.2 and 3.3 kernel versions. Most probably any left over misc bug will be addressed in the 3.4 kernel and finally finish anything left over.


How can I avoid having to enter a password for an scp command by hard-coding the password into my script?

SSH key authentication is convenient and secure

Please do not hardcode a password into the shellscript, because it is easy for other people to read it.

Login with key authentication to ssh is what you need.

This way you need no password, and it is more secure too. This is particularly important if the computer is visible on the internet. If you don't think it's important, try logging the login attempts you get for the next week.

Running

ssh-keygen

you will probably be offered to protect the key with a passphrase.
Don't do it
(press Enter to continue without a passphrase when ssh-keygen asks), because you don't want to type any password or passphrase when you run the script and arrive at the scp command line.

Without key authentication and with clear-text passwords, it is very important to have strict permissions on the shellscript and it is a good idea also for security related shellscripts without a clear-text passphrase. The default permissions for a script file (when created somewhere in your home directory) is probably 644

$ ls -l shellscript
-rw-r--r-- 1 sudodus sudodus 349 dec 23 10:54 shellscript

and you may give your script files execute permissions for everybody, 755

$ chmod 755 shellscript
$ ls -l shellscript
-rwxr-xr-x 1 sudodus sudodus 349 dec 23 10:54 shellscript

but you had better cut it down to 600, no permission except for your own userID, and no execute permission at all

$ chmod 600 shellscript
$ ls -l shellscript
-rw------- 1 sudodus sudodus 349 dec 23 10:54 shellscript

and you cannot run it directly with ./shellscript, so use

bash shellscript       # when shellscript in the current directory
bash path-to-shellscript/shellscript  # from other directories

Do it (enter a passphrase when ssh-keygen asks) if you want higher security, because your private key will be protected (encrypted with the passphrase), but then you have to type the passphrase, when you run the script with scp.
You must copy a key file, for example with

ssh-copy-id <username>@<host>

scp uses ssh for data transfer. So when the keys are in place,
it should work without a password.

Every linux machine can be made an ssh server by installing openssh-server, in Ubuntu with apt,

sudo apt update
sudo apt install openssh-server

Link with details, for example troubleshooting tips,

help.ubuntu.com/community/SSH/OpenSSH/Keys


Some ideas:

The root account on your local system doesn't have to do anything with the account you use on the remote system. Don't run sshfs with sudo! Besides, sshfs is a user space file system
Assuming you use ssh keys, did you copy your public key to the remote system? ssh-copy-id -i ~/.ssh/id_rsa.pub root@myserver
Maybe the port for ssh is different than the standard port 22? Use the -p option of sshfs
Use the debug option of sshfs: -o sshfs_debug
Is login with ssh as root on the server possible at all? Some distros disable this by default.
The user must be a member of the fuse group: sudo addgroup YOUR_USER fuse
The mount point must be writeble by the user and empty

Example:

mkdir ~/mnttest
sshfs -o sshfs_debug -p 22 root@myserver:/ ~/mnttest

Unmounting:

fusermount -u ~/mnttest


Libinput: Change Touchpad 2 finger and 3 finger clicks

Trying to achieve the same thing here, but with Libinput it is not possible (in fact, some params are hardcoded and not changeable).

I have a touchpad that also does clickpad (you can either "touch" or "click" on the pad).

What I want is to have the same things happening when touching 1, 2 or 3 fingers than when I click with 1, 2 ou 3 fingers (respectively):

1 finger : normal left-click
2 fingers : middle click (to past selected text, open links in tabs, etc.)
3 finger : right-click (displaying context menu).

I can achieve this for the "tapping" with what @WinEunuuchs2Unix said hereabove.

As for the "clicking", you can only do either:
- clicking as your hardware has been designed: most clickpad have 2 physical buttons at the button (one for left, one for right), so you can do that.
- or clicking with 2 or 3 fingers anywhere on the pad, but then the default (and unchangeable, see libinput documentation) behaviour is right-click for 2 fingers and middle-click for 3 fingers.

For that, you have to add one of the following option to the code @WinEunuuchs2Unix gave:

Option "ClickMethod" "buttonareas" # respect the designed buttons

Option "ClickMethod" "clickfinger" # click anywhere you want

If you really want to get the desired effect (and invert the 2 and 3-click behaviour to respectively middle- and right-click), you would need to get back to synaptics drivers (instead of libinput), and use this wellknown code:

Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "ClickFinger1" "1"
Option "ClickFinger2" "2"
Option "ClickFinger3" "3"


I have found an answer.

$ xdg-settings get default-web-browser
firefox-mozilla-build.desktop

and then find where it is:

$ locate firefox-mozilla-build.desktop
/home/user/.local/share/applications/firefox-mozilla-build.desktop

Open it

vi /home/user/.local/share/applications/firefox-mozilla-build.desktop

and then change

Exec=firefox

to:

Exec=firefox %u


Which one is faster?

Obviously LXDE. It is even lighter than XFCE. LXDE uses about 110 mb of ram when idle while XFCE is a little more bloated, taking about 200 mb (based on my experience)

Which is easier to use?

XFCE. It have more GUIs while LXDE requires you to modify configuration files in your own in some cases.

More configurable?

Both are configurable, but it depends on how much you want to play with it. It is less configurable than KDE or GNOME, though.

Can I install them?

Via the software center everything is easier. But I recommend you use lubuntu-desktop for LXDE or xubntu-desktop for XFCE. (Since they've prepared most of the stuff for you)


Burn it to a DVD or USB/pendrive USB.
Go to the boot menu if you can. If you don't have, then go to the grub menu to then select the DVD/USB/pendrive USB. Grub menu can also use just a iso file. Which means you could skip step 1!
Do the setup and select it to install over Ubuntu.
Reboot, you should now go to OS X.
If it doesn't and shows instead a no OS found or a blinking underscore, try again.


Wireless adapter stopped working after installing 17.04

Okay, I fixed the problem by removing the gnome networking manager and installing wicd as described here:

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


UFW not denying traffic on specific ports

This might be helpful for you. Follow the instruction
Start and enable UFWs systemd unit:
sudo systemctl start ufw
sudo systemctl enable ufw

Deny Incoming in 9200 and 5601
sudo ufw deny in 9200 | sudo ufw deny in 9200/tcp | sudo ufw deny in 9200/udp
sudo ufw deny in 5601 | sudo ufw deny in 5601/tcp | sudo ufw deny in 5601/udp

If you want to turn off UFW completely and delete all the rules, you can use reset command:
ufw reset


How to run a Python script for a specific user log in?

Either use the "Startup applications" or create a .desktop file in the directory

/home/user/.config/autostart/

..where user is the name of the user for which this script is supposed to run.

example /home/user.config/autostart/custom.desktop file would contain the following lines

[Desktop Entry]
Type=Application
Exec=/home/user/script.sh
Name=Custom script
Comment=Custom Script


This issue is caused in my case by an API mismatch that can be found in your kernel logs.

I tried several things to fix the issue and only one prevailed.  I manually install the latest Nvidia drivers from their website the .run files. I then uninstalled them using the Nvidia recommended method and then installed the nvidia-current package from Ubuntu.

The funny thing is that the Nvidia.run drivers detected the mismatch and was able to repair it, but the nvidia-current package couldn't.  I will try and submit a bug report, or possible patch.


how do i share my mobile internet connection via wifi in ubuntu 12.04

In short the steps are:

  Verify: WIFI card can support "master mode" or act as an Access    Point.
  Install: You will need hostapd, isc-dhcp-server, firestarter.
  Config: Do some configuration edits on those packages.
  Script: Run a script that starts everything.
  Firewall: Start firestarter to connect the Wifi Access Point to the    3G data card.
  Trouble Shooting: Extra info if you are stuck
  Starting/Stopping: How to start and stop once it works

More details and how to configure can be found here


HP Pavillion 17-e67cl Black screen Ubuntu 14.04, only boots with vga in

I have a HP Pavilion DV5 and I always needed to use fn+F3 to increase brightness.

To correct this issue I needed add the acpi_backlight=vendor in Grub.

Open the grub file:

gksudo gedit /etc/default/grub

Locate this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and add the option acpi_backlight=vendor:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Save and close the file

Update the Grub with this command:

sudo update-grub

Then, restart your system.


Problems with running atom editor via terminal

I have the same problem, but when starting atom in general. I think it may be caused by https://github.com/atom/atom/issues/13084

A temporary workaround which works for me is this script on Atom's GitHub page

#! /bin/bash

ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=true /usr/bin/atom "$@" &

## wait a few secs, then kill all env collecting processes
sleep 3
PIDS=`ps aux | grep 'bash -ilc command env' | awk '{print $2}'`

for i in $PIDS
do
    kill -9 $i
    echo "killed: $i"
done


You can keep on using cdrdao, without a GUI, from the command line.
In theory, it should be as simple as:

cdrdao write album-master.toc

but in practice, it turned out to be a bit more complicated than that. Here's what I had to do:

simulate - Before anything else, let's use simulate instead of write. It'll avoid ruining a CDr if an error occurs. We'll revert back to write once a simulation has completed with success.
device - Next, it can't hurt to specify which drive you want to use. cdrdao scanbus will list your drive(s) address(es). I wanted to use /dev/sr0 so added this to the command: --device /dev/sr0
driver - By default cdrdao uses the generic-mmc driver, and by default this driver doesn't write CD-TEXT. We have to specifically state that we want to also burn the text by setting the driver bit to 0x10 like this: --driver generic-mmc:0x10
speed - I haven't used that option as cdrdao detects the speed of the drive automatically, but if you want you can add --speed 4 to the command to force your drive to write at that speed (mine won't go below 16).

So now the command looks more like this:

cdrdao simulate --device /dev/sr0 --driver generic-mmc:0x10 album-master.toc

Ardour's TOC - cdrdao can be a bit sniffy with the toc files generated by Ardour(5):

If you used the Performer field in any of Ardour's CD markers, then it has to be filled in for every track, otherwise cdrdao fails.
We have to open the toc file in a text editor to manually edit the TITLE and PERFORMER of the whole cd, located in the first CD_TEXT block (but do not add a COMPOSER entry there or cdrdao will fail).
Whilst we're here, Ardour hardcodes the wav file location which means that if we ever move the .wav and .toc files to a different folder/device, cdrdao will not find the .wav file and fail. So it's worth doing a quick search-and-replace-all:
FILE "/home/xxxxx/ardour/album-master/export/album-master.wav"
FILE "album-master.wav"

If the simulation now runs successfully, you can replace simulate by write and be on your way. In my case I had to work around a couple more bugs:

Bugs

For some reason when opening a session, Ardour seems to convert my first CD marker to a Location marker, which then messes up the exported TOC file. So I have to fix that every time before exporting.
I kept the most annoying/weird bug for last. cdrdao kept failing with this error:
ERROR: Cannot set write parameters mode page.
and telling me to Please try to use the 'generic-mmc-raw' driver.
But changing the command to --driver generic-mmc-raw would also fail, this time with a different error:
ERROR: Write data failed.
Then sometimes, seemingly at random, everything would work perfectly and I could write as many cds as I wanted.
Eventually I worked it out: first run the command once with --driver generic-mmc-raw, let it fail with the Write data failed error, and after that the command with --driver generic-mmc:0x10 works fine. Go figure...


Yeah is getting worse week after installation...definitely  smth is fkd up...watching movies on 4k screen or using multiscreen via ubuntu is sht...even when you setup your monitor order its changing setup when you sign out...I do not know ubuntu is on the market so many years its cooporate with other satanic brnads and stil cant be faster fkn bill gates sht...


Second monitor not being detected on Ubuntu 16.04 / XCFE desktop

Use the GUI named arandr. Helps with xrandr under hood.  I have had fabulous experience with it. It handles problem of listing devices and you pull down menus to activate devices.

Without that, first step is show us "xrandr -q" output. Need to be sure hardware is detected. Then worry about if it is xrandr compatible. Not all video cards are.

What is the video card? If you have Nvidia, there is separate layer of questions.


It is currently not possible to cancel future operations without cancelling the currently running operation.


cannot open shared object file: No such file or directory

I have the same problem and I was unable to fund solution on the internet, nothing worked for me. Finally I've managed it to work simply by installing libgtk2.0-0:i386 graphic library from the Ubuntu Software Center.

You can also type the following command in a terminal:

sudo apt-get install libgtk2.0-0:i386


Snaps are broken, and I can't work out how to fix

What I did to fix it.
I still have no idea what is wrong with snap, but this work around worked for me.
Remove all packages
for package_name in …
do
    sudo snap remove $package_name
done

Re-install packages
for package_name in …
do
    sudo snap install $package_name
done

Replace the ellipses as appropriate.


formatting USB Flash memory for ubuntu ext4

I was having a similar problem.  I resolved this by first unmounting the partition via cli:

sudo umount /dev/sdb1 (or whatever your usb is)

Then formatting the partition for ext4 (it cannot be formatted while mounted/in use):

sudo mkfs.ext4 /dev/sdb1

That should do the trick, worked for me.


How to use English as language but belgian (or other) keyboard layout during Ubuntu 12.04 server installation?

In a default setup, you will get asked separately about language and keyboard layout. You can set any combination – I frequently install Ubuntu Server in English but with a German keyboard layout.


Lubuntu 15.04 using a dell vostro 1510 WIFI problems

I am a Newuser, I also installed Lubuntu today on my Dell Vostro 1510 and I found a solution on this very helpful board! - This fixed my wireless issues!

I used a network cable connection and ran the following code below from my terminal:

sudo apt-get install firmware-b43-installer

restarted computer and it Worked Great! :-)


Request to be able to zoom in and out of pictures in Ubuntu

Take a look at Ubuntu Brainstorm http://brainstorm.ubuntu.com/ . There you can submit any idea and track its progress as well.


Can't boot after switching to intel driver

You may try to switch the cards by adding sudo before your command.

$ sudo /usr/bin/prime-select nvidia

Or you can boot as root in recovery mode and type the same command again.


apt-get purge won't get rid of local configuration files.
ekiga creates files in your home directory, under
./.gconf/apps/ekiga

You'll have to delete that entire directory with rm -rf ~/.gconf/apps/ekiga

Applications frequently use .gconf, .gnome*, .config and .local for various settings and cache information, so those are good places to check in general.

If you're not finding more pieces of ekiga, try running sudo updatedb and when that finishes, try locate ekiga .  You might find something you've missed.

From the additional items, you've added, I don't see any problems.  If you really wanted to you could delete some of those items with something like sudo rm /usr/lib/pymodules/python2.7/orca/scripts/apps/ekiga/script.pyc .  I wouldn't expect these to make a difference, unless you're using orca.


Ubuntu 14.04 not booting on main user after name change

Your initial guess was correct - you need to change the home directory entry in /etc/passwd file. That means you can either use sudo vipw or sudo sed -i 's;/home/oldName;/home/newName;' /etc/passwd in terminal. To access virtual terminal press CtrlAltF2 (or any F key from 1 to 6), and login there.


Two types of specialized boot partitions are common on GPT disks:

The EFI System Partition (ESP) is used to store EFI-mode boot loaders. The ESP is a FAT partition on which EFI boot loaders appear as ordinary files, normally with filename extensions of .efi. The EFI spec doesn't say what size is appropriate, but most ESPs created by OS installers range between 100MiB and 512MiB. I generally recommend making ESPs at least 550MiB in order to avoid bugs on some (mostly older) EFIs. The ESP has a GPT type code of C12A7328-F81F-11D2-BA4B-00A0C93EC93B ("EF00" in gdisk, or a "boot flag" set in parted or GParted). On MBR disks, it has a type code of 0xEF (set as such in fdisk; there's no way to properly identify an MBR ESP in parted or GParted).
The BIOS Boot Partition holds BIOS-mode GRUB code on GPT disks. There's no equivalent to a BIOS Boot Partition on MBR disks. (Under MBR, GRUB stashes part of itself in an unpartitioned portion of the disk instead.) The BIOS Boot Partition is usually about 1MiB in size and has no filesystem; GRUB stores its code there "raw." It has a GPT type code of 21686148-6449-6E6F-744E-656564454649, which shows as a type of "EF02" in gdisk or as having the "bios_grub flag" set in parted or GParted.

The ESP is needed for EFI/UEFI-mode booting and is useless for BIOS/CSM/legacy-mode booting; and the BIOS Boot Partition is used by GRUB for booting from GPT disks under BIOS/CSM/legacy mode and is useless when booting in EFI/UEFI mode or when using non-GRUB boot loaders such as SYSLINUX or LILO.


Finding file and replacing word with some specific word

Execute:

find -type f -name "specificFileName" -exec sed -i.bak 's/foundWord/replaceWithWord/' '{}' \;

This will only replace first seen 'foundWord' with 'replaceWithWord', in case you wanted to replace all these 'foundWord's add sed's "g" enabler to having replace all seen

find -type f -name "specificFileName" -exec sed -i.bak 's/foundWord/replaceWithWord/g' '{}' \;

note: This will copies the 'specificFileName's as their backup files and name them with "specificFileName.bak", by dropping the "-i.bak" you will tell 'sed' to inplace replace,


The drivers for the USB dongles are sometimes a pain. Realtek's web site can help somewhat but not all adapters will work with the latest kernel without some massaging. So, here is the web site for the newest drivers REALTEK

after which you will need to blacklist a file. You want to edit /etc/modprobe.d/blacklist.conf

Open the terminal and type:

sudo gedit /etc/modprobe.d/blacklist.conf

Go to the end of the file and add the line:

blacklist rtl8192cu

Use this guide as a resource


Keefox and Keepass are installed. Yet every time I open Firefox, I'm asked to configure it again

Probably worth taking a look at this page if you've not already: https://github.com/luckyrat/KeeFox/wiki/en-|-Installation-|-Linux

The setup tab appears because KeeFox does not think that you have setup everything correctly.

The above page and/or manually entering the paths in the Options/KeePass panel should do the trick but if not you could try the KeeFox help resources: http://keefox.org/help

The path information should be explained on the setup page but it's possible this is different in non-English languages.


Can I Run 64 Bit Ubuntu OS On Intel® Pentium (R) Processor B940?

Intel's Product Specification site for the B940 says:

  Instruction set: 64-bit

So it should be possible to install any 64 bit operating system on the machine. Regarding general performance and other resource requirements, just get a live USB of the release you want to try and play around with it.


Permissions on a messed up OS X hard drive

Try gksudo nautilus and enter your password, this will run file browser application with root access so it will have all permissions.


In order to save the output of a command in a variable, you must enclose the command in backtics (`command`) or, better, in $() ($(command)). You are using single quotes which means that you are saving the string wc $FILE and not actually running wc:

$ foo='wc /etc/fstab' ## WRONG
$ echo $foo
wc /etc/fstab

$ foo=`wc /etc/fstab`  ## RIGHT
$ echo $foo
23 96 994 /etc/fstab

$ foo=$(wc /etc/fstab)   ## RIGHT
$ echo $foo
23 96 994 /etc/fstab

In addition, in order to get only the words and not the number of characters and lines, use the -w option:

$ foo=$(wc -w /etc/fstab)
$ echo $foo
96 /etc/fstab

Finally, to get the number alone, with no file name, you can use:

$ foo $(wc -w /etc/fstab | cut -d ' ' -f 1 )
$ echo $foo
96


How to send terminal output to text file without newline

Your Terminal window is too narrow for the lines to be displayed on a single line (per filename).

Hold the left ALT-key,
while doing so; place mouse pointer over either window side, inside the window,
hold down the MIDDLE mouse button
and drag to resize the window.

Let go of the mouse button and then ALT as you're content.


How do I enable 'minimize on click' on Ubuntu dock in 17.10 and later?

It seems as Ubuntu Dock is a fork of the popular and highly customisable Dash to Dock, Ubuntu Dock obeys (some) preferences set by Dash to Dock.
See Solution 2  (CLI method) for the simplest fix.

Solution 1 (GUI method)
Follow the steps below.

Go to Dash to Dock's homepage at extensions.gnome.org.
Turn the extension on by clicking on the toggle button.
Reload the page. It should look like this:

Click on the "settings" symbol next to the toggle button which now says "ON". A window should pop up.
Navigate to the "Behaviour" tab and select "Minimise" in "Click action".

Close this window and come back to Dash to Dock's homepage.
Click on the toggle button to deactivate Dash to Dock.

Now clicking on the icons of running applications in Ubuntu Dock should minimise/restore the focussed application window.

Solution 2 (CLI method)
Open Terminal and run
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'

To revert to the default option, simply run
gsettings reset org.gnome.shell.extensions.dash-to-dock click-action

Alternative options: (may work only on newer Ubuntu Dock or Ubuntu versions)

To minimise when there is a single window of the application and show thumbnail previews if there more than one, run:
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'

To minimise when there is a single window of the application and show the Activities overview if there more than one, follow the answer by V T.

In general, run the following to see all possible permitted values
gsettings range org.gnome.shell.extensions.dash-to-dock click-action


Installing 15.04 on 32 bit machine under VMWare Workstation 10

Please check {HERE} and see if your Laptop meets the minimum requirements. Unless it a custom built, or modified, I believe your Laptopt is what I would refer to as jurassic, and will not be able to run Ubuntu.


HUD in 13:10 no longer returns out of focus applications or system commands

It is expected behaviour due to a design decision (currently referred to, but not yet referenced, in this launchpad bug - see comment #8 by Ted Gould).

Sadly, I have not come across a method of changing it back.  There are two partial workarounds I'm aware of:

Gnome Do still works with Unity, and can allow for lock, shut down etc.  There are almost certainly some indicator functions it won't do out of the box, but it may well be enough for your needs.
You can access the indicator menus using the keyboard by doing AltF10 followed by Left.  If you want shut down then just do Up followed by Enter, otherwise use the cursor keys to navigate.  Nowhere near as convenient as the old HUD, but might be useful enough for you.


How do I set my screen resolution to the maximum supported resolution?

Increasing the line HorizSync in xorg.conf like this

HorizSync       28.0 - 120.0

used to help in days of yore with 19" CRTs. (60hz * 1280 columns + some traceback equals a minimum of 78 kHz, not 55.)


While installing anything: Clearsigned file isn't valid

This is actually appears to be an issue with Spotify's repository. Per following thread there is a DNS redirect that is breaking things.

http://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Spotify-0-9-11-for-GNU-Linux/m-p/844713

There is a temp fix describe in the thread that has worked for several people (myself included):

In terminal

sudo add-apt-repository -r "deb http://repository.spotify.com stable non-free"
sudo add-apt-repository "deb  http://repository-origin.spotify.com stable non-free"
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
sudo apt-get upgrade


Temporary solution:
GIMP works under X11:
sudo nano /etc/gdm3/custom.conf

uncomment: WaylandEnable=false

in nano only: Ctrl+X / key Y / Enter

sudo nano /etc/environment

add or change to: QT_QPA_PLATFORM=xcb

in nano only: Ctrl+X / key Y / Enter

Reboot to X11...

If want to go back to Wayland:
sudo nano /etc/gdm3/custom.conf

comment: #WaylandEnable=false

in nano only: CTRL+X / key Y / Enter

sudo nano /etc/environment

change to: QT_QPA_PLATFORM=wayland

in nano only: CTRL+X / key Y / Enter

Reboot back to Wayland...


How to convert MBR partition table to GPT?

If you have windows installed, you can use AOMEI Partition Assistant to convert your partition table from MBR to GPT , or from GPT to MBR. download it here
http://www.disk-partition.com/free-partition-manager.html

To install Ubuntu alongside windows 10, do following
- Valid for both GPT & MBR partition:

1)Make a partition at least 20GB & do not format it. just keep it Unallocated, in case you format it , delete it.(just like the black partition which is unallocated)

2)Reboot and boot from your installation disk/USB,
when it asks for Installation type, Select the 1st option . i.e

Install Ubuntu alongside Windows Boot Manager

(the image below was copied from google image search)

3)You don't need to configure any kind of parition here , setup will automatically do this for you.

4) Finally Install GRUB Boot-loader to you Hard disk and you are done.now when you boot your machine, you will see boot options to choose from. if you don't see such options, go to Boot Devices in your BIOS ( Press F9 or F12 ) and select

Ubuntu

or

UEFI- Ubuntu

EDIT : As commented by Zacharee1, you don't always have to format entire hard drive, you can be smart. just use AOMEI Partition Assistant. it convert MBR to GPT without data Loss.

If you face any issue, comment back.

Hope it helps!


See identical question: How do I disable mouse magnet on middle edge with multi monitors?

System Settings - Displays. Uncheck the box that says "Sticky edges".


Why this script doesn't work in cron and generates a empty output?

Try changing the line in the crontab with this:

55 * * * * /bin/sh /root/test-1.sh > /tmp/test-1.log
58 * * * * /bin/sh /root/test.2.sh >> /tmp/test-2.log

this should solve the problem.


Failed to load module “canberra-gtk-module” .... but already installed

install gtk and gtk3 module should solve it.

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module


Why are the .zip files of compressed .jpegs about the same size?

If the files were exactly the same size then something strange is going on. However, JPEG files will not compress much, if at all, with any typical archive software. It is expected that a 100kB JPEG file will be 99kB or larger when zipped.


Ubuntu 12.10 Eclipse IDE opens py file with gedit(default) cant run file from gedit? cant switch default to eclipse?

Eclipse doesn't come by default with a python-editing environment.

You probably want to install the PyDev addon. See the link for how to get it via the eclipse addon manager - it isn't available through the Ubuntu repositories.

EDIT: Re-reading the question, I may have misunderstood. I'm not clear if the question is:

How to associate .py files to be opened with eclipse rather than gedit/gvim?
Why eclipse starts an external editor when you try and open a python file with it? (because it has no python editor, see above)
Why a python file doesn't run when clicked in the file browser? (because it needs to be marked as executable, and in the hello world case probably exits before you've seen anything)


Maybe this could help you.
And also look here: How To Install Ubuntu LAMP stack (includes php)

wget http://uk.php.net/distributions/php-4.4.9.tar.gz
tar zxf php-4.4.9.tar.gz
cd php-4.4.9/
./configure
make
sudo make install


/usr nowadays stands for User System Resources. This directory contains most commands and executables files, libraries and documentation. In the early days of Unix, it was the directory where the users' home directories were placed (your user home directory would have been /usr/anatoly which now is /home/anatoly), so originally it stood for User.

See Chapter 1. Linux Filesystem Hierarchy for details.


I think you should install only these packages:

texstudio for TeXstudio 2.10.8
texlive-latex-extra for placeins.sty and sectsty.sty

with

sudo apt-get install texstudio texlive-latex-extra

One can always find needed packages by using search on https://packages.ubuntu.com using Search the contents of packages section - see example for placeins.sty.


Razer Blade Stealth Trackpad jumping all over the place in 17.10

I was able to solve the problem using the solution outlined in this answer: https://askubuntu.com/a/987271

In my case, I used the following for the hwdb file:

libinput:name:Synaptics TM2438-005:dmi:*svnRazer:*:pvr6.06*
 LIBINPUT_MODEL_LENOVO_X230=1

Hope this helps solve your issue!


Why no support for Whipper - cd ripping software?

Yes it is available in Ubuntu: https://snapcraft.io/whipper

That's right, it's a snap.

In fact, there's a link to it on the Whipper github page.


I am guessing you meant 'Wine' software, used in Linux for executing Windows software on Linux.

In that case, just go to the Wine option through menu, use 'Uninstall Wine Software' option, (on a slow computer, it may take a while) a window will appear with title of 'Add/Remove Programs'.

This window's Applications tab shows the currently Wine installed Windows software onto your Linux. Select the Windows program you want to un-install, then click the 'Remove' button.


Still you have alternative way to download virtualbox:-

form terminal : sudo apt-get install virtualbox

from installer : download from virtualbox website Here!


OpenSpritz: a free speed reading bookmarklet.

https://gun.io/blog/openspritz-a-free-speed-reading-bookmarklet/

Jetzt:  Speed reader extension for chrome

https://github.com/ds300/jetzt

Readline: Simple Spritz inspired Chrome extension let's you speed read any selected text on a website word-by-word.

https://chrome.google.com/webstore/detail/readline/hjbkmfadmomgaokjodomncmbgmmodona

Read It: Drag the link above into your hot bar. Click it to speed-read any selected text.

http://www.mikeprescott.net/ReadIt.html


How to bump the version of a package available in another user's PPA?

Download cmake 3.2.3 from here.
Extract the tarball, the path should be cmake-3.2.3.
Now rename the tarball:

mv cmake-3.2.3.tar.gz cmake_3.2.3.orig.tar.gz

Download the packaging part from the ppa for 15.04.
Extract cmake_3.2.1-1ppa3~vivid1.debian.tar.xz into cmake-3.2.3

cmake-3.2.3
  ├── debian
  │   ├── changelog
  ...

Update the debian/changelog as follow (just change the signature):

cmake (3.2.3-1ppa1~vivid1) vivid; urgency=medium

  * New upstream release.

 -- Sylvain Pineau <sylvain.pineau@canonical.com>  Tue, 30 Jun 2015 11:24:26 +0200

cmake (3.2.1-1ppa3~vivid1) vivid; urgency=medium

  * Fix path to icons in cmake-qt-gui.

 -- Nathan Osman <nathan@quickmediasolutions.com>  Mon, 30 Mar 2015 17:59:20 -0700

Install the build dependencies:

sudo apt-get build-dep cmake
sudo apt-get install liblzma-dev

Build a new source package for cmake with:

cd cmake-3.2.3
dpkg-buildpackage -S

Upload the source package to your ppa with:

cd ..
dput ppa:<user_name>/<ppa_name> cmake_3.2.3-1ppa1~vivid1_source.changes

Monitor the build progress in your ppa homepage


How to set automatic night mode in Ubuntu 20.04?

In Ubuntu 20.04, the settings for night mode are available under the "Display" tab in "Settings". Once there, you will see a button "Night Light" in the top bar that brings you to the dialog you are looking for.


Add android-studio/bin/ to PATH environmental variable

It looks like you edited this code snippet:

if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

which is included in ~/.profile by default.

The answer which lead you to do so is confusing IMNSHO.

I'd suggest that you change that code back to what it looked like before, and instead add a new line underneath it:

if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

PATH="$PATH:/usr/local/Android/android-studio/bin"

Then, next time you log in, PATH ought to be altered, whether $HOME/bin exists or not.


Disable dedicated video card without installing drivers

http://planetoss.com/articles/how-to-disable-the-discrete-amd-graphics-card-in-linux/
Follow this article and you can disable it.

in short

sudo -s
cat /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
cat /sys/kernel/debug/vgaswitcheroo/switch

See the difference of the cat, you can see that the dedicated card "DIS" is "Off" instead of "Pwr"

If it really works and you want to disable it on every startup, modify "etc/rc.local". Just follow the article I posted above.


Restore Alt+F2 "program execute" in GNOME Classic (no effects)

In System Settings - Hardware - Keyboard - Shortcuts tab, click System - Show the run command prompt - Alt+F2, change it if it's disabled or set to something else.

CCSM can also set this in "GNOME Compatibility".


I have overheating problem with HP Pavilion g4-2002tx, it has switchable/hybrid graphics between Intel and AMD Radeon. However, it has never gotten sudden shutdown.

I just power off the AMD Radeon by sending OFF to /sys/kernel/debug/vgaswitcheroo/switch. Now, the thermal is about 63° C and I conclude that the problem is caused by the discrete graphics card, so just turn it off when it is not needed.

echo OFF | sudo tee /sys/kernel/debug/vgaswitcheroo/switch

If you sudo cat /sys/kernel/debug/vgaswitcheroo/switch:

Before turning off discrete graphics (AMD Radeon):

0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0

After turning off discrete graphics (AMD Radeon):

0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0

Hope it helps.


System boots into a console when installing with the alternate CD

Login then type these commands:

sudo apt-get update

sudo apt-get install ubuntu-desktop

or

if you prefer Xubuntu

sudo apt-get install xubuntu-desktop

or

if you prefer Kubuntu

sudo apt-get install kubuntu-desktop


Kernel Panic - Not Syncing : Attempted to Kill init?

You may have a defective piece of hardware such as:

One of your memory modules (RAM) may be damaged or the slot on the motherboard may be damaged
Hard drive or it's controller (SATA) may have been damaged
A defective motherboard or USB bus

In your question you mention that attempting to boot the Live CD version of Ubuntu is crashing. This is a good indication that there is a piece of faulty hardware, although it is possible for the live version to make use of your disk. My advice is to unplug your disk and try the Live CD version. If it still crashes you likely have defective hardware and my advice is to try to run a memory/RAM test such as memtest86.


Installer hangs for ages then crashes just before the end of the installation process

SOLVED - Resolved this issue by unchecking 'install this third party software'.('Download updates while installing' was already unchecked and the machine was offline) You can install mp3 codecs and flash player manually later. Hope this helps somebody.


How to use a key press to wake a suspended laptop when using a KVM switch?

From: USB IR remote wakup from Suspend

I had the same problem and was also stumped by my USBs not appearing in /proc/acpi/wakeup. In the end, however, despite many solutions suggesting this was required I did not need to enable USBs in ACPI.

Instead, enabling wakeup on the USB port my IR device was connected to was was enough.

Find your device ID:

$ lsusb

  Bus 002 Device 002: ID 8087:8001 Intel Corp.
  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 001 Device 002: ID 8087:8009 Intel Corp.
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
  Bus 003 Device 003: ID 13ba:0018 PCPlay Barcode PCP-BCG4209
  Bus 003 Device 002: ID 1934:5168 Feature Integration Technology Inc. (Fintek) F71610A or F71612A Consumer Infrared Receiver/Transceiver
  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

In the above example my device ID is 5168.

Grep /sys/bus/usb to find the port your device is plugged into:

$ grep 5168 /sys/bus/usb/devices/*/idProduct

  /sys/bus/usb/devices/3-13/idProduct:5168

This indicates my device is plugged into bus3, port 13.

Confirm the port is correct:

$lsusb -t

  /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
  /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
     |__ Port 13: Dev 2, If 0, Class=Vendor Specific Class, Driver=mceusb, 12M
     |__ Port 14: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
     |__ Port 14: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M

Bus 3, port 13 matches the bus/port returned by grep (3-13)

Check if wakeup is enabled:

$ cat /sys/bus/usb/devices/3-13/power/wakeup

  disabled

Enable wakeup on port:

$ sudo sh -c 'echo "enabled" > /sys/bus/usb/devices/3-13/power/wakeup'

Check if wakeup enabled:

$ cat /sys/bus/usb/devices/3-13/power/wakeup

  enabled

Test your device, does it wake the system?

Make this change persistent across reboots:

$ sudo nano /etc/rc.local

Add the following lines after the comments and before 'exit 0'

# Enable Wake on IR for USB bus 3 port 13.
echo enabled > /sys/bus/usb/devices/3-13/power/wakeup

Now happily wake your PC from your USB device.

Limitations
One problem with this approach is that if the USB port the IR device is plugged into changes, then enabling that port specifically does not help.

This post has a way of enabling any IR port based on the device that is plugged into it using a Udev rule.

References
Kodi, MCE Remote and Ubuntu
Wake from suspend with keyboard or mouse
Enabling IR devices with a Udev rule

Original Answer Below

This question has three answers that may work for you: Wake up from suspend using wireless USB keyboard or mouse (for any Linux Distro)

Answer 1 (15 upvotes)

hit in terminal:

grep . /sys/bus/usb/devices/*/power/wakeup

The result, for me, was to find out that all usb were disabled.
So now, type:

1.

sudo su

we have now root privillages.

2.I have 8 usb ports (you do that for as many usb ports you have) ,so:

echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb3/power/wakeup
echo enabled > /sys/bus/usb/devices/usb4/power/wakeup
echo enabled > /sys/bus/usb/devices/usb5/power/wakeup
echo enabled > /sys/bus/usb/devices/usb6/power/wakeup
echo enabled > /sys/bus/usb/devices/usb7/power/wakeup
echo enabled > /sys/bus/usb/devices/usb8/power/wakeup

Go ahead and test it. Now you can wake up from any wireless or wired usb keyboard and mouse.

So then, the reason we must enable all of them, is because in the next step, we will write this in rc.local to execute the command after every reboot, and after reboot some linux distros (maybe all) change the usb ports.
We don't have to worry for anything going wrong by enabling all of them, since linux is in suspend or hibernation, it can't use the wifi to download anything, so it won't wake up without we wake it up on purpose.

Next step:

3.

sudo nano /etc/rc.local

and we paste everything from step 2. in there (before the exit 0 of course).

That's it. From now on we can use our wireless usb and mouse to wake up from suspend.

I hope it works for all of you. This guide was made after testing all other possible solutions around the internet.

Answer 2 (7 upvotes)

In addition to my guide above i want to add this information, because i recently discovered that some wireless usb devices after waking up from sleep, they revert back to disable.
I repeat, only some usb devices do that, not all. That's why i didn't add this small guide up on my guide.

So you did as i instructed above and your pc successfully wakes up, but later in the day suddenly it doesn't wake up again.

Solution:

Open a terminal and do :

lsusb

At your keyboard device id information the 4 first digits are the vendor id and the 4 next digits are the product id (see screenshot)

Next do:

sudo nano /etc/udev/rules.d/10-wakeup.rules

Where "wakeup" enter your desired name of the script. Number 10 is the priority in case you have many other udev rules, the lower the number the 'rule' will be executed before the others.

Copy paste this and replace the vendor id and product id with your own wireless keyboard vendor id and product id.

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="062a", ATTRS{idProduct}=="4101" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/usb8/power/wakeup'"

*usb8 for me is my wireless keyboard (you can also see that in the screenshot (Bus 008)), replace it with your own.

Ctrl + O to save , Ctrl + X to exit and reboot.

Answer 3

Pavlos Theodorou's answer is very helpful.  I would like to add that you can find the usb device that your mouse/keyboard is connected to at boot-up by piping dmesg through grep a couple of times, then egrep once, and finally using tail to make sure it was the most recent entry.

Using this method, you don't have to enable wake on ALL usb ports.

I put the following in my /etc/rc.local file and it finds my logitech receiver every time, even if moved from one usb port to another.  Just substitute the name of your keyboard or mouse from dmesg in place of "Logitech K270"

KB="$(dmesg | grep "Logitech K270 as" | grep -o -P "usb.{0,5}" | egrep -o ".{0,3}$" | tail -1)"
echo enabled > /sys/bus/usb/devices/${KB}/power/wakeup

This works on boot, but doesn't seem to run on wake from suspend, so I had to put a script file in /lib/systemd/system-sleep/.  Create it, set it as globally executable and give it a name that starts with a double digit number between 00 and 99.  My script is as follows, again substite your keyboard/mouse verbage from dmesg:

#!/bin/sh

# Action script to enable wake after suspend by keyboard or mouse

if [ $1 = post ]
    then
    KB="$(dmesg | grep "Logitech K270 as" | grep -o -P "usb.{0,5}" | egrep -o ".{0,3}$" | tail -1)"
    echo enabled > /sys/bus/usb/devices/${KB}/power/wakeup
fi

if [ $1 = pre ]
    then
    KB="$(dmesg | grep "Logitech K270 as" | grep -o -P "usb.{0,5}" | egrep -o ".{0,3}$" | tail -1)"
    echo enabled > /sys/bus/usb/devices/${KB}/power/wakeup
fi

For some reason I can't explain, the 'post' sleep if statement only works every other wake-up... but the 'pre' sleep if statement seems to work every time.


Terminal has no option to "open new tab" and no label in tabs

This seems to be a newer version of GNOME Terminal update (>3.10). When you open the preferences dialog, you should see something like this:

When you set the "open new terminals" setting to "Tab", the new terminal action will now open a new tab in the same window instead of opening a new window.

The old behaviour regarding tabs seems to have been changed in 3.12 and 3.14, for some reason.

You seem to have updated your GNOME components with a version that does not ship with Utopic, so you should expect to see it break.


Can't install Ubuntu 14.04 shows black screen. GTX 750 Ti

This is simple! Took me a while to work it out, but I had the same issue, and it turned out it was using the onboard Intel GPU!

Even if your BIOS has your Nvidia card as default, for some reason, Ububtu still uses the onboard card, so it is actually booting, you just cant see it!

The solution: Go into your BIOS and disable your onboard video. When you reboot, leave the black screen for a few minutes, and the mouse should appear.

This may not working in all situations, but its an easy thing to try first!


Is the Units Policy still being drafted or is it finalised?

It is encouraged to file them, but I would suggest only against applications developed specifically for Ubuntu, if the developer doesn't code with Ubuntu in mind, then Unity Policy might not be something they are concerned with.


Nvidia graphics card not found, system details shows NV126 instead of GeForce GTX 960

According to nouveau/CodeNames wiki (freedesktop.org) NV126 is the codename for the GeForce GTX (950, 960) graphics card. This codename correctly matches your GeForce GTX 960 graphics card. Settings -> Details shows the graphics card's codename in your Ubuntu 18.04.
When you open Software & Updates and click the Additional Drivers tab, it starts searching for additional drivers and shows a screen like the below screenshot.

As you can see in the bottom left corner of the screenshot it says No proprietary drivers are in use. while it is searching for additional drivers. Give the application a minute or two to finish searching and it will display a list of installed graphics drivers. The graphics driver that is currently being used has the radio button to the left of it selected.
You can also install Tool for configuring the NVIDIA graphics driver (nvidia-settings) to show what graphics driver is currently being used. It does a better job of identifying the Nvidia graphics card model than the System Profiler hardware information application does.
In all currently supported versions of Ubuntu open the terminal and type:
sudo apt install nvidia-settings

To open the NVIDIA X Server Settings application search for nvidia in the Dash and click on its icon.
Some applications require additional software to be installed to make optimal use of the Nvidia proprietary graphics driver. For example Blender's Cycles render engine requires nvidia-cuda-toolkit. The Compute Unified Device Architecture (CUDA) enables NVIDIA graphics processing units (GPUs) to be used for massively parallel general purpose computation.


How to remove the preview image on video and picture files in folders?

In Nautilus

Go to Edit > Preferences > Preview
Here change  always to never for Show text in icons and Show thumbnails


The option "upgrade 10.04 to 11.04" is not like upgrading 10.04 to 11.04 via an upgrade to 10.10.. This option means that all data from your /home will be preserved but you will have to reinstall your idividual applications and you will also have to create your users again. User setting from these applications (including passwords in the keyring) will be preserved.

"Upgrade from 10.04 to 11.04" therefore is like a clean installation (i.e. "Erase Ubuntu and reinstall") but without formatting your drive and without erasing /home.

As with all OS upgrades it is strongly recommended to backup your data before you proceed.

Your Windows partition(s) will only be touched and deleted by choosing "Erase everything".


Mate Desktop Environment won't uninstall from Ubuntu

If you want to remove MATE Desktop, just run sudo apt-get remove mate-*. This will remove anything relating to the MATE desktop environment. Do not run sudo apt-get remove mate*, as this can break your installation.

Source: http://sourcedigit.com/12228-uninstall-remove-mate-desktop-ubuntu-14-04-lts/


A detailed answer to all of these will take too much space and effort, plus additional information about each of these packages.

But in general, the strategy is:

If the package is not found first make sure you have it. E.g. check with dpkg -l "*libXXX*". In case of python, check which python is picked up by the system with which python3 command. It doesn't mean the same one will be found by cmake (cmake can use different order of search directories), but it is likely.
If you have it, but it is not in a standard path, just not found or different version is found, you usually need to

a) set some environment variables

or b) modify the findXXX.cmake scripts that you find in "cmake" folder of OpenCV source

or c) modify the OpenCV CMakeLists.txt file to set the needed Cmake-variables (which findXXX normally sets) manually.
The things above are easier to do with cmake-qt-gui (install it if you don't have it). Then when it finds wrong python, you can just enter the path to the right one using the GUI.
Matlab/VTK not found in not a disaster. There are many optional packages that you can built with.
Unless cmake actually says, that it cannot build the OpenCV modules you need without it or unless you really want to use this package (e.g. for performance reasons), you don't need to do anything. Which OpenCV modules require which packages and what are the advantages of using certain optional packages you need to find out individually for each package.  But if you want to build with Matlab or VTK, you need to make sure cmake will find it. So read the points 1.,2., 3.


How to find the same lines and merge the values?

Use 'awk',

awk '{seen[$1]+=$2} END{for (x in seen) print x, seen[x]}' infile > outfile

In above awk command, main this 'seen[$1]+=$2' part do the job, the variable $1 as the key feild suming the value of second column when matched key seen.

And at the end, we are looping over seen array with x as variable and print the keys seen in first column then the sum result of each key by seen[x].


I need Ubuntu.Components 1.3 for Ubuntu 14.04

I ended up re-installing Qt5 by downloading an installer file.   I had to change that file into an executable and then I ran it and Qt re-installed and it worked.

All the examples disappeared after I closed it the first time, so  googled that problem and someone came up with some command lines to do to get the examples back and those worked.

So I would advise you to re-install Qt from their website using an installer.  I suspect that you, like I, had Qt installed incorrectly or incompletely.


Check the PC's BIOS boot order options.  The specifics of how to do that vary from BIOS to BIOS, but they boil down to this:

Restart the system and immediately press F1, then F2, ... F12 to get the BIOS setup screen.  Sometimes it is Esc.  It could be faster to refer to the manufacturer's information for the right button to press.  There are only a few seconds (2–5) during which this is valid.  If you don't try in time, press Ctrl-Alt-Del to reset and try again.
Look through the menus for the Boot option.  Change it so that the USB ports are tried (to look for a bootable image) before the hard drive.
Save the revised BIOS settings and reboot.


Ubuntu Server Installation "Signal Out of Range"

I have solved the problem, I took the HDD out of my server and booted it on my PC. From there I was able to edit the Grub to my resolution.