Editing a command-line argument to create a new variable

You can do it in awk like this:

$ name=$(echo $1 | awk -F[/.] '{print $(NF-1)}')
$ echo $name
0,2817,2412941,00

By using / and . as delimiters, the stuff you want will be present in the last but one field which can be accessed using NF-1


problem with upgrade to 16.04 from 14.04

Maybe try this solution: https://ubuntuforums.org/showthread.php?t=2318779&p=13466943#post13466943
If you can login in the terminal, then you are able to do this simple procedure. Essential should be the line sudo dpkg --configure -a (if you run as root, you don't need the sudo) and you can gracefully poweroff after that using sudo poweroff. It helped a some other people, like here Error after upgrading from 14.04 to 16.04


How to find ghostscript files in ubuntu?

If you want results that include recently created files, try this:

find / -type f -name \*.gs

However, if you want an answer quickly, instead of find try locate, which uses a database of files that is updated every night or every week

locate *.gs


How do I fix gnome-shell-extensions ppa eoan Release does not have a Release file?

You have the answer in the packages section.

  This PPA currently publishes packages for Cosmic, Bionic, Artful,
  Zesty, Yakkety, Xenial, Wily, Vivid, Utopic, Trusty, Saucy, Raring,
  Quantal, Precise, and Oneiric.


Ubuntu One Taking up 40-170% of CPU usage with i5 processor

Before uploading to the server, Ubuntu One needs to take a checksum of each file, and that involves reading the file in its entirety. If you do it 160GB in one chunk, it will likely take a whole day to churn through it, and depending on the disc you have it on can make the system slow. This is inescapable, although there might be some ways to mitigate its impact in your work.

In general the Ubuntu kernel should be smart enough to find the sweet spot in the compromise between getting the work done and over with, and letting use your machine. If you need it to back off a bit, you can use nice and ionice to do that. For example, you could use ionice to set ubuntuone-syncdaemon to only hit the disc when nothing else needs it, and use give other processes some preference for CPU usage,

$ ionice -c 3 -p $( ps h -o pid -C ubuntuone-syncdaemon )
$ renice -n 10 -p $( ps h -o pid -C ubuntuone-syncdaemon )

keep in mind that this will make the process take a lot longer (but given that it'll start uploading as it goes, it might not be a problem). This should, as a side effect, lower the CPU usage as it will have less data to checksum in any given moment in time.


Recommend you check the system software then retry.

Here's the procedure:

sudo apt-get remove putty

Open Software Updater and let it check for updates.  If there are any, let it apply them, including reboots as necessary.
Then run it again just to make sure there are no updates to the updates.

Then go through this sequence of commands:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get clean

sudo apt-get install putty

Then try it again.

FYI, just checked the Snap Store for Putty:

https://snapcraft.io/search?q=putty

And it reports there is not a Snap version available.


2.11 is vastly newer than 2.2 so won't be a problem.

2.11 = two point eleven not two point one one.

2.11 > 2.2 in most versioning systems.


Possible to allow static ip for computer on any LAN?

A simple answer is NO, there is no simple way to do this.  This is the downside of using static IP addresses when dealing with networks.  It is way to easy to have 2 or more hosts with the same IP address causing a IP conflict and taking out multiple systems at the same time.  Or not having the existing Subnet of the static IP matching the new network it is being plugged into causing the host to not see anything.

Using Dynamic, or DHCP, addressing will help solve this problem allowing any system to be plugged into a network with little to no configuration on the user's part.

One of my favorite tools to use when it comes to IP addressing on networks is http://www.subnet-calculator.com/


There is a kernel bug causing this, but it's easy to fix:

In terminal:

gksudo gedit /etc/default/grub

Find the line that looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

And make it look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force"

Finally, in terminal:

sudo update-grub


Where, if anywhere, does CUPS save the file of a printed document?

See the cups-files.conf

  RequestRoot directory

  Specifies the directory that contains print jobs and other HTTP request data. The default is "/var/spool/cups".

Files are saved in a format:

/var/spool/cups/d*-nnn
/var/spool/cups/c*

where

* is the printer id.
c is the control file
d is the actual data
nnn is the document number. Starts with 001.

Oh and see if you have 'testipp' installed. It is a cups utility that will spit out everything you even need to know about the document

This gives a list of completed jobs (taken from U+L):

sudo lpstat -W completed -u $(strings /var/spool/cups/* | \
grep -A 1 job-originating-user-name | \
grep -oP '.*(?=B)' |sort -u | paste -sd ',')


Fixed it with sudo dpkg -i --force-overwrite /var/cache/apt/archives/kio_5.15.0+git20151011.0307+15.04-0_amd64.deb


Umask settings for users=rwx, group=r, others=

To quote the manpage (man umask):

For example, the following default ACL
       is equivalent to a umask of 022:

           u::rwx,g::r-x,o::r-x

So for your goals, you need to do the math of 777 - (OCTAL value of expected permissions) to get the umask (this is octal math of course, so not the easiest)

The permissions you want on your specific folder(s) or files is 740 (u::rwx,g::r--,o::---). 777 - 740 results in an octal value of 037.  You need to use a umask, then, of 037.

Note that you may want to tread lightly here using this as the 'default' umask - some things might not be able to reach into folders and files and such.


Wi-Fi not working only on Ubuntu computer?

Does your notebook have a Ethernet connection? If so, can you try that to see how it works? (Just testing through-put, to see if the ISP is bottlenecking because of the OS. It shouldn't matter, but you never know.)

What about the security of the router, is it open, WEP, or WPA? What's the model number of it? What's the model of your laptop?


You can access MySQL from command line by typing in a terminal:

mysql -u [username] -p [password]

where [username] is the user you setup during install and [password] is the password for that user.  If the password has special characters (such as $ or !) then you can leave the -p blank and it will prompt you for the password.

As far as phpMyAdmin, you need to edit the default Apache2 conf (usually located at /etc/apache2/apache2.conf or /etc/apache2/apache.conf).  Make a backup (cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak) add these lines to the end of apache2.conf:

# Include phpmyadmin

Include /etc/phpmyadmin/apache.conf

Save the file.  Then, restart Apache2 with:

service apache2 restart

Now, you should be able to access phpMyAdmin by typing http://localhost/phpmyadmin in the address bar of your browser.  I hope this helps.


What should i do if my computer can't run ubuntu

How are you running it? You're lacking key details here... I installed using a USB and on the first time, that failed for me. You should try to re-burn the iso to whatever you're trying to install it on, and then come back.

Back? Well, it could be that your computer can't actually run Ubuntu. This can sometimes happen due to performance, but do not give up. There are lighter versions of Ubuntu for you, such as Kubuntu, xubuntu, etc. There is linux mint, debian, etc. If you find your self wanting to try one of those, you can always Google it and it should bring you straight to the downloads page for the OS.


Not able to connect to external sites on Cisco Anyconnect using Ubuntu 20.04

So I finally contacted the network admins and they informed me that I need to put "Wpad" as network proxy and that solved my problem.


I experienced the same issue. You may try to include Orace's VirtualBox repository as described in [1]. Before you have to uninstall virtualbox (apt-get remove virtualbox). Then you have /etc/init.d/vboxdrv and can use it to recompile the virtualbox drivers in case DKMS fails.

[1] https://www.virtualbox.org/wiki/Linux_Downloads


The 502 Bad Gateway error means server is not getting proper response from another server. In your case it is uWSGI server. It is either not running or stopped due to error.

Check the status of uWSGI server by using sudo systemctl status uwsgi.


When I do a release upgrade on a system with two derivatives, do both get updated?

Yes, sure, you don't need to upgrade them separately. All parts of ubuntu will be upgraded at one pass.


How to list all variables names and their current values?

For bash: (the standard shell in Ubuntu)

Enter the following command in a terminal to print all the environment variables:

printenv

For further information about this command, read the printenv man page.

To show a list including the "shell variables" you can enter the next command:

( set -o posix ; set ) | less

This will show you not only the shell variables, but the environment variables too.

For more information related with this topic read:

How to list variables declared in script in bash? from SO and
How to print all environment variables defined (but not necessarily
exported) in bash from
UnixSE
Environment variable vs Shell variable, what's the difference?

For zsh: (an advanced shell)

Use the following command:

( setopt posixbuiltin; set; ) | less

For more information about ZSH options, see zshoptions man page.


How to create keyboard shortcut for "go to desktop"?

Ctrl + Super + D shows Desktop, credit to pomsky (in comment above)


How do I install Linux to a bootable USB stick?

use unetboot software.it is availabe for both windows and linux.


bash: /etc/wpa_supplicant.conf: Permission denied

Found solution at https://bbs.archlinux.org/viewtopic.php?id=116000

The following command worked
sudo sh -c 'wpa_passphrase DataRoom connect@data > /etc/wpa_supplicant.conf'


How do I find my firewall is blocking mysql?

You can use these commands to allow port 3306 through UFW

 sudo ufw allow out 3306/tcp

 sudo ufw allow in 3306/tcp

And to check that the rules have been added

 sudo ufw status


The purpose of Fn (short for function) key  is quite different: for example to change display or audio settings quickly, such as brightness, contrast, or volume, and is held down in conjunction with the appropriate key to change the settings. When you press only the the Fn key, this doesn't send any data to the computer.

According with this post, in general there is no way to know that Fn was pressed and the keycode of key-combinations including Fn depends on the individual keyboard design.

So unfortunately, you can't bind it to another key.

More about: http://en.wikipedia.org/wiki/Fn_key.


How do I mark a group in polkit as administrator?

I have not had a chance to test this theory out but I quote these lines from the manual page:

  The file 50-localauthority.conf contains the settings provided by the
  OS vendor. Users and 3rd party packages can drop configuration files
  with a priority higher than 60 to change the defaults.

I think all you had to do was change your file name to 61-local.conf and that may have solved your problem.


How to fix the error: gpg: keyserver receive failed: No keyserver available?

I got this error trying to update to Mono 6. I solved it by switching from keyserver.ubuntu.com to keys.gnupg.net in the apt-key command.


gThumb Image Viewer can be used to open webm without problems and you can install it from Ubuntu Software Centre.


Error setting up cscope 15.8 on when creating file cscope.files

You have mismatched (unbalanced) quotes, so the shell thinks you haven't finished typing the quoted string - the > is prompting you for a continuation. Also you are presumably missing some * glob characters - to find any .c, .cpp, .h or .hpp files it needs to be

find . -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" > cscope.files


mount /home as /home/ubuntu in live USB ubuntu

The easiest method is to use persistence. Make a file called home-rw

# this will make a 1 Gb file for storage, increase / decrease the count as needed
dd if=/dev/zero of=./home-rw bs=1M count=1000

Make a file system on the file

mkfs.ext4 home-rw

mke2fs 1.41.14 (22-Dec-2010)
home-rw is not a block special device.

# Answer ‘yes’ here

Proceed anyway? (y,n) y

Remove the reserved blocks

tune2fs -m 0 -L home-rw home-rw

When you boot your pendrive , hit the tab key to edit your boot options, and add persistent to the boot options.

You can edit /isolinux/txt.cfg (I think that is the file) to add a persistent option, looks like this:


Can I remove the global menu and, instead, have it on each window?

If you want to remove the global menu and use the menus directly in the windows, like in previous Ubuntu versions, assuming you are using 11.04, you just need to remove the package indicator-appmenu by typing

  sudo apt-get remove  indicator-appmenu

into a console (and probably reentering your session).


Wi-Fi adapter not found Ubuntu 18.04 with HP laptop

Try this: (It worked for me)

sudo apt remove bcmwl-kernel-source && sudo apt install git dkms
git clone -b extended https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6

After running above commands Reboot your system.
If you notice a weak signal try:

sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=1

and see if it is better, if not do

sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=2

And then run following command so that you won't have to run above command everytime you boot your system

echo "options rtl8723de ant_sel=X" | sudo tee /etc/modprobe.d/rtl8723de.conf

Replace X with whatever setting worked best. For me, X was 2.

Note: My laptop model is HP 15-bs145tu


displex indicator not working in Ubuntu 11.10

Try running these commands:

gconftool-2 --set "/apps/nautilus/preferences/show_desktop" --type bool true
gconftool-2 --set "/apps/gnome-screensaver/idle_activation_enabled" --type bool true

And try to run indicator-displex again.


Recover data from Encrypted External Hard Drive

If the partition you overwrote was encrypted with LUKS and you do not have a header backup of it somewhere, then the data is gone for good. Even knowing the password does not help in that case, since the actual data is encrypted with a master passphrase, and your password is only used to unlock that master passphrase. Actually, what you did is sometimes recommended to quickly and reliably wipe a LUKS partition.

If you do have a header backup, you could try copying that back to the beginning of the damaged partition. Since then you would probably still have overwritten the partition table of the filesystem of the encrypted partition, you could at that moment only try to run a recovery tool through the mapped / decrypted partition.

So in short: No header back -> data is lost.


Ubuntu 18.04 Cannot change display brightness or wake from Sleep on ASUS ROG laptop

Asus G752VS brightness adjustment Fn keys work after these steps:

Change default grub configuration,e.g:

$ sudo vi /etc/default/grub

Add parameters acpi_backlight=vendor to set value like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Update grub configuration:

$ sudo update-grub

Reboot the system:

$ reboot

After that you should have something like this:

$ ls -1 /sys/class/backlight/
asus-nb-wmis

Load Asus Notebook WMI module:

$ sudo modprobe asus-nb-wmi

After that, the Fn keys should work.


Script to delete content older than x days

This is pseudo code. You will have to set the folder size and what you want to remove yourself (you were not clear on what you wanted to be removed so I'm running the same thing you were)

MAX_SIZE=50000
DIR_SIZE=$(du /home/scott/google-drive/CAMMEDIA/*)
if [$MAXSIZE -gt $DIR_SIZE]
then
    find /home/scott/google-drive/CAMMEDIA/* -mtime +1 -exec rm -rf {} \;
fi


Follow the exact same instruction from that question, when  you came to sudo make install use sudo make uninstall instead, if you were lucky it will be removed nice and easily otherwise you have to find and remove the files one by one manually.


Run Eclipse on Nexus 7 with Ubuntu 13.04 Desktop

Java is indeed a cross platform language and should work on any platform... but..

Eclipse uses native libraries for it's GUI toolkit ; it's likely you don't have a build of these compiled for ARM. The actual native binaries are encapsulated in the JAR files supplied ; this is why Eclipse bundles come in platform specific flavours, but the Eclipse foundation don't prepare ARM builds.

If you really want Eclipse on Ubuntu on ARM you'll have to build Eclipse, and it's native libraries, for ARM, yourself. I'm not sure as to how practical that is without a certain amount of research.


Routing example.com/page to example.com:[port]

I think you want to use an apache server as a kind of portal for you services ?
I would use mod_rewrite and mod_proxy to makes internal proxy request to the service

with rewrite rules like

RewriteRule ^service1/   http://servername:1234  [P]
RewriteRule ^service2/   http://servername:1235  [P]
RewriteRule ^service3/   http://servername:1236  [P]

see http://httpd.apache.org/docs/current/en/mod/mod_rewrite.html


Rid system of old kernel...my usual approach doesn't work

I don't find it to be a quality answer, but it fixed the OPs problem.  So, I moved it from the comments.

I'ld try forcing the package to install for the 3.13.0-62 kernel. Then uninstalling it, and see if that sorts you out.


I ended up changing the setting called "boot mode" or something similar to that. I am the one of five people who have physical access to the server and I really doubt someone else would have touched it, which seems really odd. The setting only had two options:
- Windows mode
- Other OS

I found it extremely odd since I was also able to boot up other OS's using a USB stick and while this was set to "Windows mode". I think it's always been like that.. I turned off Secure boot and changed this weird setting to "Other OS" and after that it just booted up normally. This was an Asus motherboard by the way.


Is it possible to log all items installed, modified, removed? (Ubuntu Server 14.04.2)

It's already done (at least for things installed via Softwarecenter etc.). Please check /var/log/dpkg.log or as mention in the comments via /var/log/apt/history.log


gedit “cannot open display” , on remote OSX , using ssh - Ubuntu 14.04 LTS Profile

It appears as though you have a program set up too automatically run GEDIT when starting a shell (Or you're trying to open it). This won't work via ssh because you don't have an X-Server running in your current session.

As for the issue with running ssh -X -l root your-machine-name your copy of ssh wasn't compiled to support the -X option

Basically you:

Need an X-Server running in your session
Need to recompile ssh with support for -X optioon


Try this out,
I also faced the same problem a few days earlier, follow these steps:

Click on the Show Applications icon on the bottom of favorite apps bar (it has an icon of dotted points).
Select Software & Updates option.
Go to additional drivers tab.
It will show your wireless network driver, you have to select to Using [whatever name of the driver is there].
Provide permission if it asks for any.

Now check if your wifi option has appeared, if not reboot the system and Voila! your wifi is working.


System is unable to boot after upgrade to 15.04. Version 219

Try this:

Restart your system, or shut it down and then power it on again.

Press and hold down the shift key immediately and keep it held down while the system starts to boot, in order to force the Grub Menu to appear.

Once the "Grub Menu" appears, release shift and then press the e key to enter edit mode.

Use the down arrow key to move the cursor to the line beginning with the word linux, then press the end key to move the cursor to the end of that line. Normally this will be just after the words quiet splash.

Press space to add a blank space after splash then carefully type in the kernel boot parameter: noapic acpi=off

Press Ctrl + X to boot the system using the parameters you've added.

To permanently add a kernel boot parameter, log in to the system and start a terminal window --- Applications --- Accessories --- Terminal

In the terminal window at the $ prompt, enter the command:

sudo gedit /etc/default/grub

Enter your password when prompted by sudo.

In the editor window, use the arrow keys to move the cursor to the line beginning with:

GRUB_CMDLINE_LINUX_DEFAULT

Then edit that line, adding the parameters noapic acpi=off to the text inside the double-quotes after the words quiet splash, be sure to add a space after splash before adding the new parameters

Click the save button, then close the editor window.

In the terminal window at the $ prompt, enter the command:

sudo update-grub


Laptop doesn't suspend properly on closing lid

To change close lid action in Ubuntu :

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

sudo nano /etc/systemd/logind.conf

Change this line :

#HandleLidSwitch=ignore

To this line :

HandleLidSwitch=suspend

Make sure its commented out.

Alternately you can also add this line, but i prefer the first one :

HandleLidSwitchDocked=suspend

Then run :

sudo service systemd-logind restart

Or reboot.

To Troubleshoot the hibernate/suspend mode you should type following command in terminal :

dmesg|less

There is usually an entry what application caused the suspension to fail:

[32467.560058] Freezing of tasks failed after 20.01 seconds (1 tasks refusing to freeze, wq_busy=0):
[32467.560115] plasma-desktop D 0000000000000000 0 2065 1 0x00800004

Fix suspend on laptops

sudo apt-get install uswsusp

Now test suspend with :

sudo s2ram

If it doesn't work use :

sudo s2ram --force

Next edit this file :

sudo nano /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux

Change code to :

#!/bin/sh

/sbin/s2ram --force

Edit :
Another fix :

Put a script in ' /etc/pm/sleep.d/ ' , scripts there will be run at suspend and resume. The file name should start with an ordering number, 00-49 for user scripts (for more details, see man pm-suspend).

The script could look like this

#!/bin/sh
(killall -9 mount.nfs; exit 0)

If you're having problems, check /var/log/pm-suspend.log that will log the attempt to suspend and to run your script.

Ubuntu Suspend not working FIX

Step 1:
Open up a terminal and create a script file as follows:

sudo nano /etc/pm/sleep.d/20_custom-ehci_hcd

Step 2:
Copy the entire script below into the file you just created and save it:

#!/bin/sh
 VERSION=1.1
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1
 unbindDev() {
  echo -n > $DEV_LIST 2>/dev/null
   for driver in $DRIVERS; do
    DDIR=$DRIVERS_DIR/${driver}_hcd
    for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
      echo -n "$dev" > $DDIR/unbind
      echo "$driver $dev" >> $DEV_LIST
    done
   #for bus in $EHCI_BUSES; do
     echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/unbind
 # done
   done
 }
 bindDev() {
  if [ -s $DEV_LIST ]; then
    while read driver dev; do
      DDIR=$DRIVERS_DIR/${driver}_hcd
      #for bus in $EHCI_BUSES; do
          echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/bind
      #done
      while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
          echo -n "$dev" > $DDIR/bind
          if [ ! -L "$DDIR/$dev" ]; then
            sleep $BIND_WAIT
          else
            break
          fi
          MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
      done
     done < $DEV_LIST
  fi
  rm $DEV_LIST 2>/dev/null
   chvt 1
  chvt 7
}
 EHCI_BUSES="0000:00:1a.0 0000:00:1d.0"
case "$1" in
    hibernate|suspend)
 unbindDev;;
     resume|thaw)
 bindDev;;
 esac

Step 3:
Give the script run permissions by typing:

sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd


By switching to NVIDIA sudo prime-select nvidia NVIDIA X Server opens without any problem


aptitude remembers which packages were explicitly requested and which were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.

apt-get treats packages requested explicitly and their dependencies the same.

So better use aptitude, this helps to keep your system clean.


xbindkeys does not work with bash script

I found the reason of why xbindkeys didn't not recognise the CapsLock key. Thre reason is that I had this line on my i3 config: bindsym --release Caps_Lock exec --no-startup-id <command> that didn't allow  xbindkey to work properly. I got it after that xbindkeys -n showed me:

*** Warning *** Please verify that there is not another program running
which captures one of the keys captured by xbindkeys. It seems that there
is a conflict, and xbindkeys can't grab all the keys defined in its
configuration file.

So after some research I finally found the i3 line.

Now the key is captured.


Installing TS3 Client returns "cannot execute binary file: Exec format error"

Raspberry Pi is based on an ARM computing architecture, but Teamspeak
is available only for x86 ("32-bit") and AMD64 ("64-bit") architecture. Each binary executable file has a flag, that describes its format and target architecture. If they mismatch the host (the machine supposed to run the executable) architecture, Linux platforms will (typically) print the error mentioned in your question.

Conclusion: You cannot install Teamspeak (Client or Server) on a Raspberry Pi or other ARM-based computers.


Yes, is possible define multiple env variable and than override them from command line.

For example:

  description "Multi Parm"

  env USER=BLARG

  start on startup
  stop on shutdown

  env PARM1=foo
  env PARM2=bar
  env PARM3=hello

  script
     exec sudo -u $USER sh -c "/$PARM1/$USER/PARM2/$PARM3.sh"
  end script

Than you can start your service:

  initctl start your-service PARM1=home PARM2=bin PARM3=yourScript

It is unclear for me how you would use instance stanza. If you need to start multiple instance of your job, you could change this example:

  description "Multi Parm"

  env USER=BLARG

  start on startup
  stop on shutdown

  respawn

  instance $PARM1
  script
     exec sudo -u $USER sh -c "/home/$USER/bin/$PARM1.sh"
  end script

So you can run it multiple times with different value of $PARM1:

  initctl start your-service PARM1=my-first-script
  initctl start your-service PARM1=my-second-script

Take a look at 6.15.2 Another Instance Example there is an example on how to define a worker job and how to run it multiple times as different instance from workers job.

UPDATE
Here is an example tested on lubuntu 12.04.

First define simpleInstanceJob.conf a job that simply runs your script with given parameters. This is a job without start on and stop on stanza, so it is not start/stop by upstart init process.

# SimpleInstanceJob -
#
# This service runs for ever and print number and arguments
description "Run single job instance"
instance $ENVIRONMENT/$DRIVER/$ALGORITHM
console log
respawn
script
  exec  python /home/caterina/tmp/upstart/test.py $ENVIRONMENT $DRIVER $ALGORITHM
end script

Put it in /etc/init and test it with:

sudo start simpleInstanceJob ENVIRONMENT=foo DRIVER=bar ALGORITHM=fooBar

Use initctl to view status job:

initctl list | grep simpleInstanceJob

this will output:

simpleInstanceJob (foo/bar/fooBar) start/running, process 3828

and test.py output will be saved in /var/log/upstart/simpleInstanceJob-foo_bar_fooBar.log

Use:

sudo stop simpleInstanceJob ENVIRONMENT=foo DRIVER=bar ALGORITHM=fooBar

to stop/kill "foo/bar/fooBar" instance of simpleInstanceJob.

In order to runs multiple instance of simpleInstanceJob, create a launcherJobs.conf:

# laucherJobs -
#
# This service runs three instance of simpleInstanceJob
# starts on runlevel.
description "laucherJobs"
start on runlevel [2345]

stop on runlevel [016]
console log

pre-start script

    start simpleInstanceJob ENVIRONMENT=foo DRIVER=bar ALGORITHM=fooBar
    start simpleInstanceJob ENVIRONMENT=foo1 DRIVER=bar1 ALGORITHM=fooBar1
    start simpleInstanceJob ENVIRONMENT=foo2 DRIVER=bar2 ALGORITHM=fooBar2

end script

post-stop script
    for inst in `initctl list|grep "^simpleInstanceJob "|awk '{print $2}'|tr -d ')'|tr -d '('`
    do
       environment=`echo $inst | awk -F "/" '{print $1}'`
       driver=`echo $inst | awk -F "/" '{print $2}'`
       algorithm=`echo $inst | awk -F "/" '{print $3}'`
       stop simpleInstanceJob ENVIRONMENT=$environment DRIVER=$driver ALGORITHM=$algorithm
    done
end script

This "master" job has no main exec or script section, it will run (without a pid) for the duration that the "slave" or children (individual "simpleInstanceJob") job instances run.

Put it in /etc/init and test it with:

sudo start laucherJobs

This will start three instance of simpleInstanceJob:

initctl list | grep Job

will output:

simpleInstanceJob (foo/bar/fooBar) start/running, process 3745
simpleInstanceJob (foo2/bar2/fooBar2) start/running, process 3749
simpleInstanceJob (foo1/bar1/fooBar1) start/running, process 3747
launcherJobs start/running

Finally to stop all process:

sudo stop laucherJobs

Hope this is helpful to solve your problem.


No, you will need to use either wine or a virtualized Windows to use it.
Alternatives:

espeak. There is a front-end called gespeaker in the repositories.
fala (gnome)
neospeech

espeak can read out website but also files from command line. From the link:

Languages.
The eSpeak speech synthesizer supports several languages, however in many cases these are initial drafts and need more work to improve them. Assistance from native speakers is welcome for these, or other new languages. Please contact me if you want to help.
eSpeak does text to speech synthesis for the following languages, some better than others.
Afrikaans, Albanian, Aragonese, Armenian, Bulgarian, Cantonese, Catalan, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Farsi, Finnish, French, Georgian, German, Greek, Hindi, Hungarian, Icelandic, Indonesian, Irish, Italian, Kannada, Kurdish, Latvian, Lithuanian, Lojban, Macedonian, Malaysian, Malayalam, Mandarin, Nepalese, Norwegian, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian, Slovak, Spanish, Swahili, Swedish, Tamil, Turkish, Vietnamese, Welsh.


Symbolic links and the sense of /etc/alternatives

You have discovered the alternatives system in Debian/Ubuntu:

Try it out

% sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                           Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-8-oracle/jre/bin/java         1082      auto mode
  1            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java   1081      manual mode
* 3            /usr/lib/jvm/java-8-oracle/jre/bin/java         1082      manual mode

Press <enter> to keep the current choice[*], or type selection number:

From man update-alternatives

update-alternatives - maintain symbolic links determining default commands

DESCRIPTION
    update-alternatives creates, removes, maintains and displays
    information about the symbolic links comprising the Debian
    alternatives system.

    It  is  possible  for several programs fulfilling the same or similar
    functions to be installed on a single system at the same time.  For
    example, many systems have several text editors installed at once.
    This gives choice to the users of a system, allowing each to use a
    different editor, if desired, but makes it difficult for a program to
    make a good choice for an editor to invoke if the user has not
    specified a particular preference.

    Debian's alternatives system aims to solve this problem.  A generic
    name in the filesystem is shared by all files providing
    interchangeable functionality.  The alternatives system and the
    system administrator together determine which actual file is
    referenced  by  this generic name.  For example, if the text editors
    ed(1) and nvi(1) are both installed on the system, the alternatives
    system will cause the generic name /usr/bin/editor to refer to
    /usr/bin/nvi by default. The system administrator can override this
    and cause it to refer to /usr/bin/ed instead, and the alternatives
    system will not alter this setting until explicitly requested to do
    so.

    The generic name is not a direct symbolic link to the selected
    alternative.  Instead, it is a symbolic link to a name in the
    alternatives directory, which in turn is a symbolic link to the
    actual file referenced.  This is done  so  that  the  system
    administrator's changes can be confined within the /etc directory:
    the FHS (q.v.) gives reasons why this is a Good Thing.

    When  each  package  providing  a  file with a particular
    functionality is installed, changed or removed, update-alternatives
    is called to update information about that file in the alternatives
    system.  update-alternatives is usually called from the
    postinst (configure) or prerm (remove and deconfigure) scripts in
    Debian packages.

    It is often useful for a number of alternatives to be synchronized,
    so that they are changed as a group; for example, when several
    versions of the vi(1) editor are installed, the man page referenced
    by /usr/share/man/man1/vi.1 should  correspond  to the executable
    referenced by /usr/bin/vi.  update-alternatives handles this by means
    of master and slave links; when the master is changed, any associated
    slaves are changed too.  A master link and its associated slaves make
    up a link group.

    Each  link  group is, at any given time, in one of two modes:
    automatic or manual.  When a group is in automatic mode, the
    alternatives system will automatically decide, as packages are
    installed and removed, whether and how to update the links.  In
    manual mode, the alternatives system will retain the choice of the
    administrator and avoid changing the links (except when something is
    broken).

    Link groups are in automatic mode when they are first introduced to
    the system.  If the system administrator makes changes to the
    system's automatic settings, this will be noticed the next time
    update-alternatives is run on the changed link's group, and the group
    will automatically be switched to manual mode.

    Each alternative has a priority associated with it.  When a link
    group is in automatic mode, the alternatives pointed to by members of
    the group will be those which have the highest priority.

    When  using  the  --config option, update-alternatives will list all
    of the choices for the link group of which given name is the master
    alternative name.  The current choice is marked with a ‘*’.  You will
    then be prompted for your choice regarding this link group.
    Depending on the choice made, the link group might no longer be in
    auto mode. You will need to use the --auto option in order to return
    to the automatic mode (or you can rerun --config and select the entry
    marked as automatic).

    If you want to configure non-interactively you can use the --set
    option instead (see below).

    Different packages providing the same file need to do so
    cooperatively.  In other words, the usage of update-alternatives is
    mandatory for all involved packages in such case. It is not possible
    to override some file in a package that does not employ the
    update-alternatives mechanism.


not sure if i got your question correctly but as i see you mean that if you can use the node computers as a normal computer

yes, if you are making a Cluster Computer using a normal computers over LAN
then yes, you can use them


Can't hear any audio on my Dell Inspiron 5559 after installing Ubuntu 14.04.4 LTS

I can't add comments but I need more information to be able to help you.  What type of Dell laptop are you running?  Some Dells have custom parameters that you need to pass to the snd_hda_intel module.

Second, please post the output of

aplay -l

I would start by reading this guide, which has helped me many times in the past: https://help.ubuntu.com/community/HdaIntelSoundHowto


Upgrade to 18.04 LTS hangs on reading cache

I hit this same problem. After it prints "Reading cache" the CPU usage goes to 100% and stays there indefinitely. The underlying problem in my case was that /etc/apt/apt.conf was an empty directory instead of a file, which was causing do-release-upgrade to hang indefinitely. A sudo rmdir /etc/apt/apt.conf fixed my issue.


No need to use sudo to unpack the archive. Type this in a terminal:

tar -xzf archive.tar.gz

Or you can just double-click on the archive from Nautilus (the file manager) to see what's inside. No need for command line until now.

If this archive contains something to install in the system, then sudo would be useful at one point or another. Very often, such an archive contains software that must be compiled and then installed. Typically, what you then do is as follows:

tar -xzf archive-name.tar.gz
cd archive-name
./configure
make
sudo make install

As you see, only the step actually installing the program requires superuser rights; everything else happens just in your home directory, which you own. Please do not type blindly the instructions above; first, read any documents called "README" or "INSTALLATION" that you will find in the archive.

The source website is :

how to use sudo command to install .tar.gz?


How can I disable built-in gestures in unity 2d

on oneiric with unity 3d this is the same ,the gesture are integrated in unity ,the only way seems to use gnome or lxde ,using touchegg


autofill passwords takes time to fill the field

I have been having this issue for a while and I found an answer to a similar questions here that seems to resolve this. In short, copy google-chrome.desktop file to your home folder and edit it to use the 'Basic' password storage setting:

cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/

Then look for the line that looks like this:

Exec=/usr/bin/google-chrome-stable %U

And change it to:

Exec=/usr/bin/google-chrome-stable --password-store=basic %U

I also had a number of files in the ~/.local/share/applications/ folder that looked like Chrome-jdj94r5hsfjnfasdfsdfafp-Default.desktop that seemed to have been placed there over time based on the timestamps but I deleted them all.

Saved passwords now show up immediately when the page is loaded.


How can I get my T450s laptop to use both its batteries?

I went and bought a new battery after all, and it worked!! So, I guess it was just a bad battery after all!


Can I install Ubuntu on a clean harddrive and keep rest as unallocated?

Install Windows without License
You do not need the key to install Windows, See https://www.microsoft.com/en-us/software-download/windows10startfresh
However Windows still technically requires a license for full performance.
Without activating, you won't be able to personalize the desktop background, window title bar, taskbar, and Start color, change the theme, customize Start, taskbar, and lock screen etc.
Additionally, you might periodically get messages asking to activate your copy of Windows
It might make your life easier to install Windows 10 before installing  Ubuntu.
You can let Windows sit until you get a key and then activate it when you are ready.
Windows is a little bit useful even without activation, you can always delete it is you decide Ubuntu is enough.


This is a well known bug with Linux and the Bluetooth adapter used in Acer computers, which is HonHai/Foxconn. Please have a look at this bug report:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/898826

As far as I know, it is said that a fix was released some time ago. However, my personal experience is that it still doesn't work on Acer computers. So I don't think you can make your Bluetooth work until a proper bug fix is released, or until you fix this bug, if you're able to :) If you do, please let the rest of us know.


Recommended partition setup for two 128 GB SSDs

Most setups don't need that much space on /. You could use a filesystem that can use more than one partition or you could use LVM to make a 180gb /home and a ~64gb /. Honestly though, I think thats overkill for a simple private system. I always use symlinks in these situations:

When your /home reaches 75% find a bigger directory that won't change size that much
Create /home2/username on / and chown to your user
Move the bigger dir to /home2/username
And link it with 'ln -s /home2/username/Music ~/Music'


Leverage a for construct:

GLOBIGNORE=newfile.tab
for f in *tab; do cat "$f"; echo; done >newfile.tab

Expanded:

GLOBIGNORE=newfile.tab
for f in *tab; do
    cat "$f"; echo
done >newfile.tab

GLOBIGNORE=newfile.tab is for excluding newfile.tab from shell globbing as that is our output file
for f in *tab iterates over the files ending in tab
cat "$f" outputs file content
echo adds a newline
The file descriptor from >newfile.tab redirection is kept open for the duration of for i.e. the file newfile.tab is opened-closed once

Also, you can use printf to do formatting once:

for f in file.txt*; do printf '%s\n\n' "$(<"$f")"; done

Expanded:

for f in file.txt*; do
    printf '%s\n\n' "$(<"$f")"
done


Is there a way to auto remount a drive without a reboot

I wouldn't call it "automounting" but you can manually mount the drive. try making a directory for it to mount to:

    sudo mkdir /media/name_of_drive

Then mount it with

    sudo mount /dev/sdb1 /media/name_of_drive


Super meat boy gives black screen but sound works [Nvidia x64 12.04]

I found my solution.  The problem was that it was defaulting to fullscreen and that my fullscreen resolution was not a supported one.

The fix was to edit the /usr/share/applications/supermeatboy.desktop file and change the:

Exec=/opt/supermeatboy/SuperMeatBoy

to:

Exec=/opt/supermeatboy/SuperMeatBoy -windowed -1024x768

The list of supported resolutions is:

-640x480
-800x600
-1024x768
-1280x720
-1920x1080


Ubuntu 12.04 won't boot on Samsung Series 9 NP900X3A (ssd hard-drive)

Look wether it could depend on uefi.

I just got this fixed for myself by disabling uefi explicitly in bios. I'm pretty sure that this could help you.

Good luck!


What are the meta, super, and hyper keys?

Meta, Super and Hyper are modifier keys that modify the key's function. They are specific to the Symbolics Space Cadet Keyboard used on Lisp machines back in the day. Their function is sometimes emulated using other keys.

Meta

The Meta key is not found on modern keyboards. Its use is sometimes emulated with AltGr (on some international layouts) or the right Alt key on the others. In addition:

Sun keyboards have a meta key (◆) as well
Emacs calls Esc the Meta key

Super

The Super key is equivalent to  or the ⌘ (command) key. In Ubuntu, it's just another name for .
Hyper

Hyper is the fourth (counting Ctrl) and last modifier on the Space cadet keyboard. In Ubuntu, its function is undefined (I think), but it can be mapped, as in the screen shot above, to , should it be needed.

Sun's keyboard had different modifiers.

Note that GNOME and X.org implement many modifiers. Meta, Super and Hyper are not Linux's way of dealing with any modifier keys, but merely three of them specific to the Space Cadet keyboard. There is also Menu, Compose, AltGr, Greek, Front, X and others.

However, by convention the Windows logo key is called Super, and it is not implemented as yet another modifier by X.org.

Furthermore, the definition of modifier keys depends on:

The keyboard itself
The keyboard layout
The driver
The operating system's implementation

It's therefore almost impossible to generalise this information. I've tried to be somewhat specific to Gnome/X.org using a Windows-style keyboard with one of the more popular layouts. To test your keyboard, you can run xev - its terminal output will tell you what modifiers have been detected for your keyboard.

The Macintosh keyboard has a completely different set of modifiers

Some additional information:

The Windows key is also sometimes called Meta. E.g. in KDE.
The Alt key is sometimes called Option, as this is its equivalent on Macintosh keyboards
The Compose key (not a modifier, but a dead key), also called Multi, is often mapped to the Menu key or the right Windows key.
The AltGr key I've mentioned is also called a third-level modifier. Each key on the keyboard has, potentially, four characters on it. The first level is the lowercase, then it goes uppercase, Alt + something, and Alt + Shift + something. For example, the four glyphs on my A key are a, A, æ and Æ.

It's all a mess :-)

As they've been addressed in the comments:

The Fn is not really comparable. It's a hardware key that's not directly interfaceable by the operating systems. Pressing Fn and another key causes an entirely different code to be sent to the operating system. Examples for this include XF86AudioMute, XF86Eject and so on. The Operating system can't detect whether fn is pressed or not.
The SysRq key is traditionally a label on the Print Screen key indicating its function if used with the modifier Alt. It is sometimes, especially on newer notebooks, mapped to Fn+Alt+Print. In Linux, it provides a few Magic shortcuts.


Your graphics processor (GPU) is part of the Xeon chipset, and unfortunately there are reports of a bug that has reportedly been fixed in Linux kernel 5.11 rc4, at lease according to people at that other distribution
I don't think I can offer any assurances that anything I can tell you would make this better although supposedly Ubuntu 21.04 uses the newer kernel and may fix your problem.  Another alternative would be to use the 18.04 LTS version of Ubuntu, or to add a new graphics card to your system.


Error with gzip while used along with tar

tar -zcf /path/to/be/stored/file.tar.gz *

This worked. But you have to be in the particular folder of the files to be gzipped


passing a font as an argument to a script

It's the X logical font description. See the full standard at x.org

The 7th field specifies the size in pixel, the 8th the size in tenths of points.

So the default here is "lucidatypewriter bold at 24 point".

You can use xfontsel as a simple GUI to create such font descriptions.


Just type these commands in the terminal window. After you type these commands you have to type your password because the command sudo says you have temporary root access rights.


My friend

you are you are using intel graphics which dont offer memory

so i dont think intel has 27 MB to share

so that "May" be the reason why your ubuntu gets stuck

I use a 20$ GPU in my 2nd pc GT210 its pretty good try buying one

Your gpu spec : http://www.notebookcheck.net/Intel-HD-Graphics-Ivy-Bridge.85998.0.html

Dosent even give 30 fps in 3 year old dota so i prefer you to change it


Change visibility of files for non-root users

Try changing the owner or the group of the file.

sudo chgrp "group name" "filename"
sudo chown "username" "filename"

But this should only be done, if the file is not exactly required to be "owned" by the root.


Disable Mouse Acceleration and Increase Mouse Sensitivity

I use xinput to control mouse speed (I have a SteelSeries Rival 310 mouse):

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ SteelSeries SteelSeries Rival 310 eSports Mouse   id=12   [slave  pointer  (2)]

Note the id=12. Now issue this command to list all the possible attributes that You can manipulate for the mouse:

$ xinput --list-props 12
Device 'SteelSeries SteelSeries Rival 310 eSports Mouse':
Device Enabled (152):   1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (292): -0.700000
libinput Accel Speed Default (293): 0.000000
libinput Accel Profiles Available (294):    1, 1
libinput Accel Profile Enabled (295):   1, 0
libinput Accel Profile Enabled Default (296):   1, 0
libinput Natural Scrolling Enabled (288):   0
libinput Natural Scrolling Enabled Default (289):   0
libinput Send Events Modes Available (273): 1, 0
libinput Send Events Mode Enabled (274):    0, 0
libinput Send Events Mode Enabled Default (275):    0, 0
libinput Left Handed Enabled (297): 0
libinput Left Handed Enabled Default (298): 0
libinput Scroll Methods Available (299):    0, 0, 1
libinput Scroll Method Enabled (300):   0, 0, 0
libinput Scroll Method Enabled Default (301):   0, 0, 0
libinput Button Scrolling Button (302): 2
libinput Button Scrolling Button Default (303): 2
libinput Middle Emulation Enabled (304):    0
libinput Middle Emulation Enabled Default (305):    0
Device Node (276):  "/dev/input/event3"
Device Product ID (277):    4152, 5920
libinput Drag Lock Buttons (290):   <no items>
libinput Horizontal Scroll Enabled (291):   1

Note the libinput Accel Speed (292): -0.700000. This is the attribute You will want to change. Set new value like this:

$ xinput --set-prop 12 "libinput Accel Speed" -0.7

Try different values to find the best one that works for You.


midi controller issue; unable to enumerate usb devices during boot

CL, indeed it was a hardware issue or more specifically, I found out that my laptop usb ports seem to not handle a cable of more than 12 feet!  I still have to power the controller with a separate adaptor as well.  I have only had experience with desktops and longer usb cables still worked fine and powered the controller as well.

So for now I am managing with a shorter cable then ideal but I will need to get a powered usb hub if I want to use a 15 foot cable.


What does '*' mean in the output to 'history' command?

From bash(1)

  history [n]

  With no options, display the  command  history  list  with  line
  numbers.  Lines listed with a * have been modified.


lsblk will also tell you which partitions are available on which drives, you probably want to run e2label on the right partition, like /dev/sdg1 or whichever it is. I don't know the exact e2label command you're trying so I'm not sure.

But just noticed it looks like your hard drive partition is encrypted with LUKS? That could change things, you may need to run e2label on the mapped / unencrypted partition, maybe  /dev/mapper/udisks-luks-uuid-91f2b009-a0fc-4878-9c69-98ded9a8dfcf-uid1000 if that's it? And is "RED" the name you want to change? Editing /etc/fstab or /etc/crypttab to change the LABEL= there might be required after you change the fs label so that fstab or crypttab knows which disk to mount if it's mounting by label.


Why can't I read a file as another user with sudo

This behavior may result from a lack of execute permission on the file's parent directory

Ex. given

$ ls -ld tests/{,file}
drwxrwxr-x 2 steeldriver steeldriver 4096 Dec  4 13:46 tests/
-rw-rw-r-- 1 steeldriver steeldriver  322 Dec  4 13:33 tests/file

then

$ sudo -u daemon [ -r tests/file ]; echo $?
0

but

$ chmod o-x tests
$ sudo -u daemon [ -r tests/file ]; echo $?
1

You can think of execute permission for a directory as permission to open and traverse the directory contents.


How to customize files context menu in Xubuntu XFCE Thunar file manager?

The best way to do this is to use the excellent Thunar custom actions feature (now installed as default with Thunar), and as there are no detailed tutorials here I thought it was worth adding one. When a custom action is created it is added to the context menu, as I will show in my discussion below. However, you can tailor when it appears in the context menu and, for example, make sure that your custom action only appears when image files are right-clicked on.

In thunar, if you go to edit > configure custom actions, you will see the menu as below (minus my custom actions of course):

You can either create a new custom action (see the discussion below) or edit an existing one. There are many useful examples at the Xfce site and at the Ubuntu wiki, so there is no need to go through them all here, but we will just discuss a few examples to display the usefulness of this feature in Thunar.

You would create a new custom action by clicking the add button (shown in the first screenshot). Then you would put the below command, for example, in the command box (like I have done for a different example in screenshot 2):

zenity --question;if [ $? = 0 ];then srm -rvf %F;fi

and then make sure that the correct file types were selected in the Appearance Conditions menu (as I have done for a different example in screenshot 3).

The command above uses srm (which is in the package called secure-delete), and one should be very careful in using it on files. Hence, the GNOME dialog program, Zenity, is often used if confirmation is needed for the actions (like it was used here) so that files are not removed accidentally.

However, to use a safer example than srm, we can use the example of espeak, so that we can get espeak to read any text file to us. We would create a new custom action and then we would put in the command box (as in screenshot 2)

espeak -s 135 -f %f

Espeak needs to be installed if it isn't already (with sudo apt-get install espeak); the -s option I have used just slows down the speed of the speech a bit; you can specify other parameters as well like different voices, but the -f switch must always go before %f as it shows espeak the text input file to use.

(You can add an icon if you wish (see the screenshot below), so that the context menu looks more interesting.)

Now, only when you right click a text file, will the espeak option come up, as in the screenshot below.

There is so much more that can be done with custom actions, but this was just an introduction to the basic ways of creating your own context menu item. There is a lot more information at the Xfce wiki and a lot of useful examples, and there are also some excellent examples of custom actions in this forum.

To restrict a command to a certain type of files:

only to txt: under 'Appearance conditions' tab, check 'Text files', and then add *.txt for 'File pattern'.
only for png: check 'Image files', and *.png for 'File pattern'.
only for flv: 'Video files', and *.flv.
for other files, like pdf: check 'Other files', and add *.pdf.
etc.


Warning -- Do not do step 2 if you have Robot Operating System (ROS) installed

Check your current version with cmake --version
Uninstall it with sudo apt remove cmake
Visit https://cmake.org/download/ and download the latest binaries

In my case cmake-3.6.2-Linux-x86_64.sh is sufficient
copy the binary to /opt/

chmod +x /opt/cmake-3.*your_version*.sh (chmod makes the script executable)
sudo bash /opt/cmake-3.*your_version.sh* (you'll need to press y twice)

The script installs to /opt/cmake-3.*your_version* so in order to get the cmake command, make a symbolic link:
sudo ln -s /opt/cmake-3.*your_version*/bin/* /usr/local/bin

Test your results with cmake --version


How to specify the order of startup scripts (CLI)?

I think you may want to give upstart a try instead. You can stop the VPN server from starting in the ifupdown scripts (moving the file somewhere else) then make some upstart jobs.

Create (or modify if it's already existing, you should search in /etc/init) the PMS start up file in /etc/init and fill it up (**if it's already present, just take note of the name of the .conf file):

# pms - Plex Media Server

description "Plex Media Server"

start on (local-filesystems and net-device-up IFACE!=lo)
## here you can define what interface you can wait, just change IFACE!=lo for IFACE=eth0, etc.

## This stops the job at shutdown
stop on runlevel [!2345]

script
    exec /path/to/pms/server/binar
end script

This is very basic upstart script. You should add/modify things around. Now the other script:

Create the /etc/init/vpn.conf file and fill it with the following content

# vpn - Virtual Private Network server

description "Virtual Private Network server"

start on started plexmediaserver
## now, the VPN server will only start if PMS starts :D

## This stops the job at shutdown you can modify it and make it to stop before stoping PMS
stop on runlevel [!2345]

env REQUIRED_CONNECTION_NAME="Wired connection 1"
env VPN_CONNECTION_NAME="myvpn"

export REQUIRED_CONNECTION_NAME
export VPN_CONNECTION_NAME

script
    exec /usr/bin/nmcli con up id "${VPN_CONNECTION_NAME}"
end script

Done.


pip --version returns SyntaxError (invalid syntax) after installation

According to phd's post, the root cause is the PIP version installed by default being not compatible with the old Python version 3.4. The crucial clue was the f"" being only supported by Python v3.6+.
So I've uninstalled PIP and re-installed PIP 19.1.1 as follows:

Uninstall incompatible PIP provided by distro repository:
sudo apt remove --purge python3-pip

Download a get-pip.py version which is compatible with my Python version 3.4:
curl -O https://bootstrap.pypa.io/3.4/get-pip.py

Install PIP (in my case with sudo as global installation and with -E to apply proxy settings to sudo session):
sudo -E python3 get-pip.py

Optional: Upgrade PIP to ensure it's the latest available version
sudo -E python3 -m pip install --upgrade "pip < 19.2"

Check version:
python3 -m pip --version
Ouput:
pip 19.1.1 from /usr/local/lib/python3.4/dist-packages/pip (python 3.4)


How to upgrade sed to 4.5 on Ubuntu Server 18.04?

Note: the latest version of GNU sed at the time of writing is 4.7, not 4.5.

Here is an alternative option: compile directly from the source tarball, using two very useful features of GNU source packages.

You can install your new version of sed under any other name you want, so that it will not interfere with your current sed; in this answer I will use sed47.
The make uninstall command is supported, which allows you to cleanly uninstall it if you no longer need it.

First install all the build dependencies

sudo apt-get build-dep sed

Get the source and extract

cd
wget ftp://ftp.gnu.org/gnu/sed/sed-4.7.tar.xz
tar xf sed-4.7.tar.xz
rm sed-4.7.tar.xz    # optional
cd sed-4.7

Configure, build and install. Note the --program-suffix parameter to configure, which tells the build system to append 47 to the name of all executables.

./configure --program-suffix=47
make
sudo make install

You can now use the new sed with the command sed47, consult its manual page with man sed47, etc. When/if you want to uninstall it, do

cd ~/sed-4.7
sudo make uninstall

If you have deleted the sed-4.7 directory, you can recreate it by repeating the installation instructions above (at least up to make).

If you want to use it as your "main" version of sed, you can create an alias:

alias sed=sed47

In this case I recommend subscribing to the info-gnu mailing list to get announcements about new releases, which may contain important bug fixes.


16.10 Nautilus options missing from menu

Was puzzled by this too, but it does indeed look like intended behaviour in nautilus 3.20 - which 16.10 ships with. From the screenshot in the link it looks like there is no longer an app menu in the title bar - "Files" is all you get. However, a menu is available via the icon in top right corner, which includes, for example, "Bookmark this Location" - which was previously in the title bar menu I believe.

In answer to your specific question on Connect to Server; this appears at the bottom of the window when you click on Other Locations:

Question in your link has gone btw.


How to use a USB drive on My virtual machine XP when I'm using ubuntu as the Host

vboxusers group must be added to the user, and USB must be added via virtualbox->Settings->USB (http://www.virtualbox.org/manual/ch02.html).


How do we install Unity-2D and dependencies offline?

Well I am using 11.04 and keryx after you pointed me to the link. Thanks by the way. Did a bit googling and found keryx ppa which is for lucid. Basically installed debian package presented there. It's running on 11.04 so may be you could try that.


The correct way to bad block a disk is to use e2fsck, not badblocks directly. See man badblocks for more details...
It  is  strongly recommended that users not run badblocks directly, but rather use the -c option of the e2fsck and mke2fs programs
Note: do NOT abort a bad block scan!
Note: do NOT bad block a SSD
Note: backup your important files FIRST!
Note: this will take many hours
Note: you may have a pending HDD failure
Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.
In terminal...
sudo fdisk -l # identify all "Linux Filesystem" partitions
sudo e2fsck -fcky /dev/sdXX # read-only test
or
sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)
The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.
The -fccky parameter...
   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.


Anytime I run the sudo pip3 install flask it show directory not owned by the current user

You should not use sudo with pip if you are installing a package just for your user.

Fix you path ownership
sudo chown -R peter:peter /home/peter/.cache/pip

Use pip without sudo
pip3 install flask


Making an Ubuntu 16.04 64 bit bootable USB drive using the startup disk creator utility on an Ubuntu 12.04 32 bit computer

I think your question is already answered in an other issue.

Ubuntu 14.04 LTS live USB boot error (gfxboot.c32:not a valid COM32R image)


12.10 Lexmark S605 insecure permissions error

I don't believe /usr/lib/cups/filter//usr/local/lexmark/v3/bin/printfilter is intended as one directory - /usr/lib/cups/filter/ typically has no subdirs.

But apparently you managed to install the desired package and now you're getting the new insecure permissions error. I'm assuming this message gives the directory as /usr/local/lexmark/v3/bin/printfilter below.

What you need to do is change the ownership of /usr/local/lexmark/v3/bin/printfilter:

$ sudo chown -R root /usr/local/lexmark/v3/bin/printfilter

Changing the group shouldn't be neccessary but if you want to be on the safe side, also do

    $ sudo chgrp -R root /usr/local/lexmark/v3/bin/printfilter

However, you do need to have root as the owner of /usr/lib/cups/filter/, if it isn't, do the same for that directory:

$ sudo chown -R root /usr/lib/cups/filter/

...and when you're done with changeing the permissions, do a reboot or:

$ sudo /etc/init.d/cups restart


Why dh_make doesn't provide all options for create skeleton for new package?

Not a bug but a feature.
See https://launchpad.net/ubuntu/+source/dh-make/2.201602
Which breaks most of the HOWTOs - thanks Debian.


How do I mount a GPT Drive in Ubuntu 18.04 LTS?

Start gnome-disks there you can get the device adress /dev/XXX. (For example: /dev/sda1).

Then you can try to mount it in the terminal. If you fail, you can post the errormessage and we can help you better ;-)

mkdir mnt_ssd
sudo mount /dev/XXX mnt_ssd/

Edit:
It seems your superblock has some issues.

You can try to mount with an offset

sudo mount -t hfsplus -o ro,offset=$((512*409640)),sizelimit=$((512*1953800440)) /dev/sda /mnt/mydrive

If this wont work, i recommend to do a copy of the disk with sudo dd if=/dev/sda2 of=/somewhere/you/have/enough/space/disk.dd

Source: Can't mount HFS+ drive, bad superblock?


Blank screen on TTY7 after upgrading from 14.04 to 14.10

tty7:

Inspired by the answer from Vembu, I reinstalled my default window manager gnome-shell (apt-get install --reinstall gnome-shell). Then, I rebooted and ran

gnome-shell --replace

on tty1. Output:

  gdk_mir_display_open
  Failed to connect to Mir: Failed to connect to server socket: No such file or directory
  Window manager error: Unable to open X display

After that, tty7 showed my gnome-shell again. Mouse pointer was invisible, showed up after relogging in. Unfortunately, this was no permanent solution. The procedure had to be repeated on every boot.

After further investigation, I stumbled upon the following remark in the [release notes of 14.10][1]:

  Note. If you were using the gnome3-team/gnome3-staging PPA, you should run

sudo ppa-purge ppa:gnome3-team/gnome3-staging

  before upgrading.

I purged the ppa, reinstalled gnome-shell, added the ppa and ran dist-upgrade. Finally, I set gdm as default display manager (thanks Xieerqi). It works again!


Unmet dependencies when trying to install r-base

This problem is solved.

sudo apt install --fix-broken
sudo apt-get update
sudo apt-get upgrade

Thank you!
Cheers!


If you run the script below, it records for 10 seconds (or any other time you set) the output of the xprop command on the frontmost window (running the xprop -root command). Subsequently, it writes the output, after the time has elapsed, to a file: outfile.txt
If you make sure to keep the Gnome-Do window active until the script has finished, you can be sure the last record is corresponding to the Gnome-Do window.
To use it

Simply copy the script below into an empty file, set, in the head section, the desired path to the output file (outfile =, use an absolute path). Save it as record_xprop.py

Start the script by the command:
  python3 /path/to/record_xprop.py

Call your Gnome-Do window (or any other application you need data from).

After the time has elapsed, your outputfile will show five times the output of the xprop -root command, separated by a dotted line.

Note
If you need more time, just change the "5" in the line:
 while t < 5:

into any other value you need
The script
#!/usr/bin/env python3
import subprocess
import time

outfile = "/home/jacob/Bureaublad/outfile.txt"
data = []; t = 0
while t < 5:
    data.append(subprocess.check_output(["/bin/bash", "-c", "xprop -root"]).decode("utf-8"))
    time.sleep(2)
    t = t + 1
with open(outfile, "wt") as out:
    for rec in data:
        out.write(rec+"\n"+"-"*20+"\n\n")

Edit
If this does not work for some reason (appearantly the window is not frontmost, as recognized by xprop), we could do the same trick with the wmctrl -l command (replace xprop -root by wmctrl -l in the script), to identify the window by its name first.
Once that is done, we can subsequently run again xprop, with the -name option, to get the needed info: xprop -name <windowname>
For both commands, you can run either the sleep command, or, if you need more time, run the script again.


How would you make a "shared /home" partition for Windows and Ubuntu dual boot?

How would you set up your drive so the files in your /home are available to both OS? Just making your /home partition an ntfs one?

Impossible. /home MUST be in a POSIX compliant filesystem and Windows does not have one.
The way to do this is to create a mountpoint formatted as NTFS and then to point the system to look for the directories inside /home at that mountpoint. See ~.config/user-dirs.dirs on how to do that. Set the NTFS mountpoint to read/write, not executable. That way you can watch movies or play music from both systems (Only use a directory that is in a compatible filesystem to execute scripts for Ubuntu/Linux; safety comes first).
So if the mountpoint is /discworld you would have a /discworld/Desktop/, /discworld/Documents/, /discworld/Downloads/ etc. You can also use this for multiple users on the same machine: set those directories to a group that includes all those users.


Unable to install MySQL. Held broken packages

And when I type "mysql", it says, "ERROR 2002 (HY000): Can't connect
  to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
  (2)"

You can login to mysql database through

mysql -u root -p

and not mysql

While installation going you mus get prompted for password and you have to give that password here to login.

and to fix dep issue , you might try with

sudo apt-get install -f


That is a commit message, and not an error. Your command succeeded.


It turns out that it was a side-effect of the paper icon set  that I had installed from an article on It's Foss. Obviously it would be nice if someone could post a workaround for this, but for now I am just going to stop using that icon set.


It looks like the Indian mirror in.archive.ubuntu.com gave you a malformed package list file; this seems to be a common occurence with this mirror (among others).

Just do nothing, eventually the mirror should return to a sane state and the error will disappear.


Why do I get a blue screen after interrupting upgrade to 12.04 with a power-off?

Today I had a very similar problem -- after updating the system, rebooting and logging in, only the blue screen appeared without any signs of Unity. The way I fixed it was this.

Switched to tty1 (Ctrl+Alt+F1), logged in and made sure that all updates have been applied (sudo apt-get update && sudo apt-get upgrade).
Installed gdm by executing sudo apt-get install gdm. This automatically invoked configuration where I have selected gdm instead of lightdm. Installation of gdm lead to uninstallation of unity.
Rebooted, switched to tty1, logged in, and installed unity by executing sudo apt-get install unity and then ran sudo dpkg-reconfigure gdm where I have selected lightdm this time.
Rebooted, logged in using the graphical prompt and Unity loaded as hoped for.

Hope this experience will be useful.


Ubuntu 13.04 unable to change background images in user mode

I had the same exact problem, and it's covered by this bug in Launchpad:

https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1115886

The solution that worked for me, was to open dconf-editor, and set the following to active:

org.gnome.settings-daemon.plugins.background.active

That is, clicking "org" -> "gnome" -> "settings-daemon" -> "plugins" -> "background" and clicking the checkbox "active."


GPG error, signatures public key not available TRIED A LOT

The apt present in Ubuntu is suffering from a gpg resource limit bug in apt

You can easily fix this going to /etc/apt/trusted.gpg.d and removing unused keys (usually from PPAs you don't use anymore) until get below 40 keys.

Then ran sudo apt-get update


How can drivers for Nvidia graphics cards be installed on Ubuntu 13.04 without messing up the OS?

What you have is hybrid graphics. Basically, you have 2 video cards:

an integrated one, embedded in your i5 CPU (Intel);
a discrete one, namely the NVIDIA one.

This hybrid graphics solution is intented to work like this:

when you do basic, light graphical stuff, automatically use the integrated card to save power (and sleep the discrete card, of course);
when you do advanced, heavy graphical stuff, automatically use the discrete card so the job can be done properly (and sleep the integrated card, of course).

In order for this magic to happen, some special software is needed, namely the NVIDIA Optimus: http://www.nvidia.com/object/optimus_technology.html

You'll see a (not) nice note in the link above: "Optimus requires Windows 7 or later".

So, no love from NVIDIA to Linux regarding Optimus. See this for a laugh: http://www.youtube.com/watch?v=_36yNWw_07g

What happens in your case is that you ALWAYS end up using the integrated card, no matter what you do (or what NVIDIA driver you install).

What can be done:

some notebooks with this hybrid graphics provide a choice in BIOS that would allow you to disable the integrated card (Intel) and ALWAYS use the discrete card (NVIDIA) - you have to check your BIOS for such setting for yourself - then, you'll have only 1 active video card in your system and it will be the NVIDIA one (resulting in Linux properly identifying your video card);
look at the Bumblebee project: http://bumblebee-project.org/index.html

Good luck and let us know what happens!


You already got the answer:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

So use parted instead.

$ fdisk -l is for displaying partitions of a msdos disk. Since you have GPT you could use

$ sudo parted -l


Mobile Broadband worked in 13.04 not working in 13.10

Can you please try this:

Download the package modemmanager0.5.1.97-0ubuntu1 from here or from here.

Open Synaptic Package Manager type in your password when required, search for the package named modemmanager when you find it, hit the right click on it and hit on Mark for complete removal and close the Synaptic Package Manager.

Look for the file you downloaded before and execute it (it will may be open on the Ubuntu Software Center), install it and close the Ubuntu Software Center.

Now open one more time the Synaptic Package Manager and search for the package named modemmanager again, when you find it click on it and go to the upper menu option Package, hit on Lock Version until you see a checkmark next to that option and a locker next to the package name.

Restart your system and let us now if that worked.


Empathy not connecting on school's public wifi

There are some Applications that don't use the system proxy settings. The only thing you can do is wait for this feature to be added in the programs that don't work.

It could also be, that sites like chat.facebook.com are blocked in the schools network so empathy can not connect to them. At my school, it is like that and I can only use the chat through the websites with https.


Answering this question can get long and complicated, so I am instead going to point you to resources available instead of rehashing them here.
Documentation

Getting Set Up for Ubuntu Development
How to Fix Bugs

Tutorials
We run events throughout the cycle to help people just like you, specifically we run Ubuntu Developer Week in IRC, which is a live tutorial and Question and Answer workshop. There's one coming up at the end of February if you want to join in!
Here are two logs from a past session to give you an idea:

Getting Started in Ubuntu Development I
Getting Started in Ubuntu Development II

Places to Find Opportunities

Harvest - this tool goes through all the patches and packages in Launchpad (and even looks in other distros) for patches. Many of these can be snagged, applied, tested, and then fixed in Ubuntu and then sent upstream.
Cleansweep - List of patches sitting in Launchpad that someone has attached to a bug report. These could be useful or not, they still should  be looked at though.

Getting Help
Contacting the MOTU on the mailing list or IRC is a good way to get help for individual problems you run into:

https://wiki.ubuntu.com/MOTU/Contact

Feedback
We've spent a lot of time reworking this documentation to be as easy as we can, if you would take notes on your experiences and how we can improve this stuff it would be very useful to know how to make it suck less for people like you.


I'm giving you a "change the font in Terminal, not system-wide monospace" response, since it seems what you are asking.

You need to install the font, then change the settings the Terminal.

sudo apt-get install fonts-roboto
Right click on Terminal
Profiles -> Profile preferences
Change the Font: to Roboto

Note: Roboto is not a monospace font, so it's not the best for use in Terminal. Your terminal use will be better with a monospace font such as Inconsolata, DejaVu Sans Mono, Ubuntu Mono, or Source Code Pro.


Ctrl + Alt + Arrow key doesn't switch workspaces

I've solved it by enabling Desktop Wall in CompizConfig Settings Manager:


Sound Problem due to wrong driver installation

Finally, with lots of trouble.... with no sound, wrong-driver problem. I got the sound system working on mine.

It was all about correct alsa option of hda-intel

Follow Steps from this to get started on what you need
For my laptop specific, configuration as per this page worked.


Accidentally deleted my user's home folder

Just recreate the folder, add the default config files, and change the owner to you:

sudo mkdir /home/user
cp -a /etc/skel/* /home/user
chown -R user:user /home/user


New Toshiba Satellite Pro - Ctrl key not working in certain programs

Since you have bought a new laptop, then I am assuming you have installed the latest version of Sublime Text. CTRL + E is working, just that your Sublime Text installation is not recognizing it because it is now part of the vintage_ctrl_keys.

Check here on how to enable vintage_ctrl_keys -> Enable Vintage Package


How do I install the Glasgow Haskell Compiler?

ghc6 is in the repositories. Just install it from the Ubuntu Software Center, or by clicking on the link below:
ghc6


Does cinnamon 2.0 really break your 13.10 desktop?

Update 7. december 2013: This happened just at the release of 13.10, but it is reported that this shouldn't cause issues any more.

Yes, this is true, it happened to me as well. I couldn't login to the Unity session after upgrading to 13.10 and had to uninstall Cinnamon to get it working. It seems like this is the solution for everyone having a similar problem.

My knowledge is limited and I can't tell you the exact reason why this is happening :) But your link already gives a possible reason for the problem - a common gnome package.


reupload package to launchpad with orig.tar.gz changed

You do NOT change the origional source code, you submit a patch. If it is to the source code, the patch should almost certainly go upstream.

See - http://developer.ubuntu.com/packaging/html/fixing-a-bug.html

If you are packaging for Ubuntu I HIGHLY suggest you read the packaging guidelines.

See either the Debian or Ubuntu documentation, this is a "quick start"

http://wiki.debian.org/IntroDebianPackaging

http://www.debian.org/doc/manuals/maint-guide/

https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages

http://developer.ubuntu.com/packaging/html/packaging-new-software.html


3D accelerator ATI Mobility Radeon HD5470

VMWare places it's own video driver into Ubuntu - the ATI driver that you added will not help.  In the VMWare menu for settings on your virtual machine, there should be a display option under the hardware tab, and in the display settings an 'Accelerate 3D graphics' checkbox.


Does Android Development obviate 32-bit Linux

Outside of certain ARM environments, purely 32-bit Desktops are obsolete.

The standard CPU in computers of the last five or six years is primarily 64-bit architecture.  As such, it is relatively safe to assume that your processor isn't restricted to a 32-bit environment.  With the various improvements in processing power between 32bit and 64bit,
it makes sense the standard would be 64bit nowadays.

If Android says they will drop 32-but development environment support in the future that's their call, though.  True you can 'force' it to run 32-bit but soon enough that will probably cease to be the case.

With the standard being 64bit you should likely consider getting a 64bit OS.  You may not have to replace the entire system to achieve this unless your processor is only 32bits (in which case that system is obsoleted by today's standard consumer level PCs off the shelf which have 64bit CPUs and you should start considering upgrading if you do development)


How do I fully expand the window showing the running operating system inside VirtualBox?

To be able to change the screen geometry of a Virtual Box guest we need to install the virtual guest graphics driver.

  This is done by installing the guest additions.

We can then set the Virtual Box guest into the following display modes from the View menu of the Virtual Box Manager or by a hotkey:

HOST +  F  Switch to fullscreen mode
HOST +  L  Switch to seamless mode
HOST +  G  Auto-resize guest display


Monitor not recognized in Ubuntu 13.04 - gateway NV59c

If your monitor is not reconized, you have only one option:

Step 1) To use your monitor you can configure x.org with custom settings for you monitor so you can use your monitor on your current ubuntu version.

step 2) submit a improvement on bugs.ubuntu.com or bugzilla.kernel.org/ to add your monitor driver. This way your might have your monitor settings available in the next release.


I use a different VPN service, but this may be of use to you.  The process works perfectly for me on Ubuntu 13.10.

It involves installing the OpenVPN Network Manager and tweaking a few settings.

https://www.privateinternetaccess.com/pages/client-support/#ubuntu_openvpn_installer


The volume slider graphic sometimes shows up, sometimes doesn't

I've found out 2 ways to do it:
1.
Go to System Settings > Sound and un-check and re-check the check-mark box shown below:

2.
Open Terminal and execute:
gsettings set com.canonical.indicator.sound visible true

Hope it works! : )


20.04 - How to completely uninstall iRedMail

Try this:
sudo apt-get remove --purge postfix* nginx* sa-compile* dovecot* fail2ban* ldap* mysql* sogo* clamav* amavis* nginx* php* mlmmj*

sudo apt-get autoremove --purge

sudo rm -rf /var/run/mysql /var/run/amavis /var/run/mlmmjadmin /var/run/iredadmin /var/run/fail2ban /var/run/netdata

sudo rm -rf /etc/mysql /etc/clamav /etc/dovecot /etc/fail2ban /etc/netdata /etc/spamassassin

sudo userdel -f iredadmin
sudo userdel -f iredapd
sudo userdel -f clamav
sudo userdel -f mlmmj
sudo userdel -f netdata
sudo userdel -f vmail
sudo userdel -f debian-spamd
sudo userdel -f mail


Intel 7265D wireless driver/firmware ubuntu 16.04

Just a note, when you install 16.04, 7265D works for me without issues. I cam across this question when trying to get it updated to -21.ucode

[  142.519645] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210

modinfo iwlwifi | grep 7265D
firmware:       iwlwifi-7265D-13.ucode


On Kubuntu, how do I install my Samsung ML-1640 printer?

Get you driver from here from the Manual Download section click on SEE MORE and pick Linux, then follow these steps to install:

untar the file:

tar -xvf uld_v1.00.36_00.91.tar.gz

Change into the decompressed (uld) folder and run the install.sh script:

sudo ./install.sh

When presented with a license agreement press Space bar to scroll a page at a time then accept with a y at the end of it. Follow the prompt to install it.


Change aphostrohe with AltGr + P using xmodmap

See the output of xmodmap -pke to understand how the "values" of the keys are assigned. For example, by default, if you are using English (UK) keyboard layout, xmodmap -pke | grep "thorn" will return:

keycode  33 = p P p P section NoSymbol Greek_pi Greek_PI U03E1 U03E0 p P thorn THORN

That being said, assuming that you are using English (UK) keyboard layout, use the following command to type apostrophe when you press AltGr + P:

xmodmap -e "keycode 33 = p P p P section NoSymbol Greek_pi Greek_PI U03E1 U03E0 p P apostrophe quotedbl"

To get this change for every session, create a file called .xmodmap, with the following command:

xmodmap -pke > .xmodmap

Then, create a file called .xinitrc in your home directory, containing the following line/command:

xmodmap .xmodmap


How can I decide whether I care about a kernel vulnerability related to IPv6?

If your systems are not reachable using IPv6 – if the firewall drops all IPv6 connections, that is – I don't see why you should worry.

On a general note, keeping your system up to the latest security fixes is still a very good idea. Next month you might decide to use IPv6 and by then you probably have forgotten about this vulnerability – after all, it doesn't affect your system right now.


Is it possible to create a virtual host on a virtual machine?

i understood your query .yes, its possible to setup a guest os on your virtual machine go to this link  complete ubuntu webserver tutorial .hope this will help you!


How to change visudo editor from nano to vim?

Type sudo update-alternatives --config editor

You will get a text like below.

There are 4 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number: 3

Find vim.basic or vim.tiny selection number. Type it and press enter. Next time when you open visudo your editor will be vim


How to install a download .tar.bz linux kernel?

help.ubuntu.com has a good article on the subject of building and installing a kernel.


A mono-wrapper is just a layer on top of a library allowing you to use the library with mono.


Ubuntu 12.10 Web app integration not working when Firefox is closed?

That's how it's intended to work.

If you don't like Facebook and Gmail taking up space in Firefox's tab bar, I recommend right-clicking on the tab and choosing "Pin as App Tab". This will make the tab turn into a small icon, which can't be closed while Firefox is open. It's very useful for tabs you want to have open all the time.


evince-thumbnailer uses excessive CPU and memory

Try closing Nautilus (file manager) windows. I closed a Nautilus window showing a  loading thumbnail icon for a PDF file, and just as I closed the window, the evince-thumbnailer process closed with it.

Unfortunately, when I open the same directory in Nautilus, evince-thumbnailer launches again, but at least closing Nautilus seems like a temporary option.


Upon an upgrade to Ubuntu 15.04, both gtkpod and Banshee successfully sync my iPod Classic 160GB 6th gen (2nd rev), including cover art.

Just run

sudo apt-get install gtkpod

I recommend using Banshee to sync music, it has a much nicer interface and is much more stable than the gtkpod GUI, but it uses gtkpod in the background.

It may not be necessary to upgrade to 15.04 to do this, perhaps it would be possible to just compile the latest version of gtkpod from here (currently on version 2.1.5) to fix the problem, but I haven't tested this yet.


Running wineConsole err:wineconsole:WCUSER_SetFont wrong fon

There are several options you could try to fix errors with wineconsole.exe

Here is the documentation for it
https://www.winehq.org/docs/wineusr-guide/cui-programs

Have you tried running your batch file via wine

wine render.bat

or with the user backend instead of the console backend

wine -- --backend=user render.bat

I get those errors running cmd.exe (the windows command enterpreter) via wine (i am using 16.04) and they don't seem to be fatal and i don't see any font issues.


How to set new value for existing environmental variable

To append to $PATH:

export PATH="$PATH:/extra/directory/here"

To make it 'permanent', add that line to ~/.profile


Make Ubuntu remember screen brightness level without xbacklight

Actually, I would like to make my Ubuntu remember the level of
  brightness that was used last. How exactly can I do that? Here's some
  information:

Introduction

The script below addresses OP's need to store and restore screen brightness that was used last.  It works in conjunction with the lightdm greeter and is activated by lightdm. There's no requirement to use lightdm, so if you prefer to use a cron job, you can do so.

Basic idea:

Have the script stored somewhere (either by getting it here or through github)
Create /etc/lightdm/lightdm.conf using the sudo privilege.
Make sure that file has 3 lines: [SeatDefaults] , display-setup-script, and display-stopped script. Look below for details. Script header also gives overview.

Script Source

#!/usr/bin/env bash
#
###########################################################
# Author: Serg Kolo , contact: 1047481448@qq.com
# Date: March 7th, 2016
# Purpose: Script that will remember screen brightness
#          Must be used in conjunction with lightdm
#          Place the following 5 lines into /etc/lightdm/lightdm.conf
#
#           [SeatDefaults]
#           #display-setup-script = Script to run when starting a greeter session (runs as root)
#           display-setup-script = /home/USER/bin/sergrep/brightness.sh restore
#           #display-stopped-script = Script to run after stopping the display server (runs as root)
#           display-stopped-script = /home/USER/bin/sergrep/brightness.sh store
#
#           Basic idea is that you must give full path and either store or restore as an option
# Written for: http://askubuntu.com/q/739654/295286
# Tested on:  Ubuntu 14.04 LTS
# Version: 1.2 , added brightness limit, file creation
###########################################################
# Copyright: Serg Kolo , 2016
#
#     Permission to use, copy, modify, and distribute this software is hereby granted
#     without fee, provided that  the copyright notice above and this permission statement
#     appear in all copies.
#
#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
#     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
#     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#     DEALINGS IN THE SOFTWARE.
ARGV0=$0
ARGC=$#

store()
{
   cat "$SYSDIR"/*/actual_brightness > "$1"
}
#----------

# This function restores brightness. We avoid
# setting brightness to complete 0, hence
# minimum is 10% that can be restored.

restore()
{
  MAX=$(cat "$SYSDIR"/*/max_brightness  )
  LIMIT=$((MAX/10)) # get approx 10 percent value
  VAL=$(cat "$1" )
  if [ "$VAL" -lt "$LIMIT"  ] ;
  then
       # avoid going bellow 10% of brightness
       # we don't want user's screen to be completely dark
       echo "$LIMIT" > "$SYSDIR"/*/brightness
  else
       echo "$VAL" > "$SYSDIR"/*/brightness
  fi
}
#------------

# This function works for initial run of the script; the script cannot set
# brightness unless datafile exists first, so here we create the file
# Initial value there will be whatever the current brightness on first
# reboot was

create_datafile()
{
  cat "$SYSDIR"/*/actual_brightness > "$1"
}

puke(){
    printf "%s\n" "$@" > /dev/stderr
    exit 1
}

main()
{
  local DATAFILE="/opt/.last_brightness"
  local SYSDIR="/sys/class/backlight" # sysfs location of all the data

  # Check pre-conditions for running the script
  if [ "$ARGC" -ne 1  ];then
     puke "Script requires 1 argument"
  fi

  if [ $(id -u) -ne 0 ]   ; then
     puke "Script has to run as root"
  fi

  # ensure datafile exists
  [ -f "$DATAFILE"  ] || create_datafile "$DATAFILE"

  # perform storing or restoring function
  case "$1" in
     'restore') restore  $DATAFILE ;;
     'store') store $DATAFILE ;;
     *) puke "Unknown argument";;
  esac

}

main "$@"

Getting and Setting up the Script

You can either copy the script directly or follow these steps from the command line ( to open command line , press CtrlAltT  )

sudo apt-get install git
cd /opt
sudo git clone https://github.com/SergKolo/sergrep.git

The script will be located in /opt/sergrep/brightness.sh, so we do a:

sudo chmod +x /opt/sergrep/brightness.sh

to make it executable. Next, we need to set it up to work with lightdm. Create the /etc/lightdm/lightdm.conf file , either by opening it with command line nano text editor (the command is sudo nano /etc/lightdm/lightdm.conf ) or graphical gedit ( pkexec gedit /etc/lightdm/lightdm.conf )

Write to that file the following lines:

[SeatDefaults]
#display-setup-script = Script to run when starting a greeter session (runs as root)
display-setup-script = /opt/sergrep/brightness.sh restore
#display-stopped-script = Script to run after stopping the display server (runs as root)
display-stopped-script = /opt/sergrep/brightness.sh store

Save and exit

Indepth Overview

You've already discovered that you can write to /sys/class/backlight/*/brightness file directly , and you can also read in those values as well. Problem is that /sys is a virtual filesystem, so once you reboot, all the files in that filesystem disappear.

So you could store value in /sys/class/backlight/*/actual_brightness into a permanent file on every reboot. The question is how - via cron job, via lightdm, or via other means. Personally, I chose the lightdm route.

Basically we take advantage of lightdm's feature - being able to run a script before the greeter starts and after the session exits. The brightness is recorded to /opt/.last_brightness file and read from each time the script starts. We're essentially performing two actions with the same script, just by passing different arguments.


I tried Crouton for a few days until it self-destructed.
Crouton uses the older LTS version of Ubuntu (Xenial). You may or may not be able to upgrade to Bionic Beaver.

Also note that you will have to enable developer mode which will cause issues when you upgrade in ChromeOS.

Your only safe option is to use Crostini.

Chomebooks are good for some people who only use web apps and services, but they are not general purpose computers.


I believe that you either have an internet connectivity problem or a DNS issue as what the system is looking for is clearly there as can be seen here.


Can I install Ubuntu onto a USB flash drive using the SAME flash drive?

Booting to RAM, (toram), and unplugging will work, reference:

Can Ubuntu be installed to the pendrive it was booted from?

mkusb is superior to Unetbootin as it can make persistent partitions larger than 4GB, it will also make a NTFS partition from any excess space that is usable by Windows and Linux.

Edit:
You can do a Full install of Ubuntu to USB using VirtualBox, Instructions at:

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

A simpler method:

Install VBox and guest additions

Make new Ubuntu virtual disk

Start disk and point to Ubuntu iso

When process gets to try/install screen activate target USB and select install

When process gets to partitioning select "Something else"

Select the USB as target and continue installation.


Resizing ubuntu partion can't access unlocated space

The partition you are trying to manipulate is the one which has OS on it. and you can't perform any changes on a drive that is mounted.
Download the GParted .ISO image. Follow the instructions here-
(https://help.ubuntu.com/community/BurningIsoHowto) to burn the .ISO image to CD.This is a bootable CD. Shutdown and boot with the Gparted CD. At this moment there is no operation system running so you can make your partitions.


Why should users never use normal sudo to start graphical applications?

In Ubuntu 19.10 and later, the admonition in that article (and in this answer) no longer applies. See WinEunuuchs2Unix's answer as well as this question.

Graphical applications often store settings and other user-specific data in configuration files written inside the user's home folder. The main mechanism applications use to determine what they should use as the user's home folder is the HOME environment variable. (You can inspect it yourself with echo $HOME).

Suppose you're running gedit (a graphical text editor) as root. If you run sudo gedit, HOME will continue to point toward your home directory, even though the program is running as root. Consequently, gedit will write configuration files as root into your home directory. This will sometimes result in the configuration files being owned by root and thus inaccessible to you (when you later run the program as yourself and not as root). This mainly happens when the application has to create a new configuration file. Newly created files, by default, are owned by the user who creates them (who in this case is root, not you).

That's the primary reason why you should run graphical applications with a graphical sudo frontend rather than with straight sudo. In Ubuntu and most of its derivatives (including Xubuntu and Lubuntu), the standard graphical frontend is gksu/gksudo. In Kubuntu it is kdesudo. (It depends on the desktop environment being used.)

If you want to use sudo directly to run a graphical application like gedit, you can run:

sudo -H gedit

The -H flag makes sudo set HOME to point to root's home folder (which is /root).

That still won't automatically handle the ownership of .Xauthority by copying it to a temp folder (this is the other thing that graphical sudo frontends take care of for you). But in the infrequent event that .Xauthority is inaccessible, you'll get an error saying it is, and then you can fix the problem by deleting it (sudo rm ~/.Xauthority), as it's automatically regenerated. Thus, protecting .Xauthority's ownership and permissions is less important than protecting the ownership and permissions of configuration files.

In contrast to a root-owned .Xauthority, when configuration files become owned as root, it's not always as obvious what the problem is (because graphical programs will often run, but not work very well, and output any useful errors to the console). And it's sometimes a bigger hassle to fix, especially if you're in a situation where you want one or more files in your home directory to be owned by someone other than you (because then you cannot fix it simply by recursively chowning all your files back to yourself).

Therefore, sudo (at least without -H) should not be used to run a graphical application unless you are highly familiar with the app's inner workings and know for sure that it does not ever attempt to write any configuration files.


PAM LDAP pam_ldap.so: failed to map segment from shared object: Cannot allocate memory

I uninstalled libpam-ldap

sudo apt-get purge libpam-ldap

Then

sudo apt-get install libpam-ldapd

The memory error went away. Now I get a

pam_ldap(dovecot:auth): error reading from nslcd: Connection reset by peer

but that's obviously dovecot related and a separate issue.