After a lot of searching and reading in different forums I found a solution to my problem. Please note that while the other answers didn't solve my problem, they might be helpful to others facing problems with 3G USB Modems (specially the sakis-3g script).

I found my solution in this thread, which I will detail in the following:

When connecting my USB modem, it is detected as a USB storage. According to that thread, running sudo modprobe option could make the device be detected as a modem. If not, it is also suggested to execute the following commands:

sudo su
echo 1c9e 6061 > /sys/bus/usb-serial/drivers/option1/new_id

where 1c9e 6061 is the device ID obtained from the lsusb command. This worked for my device and it was detected in Network-Manager. Note that you must become root using sudo su and running the command with sudo won't work.

To automate things, the following steps are presented:

sudo su
nano /usr/bin/usbModemScript and put the following in the file:

   #!/bin/bash
   echo 1c9e 6061 > /sys/bus/usb-serial/drivers/option1/new_id

Then save the file (Ctrl+O) and exit nano (Ctrl+X).
chmod +x /usr/bin/usbModemScript
nano /etc/udev/rules.d/option.rules and put the following in the file:

    ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="6061", RUN+="/usr/bin/usbModemScript"
    ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="6061", RUN+="/sbin/modprobe option"

Then save the file (Ctrl+O) and exit nano (Ctrl+X).
reboot

NOTE : You should replace the values 1c9e and 6061 with the appropriate device ID values of your own modem.

After reboot, your modem should be detected when connecting it to the computer. Of course, this might not be the case (as it wasn't for me)! My device wasn't detected correctly after the first time it was connected to the computer. Instead, I had to disconnect and then reconnect it, and this time it was correctly detected as a modem in the Network-Manger. Some people might also need to restart the network-manager service (as I did):

sudo service network-manager restart

================================================================================

Another potential solution is to use wvdial.

Installation: sudo apt-get install wvdial
Connect your modem to the computer.
Run: sudo wvdialconf /etc/wvdial.conf. If it says 'no modem found' then you are out of luck!
If the modem is found, run: sudo nano /etc/wvdial.conf and input your ISP information where needed by filling the fields you know about. Run man wvdial.conf in a separate terminal for information about the options. Once you are ready, save the file (Ctrl+O) and exit nano (Ctrl+X).
Now try to connect: sudo wvdial

For more information on wvdial, read the man page (i.e. man wvdial).

Hope this helps :)


Check if files exist, get the most recent one

I would use ls version sort in a loop instead:

$ for i in $(ls -r1v ~/test/log.* 2>/dev/null); do \
  grep -q "WARNING" < "$i" && echo match; break; done

Another example using read:

$ read -r < <(ls -r1v ~/test/log.* 2>/dev/null) && \
  { grep -q "WARNING" < "$REPLY" && echo match; } || echo file not found.

In a script, I prefer to check for existence before using the file.

#!/bin/bash

mapfile -t -n 1 < <(ls -r1v ~/test/log.* 2>/dev/null)

[[ -e $MAPFILE ]] || \
    { echo file not found.; exit 123; }

grep -q "WARNING" < "$MAPFILE" && echo match || echo no match


You can blacklist the driver like this:
echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist.conf
I suggest installing your nvidia driver before rebooting after doing that


Install i7z package, run it, and see whether you're still running at full CPU speed (i7z is really easy to read). If it slows down to - let's say - 1GHz, then search solution called "governor" and keyword "performance" to force your CPU to run at full speed.


I had this problem before. I reinstalled Ubuntu and it worked perfectly after the reinstallation. You should do a back-up of your system after reinstall so you can reset if something goes wrong again.


insufficient permissions to change MAC address

On Kubuntu 14.10 This page has a procedure that works.
As root:

service network-manager stop; sleep 5
ifconfig wlan0 down
macchanger -b -a wlan0; sleep 5
ifconfig wlan0 up; sleep 5
service network-manager start

The sleeps may not be necessary, but that's what worked. Macchanger is in the repos. My attempts using ifconfig or ip link appeared to take but did not survive connecting to a network, because I didn't stop Network Manager. The burnt in MAC was reasserted.

This also works:

service network-manager stop; sleep 5
ifconfig wlan0 down; ifconfig wlan0 hw ether F8:27:93:01:02:03
ifconfig wlan0 up; sleep 5;
service network-manager start; sleep 5;

I have a feeling there are some little gotchas lurking:

In the Network Manager gui, clear the 'Restrict to Device:' field.
Also clear the 'Random' field.
Use a MAC with a recognised vendor prefix, easily found on Goog. Many
routers can tell the difference. It also avoids any snafu with the
'locally administered' bit, WTH that is.
Start from a clean state, regarding the ifup & ifdown commands. They
only keep a record of changes they have made & can be inconsistent
with the true network state ( And no: I have no idea what I'm talking
about regarding these)

Easy. Once you know how.


Why isn't a HD Video in 720p played without stops and glitches?

You can't compare Windows and Linux, because video driver performance and features are different. For instance, if you are using nVidia you need a card that supports vdpau for best performance, which is equivalent to PureVideo in Windows. PureVideo supports many more cards. However, depending on your CPU, you can play HD videos smoothly without vdpau support. So it depends on your video driver, CPU and also player settings.

It would help if you could provide more info about your video card and CPU.

Anyway, try smplayer

It's the best player IMO and plays even videos with resolutions higher than 1080p on my Core2 Duo with nVidia 7300 GT (not vdpau).

Make sure you tweak smplayer. In the Preferences, click the Performance section and select the option Skip only on HD videos in the Loop filter settings. In the General section, click the Video tab and make sure the Output driver is set to xv.


ps aux as non-root doesn't show all processes

You appear to have bumped into the default Ubuntu procps version of ps which - by attempting to emulate three different argument flavors - can be downright confusing. Quoth the man page:

  This version of ps accepts several kinds of options:

  UNIX options, which may be grouped
  and must be preceded by a dash.
  BSD
  options, which may be grouped and
  must not be used with a dash.
  GNU
  long options, which are preceded by
  two dashes.

Which means that ps -a yields very different results than ps a. Given my history, I'm rather fond of ps -eaH and frankly haven't needed to know the process RSS badly enough, often enough to slog through the whole manual to find which flag will give it to me.


Problems with virtualbox after installing Ubuntu 18.10

modprobe vboxdrv failed means the special drivers for VirtualBox aren't loading. This can happen for a variety of reasons but usually has to do with the Secure Boot UEFI protection.

The user confirmed that was the case after a firmware update re-enabled Secure Boot. Disabling it allowed the module to load properly.


Compro VideoMate TV PVR/FM In Ubuntu 14.04 x64

I got this working with MythTV by running commands..

sudo modprobe -vr saa7134_dvb
sudo modprobe -vr saa7134_alsa
sudo modprobe -vr saa7134
sudo modprobe -v saa7134 card=40

then in mythtv > capture card setup I selected Analog capture card
 and type Video device: /dev/video0 and type VBI device: /dev/vbi0

then in Video source setup > Video souce name: RF and Listings grabber: No grabber

then in Input connections > [V4L:/dev/vodeo0] (Television) I set the display name and Video source to RF.

then in channel editor I selected RF and clicked Channel Scan.

It found NO channels but I know that my distribution system is on 65 so I deleted all the channels under RF except 65 by selecting the one I wanted to delete then pressing D.

Once this was done I renamed the channel number to 800 so that it doesn't conflict with the DVB-T and went back in to Input connections > [V4L:/dev/vodeo0] (Television) and set the Starting channel to 800.

In the front end I had to type the channel number 800 and press enter because it doesn't show in the channel list.


“MOZILLA_FIVE_HOME not set” zekr quran ubuntu 13.04 ERROR

Here you are:

sudo apt-get install libwebkitgtk-1.0-0

from here.


Add these lines to /etc/modprobe.d/alsa-base.conf:

options snd-pcsp index=-2
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=hp-m4
options snd-hda-intel enable_msi=1

Make sure they're at the end of the file.


uninstalled tigervnc from ubuntu 20.04, now cannot start tightvnc

Try sudo apt purge tigervnc-standalone-server

What I believe is happening is that you deinstalled the tigervnc-standalone-server package but you did not purge it, thus leaving its configuration such as /etc/X11/Xvnc-session and others installed and active.


Laptop boots to a black screen after trying to install fglrx for AMD HD8670M in Ubuntu 12.04

I think that you have to edit grub. For that, ESC at the beginning of the boot. After: e (to edit). At the end of the line which start by "Linux...", add nomodeset after "quiet splash". Then F10.
Normally, you be be able to boot. If you want to keep nomodeset for the next boot, you need is to "add nomodeset to the end of GRUB_LINUX_CMDLINE_DEFAULT in /etc/default/grub and then run sudo update-grub", as hal7df explained to you.

But maybe the best idea is to desinstall fglrx. I have also a AMD HD8670M in hybrid video card, on Ubuntu 14.04, without fglrx. I do not think that AMD HD8670M is used, because lspci -nn | grep VGA
gives me
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)

But my computer works well. I change the brightness, which I could not do before with others Ubuntu versions; suspend an resume. The only problem is that the fan sometime is noisier than on Windows 8.1


There is an amazing piece of software called Calibre. I linked an article talking about its features it nice and useful! To install it click the icon: calibre

Alternatively you can install Adobe Reader with eBook extension.


How to enable finger printer with Thinkpad X230

For 13.04 and newer

For the X220/X230:

sudo apt-get update
sudo apt-get install libpam-fprintd libfprint0 fprint-demo fprintd

Then run this command to configure pam:

sudo pam-auth-update

Finally enroll your finger with:

fprintd-enroll


Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get update

Then try installing vim again using sudo apt-get install vim


Unattended updates: why are some security updates not installed, is it based on the kernel version?

Commenting out the 'MinimalSteps' setting of unattended updates configuration seems to solve the problem (for the kernel we use, although not all server have this problem). https://forum.ubuntuusers.de/topic/sicherheits-aktualisierungen-werden-nicht-mehr/


Boot fail after update kernel in ubuntu 14.04

you can use boot repair burn it as image on cd and leave it .
it will repair every thing.
http://sourceforge.net/projects/boot-repair-cd/
after that u can boot ubuntu again.


Don't know anything about Ubuntu Cloud, but all Ubuntu installations have a root user (all GNU/Linux distros do), but most versions of Ubuntu hide it, and require the user to use Sudo for administrative tasks instead. To answer your question, you cannot create the user root, because the user already exists.

Don't believe me, type:

sudo -u root whoami

The result should be "root".


Just turn off the 3D Acceleration option of Virtual Box !!
Then I can login too.
Thank you very much.


How can I increase resolution when impossible to set up nvidia driver?

Perhaps an xserver update solves your issue... just follow the steps here: How to upgrade intel graphics package?


finger print reader not detected for Lenovo Thinkpad Edge E531 in Ubuntu 12.04

Fprint Demo is the application for finger print readers (including drivers) in Official Ubuntu Repository. Can install it with :

sudo apt-get install fprintd fprintd-doc libfprint-dev libfprint-dev libfprint0 aes2501-wy


Your computer is EFI-based, but the instructions you reference assume a BIOS-mode installation. This is a poor assumption to be made in 2015, when the instructions were written.

I've only skimmed those instructions, and I'm not familiar with the procedure described, so I may be missing something, but instead of creating a GRUB rescue .iso file, you might want to try the CD-R image of my rEFInd boot manager. (See the download link for the CD-R image.) You'd then point VirtualBox to the rEFInd .iso file as a CD image file. If my cursory glance at the instructions is not leading me astray, rEFInd should be able to boot your regular Ubuntu installation from within VirtualBox. In the long term, you might consider setting up a small virtualized disk with a FAT filesystem and install rEFInd to it; this might persist across uses better than a pointer to a CD image file. (Under Linux, at least, VirtualBox frequently "unmounts" CD images without being asked -- or maybe that's Ubuntu itself.)


How to install Thunderbird in old version Ubuntu 9.xx?

You should try using the official thunderbird version provided by Mozilla, instead of the version in official Ubuntu repository provided by Canonical. At least on Ubuntu 9.04 and 9.10, the version in Ubuntu is not very good, and the upstream version is much better.


How can I get the MAC addresses of machines using python-nmap?

I managed to get the MAC addresses of systems on the same network (my own local network) using the following code.

Moreover you have to run this code as root (using sudo)

#!/usr/bin/env python

import nmap

nm = nmap.PortScanner()
cidr2='192.168.1.99/24'

a=nm.scan(hosts=cidr2, arguments='-sP')

for k,v in a['scan'].iteritems():
    if str(v['status']['state']) == 'up':
        print str(v)
        try:    print str(v['addresses']['ipv4']) + ' => ' + str(v['addresses']['mac'])
        except: print str(v['addresses']['ipv4'])

Source: is it possible to get the MAC address for machine using nmap


will upgrading ubuntu to 16.04 changes my Apache, Mysql and Php version?

yes, to some degree. xenial comes with:

apache2 - 2.4.18
mysql-server - 5.7.17
php - 7.0

EDIT:

according to @muru php5 packages might not get updated due to package name changes for php7. So I gave it a try:

installed a basic trusty and did

# apt-get install php5-cli php5 mysql-server

# dpkg -l | egrep "\s(apache2|php5|mysql-server)\s"
ii  apache2                          2.4.7-1ubuntu4.13                 amd64        Apache HTTP Server
ii  mysql-server                     5.5.54-0ubuntu0.14.04.1           all          MySQL database server (metapackage depending on the latest version)
ii  php5                             5.5.9+dfsg-1ubuntu4.21            all          server-side, HTML-embedded scripting language (metapackage)

# sed -i 's/trusty/xenial/g' /etc/apt/sources.list
# apt-get update
# apt-get -y upgrade ; apt-get -y dist-upgrade
# apt-get --purge autoremove ; apt-get autoclean

# dpkg -l | egrep "\s(apache2|php5-cli|php-cli|mysql-server|mariadb-server)\s"
ii  apache2                          2.4.18-2ubuntu3.1                 amd64        Apache HTTP Server
ii  mysql-server                     5.7.17-0ubuntu0.16.04.1           all          MySQL database server (metapackage depending on the latest version)
ii  php5-cli                         5.5.9+dfsg-1ubuntu4.21            amd64        command-line interpreter for the php5 scripting language

So, @muru is right: php5 will most probably not be replaced even though the php7.0-* packages are defined with Replaces: php5-cli (<< 5.6.16+dfsg-4~) (for example).


How To add the new startup sound to Ubuntu 12.04?

You should try using the same command as in the answer you linked to, but use the --file flag instead of the --id flag.  Like this:

/usr/bin/canberra-gtk-play --file="/PATH/TO/FILE"

That should allow you to play whatever sound you would like for your startup sound.  I believe it must be .ogg format however.


Reboot and shutdown activities are delayed by 5 minutes on the client side on purpose. If there is someone logged in at the console, he/she will have 5min to save his/her work, or cancel the reboot/shutdown.

About package updates taking 30min, that could depend on a lot of factors:

your bandwidth from the client to the ubuntu archive
if this happened right after a client registered with the server. There is an initial delay while package data is synchronized between server and client. It's usually a few minutes, but can be up to 3h if it's an ubuntu release that the server has seen for the first time and for which there are no hash-id files (check /var/lib/landscape/ or something like that for a hash-id directory, I don't remember the exact name from memory).
also for the above case, if the package activity happened while that sync was going on, the client will log something about unknown hash-ids in /var/log/landscape/package-reporter.log or package-changer.log. That has a timeout of 2h IIRC, to give time for the client to run apt-get update on its own (package reporter interval configuration sets that).

Hope this helps.


I have problems installing Ubuntu 13.04 with Wubi on Windows XP

Wubi doesn't support Ubuntu 13.04. See also this post. Ubuntu 12.10 is the last version that could directly be installed with Wubi.

You might want to install 12.10 and upgrade. Or just install 13.04 from a bootable DVD and install it on it's own partition.


recently-used.xbel is empty and entries are never added

If Gedit and  Nautilus aren't showing any Recent entries & ~/.local/share/recently-used.xbel is no longer being written to then most likely from changing the default Privacy settings.

To check open System Settings > Security & Privacy > Files & Applications > and make sure that Record file and application usage is enabled.


running hadoop on ec2 and HADOOP_HOME variable?

Why not try Amazon EMR or Xplenty to get a cluster automatically up and running? You may also try to provision a Hadoop cluster on EC2 with Cloudera Manager, Whirr or Ambari


On my system, this works:

echo "0" | sudo tee /proc/sys/kernel/yama/ptrace_scope > /dev/null

You should be able to see the content of the file with:

cat /proc/sys/kernel/yama/ptrace_scope.

It should be either 1 or 0 .


No Internet connection after disconnecting from VPN in Ubuntu 18.04

It could be related to this bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946

SOLUTION

Edit the file /etc/ppp/ip-up.d/0000usepeerdns

Replace the following line:

cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"

With this code:

cp "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"
chmod 644 "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"

Restart the network manager:

systemctl restart NetworkManager


How can I find out if a process is CPU, Memory or Disk-bound?

That requires some expert skills. It depends. Example:

If there's enough of memory and disks don't seem too busy, it may be CPU-bound. Look at CPU usage and if its bordering at 100% it's CPU bound. If it's not there's an artificial bottleneck in the implementation. E.g. on a dual-core CPU a single threaded process will not go above 50% CPU usage.

If CPU and memory are available, but disks are very busy, or IO latency seems high, its likely that its IO bound. See if adding more disks (RAID?) helps.

None of the above? Check memory available.

Enough memory? There may be an artificial bottleneck in the process itself i.e. maybe someone forgot to remove a sleep(1)? Naah its not that easy usually. ;)

There's a reason why we have a whole lab for performance engineers in most companies dealing with performance sensitive products!
Use tools like sar, vmstat, iostat, oprofile, lockstat, dtrace, product specific perf monitoring tools etc, to debug perf problems.


How to handle multiple keyboards compose key?

I ended up adding a couple of aliases to this commands:

Laptop Keyboard

alias xkb-linux-on="gsettings set org.gnome.desktop.input-sources xkb-options \"['compose:rctrl']\""

MacOS Keyboard

 alias xkb-macos-on="gsettings set org.gnome.desktop.input-sources xkb-options \"['altwin:swap_lalt_lwin', 'lv3:rwin_switch', 'compose:ralt']\""

If anybody knows how to run them when switching input-sources, I would be interested.


Negative to positive number range in regex in bash scripting

The expression [0-100] isn't a range of integers; it's a set of characters that happens to include a range 0-1 (so matches 0 or 1 or 0 or 0).

To match the range of integers -100 to 100, you could use:

a decimal digit [0-9]; optionally followed by
a second decimal digit [0-9]

or

the sequence 100

all preceded by an optional sign. So

^[-+]?([0-9][0-9]?|100)$

Ex.

while read num; do
 [[ $num =~ ^[-+]?([0-9][0-9]?|100)$ ]] && echo "$num is valid" || echo "$num is invalid"
done
-101
-101 is invalid
-100
-100 is valid
-83
-83 is valid
22
22 is valid
100
100 is valid
102
102 is invalid
^C


FireFox won't launch, "Error: Access was denied while trying to open files in your profile directory"

Found the below link that is related.

https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1180227

I did the following:

ls .cache/mozilla/
   ls: cannot open directory .cache/mozilla/: Permission denied

chown -R user.user .cache/mozilla/
    chown: cannot read directory ‘.cache/mozilla/’: Permission denied

sudo chown -R user.user .cache/mozilla/
firefox

This fix my problem.


Copying from mount share drive to local folder through script

No your commands should look like following

  rm -rfv /home/user/Documents/Exercise/*

because folder Exercise can have subdirectories

and in case of a samba share first you have to mount it locally

i.e.

mount -t smbfs smb://"server/arc/Exercise Files/Word/" /mnt

and then do

 cp /mnt /home/user/Documents/Exercise/


Buzzing/Static sound in headphones when volume is turned up

For me this was because my microphone was set to be amplified back to my headphones. If you happen to have a mic, just check to make sure your own voice isn't being amplified. If it is, play around with alsamixer (in my case it was one of the playback sliders) until your own voice is no longer amplified.


Ubuntu 18.04 and 19.04 very slow on surface

for anyone who has the same issue, the problem is that the kernel comes with ubuntu is not fully compatible with surface book2:

lacking drivers for touch screen
deffective behaviors for mouse movement.
cannot suspend/hibernate.
etc.
The solution for me is to install a jakeday's linux kernel for surface products. The instruction can be found here:

https://github.com/jakeday/linux-surface
After installing this kernel, my machine seems to be working ok.


How will updates be applied to the Nexus 7 Ubuntu release? Will refreshing the device be necessary?

Updates will be pushed to a PPA, and a simple apt-get dist-upgrade will pull them down.  No reflashing necessary


How to copy files to all machines using puppet master?

Puppet is a bit of a monster to get your head around, so learning by example is no bad thing. In the below I'm assuming you're using modules - please say in a comment if you're not or if you need more details about how to put the module together.

Let's say you start a new module called mymodule. In the puppet home directory (usually /etc/puppet) on the puppet master you should create the module manifests and files directory:

mkdir -p modules/mymodule/manifests
mkdir -p modules/mymodule/files

Then create a file in that directory named init.pp and enter:

class myfile {
    file { '/home/operator1/Desktop/Backup':
        ensure => directory,
        mode => '0755',
        owner => 'operator1',
        group => 'operator1',
    }

    file { "/home/operator1/Desktop/Backup/datas.xls":
        mode => "0644",
        owner => 'operator1',
        group => 'operator1',
        source => 'puppet:///modules/module_name/datas.xls',
    }
}

Then put the datas.xls file into the module's files directory - in this example in modules/mymodule/files/. (Note there can also be a templates directory for templates).

In the manifests/site.pp file you need to import the module and include the class by doing something like:

import 'mymodule'

node base {
    include myfile
}

node server1 inherits base {}
node server2 inherits base {
    # extra config here
}

Make sure that all your nodes inherit from base and that should be all you need to do. As of puppet 0.25 you can use regular expressions in the node name, eg:

node server[0-9] inherits base {}

Let me know in comments if you require further clarification.

Setting up a client to talk to the puppet master

On the client, you need to do:

sudo apt-get install puppet

Then edit /etc/default/puppet and change START=no to START=yes.

Also edit /etc/puppet/puppet.conf and add a line to the [main] section to tell it where to find the puppet master:

server=puppet.mydomain.com

Then we can do a test run with sudo puppetd --test. If you get key errors you may need to go on to the puppet master server and sign the client key. To check the exact name you can do sudo puppetca --list and then sudo puppetca --sign server1.mydomain.com (or whatever the server name was from the list command).

Now start the puppet service with sudo service puppet start and you should be away. The puppet service will run every hour, so if you update your puppet recipes then all your clients will also be updated.

Deleting Files

I note in the original question you wanted to know how to delete files. You would edit the manifests/init.pp to be

file { "/home/operator1/Desktop/Backup/datas.xls":
    ensure => absent,
}

Other useful tips

If you are having trouble there are a few things you can do. On any machine with puppet installed you can check your syntax by running

puppet --parseonly --ignoreimport myfile.pp

or check the whole lot by taking out the --ignoreimport flag, though that can lead to some funny error messages that aren't really errors I've found. You can also run puppet live on a puppet client machine by doing:

sudo puppetd --test

which shows various useful output, with errors and warnings highlighted in different colours. If you want even more detail you could run:

sudo puppetd --test --debug

but that generally generates so much output that it is hard to wade through, so only do that if you've already tried the previous steps and are stuck and need to see everything being done.

Note this is based on puppet 0.25.x which is what I use at work currently, and is also the version in Ubuntu 10.04. The puppet code in the main section will definitely still work, but later versions of puppet have new flags that can help with debugging output.


Ubuntu 11.10 resets to default settings after reboot

I had the exact same problem.

Inspecting apt-get, it indicated that some packages were held back.

Doing a
    sudo apt-get dist-upgrade
and logging out and back in solved the issue, and all my settings were restored.


go to the directory where you have installed genymotion and remove libdrm.so.2


I figured it out! thanks to the bug report Window Capture Black Screen.
If I record as a window instead of the whole screen and select the running FA instance initially I would see a black screen in the preview. so initially I thought window recording wasn't possible.
But if you go to the next step you get this screen:

And you can enable the option called "alpha-less texture format (Mesa workaround)" (which makes sense because FA is a mesa app) then it works.
(I actually had to toggle on (then off because I don't actually want to swap colors) "Swap red and blue" to force it to apply.
There!


What was the name of Mac bottom panel in Ubuntu?

There are a couple:

Avant Window Navigator/AWN

Docky

Plank

DockbarX

You can also use the XFCE4 Panel, using a tutorial I wrote previously: http://lkubuntu.wordpress.com/2011/09/04/make-xfce4-bottom-dock-act-like-docky-awn/

Or you can also move the unity launcher to the bottom: Can I move the Unity launcher?


How does the update process work for different install methods?

In short, Your understanding is correct. Package managers only update those applications that

come as a debian package,
have a repository configured and
the repository is still alive or active.

By package managers I'm referring to apt (or apt-get), aptitude, Synaptic package manager, Software Center etc.

To specifically answer your question -

  Build from source and install

Update requires re-building from source and reinstalling the application. Debian package managers have no knowledge of these applications. They don't get update by them.

There are debian-source packages that can be fetched from repositories through package managers like apt-get source and compiled to debian package. These are fetched and then built to produce a .deb file. Then those debian packages can be installed. They will get update if fulfilled the condition for a manually installed .deb file.

  Install a binary

I'm assuming, by this, you are referring to just copying some binary programs in your system to use. Like how rclone application is installed. Package managers have no knowledge of these applications and can't be updated using them.

  Install a deb file.

The conditions from the short answer apply here. If you install a deb file manually for which a repository is configured, these package can be updated through package managers. For example, if you had an already downloaded google-chrome .deb file and you installed it manually using dpkg and you have google chrome repository configured, then this package will get update, provided that other conditions are satisfied.

  Install from repository

This is very obvious. If the repository is alive these will get updates from package managers.

If you remove all repository sources, package managers would be unable to even update most core packages!

See apt-get manual page for details.


Problem was caused by E4rat. I realized it after running sudo dpkg --configure -a command in TTY1 (Ctrl+Alt+F1) which gave me kernel debug info (or whatever the messages are).

Changing grub configuration back to it's original state solved the problem.

First I edited grub file with this command:
gksu gedit /etc/default/grub

Then changed this line:

GRUB_CMDLINE_LINUX_DEFAULT="init=/sbin/e4rat-preload quiet splash"

To this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

So we stopped e4rat from initializing the system which was the problem.

Hope this will help someone in future...


Sure, are you using WPA or WEP encryption? You can use ifconfig to check if your adapter is being recognized; possibly something is causing it to be blocked or taken "down":

sudo ifconfig

if you see your wireless adapter there, then move on to step 2. If not, use

sudo lshw

to see if the adapter has been rfkilled or something else.

If you're using WEP and your wireless adapter's name is "wlan0":

sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid network_name key network_key
sudo dhclient wlan0

If you're using WPA and your wireless adapter's name is wlan0:

sudo apt-get install wpasupplicant
cd /etc
sudo nano wpa_supplicant.conf

And add:

network={
    ssid="ssid_name"
    psk="password"
}

Then press Ctrl+x to save. Controls vary using vi, vim, etc. You could use a text editor, as well.

sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
sudo dhclient wlan0

*Some information gathered from this link:
How do I connect to a WPA wifi network using the command line?

Also try this if the above does not work:

ubuntu 14.04 wireless constantly disconnects


I ran

apt-cache search php |grep -i emacs

which shows

php-elisp - Emacs support for php files

and after

sudo apt-get install php-elisp

emacs shows a php file quite colorful.


Geographic objects support for PostgreSQL has been updated from postgresql-10-postgis-2.4 to postgresql-12-postgis-3 in Ubuntu 20.04. To install postgresql-12-postgis-3 open the terminal and type:
sudo apt install postgresql-12-postgis-3

Installing postgresql-12-postgis-3 will also install postgresql-12 as a dependency, but it will not automatically install the postgis suggested package.
postgresql-12-postgis-3 adds support for geographic objects to the PostgreSQL object-relational database.


Unable to install updates. Unmet dependencies icedtea-7-jre-jamvm and openjdk-7-jre

For Sun/Oracle java

Press ctrl+alt+t to open terminal.

Add the webupd8team PPA repository and install Oracle Java 7/8 using the following commands one by one:

To install Oracle Java 7:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

To install Oracle Java8:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

For Openjdk:

Open Ubuntu Software Centre. Search 'Synaptic' and select 'Synaptic package manager'. FYI, Synaptic is the old package manager for Ubuntu and should take care of all dependency problems. After installing synaptic package manager, open it from Unity dash and search for openjdk and select openjdk-7-jre from search result.

BTW, its not clear what you are trying to install.


What is the use of systemd-journal-flush.service?

The systemd-journal-flush.service asks the journal daemon to flush any log data stored in /run/log/journal into /var/log/journal, if persistent storage is enabled. In case you have (already) huge log files, this will result in slower booting. Further the disk (with /var/log) has to be mounted in a writeable modus to do so.
To sum it up: huge old log files, which are checked during boot and the appending of new log data results in slower boot time.
To check the journalctl log size type
journalctl --disk-usage

In order to get the time and disk space information of flush processing, enter the following command
journalctl -b --unit systemd-journald

The corresponding output will look like
-- Logs begin at Sat 2018-12-08 00:40:23 CET, end at Mon 2018-12-10 19:40:27 CET. --
Dec 10 12:51:38 ubuntu01 systemd-journald[479]: Journal started
Dec 10 12:51:38 ubuntu01 systemd-journald[479]: Runtime journal (/run/log/journal/265c93c062bf4c8da41abfe2ae793452) is 4.7M, max 38.3M, 33.5M free.
Dec 10 12:51:38 ubuntu01 systemd-journald[479]: Time spent on flushing to /var is 7.066904s for 132 entries.
Dec 10 12:51:38 ubuntu01 systemd-journald[479]: System journal (/var/log/journal/265c93c062bf4c8da41abfe2ae793452) is 128.0M, max 256.0M, 128M free.

You can either

Disable the service (not recommended)

Then it is possible that not all log data is written to disk; annoying when debugging boot faults. Journald is a fundamental service in systemd linux and many other services depends on it.

Verify the journal file for internal consistency:
 journalctl --verify

Look out that every journal shows up PASS.

Use a journalctl --vacuum command

From journalctl -h

--vacuum-size=BYTES     Reduce disk usage below specified size
--vacuum-files=INT      Leave only the specified number of journal files
--vacuum-time=TIME      Remove journal files older than specified time

Hence do a
    sudo journalctl --vacuum-size=1G --vacuum-time=5d --vacuum-files=5

Change  storage type of systemd-journal-flush.service

First check your storage type with
     systemctl cat systemd-journal-flush.service  | grep -i storage

From man journald.conf

Storage=
Controls where to store journal data.
One of "volatile", "persistent", "auto" and "none".
If "volatile", journal log data will be stored only in memory, i.e. below the /run/log/journal hierarchy
(which is created if needed).
If "persistent", data will be stored
preferably on disk, i.e. below the /var/log/journal hierarchy (which is created if needed), with a fallback to /run/log/journal (which is created if needed), during early boot and if the disk is not writable.
"auto" is similar to "persistent" but the directory /var/log/journal is not created if needed, so that its existence controls where log data goes.
"none" turns off all storage, all log data received will be dropped.
Forwarding to other targets, such as the console, the kernel
log buffer, or a syslog socket will still work however. Defaults to
"auto".

Edit the file
    sudo nano /etc/systemd/journald.conf

In the journal section uncomment and alter:
    Storage=auto
    SystemMaxFileSize=1G
    SystemMaxFiles=5

Recommentation
I recommend to limit the size of the SystemMaxFileSize key to 20MB -->
    SystemMaxFileSize=50M

Finally, in case your Ubuntu is not running on an important server, I suggest to change the data storage to volatile:
    Storage=volatile

If you run the boot in debug mode and trace the system calls (strace) you may found out that the flush writing has a very poor i/o performance. In my case it was unclear why. Maybe some kernel messages spam the log file (note that after 10000 messages the unit is blocked per default, but journald has to manage this, which maybe cause the poor performance). In that case step over the messages and search for errors, which haven't necessarily marked as errors.
    journalctl -b --output short-monotonic

and
    journalctl -b -p 1..4 --output short-monotonic

The --output short-monotonicflag prints the time steps in contrast to the default utc time.
Finally remove the old log files by
    sudo rm -rf /var/log/journal

Save & reboot.


Do I need to install apache2-mpm-worker libapache2-mod-fcgid php5-cgi like I used to in previous versions of Ubuntu?

For apache2-mpm-worker, no, you do not need to install this package, as the package now includes just a doc file.

For libapache2-mod-fcgid and php5-cgi, you still may need to install these packages. The libapache2-mod-fcgid package adds a mod file and an HTML and XML file, while the php5-cgi package installs a conf file and an executable.

I would suggest trying to enable and use the mod first before installing the other packages.


The phone images use GStreamer for media, yes. The supported API for building a phone app which uses the camera or microphone, however, is not GStreamer directly. It is the Qt multimedia APIs via the QML API.


Why don't custom colour settings in LXAppearance affect all applications?

Short answer, no

Because, as you noticed, not all apps respect/use the system theme. This is not only about colors: other aspect of themes, like window decorators, are not used by all apps.

For example, take Chromium Browser, the free version of Chome. Notice how it's window borders and title bar are completely different from other apps. Chromium uses its own, custom widgets for its UI, and it's completely unaware of system theme.

So perhaps you're experiencing a similar issue with your apps. And unfortunately you cannot avoid id. But you can fill a bug report asking the developers to try to follow the system theme, if possible.


I was struggling with this on Ubuntu Gnome 16.04 and I tried this:

nm-connection-editor

This will open GUI for network-manager and there was new button and create SSTP connection there.

Original post


Intsalling ruby 1.9.3-p551 on Ubuntu 18.04

This worked for me

sudo apt install libssl1.0-dev
curl -fsSL https://gist.github.com/FiveYellowMice/c50490693d47577cfe7e6ac9fc3bf6cf.txt | rbenv install --patch 1.9.3-p551

Found it in the link below.

https://stackoverflow.com/questions/51986932/debian-9-rbenv-ruby-1-9-3-openssl-not-available


Gnome 3 displays the Switch User option only when you have multiple normal user accounts on your system with a user id between 1000 and 29999 (Debian, Ubuntu).

If you want to switch to a user account within the reserved id range of your distribution, you can lock the screen with Super+L or Ctrl+Alt+L and click on Log in as another user below the login form.


Single mouse clicks behaving as double clicks?

I've just found the bug report here. Bryce seems to suggest that it might be a Nvidia issue (that's how it has been filed since).

But yes, try another mouse. Try a different version of the nvidia driver (you can update to the x-swat PPA for the latest versions -- or install it manually) and if you're at your wits' end, splash out a monkey load of money on a £300 motherboard, £100 mouse and £150 SSD. If nothing else, it'll give you some retail therapy.

This effected me in 9.10 and I did my upgrade some time before moving to 10.04 so this could easily be completely unrelated.


issue while upgrading from 14.04 LTS to 16.04 LTS?

In case something bad happens next time, you can almost always drop into "text mode" by pressing Ctrl + Shift + F1 (or F2 or F3 or F4). It can take a second, so don't be too hasty. Mostly you can go back to your graphical session using Ctrl + Shift + F7 if it is working. You can fix most things in that simple terminal then. For tabs in the terminal, I use tmux and for very simple, text based browsing w3m or lynx (just as a tip), so make sure, you have them installed.

In your case, I would wait for the 16.04.1 release, since the initial bugs, like for specific hardware and upgrade circumstances, get fixed there. That point release also gets offered to users of the previous LTS release.

You can read more here: How do I upgrade from 14.04 LTS to 16.04.1 LTS?


After waking from hibernation/suspend, screen displays noise pattern

Do you have hybrid graphics with an NVIDIA card on your system? If so, maybe try installing the NVIDIA graphics drivers. I had similar problems which were resolved upon installing the proprietary NVIDIA drivers. Steps to install the driver
This might not be the best solution, but it seemed to work for me.
Cheers!


USB drive became mounted as read-only after being unplugged while still copying

Assuming you don't mind losing anything on the affected disk, you should:

Unmount /dev/sdc
create a partition table on the disk in gparted (available from the Device tab).
If you are not sure what type of table to use, go with the default (usually GPT or msdos).
you will now see unallocated space on the disk. In this space, make a new partition,
change the filesystem drop down to the filesystem of your choice (from your screenshots, it appears you want NTFS).

If this goes well, you should then be able to use your flash drive again.


I just reinstalled rake and zsteg and it worked for me.

make sure you have ruby-dev
update --system
sudo gem install rake
sudo gem install zsteg


How can I get all of my GMail directories to appear in Thunderbird?

According to this source, Gmail uses a special implementation of IMAP. In this implementation, Gmail labels become Thunderbird folders. When you apply a label to a message in Gmail, Thunderbird creates a folder with the same name as the label and stores the message in that folder. Similarly, if you move a message to a folder in Thunderbird, Gmail will create a label with the folder name and assign it to the message.

You should switch to IMAP if you're using POP3 and, in "Server Settings" for the GMail account, select "Advanced..." and then uncheck "Show only subscribed folders".


If it happens only while installation of programs then it is probably a network problem. Otherwise I have no clue.

Hope this helps Ben


How do I make sure that Canonical get affiliate benefits when I buy from amazon?

First of all note that it's not just Amazon. It's a shopping lens, which can be used for numerous backend stores, of which Amazon is one.

The Amazon affiliate referral happens if you've arrived at the Amazon property via a 'tagged' link. Both links clicked via the dash which go to Amazon sites, and the shortcut in the launcher will add the tag. The tag adds a cookie which lasts for 24 hours. If you buy anything during that period, Canonical will get some affiliate revenue.

Personally I've just "pinned" a tab in my browser (i.e. opened whenever I open the browser) which goes to http://www.amazon.co.uk/?tag=u1webapp-uk-21 (which is right for the UK, but will differ for other territories) which ensures the cookie is always there for me. So even if I don't follow links via the dash or use the launcher, I still give revenue to Canonical (my employer ;) ).

For the US: http://www.amazon.com/?tag=u1webapp-20
For Canada: http://www.amazon.ca/?tag=u1webapp-ca-20
For Germany: http://amazon.de/?tag=u1webapp-21

I also do this on 12.04 where I don't have the shopping lens installed.


How can I start a process with a different name?

You can use the exec shell builtin:

bash -c "exec -a MyUniqueProcessName <command> &"

<command> replaces the current shell, no new process is created, that's why I'm starting a new shell to call exec.

Then you can kill the process with:

pkill -f MyUniqueProcessName

You can start more than one process under the same name, then pkill -f <name> will kill all of them.


Failed to fix broken packages in Ubuntu 16.04

I managed to solve it.

I pressed Ctrl + C to stop the process and then I saw:

File to patch: ^Cdpkg: error processing package ros-kinetic-librealsense (--configure):
 subprocess installed post-installation script was interrupted
dpkg: dependency problems prevent configuration of ros-kinetic-realsense-camera:
 ros-kinetic-realsense-camera depends on ros-kinetic-librealsense; however:
  Package ros-kinetic-librealsense is not configured yet.

dpkg: error processing package ros-kinetic-realsense-camera (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-turtlebot-bringup:
 ros-kinetic-turtlebot-bringup depends on ros-kinetic-realsense-camera; however:
  Package ros-kinetic-realsense-camera is not configured yet.

dpkg: error processing package ros-kinetic-turtlebot-bringup (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-turtlebot:
 ros-kinetic-turtlebot depends on ros-kinetic-turtlebot-bringup; however:
  Package ros-kinetic-turtlebot-bringup is not configured yet.

dpkg: error processing package ros-kinetic-turtlebot (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-turtlebot-teleop:
 ros-kinetic-turtlebot-teleop depends on ros-kinetic-turtlebot-bringup; however:
  Package ros-kinetic-turtlebot-bringup is not configured yet.

dpkg: error processing package ros-kinetic-turtlebot-teleop (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Errors were encountered while processing:
 ros-kinetic-librealsense
 ros-kinetic-realsense-camera
 ros-kinetic-turtlebot-bringup
 ros-kinetic-turtlebot

I used: sudo dpkg --purge <the packages which could not be processed>

And then: sudo apt install debian-keyring linux-source-4.15.0
(4.15.0 is the kernel version)


Issues installing NGINX on AWS Ubuntu 16.04 on a new VPC

To fix your problem run

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nginx_1.12.0-1~xenial_amd64.deb

check everything is fixed by running :

sudo apt-get -f install


As suggested, the command inside the numlock.sh script was wrong, probably because before the shutdown you can't rely on a X based command

A script like this works perfectly

#!/bin/bash

for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done

Actually I changed the UNIT file to simplify, it won't need a script now.

[Unit]
Description=Turn off numlock at shutdown

[Service]
ExecStart=/bin/bash -c "for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done"

[Install]
WantedBy=multi-user.target


Vim macro broken after switching from Gnome Terminal to Byobu

I assume the ^[OH and ^[OB are intended to be home key and down arrow? In that case, why not use the 0 and k motions directly:

let @l='^[I
^M^[0k'

Or, condensing the I + Enter to O:

let @l='^[O
^[0k'

(Or ^ in place of 0, depending what you intended to do.)


/etc/network/interfaces doesn't always take affect

Try this interfaces file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 173.213.192.234
    netmask 255.255.255.248
    gateway 173.213.192.233
    dns-nameservers 8.8.8.8

auto eth1
iface eth1 inet static
    address 10.0.0.106
    netmask 255.255.255.0
    up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.0.0.1
    up route add -net 172.16.0.0 netmask 255.240.0.0 gw 10.0.0.1
    up route add -net 192.168.0.0 netmask 255.255.0.0 gw 10.0.0.1

This will redirect all local traffic to 10.0.0.1 and Internet to 173.213.192.233.


How to easily keep Virtual Box up-to-date

Virtualbox has Ubuntu-friendly repositories available as described on their website.  To repeat their directions (focusing on Focal):
Add the following line to your /etc/apt/sources.list:
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib
The Oracle public key for apt-secure can be downloaded and added with:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
To install VirtualBox, do
sudo apt-get update
sudo apt-get install virtualbox-6.1

This will now be updated along with your normal system updates.


It's just an ordinary loopback IPv4 address... All IPv4 addresses begining with 127 are loopback addresses.

Ubuntu 17.10 uses systemd-resolved as the default local caching name resolver; using a rarely used loopback IPv4 address enables it to coexist with other local caching resolvers. As far as I know no other well-known application uses 127.0.0.53 by default.


Ubuntu 14.04 LTS doesn't recognize CDROM/DVD device

The Optiarc AD 5540A can be a bit flaky. You might want to replace it with a more recent drive as it doesn't appear that Optiarc is offering firmware updates for it ATM.

If your the adventurous sort and want to try out different firmware on the drive (which came out in 2006) there are a number of possibilities listed here.

Note: Changing the firmware on a device can have unpredictable results and I don't recommend doing it unless you are prepared to pitch it in the bin if something goes awry.

Sources:

http://www.sony-optiarc.us/endoflifeproducts/dvddrives/slim/ad5540a.html
http://www.postseek.com/meta/dee33ebab1ad80e6ba438b14230396d0


The first error ([sde] No Caching mode page found [sde] Assuming drive cache: write through lvmetad is not active yet, using direct activation during sysinit /dev/mapper/ubuntu--vg-root: clean, 233862/13139968 files) you fix by changing the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" in /etc/default/grub. The second error isn't really a error at all, it is just a warning. If you want it to go away, enable ECC in your BIOS. I don't have this though and never have seen it so it may have side effects. It is a option for your RAM.


Cron creating empty files in the root directory

Why?

Because this is what wget command is doing and because your cron job call wget at every minute. From man wget:

  GNU Wget is a free utility for non-interactive download of files from the Web.

It creates files with 0 bytes because probably script.php does not return nothing in non-interactive mode.

How to stop creating these files?

Run in terminal next command to open the crontab file:

crontab -e

and delete or comment the line:

* * * * * /usr/bin/wget -q https://domain/script.php

Save the crontab file and close it.

Or just simple use:

crontab -r

to remove your crontab file.

If you want to make the cron job only to access https://domain/script.php every minute, then use curl, ping or maybe lynx. For example:

* * * * * curl https://domain/script.php

More about: http://v1.corenominal.org/howto-setup-a-crontab-file/


How do you update the DNS resolver configuration without causing downtime?

If you absolutely can't have resolv.conf be in an inconsistent state, here's what I did:

The "state" of the resolver generated from the dns- lines in your /etc/network/interfaces is stored in /var/run/resolvconf/interface/(interfacename).inet - this file was truncated.
The same data (search, nameserver, etc, same stuff that's in a completed resolv.conf) was copied into /etc/resolvconf/resolv.conf.d/tail (the tail file had to be created), with an appropriate comment added so anybody that comes along later can see what happened.
The dns lines in /etc/network/interfaces were commented out
And finally run resolvconf -u to regenerate the /etc/resolv.conf from the tail file

This has the effect of:

Decoupling the resolver settings from the network interface (which if you're on a single interface box is needlessly annoying)
Placing the resolver settings in a single purpose text file (the tail file)
Making the changes take effect immediately
..and having them persist after a reboot
And re-generating the system wide /etc/resolv.conf with resolvconf's notification mechanism intact.
...with no downtime :D


check the settings,it could be set to only accept long term release upgradesyou can upgrade using the do-release-upgrade command
the technical answer to the subject is /usr/bin/update-manager


How do I get a Rosewill USB wireless adapter RNX-N180UBE working?

Found install documentation here:

http://www.rosewill.com/rosewill-rnx-ac1200ube2-11ac-wireless-usb-ac1200-wi-fi-adapter.html#product_tabs_Downloads

Download and unzip the file.
Includes readme and install.sh.
Will work on this now.
Will not always be using the USB adapter.


I see you have started already excluding certain paths from your backup, with --exclude.  One of the most useful rsync flags I have found is -F which simply allows you to place such lists of exclude file-patterns anywhere in your source tree.

For example, I have many directories where there are C files I want to backup but not the objects, or git directories where I don't want the .git backed up, etc.  In any directory I can place a file .rsync-filter which holds patterns, just like --exclude, for that directory (and all sub-directories as usual depending on your pattern).  rsync -F will look for these files and obey the exclusion (or inclusion) rules in them.

The filter rules are a bit hard to master, but if you stick to simple cases, and always test with a -nv you can trim down your backups to something small and useful.


Missing php.ini after apt-get install php5

Run sudo updatedb in your terminal and try locate php.ini.

Or you can find php.ini under /etc/php5/apache2 or /etc/php5/cli/.


reducing existing installation to minimal

The difference between the minimal and the normal installation options is just that canonical removed a few packages from being installed by default. The difference is fairly small, around 400mb in total installation size. You can simply remove the packages that you do not need with sudo apt remove PACKAGENAME or sudo apt purge PACKAGENAME.

To answer the question, here is a list of all the packages that have been removed if you install the 18.04 with the minimal option. A similar list for ubuntu-mate can be found here.

# This is a list of packages to be removed when the 'minimal' option is
# selected during installation.

# Note that the format is NOT the same as the usual seed format. This file is
# not processed by germinate - it is simply downloaded during image builds.

# Desktop apps
thunderbird
transmission-gtk
gnome-todo
baobab
rhythmbox
cheese
vino
shotwell
totem
usb-creator-gtk
deja-dup
gnome-calendar
remmina
simple-scan

# Desktop experience
thunderbird-gnome-support

# Games
aisleriot
gnome-mahjongg
gnome-mines
gnome-sudoku
branding-ubuntu

# Libreoffice
libreoffice-style-breeze
libreoffice-gnome
libreoffice-writer
libreoffice-calc
libreoffice-impress
libreoffice-math
libreoffice-ogltrans
libreoffice-pdfimport

# Others
example-content
ubuntu-web-launchers

# Langpacks (keeping libreoffice and thunderbird installed otherwise)
libreoffice-l10n-en-gb
libreoffice-l10n-es
libreoffice-l10n-zh-cn
libreoffice-l10n-zh-tw
libreoffice-l10n-pt
libreoffice-l10n-pt-br
libreoffice-l10n-de
libreoffice-l10n-fr
libreoffice-l10n-it
libreoffice-l10n-ru
libreoffice-l10n-en-za
libreoffice-help-en-gb
libreoffice-help-es
libreoffice-help-zh-cn
libreoffice-help-zh-tw
libreoffice-help-pt
libreoffice-help-pt-br
libreoffice-help-de
libreoffice-help-fr
libreoffice-help-it
libreoffice-help-ru
libreoffice-help-en-us
thunderbird-locale-en
thunderbird-locale-en-gb
thunderbird-locale-en-us
thunderbird-locale-es
thunderbird-locale-es-ar
thunderbird-locale-es-es
thunderbird-locale-zh-cn
thunderbird-locale-zh-hans
thunderbird-locale-zh-hant
thunderbird-locale-zh-tw
thunderbird-locale-pt
thunderbird-locale-pt-br
thunderbird-locale-pt-pt
thunderbird-locale-de
thunderbird-locale-fr
thunderbird-locale-it
thunderbird-locale-ru

# Unused rdepends
gir1.2-rb-3.0
gir1.2-totem-1.0
gir1.2-totemplparser-1.0
guile-2.0-libs
libabw-0.1-1
libavahi-ui-gtk3-0
libdmapsharing-3.0-2
libexttextcat-2.0-0
libexttextcat-data
libfreehand-0.1-1
libgnome-games-support-1-3
libgnome-games-support-common
libgom-1.0-0
libgrilo-0.3-0
liblangtag-common
liblangtag1
libmessaging-menu0
libmhash2
libminiupnpc10
libmwaw-0.3-3
libmythes-1.2-0
libnatpmp1
libneon27-gnutls
liborcus-0.13-0
libpagemaker-0.0-0
librdf0
libreoffice-avmedia-backend-gstreamer
libreoffice-base-core
libreoffice-common
libreoffice-core
libreoffice-draw
libreoffice-gtk3
libreoffice-style-elementary
libreoffice-style-galaxy
libreoffice-style-tango
libraptor2-0
librasqal3
librevenge-0.0-0
librhythmbox-core10
libtotem0
libvisio-0.1-1
libwpd-0.10-10
libwpg-0.3-3
libwps-0.4-4
libyajl2
python3-uno
rhythmbox-data
rhythmbox-plugin-alternative-toolbar
rhythmbox-plugins
remmina-common
remmina-plugin-rdp
remmina-plugin-secret
remmina-plugin-vnc
duplicity
seahorse-daemon
shotwell-common
totem-common
totem-plugins
transmission-common
cheese-common
gnome-todo-common
libgnome-todo
gnome-video-effects
libcheese-gtk25
libcheese8
uno-libs3
ure
zeitgeist-core
hunspell-de-at-frami
hunspell-de-ch-frami
hunspell-de-de-frami
hunspell-en-au
hunspell-en-ca
hunspell-en-gb
hunspell-en-za
hunspell-es
hunspell-fr
hunspell-fr-classical
hunspell-it
hunspell-pt-br
hunspell-pt-pt
hunspell-ru
hyphen-de
hyphen-en-ca
hyphen-en-gb
hyphen-en-us
hyphen-fr
hyphen-hr
hyphen-it
hyphen-pl
hyphen-pt-br
hyphen-pt-pt
hyphen-ru
mythes-de
mythes-de-ch
mythes-en-au
mythes-en-us
mythes-fr
mythes-it
mythes-pt-pt
mythes-ru


In an UEFI PC, ubuntu identifies such PC and while installation suggest the type and nature of partitions you need to create to work in UEFI mode.


How do I preload a program for faster start?

install the preload package

with a console type :

sudo apt-get install preload

And that's it. THe package will preload the applications the most used applications after calculating the usage statistic.

preload an application use ram memory and behave differently than "cold" or "warm" start an application.

Preload = putting everything in memory from the hard drive. Your application is garanteed to be run as fast as possible.
Cold Start = loading from hard drive to the memory
Warm Start : reusing what's left on memory and load what's missing from hard drive to ram memory. Your application may run faster if linux didn't had to empty the corresponding cache for another app.

The Cold Start impact is due to the hard drive speed and latency. You can purchase a good SSD drive in order to speed up cold start (it has a real overall impact on the latency of the system)

Best regards.


Sudo comes up with an error, cannot run anything as root

If you can login as root:

$ su root     #enter password
$ chmod 644 /usr/lib/sudo/sudoers.so
$ chown -R root /usr/lib/sudo

If not, you'll have to startup in recovery mode, get write permission on your disk, and change the mode of that file. https://wiki.ubuntu.com/RecoveryMode

$ mount -o remount,rw /
$ chmod 644 /usr/lib/sudo/sudoers.so


Problem in setting GUI to Ubuntu 14.04-Failed to fetch problem

You have a network problem. The InRelease thing is the consequence. Your system can't fetch the GPG key and for this reason it tries to use the InRelease file instead of the Release file and of course, also fails.

  InRelease files are signed in-line while Release files should have an accompanying Release.gpg file.

Source


How do i uninstall kde packages with unmet dependencies?

Download the needed package and force the installation:

apt-get download ppa-purge
sudo dpkg -i --force-all ppa-purge*.deb

Purge the PPA and the desktop, as you say in your question:

sudo ppa-purge ppa:kubuntu-ppa/backports
sudo apt-get remove kubuntu-desktop

Perhaps not necessary but also not a bad idea:

sudo apt-get install -f


I want to make this clear first by saying that i have never tried Photoshop on Wine but in years my Wine can play games can execute almost any software and many thing due to the good configuration that i have made and of course the changes that the community made over the years, so with this in mind you can try to configure your Wine according to mine.

Is not bad to do other thing beyond photoshop right?

There are four main reason that probably photoshop is not working:

1. Try the latest Wine see how: https://wiki.winehq.org/Ubuntu

To find out your version type in terminal: wine --version

*Remove the older version first IF you using an older version before you install the new one.

2. Open winetricks and check what you are missing to make photoshop work:

Choose "Select the default wineprefix" click OK and then "Install a Windows DLL or component" click OK

See if you got those:

directx 9&10&11,
devenum,
directmusic,
directplay,
dmsynth,
dotnet,
dsound,
dxdiag,
gdplus,
msc42,
msctf,
msls31,
msvcirt,
msxml3,
msxml4,
pngfilt,
quartz,
riched20,
riched30,
vb6run,
vcrun2005,
vcrun2008,
vcrun2010,
vcrun2012,
vcrun2013,
vcrun6,
wininet,
wsh56vb,
xact,
xact_jun2010,
xinput,
xmllite.

Now click on Cancel and choose "Change settings" and enable "ddr=opengl" now press cancel a couple of times until the Winetricks quits.

3. Check the paths in Wine menu configuration:

Note: If you installed the new version of Wine open your file manager and choose to view hidden folders and go to directory /home/yourusername/.wine/drive_c/windows/system32 and make a shortcut of the file " winecfg.exe" on your desktop or run it from terminal by typing winecfg

Now at Tab "Desktop Integration" and also the tab "Drives" are the paths-folders as it should be?

4. Use Wine as "Windoze xp" from tab "Applications.

Tip: Remember to backup your .wine folder from directory /home/yourusername so you don't need to do all this everytime, also you can use the folder for feature use and also for sharing with other users.

Now always make sure to scan time to time this folder with clamtk-gnome (Nautilus Menu Provider extension ) & clamtk (the clamav front-end) and everytime you download an *.exe file.

You can find clamav & clamtk & clamtk-gnome in Synaptic Package Manager and always keep up with latest Virus Definitions by typing in terminal: sudo freshclam


The problem is that ownership of your file is: user=root group=erelsgl.

User root belongs to root group.

So to fix your problem:

   chown root:root <filename>
   chmod u+s <filename>

After that you can remove sudo directive in your  script.

I tested this on lubuntu 12.04.

Another better approach to this kind of problem is configure sudoers. Here is an example.


Yes.  I installed Ubuntu 14.04 LTS Server onto my Lenovo TS140 with E3-1225 cpu.  I have 2 identical 32gb SSD drives that were partitioned as RAID1 as part of the installation process.


Ubuntu 14.04 Login Loop problem after appending .profile file in home folder

I'm guessing you wanted to be able to run commands in your current working directory without typing the prepending ./? Oh well, this is still fixable.

You've only messed up your own user profile, so we can use the root account to repair this damage. First off, you're going to want to boot into recovery mode on your system. From there, select the option that says root, which will drop you into a usable terminal.

From there, you want to cd to your user's home folder (/home/<your username>, the ~ shortcut will not work here). From there, edit your .profile file with something like nano or vi. Delete the line containing:

export PATH= .:$PATH

Be sure to also check .bashrc, .bash_profile and similar files just to be sure. Remove the same line there (if they exist).

If you do want to try this again, be careful to not include spaces in the profile, and be sure to add the . to the end, like so:

export PATH="$PATH":.


How to use ZTE AX326 Modem on Ubuntu 10.10?

there is an answer for that ;-)

http://unix-master.blogspot.com/2013/02/zte-ax326-4g-modem-drivers-for-linux.html


I'm seeing the same issue. I think it's related to using the version of ubuntu-emulator that comes with the Ubuntu SDK instead of grabbing it from the phablet-team/tools PPA.

That is my best guess based off of this howto. http://www.webupd8.org/2014/03/ubuntu-touch-emulator-installation-and.html


A couple of minor issues after upgrading to Ubuntu 14.04

1). For desktop, find the file in /usr/share/applications/ - it'll likely be called "dropbox.desktop"

find the line that reads: Icon= and either change it to the full path of your own icon, or simply pop open GIMP and scale down the icon where it sits.

2). For Variety, I would recommend using something officially endorsed, such as the Automatic Wallpaper Changer , or try one of these applications


install ati radeon 2400 hd pro on ubuntu 13.04

Legacy drivers for these cards are available. Unfortunately these legacy drivers (version 12.6) have not been updated.

So if you want to install these drivers, you have to downgrade to xorg 1.12.  To do that, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install fglrx-legacy

If you encounter any problems with these drivers, you can remove these drivers, by running following commands:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:makson96/fglrx

Source:Launchpad


Depends of your FTP server, but most log files are in /var/log. Most servers just log errors and warning by default, so I'm not entirely sure you can find the log of file transfers since they would tend to take too much space.

You can use also locate to find them in case you have an idea of what are they called, like ftp.log.


Ubuntu home network can't connect to firefox server

Ubuntu 18.04 does not work with eth0 or eth1 (example: enp2s0, wlp1s0, etc) and does not work with /etc/network/interfaces (See Yaml)

Create a file:

/etc/netplan/config.yaml

And add your localnet config. Example:

# Let NetworkManager manage all devices on this system (networkd)
network:
  version: 2
# change to "networkd" if you don't want to use NetworkManager
  renderer: NetworkManager
  ethernets:
    enp2s0:
# change dhcp4 to "no" if you want to use static IP. See http://yaml.org/type/bool.html
      dhcp4: yes
      dhcp6: no
      #addresses: [192.168.88.13/24] # uncomment and replace with your static IP/Netmask
      #gateway4: 192.168.88.1 # uncomment and replace with your gateway
      #nameservers:
      #addresses: [8.8.8.8, 8.8.4.4]  # uncomment and replace with your dns
   enp2s8:
      dhcp4: no
      addresses: [192.168.0.10/24]

You must validate this content first in yamllint

For more information visit NetPlan


It's this bug. One way to fix it is to download ttf-mscorefonts-installer from Debian and install that package.


The reason assigning a mac address worked is because you had several networks that your computer was picking up all at or stronger then your connection so your computer was roaming continually from the strongest signal network to the next.

BSSID is the MAC address of your router.

The other MAC address is the MAC address of your wireless device.


14.04 LTS Ubuntu wifi stops working and disconnects after few minutes from rebooting

As line 2 of your log output:

tail -f /var/log/{messages,kernel,dmesg,syslog}

contains a

CTRL-EVENT-DISCONNECTED bssid=d8:5d:4c:d5:52:47 reason=3 locally_generated=1

and it happens about 5 minutes after log-on, I strongly believe it to be power-savings related.  Therefore type the following command:

sudo iw dev wlan0 set power_save off

to turn off wlan power savings.


How can I boot a live system from a hard disk and then install to the same drive?

Installating to a different partition than the boot-partition, or to an unpartitioned space should be possible without issue. Make sure the partition to install is not mounted.

Nevertheless, and because you seem to be unable to use additional partitions on this hard drive, think of plugging the drive into another computer, where you have access to the Internet for installation. For safety reasons unplug any other hard drives on this computer.

This will not only let you install Lubuntu smoothly, but it will additionally give you the advantage of installing all updates, additional applications, or drivers you may need.

After all is setup you can then plug the drive back in to your laptop.

Related questions:

How to install Ubuntu without a CD and a USB?
Can I install Ubuntu on the same hard drive I booted with?


It looks like the metadata on the drive are still there. You can first use 'lsblk' to check if all the Raid member drives for /dev/md0 are still appear in the system, if they do appear, try using 'mdadm -A -s' for automatically assemble the Raid Volume.

If failed, you can try to assemble them by yourself using 'mdadm -A /dev/md0 /dev/XXX /dev/YYY'. /dev/XXX /dev/YYY are the drive that original /dev/md0 using.

After that, you can use 'mdadm -E -s > /etc/mdadm.conf' to create the raid metadata file, system will use the info base on this file to assemble Raid Volumes during reboot.

Stop and Reassembly Raid Volume won't cause data loss.


update mod-wsgi in apache on Ubuntu server

Run the following command:

sudo apt-get install libapache2-mod-wsgi


How to change root's shell back to bash?

Assuming that you have not modified the path or created symlink, the default path to the bash binary is /bin/bash, not /usr/bin/bash.

The error is occurring because you have set the root's shell as /usr/bin/bash in /etc/passwd like:

root:x:0:0:root:/root:/usr/bin/bash

You need to change that to /bin/bash:

sudo usermod -s /bin/bash root

or do:

sudo vipw

and make the modifications manually.

You can obviously choose any other shell of your choice, just make sure that the path is correct. A common place to look for shell paths is /etc/shells file which contains the full paths to all the valid login shells on the system.


JUJU botstrappin stuck on fetching juju releases 1.20.11 .... please help

Try this:

wget -c https://streams.canonical.com/juju/tools/releases/juju-1.20.11-trusty-amd64.tgz

sudo mkdir -p /var/www/html/juju-metadata/tools/releases

mv juju-1.20.11-trusty-amd64.tgz /var/www/html/juju-metadata/tools/releases

sudo juju --debug metadata generate-tools -d /var/www/html/juju-metadata

sudo chmod 644 /var/www/html/juju-metadata/tools/streams/v1/*

Now in your ~/.juju/environments.yaml file you will need to specify the URL of your newly shared tools:

default: maas

environments:

maas:

type: maas

maas-server: 'http:///MAAS/

maas-oauth:

tools-metadata-url: http://YOUR IP/juju-metadata/tools`


The DNS Servers are managed by systemd-resolved, or by dnsmasq (if you have that installed).
If dnsmasq is installed, you must edit /etc/systemd/resolved.conf, else you'll have two DNS mechanisms fighting for port 53, so...
change:
#DNSStubListener=yes

to this:
DNSStubListener=no

/etc/resolv.conf normally contains 127.0.0.53, which is the local address for the local DNS mechanism. Do NOT manually edit this file (it says so right in the file itself).
To view what actual DNS servers are being used, do this...
resolvectl status | grep -i "DNS Serve"

More than likely it'll report 192.168.0.1 (the address of your router, or the DNS servers of your VPN service, if you use a VPN). Your router will probably use your ISP's DNS servers, unless you've manually changed that in your router's admin config page (highly recommended).


Can't get Optimus to work with Ironhide on an Asus N53SN

try running .. and then reboot

rm /etc/pm/power.d/ironhide-disablecard-on-powerup

After reboot run optirun glxgears. See if it works,

Also I suggest using xorg edgers ppa to get latest module for nvidia


Tor: Relay configuration issue "Could not bind to 0.0.0.0:443: Permission denied"

You can't bind lower ports without root permission.
You have to do this to do so.
sudo setcap CAP_NET_BIND_SERVICE=+eip /path/to/binary

For me it worked fine but there are also other ways.

For more Information and a better explanation read this.
https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443


Ubuntu-gnome now alone on harddrive, how to remove multiboot menu

Open a terminal and run the following command -

sudo update-grub

This will re-generate the grub config files so that only valid entries exist.

Note - You need a bootloader like grub or syslinux if you wish to boot into Ubuntu. Therefore, you must not remove grub itself, as suggested in the question.


Ubuntu 12.04LTS - Dash home application question mark icon

I have discovered the reason:

ls -all

drwxr-xr-x  3 root root 4096 nov 10 18:04 google
drwxr-x---  7 root root 4096 nov 11 12:28 PhpStorm
drwxr-xr-x  8 root root 4096 nov 10 21:28 VBoxGuestAdditions-4.2.4

setting up the permissions like the google chrome folder everything works!

drwxr-xr-x  3 root root 4096 nov 10 18:04 google
drwxr-xr-x  7 root root 4096 nov 11 12:28 PhpStorm


So this is actually a known issue with the Razer and is easily resolved with a GRUB change.  The official link for the documentation is here.

https://help.ubuntu.com/community/RazerBlade#Suspend


What is the Google Calendar webapp good for?

Zan, to be honest, it does nothing special. It's no different from the typical calender, rather when integrated in the Firefox it makes it a bit difficult to observe notes because the size of the calender is smaller than the original one. I got rid of it and now using the typical one bookmarked in my browser. Glad that I was not the only one being grumpy about it.

Cheers, Pranayy


Wetransfer with Thunderbird on Ubuntu [Solved]

For reference, I've just upgraded to 60.9.0 on my Ubuntu 18.04 install from the standard repositories, and the FileLink extension now is included by default.


Application Switcher on both monitors in dual-head setup?

Open CCSM. Go to "Ubuntu Unity Plugin", Click on the "Switcher" tab and disable "Bias alt-tab to prefer windows on the current viewport" option.

This should work to display on both monitors.


Sudo apt-get update end with Failed - Ubuntu 16.04

The issue is that you are running Xenial and the PPA only has files for Precise, Quantal and Raring.

Open Software and Updates, click on the 'Other Software' tab, scroll down to find the PPA you added, then select it and click 'remove'.

When you close software and updates, it will prompt you to update your system. Let it and the error should be gone.

Unfortunately, you cannot use this PPA with your version of Ubuntu.

Rob


How to open new tab in Ubuntu Touch browser?

at the bottom side of the screen there's a "(1)". Slide this up and you can find a "new tab".


Why LXPanel 0.5.11 asks for a new dependency in Precise but not in Quantal?

The problem is with the way the version of a build (especially dev version) is displayed.

In Lubuntu Quantal, the LXPanel version that works with only libmenu-cache1 is displayed  as

But in Synaptic Manager it's 0.5.10:

Also,

~$ apt-cache policy lxpanel
lxpanel:
  Installed: 0.5.10+git20120823-0ubuntu1
  Candidate: 0.5.10+git20120823-0ubuntu1
  Version table:
 *** 0.5.10+git20120823-0ubuntu1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages
        100 /var/lib/dpkg/status

I do not know how Launchpad displayed the name of this version, but it could be a dev or otherwise improved version of 0.5.10, although I do not remember manually updating LXPanel in Quantal.

Also, after installing (in Lubuntu Precise) LXPanel for Precise from here, which looks like being a daily build of 0.5.11 (Launchpad named it lxpanel-dev-0.5.11~bzr1306+201301150740~precise1) (which was possible only after installing  libmenu-cache2 for Raring from here) I see that LXPanel "About" says version 0.5.12, while in Synaptic it was displayed 0.5.11.

So, the  dev version installed in Precise is not the same version as the one from the other computer running Quantal, but a newer build that asks for libmenu-cache2, while that quantal version does not.

It seems that LXPanel versions above 0.5.10 need libmenu-cache2.

(But to see the real version of a build one must look in Synaptic or run apt-cache policy lxpanel, because dev builds might show a newer version in "About" section.)


'no active partition found' error after install of Ubuntu 12.04?

I had a similar problem with suse. my harddrive was formatted as GPT. I changed it to MBR and made a new partition system and it seemed to sort it out.


Why is my 20.04 System Sounds volume slider non-functional?

When I used Ubuntu 14.04 a long time ago, I had a similar problem when I used the optical (SPDIF) audio output. The volume was fixed at maximum and there was no way to control it via the computer volume program. But at the time, my impression of digital audio outputs was that you would control it from the audio device you use, which in my case was an amplifier with a dial anyway.
I since have used 18.04 and just switched to 20.04 and use pulseaudio myself. I now use a USB DAC for my computer audio and don't seem to have a problem adjusting the system sounds. One USB headset I had had a volume control on the cable which actually controlled the system volume. Are yours only able to be adjusted by your computer volume?
I'm not sure if any of this will help. I just remember having a similar problem myself years ago.


Why does 18.04 LVM default to 4GB despite more space available?

You mentioned using the live-server installer in the comments. LVM is not supported by the live-server installer. Here is a quote from the Ubuntu Documentation at https://help.ubuntu.com/lts/serverguide/preparing-to-install.html

  Ubuntu Server 18.04 LTS introduces a new installer, the "live server" installer (sometimes called "Ubiquity for Servers" or simply "subiquity") which provides a more .user friendly and faster installation experience. At the time of writing it only supports amd64 processors and does not support LVM or RAID or other more sophisticated storage options, nor does it support reusing existing partitions on the disks of the system you are installing. It also requires access to the Ubuntu archive, possibly via a proxy. The previous, debian-installer based, installer is still available if these  restrictions mean you can't use the live server installer.

You're going to want to re-format your drive and use a different .iso file, as recommended in the comments


Can't open terminal from one of the user accounts

Press CTRL+ALT+F1 and login there with your name and password and then type below command

sudo apt-get install --reinstall gnome-terminal

then try again with relogin/restart.


Change the background of the login screen

The proper way of changing default unity-greeter background is through overriding glib-2.0 schema, as specified in the Lightdm Ubuntu Wiki

The steps are as follows:

Create /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override file with the following contents:

[com.canonical.unity-greeter]
draw-user-backgrounds=false
background='/foo/wallpaper.png'

Run sudo glib-compile-schemas /usr/share/glib-2.0/schemas
Reboot or login to TTY2  (accessed by pressing Ctrl+Alt+F2  ) and run sudo service lightdm restart

This has been tested on my Ubuntu 14.04

Update: November 17 2015

I have put together a script that simplifies the process of changing the greeter background. It has been tested in its final form on two versions of Ubuntu, 14.04 LTS (actual physical machine ) and 15.10 (Virtual Machine )
It can be found in my GitHub


Copy the Unity launcher from one user to all users

You can divide the Unity launcher's items in application launchers and other items; network related, mounted volumes and such. The best is to only copy the application launchers to other users, since the other ones can be user specific and / or vary during the process.

Also note that if you copy a launcher's content to another user, possible local .desktop files (in ~/.local/share/applications) of locally installed applications for example, will not appear in the other user's Unity launcher.

Reading the current launcher's content

Having said that, you can read the current launcher's content by the command:

gsettings get com.canonical.Unity.Launcher favorites

The output is a list of all items from your current Unity launcher.

Setting a new launcher's content

To set a new content for the launcher, the following command is used:

gsettings set com.canonical.Unity.Launcher favorites <list_of_items>

Using a script to copy the launcher to another user's account

If we use a script to fetch the launcher items of the first user, write the result to a file, then log into the another user's account to run the script again (together with the file) to set the content into other user's account, it can be done in no time. The script below is made to do both, depending on the argument you give it (see further below).

How to use

Copy the script below into an empty file, save it as copy_launcher.py
Open a terminal window in the "model user's" account, and run the script with the command:

python3 /path/to/copy_launcher.py get

The get -argument of the command makes the script create a text file: saved_launcher.txt, with the content of your current Unity launcher. The file is created in the same directory as where the script is located.
Copy both the script and the saved_launcher.txt file on (for example) an usb stick, but keep both files together in one and the same directory.
Log into other user's account, open a terminal and run the script by the command:

python3 /path/to/copy_launcher.py set

(mind the set argument)

The script

#!/usr/bin/env python

import subprocess
import os
import sys

command = sys.argv[1]

curr_dir = os.path.dirname(os.path.abspath(__file__))
datafile = curr_dir+"/saved_launcher.txt"

def get_current():
    get_current = subprocess.check_output(["gsettings", "get", "com.canonical.Unity.Launcher", "favorites"]).decode("utf-8")
    return (str([item for item in eval(get_current) if item.startswith("application://")]),
            [item for item in eval(get_current) if not item.startswith("application://")])

def write_saved():
    current_launcher = get_current()[0]
    with open(datafile, "w") as saved:
        saved.write(current_launcher)

def read_saved():
    with open(datafile, "r") as saved:
        return eval(saved.read())

def set_launcher():
    app_section = read_saved(); fixed_section = get_current()[1]
    new_launcher = str(app_section+fixed_section)
    subprocess.Popen(["gsettings", "set", "com.canonical.Unity.Launcher", "favorites", new_launcher ])

if command == "set":
    set_launcher()
elif command == "get":
    write_saved()

If you're done, you copied the Unity launcher from one user to another.


How to connect and copy file to Windows 8 system from Ubuntu 12.04 via network using command line?

For windows I can propose freesshd.
After installing you can transfer file using command

scp root@ip_address_of_server:/path/to/file.txt localfile.txt


You can do that doing this:

1) Open "System Settings"

2) Keyboard Layout

3) Options

4) Alt/Win key behavior then choose "Alt is mapped to right Win, Super to Menu".


This is because mdadm still finds the superblock of the old raid. You can easily delete it running

mdadm --zero-superblock /dev/sdX


If I use && to run two commands - do I need to put sudo in once or twice?

Yes you have to use sudo for each command or

you can use

sudo sh -c "gedit first; gedit second"

Above creates a documets first and second with root privllages. Separate the commands with semicolon ;


Can I have both unity 2d and gnome 3 sessions available?

Ubuntu 11.10 uses Gnome 3 by default and yes, you can easily have both Unity, Unity 2D and Gnome Shell in it. 11.04, however, is based on Gnome 2 and cannot use Gnome Shell without fairly large changes to the system. I would wait until you're comfortable and upgrade to 11.10. Then you can just apt-get install gnome-shell. Unity2D really rocks in 11.10, btw. I know people who actually prefer it to Unity and it's actually understandable, though I prefer Unity myself. Gnome Shell is also very nice in 11.10. :)

I would not recommend using a PPA to get Gnome Shell on 11.04.


I don't know what to do next after I installed Ubuntu using VMware. It goes to a blank screen

That is a tty - a terminal. Press CTRL-ALT-F7 to go back to a graphical interface - or if that is just a black screen, press CTRL-ALT-F1 and type in sudo startx and then press Enter..


How to install Mupen64plus on ubuntu 13.10?

Go into the "Ubuntu Software Center" and search for "Mupen64Plus" and look for "Plugin-based Nintendo 64 emulator (transitional dummy package)" and click "Install" Wait for it to install and then click CTRL + ALT + T and run the following into your terminal 'Mupen64plus' without the quotes... Hope this works! Good luck! (By the way... Mupen64Plus doesn't have a front end so you'll always have to run it in a terminal and give it a path to your rom)


Why can't I connect to Internet from machine root, but can from virtual machine

Resetting the firewall to the default to allow all outbound traffic solved this problem.
sudo ufw default allow outgoing

The mystery as to why this was necessary remains.


Removing window decorations of gnome terminal in Ubuntu 19.04

Open dconf-editor, navigate to /org/gnome/terminal/legacy/headerbar and change it to False to switch back to the previous look (which still has some decoration, provided by your window manager).

You need to restart gnome-terminal (quit all its windows at once) for the change to take effect.


Cant't install any new packages or run upgrade, missing final newline

Try to install mount package manually:

apt-get download mount
sudo dpkg -i mount*.deb

You can check other problematic file-lists with the following command:

grep --color='auto' -P -n "[^\x00-\x7F]" -r /var/lib/dpkg/info/*.list

(may give some false-positives with unicode characters such as ő, but you got the idea).


Why is my python script not running crontab? Everything has full paths, but it still doesn't work

So this has taken me all week to fix. But I have it now. Here's what I did.
There were two separate issues. As @steeldriver said, notify-send doesn't work from crontab without specifying details with the display. I changed that line to export XDG_RUNTIME_DIR=/run/user/1000; /usr/bin/notify-send -u critical "Battery Not on Idle" ""
The other problem was with /usr/bin/tlp-stat -s -c -b. I couldn't get the permissions right for it to run in crontab somehow. It did however run in crontab as root accessed by sudo crontab -e. But... having this as root caused the notify-send to stop working. I spent days and days fiddling, but I ended up having to write two bash scripts, one in sudo crontab -e to get the battery status and output using echo to a text file; and another cronjob in crontab -e to read the output file and display the message if the status wasn't idle.


Problem in install ubuntu on asus laptop

I found a solution for my question.

At the first I loged in as nomodeset and use this command

sudo apt-get update
sudo apt-get install intel-microcode

for solving this

[Firmware Bug] : Tsc-Deadline disabled due to Errata;please update a microcode to version 0x52 (or later)

after that I used this command

apt-get install nvidia-XXX

for solving this

[Firmware Bug] :ACPI region dosent cover the entire command/response buffer.[mem 0xfed 4000 - 0xfed 40487f flags 0x201]vs fed40080fBO

and then restart my Computer

Notice :XXX must change with the latest nvidia driver version (You can use terminal suggestion using tab key)
Finally switch graphics card to intel by launching NVIDIA X Server Settings and select intel graphic card.

Notice: On my computer, I can not launch Ubuntu after turning the computer off, but you must first log in to Windows and then restart. Maybe you'll have this problem as well.


Is constantly mounting another drive safe?

Mounting drive can't cause any bad sectors. This is a physical problem.
Did you confirm it's "bad sectors" vs just "corrupted data"?


Solution for apps that don't scale on HiDPI displays

As olivierb2 pointed out there is no simple, global way to accomplish this. However, I did find a way to perform window scaling on a per-app basis that works very well, but not for all applications.

I found a script called run_scaled that acts as a front end for xpra, which is like screen for X. It basically sets up a second X server scaled to whatever you choose, runs your app, and then forwards it to your primary display. In order to use it you need to install some deps:

sudo apt-get install xpra winswitch xvfb

Install it:

curl "https://raw.githubusercontent.com/kaueraal/run_scaled/master/run_scaled" > ~/.local/bin/run_scaled
chmod +x ~/.local/bin/run_scaled

And after that on a new shell you run your app like so:

run_scaled someapp

If you test your app(s) that you need scaled and it works you can make it a little more user friendly by copying the script to somewhere in your path and editing the .desktop file for your app so it will launch scaled from your DE.

The downside is that this doesn't work with every app. It seemed to work fine for all of the FOSS apps I tried, but non-free apps like Steam and HipChat didn't work. Not a perfect solution, but it can help in a pinch.


How to get copy.com notification icon on Unity on Trusty to work?

It looks like the same issue that has been described in the link below. The issue persists on 13.04 to 14.04. This has been fixed in 14.10 but temporarily you can find the solution here:
Fix Copy.com indicator menu for Ubuntu 14.04/13.10
Hope it helps


Why do I have so many .Xauthority.* files in my home directory?

These are the "cookies" of the X client to allow connection to the X server (displays). It's very clearly explained in the wiki:

  xauth is a mechanism for enforcing access controls on X servers
  (displays). When an X server is started, it is given a
  randomly-generated "cookie". This cookie is written to a file owned
  and readable by the user whose session the X server is running. No
  other users can read that file. When an X client (application) is
  started, it attempts to read and use the cookie to authenticate itself
  with the server. If this "xauth" authentication fails, the application
  is not allowed to connect to the server and show windows on the X
  display.

  The command

  $ xauth list

  will show the cookies available to the current session:

selene/unix:0  MIT-MAGIC-COOKIE-1  c2438e7c2858f142e0b81d6b4fe3867b
localhost.localdomain/unix:0  MIT-MAGIC-COOKIE-1
c2438e7c2858f142e0b81d6b4fe3867b

  Traditionally, the location for each users' cookies has been
  ~/.Xauthority: the X server writes its cookies to that file as it
  starts up, and xauth (and other X clients) look in that file for
  authentication cookies.

Source: https://wiki.ubuntu.com/RemoteXHowTo

And as is shown here, it seems that is a bug of lightdm that doesn't remove the old cookies and pollutes the /home directory.

https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1175023

In fact, I have this problem as you and also with .goutputstream files as is shown in this other bug:

https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/984785

Then yes, you can delete them because if you don't have a cookie to connect to a X server, you are going to create one new.


You can fix that with the "Tweaks" app. Under "keyboard & Mouse", "Additional Options":
Under "Alt/Win key behavior", you have a "Left Alt is swapped with Left Win" option.
Additionally, from the same dialog, I had to select:
"Key to choose the 3rd level", "Right Win".
That's not the only problem I had with this keyboard, but maybe that's because I'm using a French layout. To get the "<" and ">" key working, I had to edit the keymap using this command:
  xmodmap -e "keycode  49 = less greater less greater lessthanequal greaterthanequal lessthanequal greaterthanequal less greater lessthanequal greaterthanequal less greater lessthanequal greaterthanequal"

To make this change permanent, create a file $HOME/.xmodmap.conf containing only:

keycode  49 = less greater less greater lessthanequal greaterthanequal
lessthanequal greaterthanequal less greater lessthanequal
greaterthanequal less greater lessthanequal greaterthanequal


GNOME alternatives / equivalent for Klipper?

You have:

Glipper - Klipper's Brother... for GTK. It has a limited amount of entries (MAX 99 Vs Klipper with 1024) but has nice features like sync different Glippers in the network, smart detection for similar clipboard copies and others. After a couple of versions ago, Glipper is GONE!. What you can do in Ubuntu 18.04+ is install the Gnome Extension Clipboard Indicator here https://extensions.gnome.org/extension/779/clipboard-indicator/

Parcellite - Small clipboard manager. Very nice and simple.

Synergy - You can share clipboard over Network (Including Mouse and Keyboard)

xfce4-clipman / xfce4-clipman-plugin - Klipper's Smaller Brother.. for xfce.

Install by:

sudo apt-get install glipper

sudo apt-get install parcellite

sudo apt-get install synergy

sudo apt-get install xfce4-clipman


How to recover `/usr/lib/jvm` in Ubuntu?

First let's see which package(s) provided the files in that directory:

$ dpkg -S /usr/lib/jvm
openjdk-8-jre-headless:amd64, default-jre-headless: /usr/lib/jvm

(please check on your own system - the exact packages may be different)

Then reinstall those packages (replace with your own results):

sudo apt install --reinstall openjdk-8-jre-headless:amd64 default-jre-headless

Now /usr/lib/jvm is back


There is a discussion from some months ago that addresses the same question. Are there plans for system-wide smooth scrolling?


Is it safe to disable or remove the Keyring in Ubuntu 18.04LTS since the last update broke it?

I removed ubuntu-keyring and gnome-keyring packages from my bionic installation. It broke my xserver. Trying to fix it now. Will update when it works.

So please do not remove the packages.


Try to boot into the live cd (click try Ubuntu without installing) but pass the kernel this parameter: pci=noaer to disable PCIE Advanced Error Reporting. If you can get booted then you can try to find out which PCIE device is causing the errors.  It is hard to tell from the video you posted what is actually going on in detail.  You may also consider checking what values (for PCIE) can be adjusted in your system's bios.


Editing remote files via SSHFS mount very slow (Sublime Text)

One thing to try is to open your user preferences (Preferences -> Settings-User) and set

"atomic_save": false

in it. See this question over at StackOverflow and my answer to it for an explanation of what this setting is doing, and why disabling it is often quite useful when working over a network.

Unfortunately, I'm not quite exactly sure what's going on with the issues while editing. Before saving, the contents of the file should be in memory, and disk I/O shouldn't be an issue. I'd suggest taking a look at your SSHFS settings, and seeing if something can be tweaked there. I assume you don't have any issues when editing local files?

As a suggestion (and this may not be feasible, depending on your setup) you could try moving files back and forth via the Dropbox for Linux CLI. Obviously, this is not an ideal setup for all situations, but it may help in the meantime until you can sort out the SSHFS settings.


Most probably you already had an apache installed via the Ubuntu packet management when you installed xampp. You should decide if you really want to use xampp or just use the applications that come with Ubuntu (I personally prefer the latter).

If you want to keep xampp: remove apache2 with sudo apt-get remove apache2 (or with synaptics if you prefer a gui). After that you should be able to start your apache from the xampp installation again.

If you want to use the apps shipped with Ubuntu: the default document root of the apache is in /var/www, the configuration files reside in /etc/apache2. The Ubuntu wiki has loads of information about the configuration and usage.

If you already had apache installed it is possible that you run into similar problems with other services, for example MySQL.


C++ 'Hello World' with Codelite-iostream not found

Your problem is because your selected a gcc template and not g++.
CodeLite will execute gcc for files with the .c extension.

Right click on main.c in the project view and select Rename
Change it to main.cpp
Compile your code and it should work


Erase the second deb line and the rest of the contents in the file.  You only need the contents on the first line to make that repository work.
So, /etc/apt/sources.list.d/pgdg.list literally should look like this:
deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main

and nothing else.


How to use a program designed for older verisions of ubuntu on a newer one

There will be no direct way. you can do that with some extra work and luck.The only problem is Dependencies.

If Application needs some kind of dependency either not available or conflicts with existed dependency then its a big problem.

what I suggest ? , I am simply suggesting that do it & if you got any a problem with the installation , start a new question and post.


Not able to install g++ in ubuntu 13.10 because of broken packages

A detailed solution about how to solve broken package issue can be found here How do I resolve unmet dependencies after adding a PPA?

If you couldn't solve the broken package issue using the solutions in the above link then you can use 'aptitude' instead of 'apt'. Please using the following commands to solve the issue.

sudo apt-get install aptitude

sudo aptitude install build-essential


No.
Samba listens to ports below 1024 (135, 445 namely), and convention requires that only root can bind ports below 1024.


Second link was the answer, I extracted file, then:

cd Downloads
chmod +x amd-driver*.run
./amd-driver*.run

I selected the first option, install driver, NOT build package.


Open a terminal and type sudo umount /dev/sdb and type password, then mkfs.vfat /dev/sdb