What is dconf, what is its function, and how do I use it?

Introduction

As other answers on this site discuss gconf and dconf together, I will just concentrate on discussing command-line tools such as gsettings and the gui dconf-editor that are used to access the dconf database.

At the GNOME official site it is noted that

  dconf is a low-level configuration system. Its main purpose is to provide a backend to GSettings on platforms that don't already have configuration storage systems.

  dconf is a simple key-based configuration system. Keys exist in an unstructured database (but it is intended that keys that logically belong together are grouped together).

  Having all of the keys in a single compact binary format also avoids the intense fragmentation problems currently experienced by the tree-of-directories-of-xml-files approach.

  dconf is optimised for reads. Typically, reading a key from dconf involves zero system calls and zero context switches.
   Writes are less optimised -- they traverse the bus and are handled by a "writer" -- a DBus service -- in the ordinary way.

Using gsettings to view and change settings

Once one gets to know gsettings it can be as easy as the gui dconf-editor. The options can be listed by entering man gsettings or going to the Ubuntu manpages online.

NOTE: As everyone's system has different programs installed, you may have to substitute the specific items I choose for different ones when experimenting yourself, as I am using XUbuntu XFce with quite a lot of GNOME programs.

To list all the available schemas, enter

gsettings list-schemas

To also include all the keys, enter

gsettings list-recursively

However, it is usually easier to specify what you want with, for examples,

gsettings list-schemas | grep -i shotwell

This returns a long list; I have shortened it to:

org.yorba.shotwell
org.yorba.shotwell.preferences.ui
org.yorba.shotwell.preferences.slideshow
org.yorba.shotwell.plugins.enable-state
org.yorba.shotwell.printing
org.yorba.shotwell.preferences.editing
org.yorba.shotwell.preferences.files

Now when you have found the schema that you are interested in, list the keys with

gsettings list-keys org.yorba.shotwell.preferences.ui

This returns a list (again I have shortened it):

background-color
display-basic-properties
display-extended-properties
display-photo-ratings
display-photo-tags
display-photo-titles
event-photos-sort-ascending
event-photos-sort-by

Pick one and see what the current value is with

gsettings get org.yorba.shotwell.preferences.ui display-photo-tags

This returns a value of true, so to reverse it, use

gsettings set org.yorba.shotwell.preferences.ui display-photo-tags false

These are trivial examples, but show basically how keys and values are identified and changed with gsettings.

Using dconf-editor to change settings

The GUI program, dconf-editor is installed with dconf-tools package by clicking here or by running

sudo apt-get install dconf-tools

Then run it by entering in the terminal or in the quick launch menu, dconf-editor.

As you can see in the screenshot, all the various schemas can be expanded on the left hand side and the appropriate key selected. It is very straightforward to navigate to the value you want (in this case the gnome-mplayer preferences). You can click the check box to have a value activated or add a numerical value into one of the other boxes. You can also search within dconf editor with Ctrl+F keyboard shortcut.

You can also add another log say to log-viewer by adding a path in the form ['/var/log/auth.log', var....'] in the screenshot below.

Conclusion

There are many other useful ways that you can tweak settings with both gsettings and dconf-editor and they are straightforward to use. It is worth looking through them to see if there are options there that are not in the programs' preferences, as you may be able to customize your program just the way you want. As fossfreedom recently showed in this question

How do I edit the list of music library locations in Rhythmbox?

knowing how to use gsettings or dconf-editor is extremely valuable. See also:

How do I use the gconf editor?


Find and replace numbers in multiple text files with the original number modified?

Using find + Perl:

find . -type f -exec \
perl -i -e 'use POSIX;' -pe 's/([0-9]*)dp/floor($1*.83).dp/ge' {} +

find command:

.: searches in the current working directory hierarchy;
-type f: searches only for files;
-exec [...] {} +: executes the following command feeding it the search results as a list of arguments;

Perl command:

-i: specifies that files processed by the <> construct are to be edited in-place;
-p: causes Perl to assume the following loop around the program, which makes it iterate over filename arguments somewhat like sed: while (<>) {...} continue {print or die "-p destination: $!\n";};
-e: used to enter one line of program; Perl will not look for a filename in the argument list;

Perl command #1 breakdown:

use POSIX;: imports the POSIX module, needed for the POSIX::floor function;

Perl command #2 breakdown:

s: asserts to perform a substitution
/: stops the command / starts the pattern
(: starts the capturing group
[0-9]*: matches any number of any digit
): stops the capturing group
dp: matches a dp string
/: stops the pattern / starts the replacement string
floor($1*.83).dp: Perl expression replaced with the result of floor($1*.83) (where $1 is the captured group) followed by a dp string
/: stops the replacement string / starts the options
g: asserts to perform substitutions globally
e: asserts to execute the replacement string as a Perl command

Sample output:

ubuntu@ubuntu:~/tmp$ tree
.
└── 1
    ├── 2
    │   ├── 3
    │   │   └── infile
    │   └── infile
    └── infile

3 directories, 3 files
ubuntu@ubuntu:~/tmp$ find . -type f -exec bash -c 'echo -e "{}:\n\n$(cat {})\n"' \;
./1/infile:

1dp 2dp 3dp 4dp 5dp
6dp 7dp 8dp 9dp 10dp
11dp 12dp 13dp 14dp 15dp

./1/2/infile:

1dp 2dp 3dp 4dp 5dp
6dp 7dp 8dp 9dp 10dp
11dp 12dp 13dp 14dp 15dp

./1/2/3/infile:

1dp 2dp 3dp 4dp 5dp
6dp 7dp 8dp 9dp 10dp
11dp 12dp 13dp 14dp 15dp

ubuntu@ubuntu:~/tmp$ find . -type f -exec perl -i -e 'use POSIX;' -pe 's/([0-9]*)dp/floor($1*.83).dp/ge' {} +
ubuntu@ubuntu:~/tmp$ find . -type f -exec bash -c 'echo -e "{}:\n\n$(cat {})\n"' \;
./1/infile:

0dp 1dp 2dp 3dp 4dp
4dp 5dp 6dp 7dp 8dp
9dp 9dp 10dp 11dp 12dp

./1/2/infile:

0dp 1dp 2dp 3dp 4dp
4dp 5dp 6dp 7dp 8dp
9dp 9dp 10dp 11dp 12dp

./1/2/3/infile:

0dp 1dp 2dp 3dp 4dp
4dp 5dp 6dp 7dp 8dp
9dp 9dp 10dp 11dp 12dp


I cant format Sandisk Cruzer Edge USB: Read-Only filesystem

When a pendrive or memory card is read-only

On some pendrives and on many memory cards there is a small mechanical switch for write protection, that can toggle between read/write and read-only. You might have set it read-only without intention.
Reboot the computer and try again to wipe the first megabyte with mkusb.
Try other USB ports and another computer.
If you still cannot wipe the first megabyte of the drive, and the drive is read-only, it is 'gridlocked', and the next stage is that it will be completely dead.

Pendrive lifetime

But there is still hope, because this symptom can also be caused by a severely damaged partition table. Try to wipe the first megabyte (overwrite with zeros). If this works, you can use gparted or another tool to create a partition table, and after that partitions again.

mkusb

wipe the first megabyte

If this does not work, the pendrive is damaged beyond repair (for normal users).

There are more details at the following link,

Can't format my usb drive. I have already tried with mkdosfs and gparted


unable to execute after loading second shell /bin/bash?

Try doing this using a here-document :

vech=Bus
echo $vech
/bin/bash<<EOF
echo "before empty line"
echo $vech
echo "after empty line"
vech=Car
echo $vech
exit
EOF
echo $vech


How to install GitLab on Ubuntu 16.04 with an existing Apache installation

The idea here is to stop using bundled nginx server and point new port[8080 or any other] to your gitlab web directory. Below link might help:

https://forum.gitlab.com/t/solved-setting-up-gitlab-on-ubuntu-14-04-with-apache2-without-owning-a-domain-name/679/8


How to connect to internet in fresh installed ubuntu 12.04 server

Do you want to connect over Ethernet? In that case you should try this:

sudo ifconfig eth0 up
sudo dhclient eth0

If this dosen't work try eth1,2, etc. Or you can get a list of interface names by typing:

ifconfig


What is this partition and can I delete it to recover space?

Yes, you can verify that sda2 does not contain any data you need, then delete sda2 partition using gparted and expand sda1 to take up its space.

To be able to delete a partition you'll need to unmount it first (see the lock icon next to it?) - I believe the option to unmount is in the right-click menu.

Because you can't unmount your root partition while booted from it, you'll need to boot from another medium (LiveUSB) and launch gparted from there.


Assuming that your real question is given in your comment (and assuming python since you have added a py-appindicator tag):
"
1.) How do I get the colors from the global menu?
2.) And how do I draw the colors onto the image for my appindicator?
"

Your second question is actually composed of two questions:
2.a) How do I draw an image?
2.b) How to define an Appindicator icon theme?

I have no answer to 2.b). The Appindicator is either extremely bad documented, or the documentation is extremely well hidden. Some not so useful stuff can be found here and here. You probably have to run myindicator.set_icon_theme_path but I did not find the names of the different icons that are used.

To 1.):
To get the colors of a gtk widget programmatically for use in cairo (to draw them later) you can use something like this (for a menu):

import gtk
def get_menubar_colors_for_cairo():
    w = gtk.Window()
    b = gtk.MenuBar()
    w.add(b)
    w.show_all()
    w.hide()
    style = b.get_style()
    del(w)
    del(b)
    bg = {}
    fg = {}
    for name, state in [("normal", gtk.STATE_NORMAL),
                        ("active", gtk.STATE_ACTIVE),
                        ("prelight", gtk.STATE_PRELIGHT),
                        ("selected", gtk.STATE_SELECTED),
                        ("insensitive", gtk.STATE_INSENSITIVE)]:
        bg[name] = (style.bg[state].red / 65535.0, style.bg[state].green / 65535.0, style.bg[state].blue / 65535.0)
        fg[name] = (style.fg[state].red / 65535.0, style.fg[state].green / 65535.0, style.fg[state].blue / 65535.0)
    return fg, bg

This gives you the forground and background style for different states. (There are probably better ways, but this should still work...)

Note that the bright blue or bright red do not seem to be part of the standard menu colors. I could not find out where they come from.

Note also that if the gtk theme changes but you leave your icons as they are, they will stand out since they then might have the wrong colors.

To 2.a) You can use cairo to draw images to various surfaces (png, pdf, svg, gtk widgets, ...). Here is an example that draws some rectangles onto png surfaces and saves the files in your current working directory. Each rectangle has the foreground color drawn onto the background color of the given state:

import cairo
def draw_a_rect(fg, bg, state, outfilename):
    surf = cairo.ImageSurface(cairo.FORMAT_ARGB32, 200, 200)
    context = cairo.Context(surf)

    context.rectangle(0, 0, 200, 200)
    context.set_source_rgb(*bg[state])
    context.fill()

    context.rectangle(50, 50, 100, 100)
    context.set_source_rgb(*fg[state])
    context.fill()
    surf.write_to_png(outfilename % state)

fg, bg = get_menubar_colors_for_cairo()
for state_name in ["normal", "active", "prelight", "selected", "insensitive"]:
    draw_a_rect(fg, bg, state_name, "test_%s.png")

A last note: you probably want to leave the background of your icons transparent, so you have one color less to worry about.


aptitude count number of files and directories

The closest result that I could get is using:

cat /var/lib/dpkg/info/*.list | sort | uniq | wc -l

Information of installed packages are located at: /var/lib/dpkg/info/.
Each package has a pkg-name.list file which contains a list of files located in that package. we can count their line number.


Add the flag: _netdev to the string

curlftpfs#<login>:<pass>@<ip> /media/ftp fuse _netdev,rw,allow_other,auto,user 0 0


Uninstalled gtk and ubuntu freezes in login

I have actually found the solution to the problem.
First it is needed to ender the recovery mode. For which shift has to be pressed during boot and a menu will appear with the recovery mode option. Select that and then enter the terminal by the root option.
Then to revert the system applications back to how it was, I used the command -
sudo apt-get install ubuntu-desktop^
Thats all it needed. It Automatically then installed the required packages and my pc was back to normal.
Hope anyone with the same problem will be helped.


What's the issue with one specific valid account in accessing skype?

Apparently this is common. It has to do with previous chat history. Try this:

$ sqlite3 ~/.Skype/[YOURUSER}/main.db
sqlite> DELETE FROM Messages WHERE type=68;
sqlite> .quit

This will delete all old file transfer history, but messages should still remain.

Edit
If you don't have sqlite3 installed, install it:

sudo apt-get install sqlite3


I recommend you add those lines to .profile which is more appropriate for setting environment variables

@edwinksl is totally right, the files are there, just hidden, because their names start with  a dot .

In a terminal, you can first make a copy of the file you are going to edit, and then open it with a text editor

cp .profile profile-bak
gedit .profile

then scroll down to the end of the file and paste all the lines there. Save and exit, then log out and log back in for the changes to your environment to be loaded.


Tomcat 8 doen´t start on ubuntu 15.04 -- status=127

I had the same error when I upgraded Ubuntu and also Java (8->11). The problem was a wrong JAVA_HOME path inside the systemd module. The JAVA_HOME path had "jre/" at the end which is wrong for newer Java versions. Solution:

Edit /etc/systemd/system/tomcat.service and remove the trailing "jre/" of the JAVA_HOME path.
systemctl daemon-reload
systemctl restart tomcat


How do I (persistently) change default file/program associations in Ubuntu 18.04+?

As for Ubuntu 19.10, the "Set as default" button is accessible by selecting "Properties" on a file contextual menu and going to the tab "Open with".


Ctrl + Alt + t will give you a terminal.  Once you have terminal enter sudo synaptic  You will be asked for your password.  Enter it.  The curser will not move.  Hit enter.  This should start the Synaptic Package Manager.  Search for LXPanel and then mark lxpanel for re-installation.  Hit apply.  Hope that helps.


if you want to do that on Windows there is very useful scripting language AutoHotKey which can do a lot with scripting interface.

A perfect alternative to AutoHotKey is AutoKey. Very useful whether you want to remap keys or assign abbreviation(adr) and it will write your full address!!

  AutoKey is a desktop automation utility for Linux and X11. It allows
  you to manage a collection of scripts and phrases, and assign
  abbreviations and hotkeys to these. This allows you to execute a
  script or insert text on demand in whatever program you are using.

Latest version is v0.90.

Where to get this? It is in the ubuntu's repository!

Open software center > search for autokey > install AutoKey(GTK)

How to use this?

Open AutoKey.

Press Ctrl+N or from File>Create..>New Phrase. Rename with whatever you like.

Enter keys In right panel(remove text Enter phrase contents) you want to get typed (in your case Shift + Left Arrow so will type <shift>+<left> )when you hit some key. full info for Special Keys like shift,arrow, etc. are described here.

Then in bottom-right corner there is three Set buttons to set for Abbreviation or Hotkey or Window Filter or all of them.

Click Set for Hotkey. You will be prompted to give HotKeys. If you want to make it run with single key (in your case 1) Don't click on any other button than Press to Set.

Click Press to Set and hit a key you want to assign(in your case 1).

Click OK.

Click Save in bottom-right corner.

 Now try by hitting 1 wherever you want.

You need to keep AutoKey running, or you can add in startup list for command autokey-gtk

Amazing tutorial is here :))

here is some Sample Scripts If you'd like to do something more.


how to get the address with /proc/kallsyms

You should execute the following command to enable kallsyms first:

sudo sh -c "echo 0  > /proc/sys/kernel/kptr_restrict"


Ubuntu 15.04 seems to be not supported by this PPA – the latest change  was from 2014-06-23.

But you can download the matching packages from launchpad and try to install them manually.

As there seems to be no native 64 bit drivers support, you need to add the 32 bit architecture :

sudo dpkg --add-architecture i386
sudo apt-get update

Download and install the driver for Canon PIXMA MP560 printer - printing functionality :

wget https://launchpad.net/~michael-gruz/+archive/ubuntu/canon-trunk/+files/cnijfilter-common-32_3.90-76~ubuntu14.04.1_amd64.deb
sudo dpkg -i cnijfilter-common-32_3.90-76~ubuntu14.04.1_amd64.deb

wget https://launchpad.net/~michael-gruz/+archive/ubuntu/canon-trunk/+files/cnijfilter-mp560series-32_3.90-76~ubuntu14.04.1_amd64.deb
sudo dpkg -i cnijfilter-mp560series-32_3.90-76~ubuntu14.04.1_amd64.deb

Download and install the driver for Canon PIXMA MP560 printer - scanning functionality :

wget https://launchpad.net/~michael-gruz/+archive/ubuntu/canon-trunk/+files/scangearmp-common-32_2.10-33~precise1_amd64.deb
sudo dpkg -i scangearmp-common-32_2.10-33~precise1_amd64.deb

wget  https://launchpad.net/~michael-gruz/+archive/ubuntu/canon-trunk/+files/scangearmp-mp560series-32_2.10-33~precise1_amd64.deb
sudo dpkg -i scangearmp-mp560series-32_2.10-33~precise1_amd64.deb

Alternatively download the original drivers from Canon Asia website and install them manually :

Canon MP560 series IJ Printer Driver Version 3.20 for Linux (debian package archive)

Download location : http://support-asia.canon-asia.com/contents/ASIA/EN/0100236502.html

Extract the archive and install the packages by executing :

sudo dpkg -i cnijfilter-common_3.20-1_i386.deb
sudo dpkg -i cnijfilter-mp560series_3.20-1_i386.deb

Canon MP560 series ScanGear MP Version 1.40 for Linux (debian package archive)

Download location : http://support-asia.canon-asia.com/contents/ASIA/EN/0100237802.html

Extract the archive and install the packages by executing :

sudo dpkg -i scangearmp-common_1.40-1_i386.deb
sudo dpkg -i scangearmp-mp560series_1.40-1_i386.deb

Sometimes it even works to select another printer from Printers setup in System Settings.


How to install Epson L375 printer in Ubuntu 16.04

Add Ubuntu Trusty repository via system>software update>other software install lsb and then remove the repository. You can install the driver. This is the only way now till a solution is brought up by Canonical. The lsb files work in Xenial and even if one does an update from Trusty to Xenial with lsb installed, they are left behind and fully functional.


Ubuntu 14.04 with Gnome Shell 3 Missing icons in dropdown menus in Eclipse

I had the same issue. Finally found a solution:

https://ask.fedoraproject.org/en/question/23116/how-to-fix-missing-icons-in-program-menus-and-context-menus/

GOTO:
dconf-editor -> org.gnome.settings-daemon.plugins.xsettings

Add
{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}

to what is there.


How to resolve the following “keyserver receive failed” issue on my Ubuntu 18.04 LTS while installing MongoDB?

That looks like an older versions of the instructions. For the latest you should check out the official docs. As of writing this answer that line looks like this:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

If you still fail with a similar error then the issue is that your host/vm can't resolve/reach the keyserver.ubuntu.com address and you essentially have to troubleshoot your connection to that server.


Why doesn't the command "ls | file" work?

The fundamental issue is that file expects file names as command-line arguments, not on stdin. When you write ls | file the output of ls is being passed as input to file. Not as arguments, as input.

What's the difference?

Command-line arguments are when you write flags and file names after a command, as in cmd arg1 arg2 arg3. In shell scripts these arguments are available as the variables $1, $2, $3, etc. In C you'd access them via the char **argv and int argc arguments to main().
Standard input, stdin, is a stream of data. Some programs like cat or wc read from stdin when they're not given any command-line arguments. In a shell script you can use read to get a single line of input. In C you can use scanf() or getchar(), among various options.

file does not normally read from stdin. It expects at least one file name to be passed as an argument. That's why it prints out usage when you write ls | file, because you didn't pass an argument.

You could use xargs to convert stdin into arguments, as in ls | xargs file. Still, as terdon mentions, parsing ls is a bad idea. The most direct way to do this is simply:

file *


World of Warcraft Launcher crashes on Wine

1) Make sure you have disabled p2p connections in downloader options

2) If the launcher freezes (in the middle) kill the background task "wow-4.2.1.2736-enUS-tools-downloader.exe

3) If points 2) and 3) dont work for you create a new wineprefix and restart the launcher.


How can I upgrade to Firefox 34.0.5 on Ubuntu 14.04?

Apparently, Firefox 34.0.5 is the version that switched US users from Google to Yahoo search. (source here)

Firefox in Ubuntu and derivatives is unaffected, but if you wish to switch the default search engine to something else, just change it in the search bar.

PS: I can also confirm that Firefox 34 is not "upgradeable" to 34.0.5 on Windows, ...probably because I am not in the US.


I guess something is wrong with your manual pages caches, run:

sudo mandb

to update it, if it does not exist on your system it's going to be created.

You can also use sudo mandb -c to fore the removal of old cache and creating a new one.

The other option which may be useful to you is -t, it perform correctness checks on manual pages.

If you have some packages installed locally, e.g using pip or other package managers in ~/.local/bin then to add their manual pages once again run it without sudo:

mandb

Extra steps

If the above instruction did not worked for you use manpath to find out about manual search path, make sure it's not empty.

Then check to see if any manual has been installed at all:

$ man -w man
/usr/share/man/man1/man.1.gz

If the command does not have any result use:

$ file /usr/share/man/man1/man.1.gz
/usr/share/man/man1/man.1.gz: gzip compressed data, max compression, from Unix

Then try man to open the manual, see if it works at all:

man /usr/share/man/man1/man.1.gz

If you didn't find out any man page try reinstalling that package.


problems with bluetooth with my ASUS S551LB

It looks like that model has an Atheros Wifi/BT combo card and the AR3012 has issues in Linux with the xhci drivers and the ath3k module needs to be loaded later.  The only workaround I have found involves blacklisting ath3k and using rc.local to load the module
echo "blacklist ath3k" | sudo tee /etc/modprobe.d/ath3k.conf
 and

gksudo gedit /etc/rc.local

and add

modprobe ath3k

above exit 0
Save, exit program and reboot

If you check /lib/firmware/ar3k and there is no such folder you will need to install package linux-firmware also


How to change the file naming scheme for screen shot

Use the -f option as described in man gnome-screenshot:

-f, --file=FILENAME
              Save screenshot directly to this file.

So, try

gnome-screenshot -f Screenshot_from_$(date "+%Y-%m-%d-%H%M%S").png

On my system, the image is saved to my home folder. If you want it to be saved elsewhere, you need to specify the path like this, for example:

gnome-screenshot -f ~/Pictures/Screenshot_from_$(date "+%Y-%m-%d-%H%M%S").png

Read http://www.foragoodstrftime.com or man date for more on formatting dates.


Install Ubuntu with BTRFS and more subvolumes

This should be easy enough to change after you have finished your initial install.

One neat way is to take two snapshots of @, calling them @var and @tmp.
Then delete everything in @var except for @var/var, them move the contents of @var/var/* up to @var/* and delete @var/var.  Same for @tmp/tmp/.
Then modify /etc/fstab with the new subvolume mount points for /var and /tmp.
Reboot.
Finally (I'm not so sure about this last bit) you should be able to delete the original contents of @/var and @/tmp by mounting the subvolume @ under /mnt (so the same subvolume is mounted twice, once as / and once as /mnt) and deleting /mnt/var and /mnt/tmp.


Ubuntu running on command line due to insufficient graphics

First, uninstall the current nvidia drivers:

sudo apt-get remove nvidia-*

Then reinstall:

sudo apt-get install nvidia-current-updates

If successful, restart the computer:

sudo shutdown -r now


How to determine the size of a package while using apt prior to downloading?

In the terminal, for a single package:

apt-cache --no-all-versions show $package | grep '^Size: '

for more than a package:

apt-cache --no-all-versions show $packages |
    awk '$1 == "Package:" { p = $2 }
         $1 == "Size:"    { printf("%10d %s\n", $2, p) }'

I have no idea about Synaptic.


To remove the Ubuntu boot loader, you have to boot from the Windows 7 Installation Disk (or a bootable USB drive) and click on the Repair your computer link in the bottom left corner. After this, select your Windows 7 installation and click Next, then select Command prompt. After this, type the following commands:

bootrec /fixmbr
bootrec /fixboot

This will restore the Windows 7 boot loader and remove Ubuntu from startup.

To completely remove the Ubuntu installation, you can remove the partitions that Ubuntu used with Disk Management. To open it, open the start menu and type diskmgmt.msc and hit enter. This will show all the partitions on your disks, and you can remove the ones that were used by Ubuntu (they have no filesystem recognized) and create new partitions for Windows if necessary (or extend the current partitions). Here's a small tutorial on Disk Management.


WMV files don't play neither in default Ubuntu movie player nor on VLC

I don't know how universal it is, but using a suggestion by doug I went to vlc > Tools > Preferences > Input/Codecs & set Hardware-accelerated decoding and then selected VDPAU video decoder. Under this option all my .wmv files work just perfectly, are very smooth and in general all the video files load faster.


Note: This answer is severely outdated. Please refer to karel’s answer instead which describes how Canonical and Adobe currently recommend to install Flash Player in Ubuntu.

For Linux, the latest version of Adobe Flash Player is 11.2 which you already have. Sorry, but it cannot be updated to 11.8. Adobe provides security backports to Flash Player 11.2 for Linux.

To install the Flash plug-in on Ubuntu 13.04 (Raring Ringtail), please follow this process:

Enable the multiverse repository, as shown here: How do I enable the "multiverse" repository?
Open a terminal window (press Ctrl+Alt+T) and copy/paste this line:

sudo apt-get install flashplugin-installer

When the Flash Player is installed, close the terminal window and restart your browser.


Ubuntu 14.04 Gnome Metacity Fallback doesn't update Background

I had this symptom too, and it was a configuration problem.

To verify if this is a configuration problem, try creating a new throw-away user account and log in using this. If the problem is gone, it's a configuration problem.

On that note, have you deleted all of the following (or moved them out of the way)?

.config/dconf
.config/gnome-*
.config/gtk-*
.config/nautilus-*
.gconf
.local

Edit: Other things to check:

Are you using gdm (the GNOME Display Manager)?
Are the file permissions correct on your home directory? Gnome really doesn't like not being able to write configuration files.


To add automatic wrapping to the global configuration of Mousepad, add the following line to ~/.config/Mousepad/mousepadrc:

ViewWordWrap=true

(In my case, I had to create that configuration file.)

Source: here.


Adding a USB eject button to the panel/dock

Check out USB Safe Removal application indicator.


I reformatted my computer to a new OS - need to restore files and folders

When you sync folders using Ubuntu One, nothing will be deleted unless you actually mean to delete something. You can sync the Ubuntu One folder safely to Windows 7, without anything being deleted.


This sounds as if you have installed GRUB into the boot partition.
 Anyway each system installation overwrites the MBR so previous installations (mostly Windows) cannot boot. Since Win2k Windows needs to boot with the BCD or it can't find itself.
Stupid? – Yes …
As wtkd said, you will need to repair the MBR with an original installation disc, which then overwrtes the MBR again for booting into BCD.

After that you will not be able to boot into Linux.
But you'll have two options:

fix the MBR for Windows  install a BCD editor  try to add a Linux boot option (this is really complicated but not impossible) – if GRUB is on the system volume, you'll have to select this volume– if not, see next option:
boot into Linux  install GRUB again but this time install GRUB into the (Linux) system volume  Nevertheless the MBR will be overwritten again, so you will have to fix Windows again as described.

If you have a second HDD you can use a workaround for this problem:

Leave the Windows boot volume untouched (after repair!).
Install GRUB to the second HDD's boot (=active) partition.  This partition can be tiny (~50-100MB) and anywhere on the HDD as long as it is marked "active". But for faster booting it should be near the beginning of the disk.
Go to your BIOS and change the boot disk option to that second HDD.
Update GRUB.  That way it will add Windows (actually the BCD) to its menu and if selected it just switches back to the first HDD's boot volume, where BCD will be loaded.

The trouble herein is that you cannot edit the BCD unless BIOS boots from this HDD. Thou – if you can manage to add a boot entry in BCD for Linux – you are free to decide from which HDD to boot. Howsoever it is not to avoid to have to boot through two boot managers.
So changing something here can really make you nuts. ;-)


How can I run a C program in Code::Blocks in Ubuntu?

It's possible that Code::Blocks doesn't execute your program after Build & Run because your project's compiler (from a project which was compiled in Windows?) and the IDE's default compiler don't match. Try compiling the project without running it using your Code::Blocks default compiler settings. Then try to run it again.

Make sure you have GNU C compiler (gcc) installed.
In Code::Blocks select Settings -> Compiler… -> GNU GCC Compiler (marked by mouse cursor in the below screenshot)


Installing python-pip on Ubuntu Server 16.04

looks like it is an IP6 issue on my Hyper-V host. Maybe my firewall is blocking, or I haven't enabled it or something. In any case I am now using:

sudo apt-get update -o Aquire::ForceIPv4=true

and that worked fine. Adding the same -o Aquire... option worked for installing python3-pip too.

I got that idea from a post in the Unix forum.


How to have grub auto-detect another Linux installation?

It might just be that the checks update-grub2 does is unable to read a BTRFS partition. In theory they should work if you've got it mounted, but grub is supposed to run before any such file system drivers are loaded so it might make sense that it didn't pick up this particular partition.

I've had some similar issues with XFS formatted partitions too. It seems grub only like FAT/EXT/NTFS. For other stuff I've always had to manually edit the grub menu.

BTW, I prefer using Grub Customizer to editing the grub config file in a text editor. Though it's not available in the normal repositories, I have to add a ppa from launchpad to install this tool: https://launchpad.net/~danielrichter2007/+archive/ubuntu/grub-customizer


I'd be looking at this post if I were you:

How can I repair grub? (How to get Ubuntu back after installing Windows?)

Follow Scott's answer up to (and including) step 4 so you've mounted your install and have chrooted into it. You should be root on your actual install. That's when you need to check your fstab.

Run sudo blkid to get a list of the partitions. Copy the UUID for your main disk.
Run sudoedit /etc/fstab and check that the UUID for your disk is correct. We're talking about the one for /. If it doesn't match up, fix it.
Carry on with Scott's answer. This will reinstall grub.
Reboot.


How do I install VisTablet PenPad on Ubuntu 14.04?

I find that it works fairly well using the software mypaint sudo apt-get install mypaint I haven't figured anything else out, regarding the macro hot keys. I am getting touch sensitivity, and the right click left click actions. Sorry for the necromancy, but I just got this hardware myself.

My vistablet shows up as a waltop pointing device, and I have seen linux support for their products in the past. I got nothing for this device currently though.


Kile Live Preview: auto-reload without saving?

In v2.9.93, it's possible to select between compile after saving and periodic refresh::
Settings -> Configure Kile -> Live Preview
But I guess that ship sailed long ago :-D
Having said that, I find problems with the .out file sometimes being corrupted, so if I use it, I use it with appropriate trepidation


I'd say using software like Pyenv is a good idea for your case. 3.8 isn't in 16.04, but PPAs like Deadsnakes provide it.
Pyenv allows you to manage multiple python versions. Check it out at
https://github.com/pyenv/pyenv

run curl https://pyenv.run | bash in your terminal, and open a new terminal. sudo mv $(which python3) $(which python3).5 Will make python3.5 launch python 3.5 instead of python3
 Now run pyenv install *. Finally, pyenv global *.

the asterisk (*) = run pyenv install --list, find the version you want to install, replace * with that.

Sources:

https://github.com/pyenv/pyenv (pyenv)

https://github.com/pyenv/pyenv-installer (how to install it)

https://unix.stackexchange.com/questions/147420/what-is-in-a-command

EDIT: Added sources, replaced where with which as where is ZSH only


While installing Arc theme I mistyped the word "deb" to "dep" and now I'm getting errors

Open up the terminal and type:

gksu gedit /etc/apt/sources.list.d/arc-theme.list

This will open up the file in gedit.
Find (Ctrl + F) the line with the dep entry and delete it.
Save file and close gedit. Then try updating again.


I need help configuring my screen resolution

I don't know much about Linux, but would THIS work?

Or perhaps THIS?

Try the first link first, as I think this might be a driver issue.


Try this sed command:

sed 's/\s/./g;s/432./432 /;s/!|---|./!|---| /' source.txt

And of course you can do the substitution in place with sed -i or send it to another file with sed ... > output.txt

g: global option


Can’t search for Synaptic on GNOME Shell

This problem is gone --just was a incorrect OnlyShowIn setting. Now it works.


Kolab groupware(Mail Server) fails to install because of dependency problems

I would suggest you to follow instalation instructions from here

http://docs.kolab.org/en-US/Kolab_Groupware/3.0/html/Community_Installation_Guide/index.html

because few people over there are saying they can't get working kolbag v. 2.x on ubuntu, but kolab 3.x is working

https://kolab.org/blog/henning-holly/2013/04/28/kolab-3-collaboration-server-ubuntu

and! ubntu is not a priority for them, you can try to use openSUSE as server, I guess..


How can I instruct Nautilus to pre-generate thumbnails?

Nautilus's thumbnailing routines actually come from the libgnome-desktop library, so it is possible to run the same thumbnailers outside of the file manager.

The API is a little complex, but the following Python script should help:

#!/usr/bin/python
import os
import sys

from gi.repository import Gio, GnomeDesktop

def make_thumbnail(factory, filename):
    mtime = os.path.getmtime(filename)
    # Use Gio to determine the URI and mime type
    f = Gio.file_new_for_path(filename)
    uri = f.get_uri()
    info = f.query_info(
        'standard::content-type', Gio.FileQueryInfoFlags.NONE, None)
    mime_type = info.get_content_type()

    if factory.lookup(uri, mtime) is not None:
        print "FRESH       %s" % uri
        return False

    if not factory.can_thumbnail(uri, mime_type, mtime):
        print "UNSUPPORTED %s" % uri
        return False

    thumbnail = factory.generate_thumbnail(uri, mime_type)
    if thumbnail is None:
        print "ERROR       %s" % uri
        return False

    print "OK          %s" % uri
    factory.save_thumbnail(thumbnail, uri, mtime)
    return True

def thumbnail_folder(factory, folder):
    for dirpath, dirnames, filenames in os.walk(folder):
        for filename in filenames:
            make_thumbnail(factory, os.path.join(dirpath, filename))

def main(argv):
    factory = GnomeDesktop.DesktopThumbnailFactory()
    for filename in argv[1:]:
        if os.path.isdir(filename):
            thumbnail_folder(factory, filename)
        else:
            make_thumbnail(factory, filename)

if __name__ == '__main__':
    sys.exit(main(sys.argv))

Save this to a file and mark it executable.  You may also need to install the gir1.2-gnomedesktop-3.0 package if it is not already installed.

After that, simply invoke the script with the files or folders you want to thumbnail as arguments.  Thumbnails will be saved to ~/.thumbnails where applications like Nautilus expect to find them.


Installing java for 32 bit on a 64bit OS on terminal

Your problem has solution here.

install java

Hope this 'll help you.


VirtualHost In Localhost Is Not Accessible From Localhost When Offline, How To Fix It?

If you're setting up just a development machine you don't need outside url's to lead into your machine as you should be developing in such a way that the url doesn't matter. I have multiple projects going at the same time and all of them work fine with no internet connection. This is how I setup my platform.

localhost does not need to have internet to work.

Open your hosts file and add your sites to your development machine.

sudo nano /etc/hosts

For each site you're going to build, add a host record for it like below.

Now in your apache virtual host files you can set them up accordingly.

As an example here is the config file for my elim.localhost site. Which I store as /etc/apache2/sites-available/elim.localhost.conf

after adding this information to the file I issue this command:

sudo a2ensite elim.localhost.conf && sudo service apache2 reload

Now in the browser, access my site I can type:

elim.localhost

I repeat this process for each project. Based on the setup at the time of this post the following urls can be used on my development machine, all going different places.

elim.localhost
18we.localhost
29pines.localhost

If you're using phpmyadmin for your work on a mysql database server, localhost/phpmyadmin should still work with no problems.

This is confirmed to work even with the network card disconnected from the network.


Skype SQLite DB empty and not sure how to read IndexedDB

You can read the leveldb of /home/crewnew/Documents/IndexedDB/file__0.indexeddb.leveldb/ directly, it's just needed to implement a comparator named idb_cmp1.
Leveldb is a NoSQL key-value storage. For binary coded values of the db you can use my python source or this C++ source or implement the parsing directly in php, if you want, if it's possible to include leveldb into php somehow.
Note that from skype 8 the message history is stored in the cloud, you can read only cached ones from the leveldb. Enjoy.


You have three choices and both are from terminal.
1. If it's available then

   sudo apt-get install qt5.1

Will install it from terminal.

Wait until Ubuntu prepare & stream it into all Ubuntu 13.10.pretty official release.you will upgrade & bug reporting facility as usual with automatic alternative configuration.
Get the source and compile& build to install.

No direct upgrade facility.
No automatic alternate configuration facility.
No bug reporting too.

Choose wise.
Choice is yours


How to promote ldap user to adminstrator role?

you don't need to have any administrative role to change your own password in ldap. . Being able to authenticate with your own credentials is enough.

Jere is a script that you can use to allow a user to change password against your ldap server. It also forces users to use a password length of minimum 8 characters. The correct way would of course to enforce this change on the ldap server with the ppolicy (password policyoverlay)  since it can easily be overridden by any user who reads the script or calls ldappasswd from the shell him/her self

#!/bin/bash
# a simple yet precise script to allow users to set their own ldap password

stty -echo
pwdminlenght=8
passwordok=true
username=$(whoami)

printf "Please enter your current ldap password:\n"
read currentpassword

printf "Please enter your new password:\n"
read password

pwdlenght=$(echo ${#password})
if  [ "$pwdminlenght" -gt "$pwdlenght" ] ; then
        printf "Error, new password to short  must be > 8 characters\n"
        passwordok=false
fi

if [ "$passwordok" = "true" ] ; then
                ldappasswd -x -w $currentpassword -s $password -D uid=$username,ou=int,dc=yourcompany,dc=org -h hostnameofyourldapserver.org
fi
stty echo


Restarting network service on a live server


The important thing is your video chipset.  You do not say what version of *buntu.  Try: booting to the login screen.  Don't log in.  Press the 'Ubuntu' button at the side of the login screen (on Ubuntu 12.04) and change setting to Unity 2D.

If your setup is different please ask again with full information especially video card/controller/chipset.


Just make a file, say, called 'toggle_wifi.sh' (contents listed below), make it executable and stick it into /usr/local/bin/ directory, then add a Keyboards Shortcut in Settings.

Name: Toggle Wifi On/Off
Command: toggle_wifi.sh
Shortcut: F12

toggle_wifi.sh file contents:-

#!/bin/sh

if [ $(nmcli radio wifi | awk '/led/ {print}') = 'enabled'  ] ; then
  nmcli radio wifi off
else
  nmcli radio wifi on
fi

Thanks to those above who have given me the core instructions, been meaning to figure out how to do this for a while.


Trouble Booting Up after Crash Caused By Losing Power

Lets first check your file system for errors.

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


I have the same issue with the bq M10 tablet.
There is a bug report on this matter:
Bug #1574365: Ubuntu Touch needs way to switch external keyboard layout.
In the description and comments, you can find a couple of workarounds, e.g.

  Switching keymaps is possible with the following shortcuts:

  Super+Space -> Next keyboard layout

  Super+Shift+Space -> Previous keyboard layout

  (same as in unity 7)

This workaround is useless for me, since I have an external bluetooth keyboard without Super button. But maybe it will help you.
In any case, I suggest you to vote for this bug report.


How to install Python3.3.5 on Ubuntu Server 12.10?

If you want to be absolutely sure that you are installing python3.3.5 then

Download python3.3.5 source tarball to ~/Downloads Folder
make sure you have already removed python3 from the system

sudo apt-get purge python3

Change directory to Downloads

cd ~/Downloads

Untar the file

tar -xvf Python-3.3.5.tgz

Change directory to Python-3.3.5

cd Python-3.3.5

run install-sh as root

sudo ./install-sh

This should do the job, hope it works


Ubuntu GNOME 14.10 can't use multiple languages

Install ibus-m17n and add Hebrew (kbd (m17n)).


I run a dual-boot, but with lower systems: Ubuntu 13.10 and Windows XP.

You don't need another partition for installing Ubuntu. The technical guy who installed Ubuntu on my computer told me almost all Linux distributions make their own little space on your computer. That space is inaccessible through any other OS.

In other words, you can install Ubuntu along with your Windows 7 (by choosing the option Install With Windows or something). Ubuntu will automatically make some space and install in that.

I had four drives (partitions). They all work as they should. There's even the entire C drive in which all my Windows software and even Windows XP itself is installed. There's no problem in accessing.


How to clean-up/remove files in /dev/sda7?

your df -H shows that /dev/sda7 is mounted on / meaning that its your main operating system, you shouldn't make changes to files in /dev, nor can you ls /dev/sda7 because its a device file not a directory. you can use ls on the place that its mounted to though (ls /).

you can use this command to find the files taking up the most space

du -ah /directory/here | sort -h -r | head -n 10

explanation of this command:

du estimate file space usage

-ah tells du to write counts for all files, not just directories in human readable form (i.e: 1.5G)

/directory/here any directory here, for the whole partition you would use its mount point '/' (you may wanna just use your home folder though)

sort -h -r sorts through the output of du, -h means sort human readable numbers (so it sees that 1G is larger than 1MB) -r tells it to reverse sorting order, so now its highest to lowest and not lowest to highest.

head -n 10 only shows the top ten lines of sorts output, you can change 10 to any number you want if you want more/less lines or just remove this part if you want

you should always know what commands are going to do before using them, otherwise you could accidently break something or some other adverse effect.

i hope this helps.


How do I open the software and updates panel from the command line?

Found it!
I used strace -e execve -f update-manager to find what was run when opening the settings from inside of the update manager window. Hopefully someone who needs this finds it.


FocalTech Touchpad works only after suspension in Ubuntu 16.04

I have a solution, but it might be only a workaround.Let me know if it works.

sudo modprobe -r psmouse
 sudo modprobe psmouse proto=imps


sudo apt-get install libcanberra-gtk-module

or possibly, force the i386 version:

sudo apt-get install libcanberra-gtk-module:i386

I am uncertain of the dependencies and requirements for the other two: my understanding is that "overlay-scrollbar" is not critical, but unity-gtk might be.

sudo apt-get install unity-gtk2-module:i386

I am facing a similar issue.


You should be able to remove Mir with the following:

sudo apt-get purge mir-demos unity-system-compositor

then run:

sudo apt-get autoremove

To remove any leftover dependencies. Reboot the machine.

To check if Mir was successfully removed run:

ps afx | grep unity-system-compositor

There should be no process with a name of unity-system-compositor.


Ubuntu 15.10: Cannot resume from hibernate

As @Pilot6 suggested, I post the answer here.
I have to append

resume=UUID=4cea5ee8-3322-48c6-b05e-2e90854f088e

to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub then update GRUB using

sudo update-grub


you can use this tool, Grub Customizer. To download,
Open terminal and type:

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

Open dash and search grub customizer, and run it. Edit configuration with this tool.it's easy . Go to General Settings to edit the default, time boot etc


As per email.com website, this should be your configuration:

Email.com (mail.com) SMTP Server    smtp.mail.com
SMTP port   465
SMTP security   SSL / TLS
SMTP username   Your full email address
SMTP password   Your Email.com password

Anycase try to use a configuration that already work for another user on the same network (under the same gateway/firewall).

If clicking "re-test" the issue is still present, and you are sure the configuration is correct, try again: may be it is a matter of thunderbird syncronization with email.com provider. (It happens also with other providers, in some cases synced after about 20 minutes of trying).


Are the privacy controls only for Unity?

Ubuntu 13.04 does include Privacy controls, and no, the other Desktop Environments do not send your data anywhere.

Unity sends only searches (anonymously) to a server which only takes care of online searches (such as Amazon and Videos).


My computer is Windows 7 64 bit. Let me tell you that I consider W8 is a stupid version of Microsoft.
Second point: I downloaded Ubuntu 13.04 (64 bit) and burned on a DVD. It's a question to modify how to start the computer: Just press the F2 key and select to boot first of all the disk and the HDD later.
Therefore with the DVD the computer starts and asks where are you?, for example.
Once wihout the disk at the moment of rebooting appears several alternatives: Ubuntu and Windows.
It runs very well.


GEdit - Python Console plugin not retaining color settings

Same problem for me, python console Preferences in plugin interface doing nothing, without any error message.

I finally changed the colors using gsettings in command line by typing the following commands in a terminal (pick your prefered colors, these are working for me).

gsettings set org.gnome.gedit.plugins.pythonconsole command-color '#0de0d6'
gsettings set org.gnome.gedit.plugins.pythonconsole error-color '#FFD063'


how to solve "wodim no such file or directory.cannot open scsi driver" in 12.04LTS

What wodim command exactly did you run when the error appeared ?

The fact that wodim --devices lists /dev/sg1 is somewhat strange. I would expect
a sg address with kernels older than 2.6. On newer kernels the address should
be like /dev/sr0.

The most plausible difference between shell and PHP would be a lack of permissions
with PHP (other user id?). A burn program on Linux needs rw-permission to the
device file.


Upgrade from Ubuntu 17.04 to 17.10 in VirtualBox 5.1.26 - very slow!

I had the same issue (8GB ram, 4 cpu's). The gnome-shell process constantly uses 10% cpu.

Disabling 3d acceleration did fix it (I didn't have 2D enabled as Virtualbox complains about it). Before you disable 3d acceleration be sure to disable the Virtualbox graphics driver under "Additional Hardware" inside of Unity. If you don't do that gdm3 won't even load.

The Unity desktop is still available and works fine, but one of the reasons to upgrade is to use Gnome. Even logging into unity and doing Additional drivers didn't help gnome.


Espson Stylus Workforce 320 SX218 Lubuntu, Need to clean print head/nozzles

The easiest way is to use menu in the printer itself. The printer should have a display. There must be an option to test/clean nozzles.

Stylus Workforce 320 has this functionality. You can look at the printer's manual to do it.

Press menu button, then go to 'Maintenance' -> 'Head cleaning'.

If the printer has no features to do it there, then you could install escputil.

sudo apt-get install escputil

You can check nozzles by

escputil -n

and clean by

escputil -c

There are some other options, you can see them in

man escputil


Quoting here:
"In initial releases of WSL 2 hardware access support will be limited, e.g: you will be unable to access the GPU...".
Update June 18, 2020:
"What’s new in Build 20150
Three new Windows Subsystem for Linux (WSL) features: GPU compute, WSL install, and WSL update"
https://www.tenforums.com/windows-10-news/158773-windows-10-insider-preview-build-20150-1000-rs_prerelease-june-17-a.html


Figured out that I need to configure the iptables to get port forwarding to work using the command:

iptables -I INPUT -p tcp --dport 8978 -j ACCEPT


start an application based on extension not protocol (using xdg-open)

Use

xdg-mime query default MIMETYPE

to get your desktop's default app for opening files with mime-type MIMETYPE

To get the mime-type of file FILE (not an URL) use

xdg-mime query filetype FILE


Text rendering issues in Matlab after upgrade

From the output of the lshw command, I can safely conclude you forgot to install the nVidia drivers...
So have a look here on how to install them and then the problem will go away!
:-)


Change display language for pinned directories/locations

You need to restart the system for the changes to take effect, a simple login/out isn't enough.


ok, the problem was, that the / was mounted readonly when booting. Therefore I set the line:

/dev/mapper/ubuntu--vg-root / ext4 defaults

in /etc/fstab. But I still don't understand why that happened, because there is no other line in fstab that would mount root as readonly.


Display 1080p signal on external monitor while laptop screen is 720p

Yes, it is.

If you use the external monitor only (disabling the internal) it should automatically adjust for 1080P; if using both you may need to explicitly set the different resolutions and options.


Bluetooth can't be enabled after hibernation(using terminal to hibernate) Ubuntu 15.04

You are missing firmware for the bluetooth to function

cd /lib/firmware/ar3k
sudo wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/ar3k/AthrBT_0x11020100.dfu
sudo wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/ar3k/ramps_0x11020100_40.dfu

Reboot

This firmware is also in the linux-firmware package for xenial


The documentation in the https://github.com/jpfleury/gedit-markdown repository has Gedit 3.10 as the highest version.
We can try to launch it on modern Ubuntu. For example on 16.04 LTS with Gedit 3.18.
sudo apt-get install gedit python3-markdown
cd ~/Downloads
wget https://github.com/jpfleury/gedit-markdown/archive/master.zip
unzip master.zip
cd gedit-markdown-master
./gedit-markdown.sh install
gedit

then enable plugin in the Preferences → Plugins → Markdown Preview, but it will not work because of changed API. The error here is shown below:

Traceback (most recent call last):
 File "/home/user/.local/share/gedit/plugins/markdown-preview/__init__.py", line 113, in do_activate
   self.addMarkdownPreviewTab()
 File "/home/user/.local/share/gedit/plugins/markdown-preview/__init__.py", line 139, in addMarkdownPreviewTab
   panel.add_item(self.scrolledWindow, "MarkdownPreview", _("Markdown Preview"), image)
AttributeError: 'Stack' object has no attribute 'add_item'

So I would recommend to use ReText as a replacement:

You can install it as simple sudo apt install retext. For spell check you need to install additional package with sudo apt install python3-enchant. It has two modes of operation - Live Preview and Preview.
Note: if you need to have latest version of ReText on old systems as 16.04 LTS, then you can install it from Python Packages with pip3 install ReText.

I have just hacked it to work with Pluma (fork of Gedit for MATE DE) in Ubuntu 18.04 LTS.
All you need is to install dependencies from APT and then use files from my Github repository:
sudo apt-get install pluma python-markdown gir1.2-webkit-3.0 python-configparser -y

cd ~/Downloads
wget https://github.com/N0rbert/pluma-markdown/archive/master.zip
unzip master.zip
cd pluma-markdown-master
./pluma-markdown.sh install

and it will look like:

You can move preview to the side by editing ini-file:
sed -i 's/panel = bottom/panel = side/' ~/.config/pluma/pluma-markdown.ini

Note: this solution with pluma-markdown will not work for Ubuntu 16.04 LTS (because of missed python integration for pluma). And it will not work on newer versions because of upgrade to WebKit2.


jpdfbookmarks-2.5.2, this tool can change the default boorkmark's 'fit-to-page' to 'full-page-width'. I have used this tools to change many pdf files's default behavior. It's a little time-consuming. I have no time to change every pdf I read. So I give up and find easy trade-off way.

Evince has a shortcut key 'w'.
Just tap 'w', evince will show in 'full-page-width' mode.


How to download all files with WGET, including .java files.

You can use --reject or --exclude-directories to skip things:

wget ... --reject '*backup*' ...
wget ... --exclude-directories '*backup*' ...


How to install windows 8.1 , when I have a windows 7 and ubuntu 14.04 running side by side?

Provided that you are sure that no UEFI stuff is going on, just install Windows 8.1 as you normally would on partition 1, then recover grub as described here:

How can I repair grub? (How to get Ubuntu back after installing Windows?)


How to reset Ubuntu 20.04 Login Screen to defalt like this picture

The picture you show is the GDM login manager with the default Ubuntu theme. Make sure this login manager (package: gdm3) is installed. You can then make it the default with the command:
sudo dpkg-reconfigure gdm3

Select the gdm3 display manager.
If the colors are not the Ubuntu theme, change the theme with the command
sudo update-alternatives --config gdm3-theme.gresource


amdgpu: module ABI major version (23) doesn't match the server's version (24)

I was able to resolve this issue by removing the uninstalling the open source amdgpu drivers. If this issue is happening to you, take a look at the following thread for context.

https://ubuntuforums.org/showthread.php?t=2441792


Invoke the deja-dup applet as follows:
deja-dup
Click on Scheduling to set backup frequency or turn it off.
Click on Storage Location. See the 2nd line: change the location of the backup from the storage location in the backup settings of the tool you use to create a backup.
What you currently have set is likely invalid. For instance not a location owned by your user, or even it was never set or it requires a user and password validation.
In case of duplicity:


How to prevent access to a specific directory?

Open the folder with your favorite FTP client - unless you're local and can just navigate to the folder.
Add a file called .htaccess. The '.' is important and mandatory.
Edit the .htaccess file with a plain-text editor (don't use a word-processor application) and add the following line:
Options -Indexes

Save the file.
What this will do is prevent indexing the files in the folder. If people try to access the folder directly, they'll get a 403 forbidden error.
At the same time, you can still link directly to files in that folder.
So, let's say you added the .htaccess to a directory called /tmp. You can still link to, use, and send people to /tmp/picture.jpg like normal, but people won't be able to browse the directory and find files you don't want them to see.
For more information, click this.


I've never used ibmvfc, so I can't state explicitly whether it works or not.
However, I can say that there is an ibmvfc module enabled in 14.04's ppc64 builds, as seen here:

$ lsb_release -sc; uname -m; uname -r
trusty
ppc64
3.13.0-24-powerpc64-smp

$ dpkg-query -S /boot/vmlinu?-$(uname -r)
linux-image-3.13.0-24-powerpc64-smp: /boot/vmlinux-3.13.0-24-powerpc64-smp

$ sudo modprobe ibmvfc
$ lsmod | grep vfc
ibmvfc                 83360  0
scsi_transport_fc      80588  1 ibmvfc

$ dmesg | tail -n 1
[  110.720647] ibmvfc: IBM Virtual Fibre Channel Driver version: 1.0.11 (April 12, 2013)

The module is also available for ppc64 little endian, but it is delivered in the 'linux-image-extra' package rather than linux-image.  So on ppc64el, you'll need to:

sudo apt-get install linux-image-generic

That will get you the correct linux-image-extra-KERNEL_VERSION package.

From there, the kernel module loads, but I have no experience to test it.
If you find bugs in the ibmvfc driver, please file them on launchpad using ubuntu-bug linux-image-generic.


Ubuntu on Chromebook: (precise) "myusername"@localhost: what is precise?

The (precise) indicates that you're running inside a chroot, not inside a normal Ubuntu installation. (Are you using Crouton?) To remove it, edit ~/.bashrc, find the following lines:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

Comment them out by adding a # at the beginning of each line.

The localhost part is the hostname of your chroot. On your dual-boot system (the one with Windows), your hostname and username happened to be the same. To set the hostname, use hostnamectl:

hostnamectl set-hostname myusername

What does "${debian_chroot:+($debian_chroot)}" do in my terminal prompt?
How do I change the hostname without a restart?


how to raise thumbnails in ubuntu 18.04 from nautilus limiting to 4096MB maximum, to higher?

This is how you can change it using the command line:

gsettings set org.gnome.nautilus.preferences thumbnail-limit 10485760

To reset to the default setting, issue the command

gsettings reset org.gnome.nautilus.preferences thumbnail-limit

Display the currently set value with:

gsettings get org.gnome.nautilus.preferences thumbnail-limit

See man gsettings for all uses of gsettings, the command line tool to manupulate GSettings.


There isn't any command for retrieving previously send messages in Desktop Notifications Specification so my guess is that they are discarded after retrieving.
You can however observe these using dbus-monitor command, like this:
$ dbus-monitor "interface='org.freedesktop.Notifications'"

Sending simple notification:
$ notify-send "Hello there"

results with following information:
method call time=1555095758.597788 sender=:1.385 -> destination=:1.386 serial=6 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=GetServerInformation
method call time=1555095758.601101 sender=:1.385 -> destination=:1.386 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "notify-send"
   uint32 0
   string ""
   string "Hello there"
   string ""
   array [
   ]
   array [
      dict entry(
         string "urgency"
         variant             byte 1
      )
   ]
   int32 -1
signal time=1555095765.734845 sender=:1.386 -> destination=:1.385 serial=15 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
   uint32 1
   uint32 1

Time field is an UNIX timestamp, can be translated like this:
$ date -d @1555095765
Fri Apr 12 21:02:45 CEST 2019


LibreOffice does not detect Windows fonts

Recent versions of LibreOffice (5.3 and above) have stopped using  PS Type 1 URW fonts. This seems to be a policy decision as discussed in PS Type 1 URW fonts missing in LibreOffice 5.3.0.0.beta1 and 5.3.0.0.beta2.

  All code supporting Type 1 fonts have been removed in the upcoming 5.4 release and I don’t see anyone volunteering to bring it back and adding the code required for the new layout engine to support them.

  A better investment, going forward is to find a non-Type 1 replacement of these fonts, to convert them to OpenType using AFDKO or FontForge.

Even if these fonts are installed on your system and other applications such as Gnumeric use them, LibreOffice won't.

Sources for similar fonts are provided in the link above.

You could also go through Shortage of Fonts in LibreOffice 5.3.0.3 and the responses, one of which states that

  The decision was made by the Engineering Steering Committee, in order to
  allow for implementation of the new rendering framework code.


Ubuntu 16.04 LTS live USB stops working after initial software update

I've abandoned the Live USB for now, and installed full Ubuntu 16.04 onto the USB and it runs fine. I found that other problems (and possibly this one) are solved by using Startup Disk Creator from an existing Ubuntu 16.04 installation, instead of a 14.04 installation, which was my originally posted attempt.


It probably due to a dependency that has not been upgraded correctly.

In these scenarios I would first try to purge rhythmbox and its dependencies before reinstalling.

purge:

sudo apt-get purge rhythmbox rhythmbox-plugins gir1.2-rb-3.0 librhythmbox-core9 rhythmbox-data

reinstall:

sudo apt-get update
sudo apt-get install rhythmbox


it's written on the laptop that some features are only available while running Microsoft windows as the device is built with windows 8 pre-installed . Running Ubuntu might be the cause of the problem :)


After suspend bluetooth on my Lenovo E120 can`t be turned on

Does it work on reboot?

If it is truly hard-blocked,  boot into Windows (with Lenovo drivers & wireless utils) is necessary to re-enable on many (most?  all?) Lenovos in your model range.


Black screen after installing Nvidia drivers on Ubuntu 20.04

Sort of a Solution
Rather than relying on the system which I got from doing an upgrade from Ubuntu 18.04 to 20.04, I did a complete fresh re-install of Ubuntu 20.04 and now everything seems to work. I did update the drivers via "Software&Updates" in the Additional Drivers tab.


Chrome on Ubuntu running on Virtualbox very slow

I just want to clarify some things quickly, I have some experience troubleshooting Chrome on virtualbox. You are using the windows version of chrome inside a windows 7 64 bit virtual machine, correct? I have also had an issue with Chrome reporting that it crashes every time I close it. There is relatively little documentation on using chrome under these circumstances, which is why I switched to firefox under my virtual machines.

You have installed guest additions i assume? Have you tried using a different browser to see if the problem is network related?


NVIDIA Driver troubles on GeForce2 Go at 1600x1200

The OP found a solution. Reformatted excerpt:

  The business of the bogus "Additional Drivers" entries was a red
  herring. Turns out the problem was color depth. This old and wimpy
  machine simply cannot handle the default color depth that 12.04
  assigns.

  Installing a basic xorg.conf setting color depth to 16, down from
  the default of 32, made a huge, huge difference.

  There is still room for improvement, but I do not expect miracles from
  such very old hardware. It now plays Youtube videos, in the browser
  window just fine. Of course full-screen is too much, but that is to be
  expected.


postgresql, how do I connect to it using pgadmin?

To answer my own question, this is 1 way I found:
(deploying to my local cloud)

sudo juju bootstrap

juju deploy postgresql pg-a

juju expose postgresql pg-a

juju status

add local IP to the allowed hosts

juju set pg-a admin_addresses=10.0.3.1

login to the box to change postgres pwd

ssh ubuntu@10.0.3.131

sudo -u postgres psql

\password postgres


With the help of @Alaa Ali, I was able to figure out a solution.

Boot with Ubuntu Desktop (USB/CD)
Choose "Try Ubuntu"
Start GParted
Right Click on the lvm partition and select deactivate.
Right Click on the extended partition and select resize/move
Resize the partition
Right Click on the lvm partition and select activate.
Right Click on the lvm partition and select resize/move
Resize the partition
Apply the changes
Reboot


Plesk and Apparmor have conflict(s), I am only aware of the conflict between Apparmor's default Bind9 profile and Plesk's configuration. The official documentation says to uninstall Apparmor as it is not supported, I think this is unwise as it discards a fair amount of protection.
You could just adjust the Apparmor profile for bind9, edit /etc/apparmor.d/local/usr.sbin.named and add:
# Allow Plesks configuration for bind9 to run with Apparmor
/var/named/run-root/** rwm,

Then reload Apparmor, and start bind9:
# Reload Apparmor profiles
service apparmor reload
# Start bind9, which should start without error now
service bind9 start

The services management page should now report that bind9 is running, if not, you may need to restart Plesk:
service psa restart

Source: http://www.failover.co/blog/plesk-11-bind9-and-ubuntu-12-04-apparmor-problems
(Disclaimer: I wrote the source, I am not a security expert.)


Please explain `sudo ubuntu-drivers --gpgpu nvidia autoinstall`?

I ended up trying this command.

sudo ubuntu-drivers --gpgpu nvidia autoinstall

As far as I can tell, it does the same thing as installing the the latest tested proprietary graphics driver from the Additional Drivers tab.


Brother MFC-J470DW Printer Driver Installation

Visit [this page]:[1]

Choose linux and .deb and click search.

Follow the 3 step process to download the Driver Install tool (at this time it is entitled linux-brprinter-installer-2.0.0-1.gz)

Save the file as shown:

Open and extract the tool somewhere convenient (your desktop for example)using Archive Manager.

Open a Terminal (CTRL-ALT-T)

Change to your Desktop directory and make the file executable as follows:

cd ~/Desktop

chmod +x linux-brprinter-installer-2.0.0-1

run the tool by issuing the command

sudo ./linux-brprinter-installer-2.0.0-1

Answer the questions the tool asks (It starts with your model # as shown below)

This approach works with a large number of Brother printers, not just the model you specified.


Blob And Conquer: SDL not showing textures

Update 2016-07-28:

As @Grumbel pointed out, sounds and later textures were removed from debian main because of incompatible licensing. Later, it was discovered that most textures had no copyright info, or weren't even redistributable, and have been removed upstream as well.

The game is currently being developed at GitHub and free replacements are being sought for the assets (thanks to @lumidify). Information about old assets, where to find them and the status of the replacements can be found here.


AFAIK, yes. it's in the mir blueprint.
see https://blueprints.launchpad.net/ubuntu/+spec/client-1404-mir-converged


Big problem accessing USB with Ubuntu 16.04

for those looking at a similar issue in the future, a solution from Arnaud.

The Ubuntu 16.04 installation I used was the Windows subsystem for linux version. As of 20.6.2018 they have not implemented any USB functionality on this version and so I was unable to look at any USB details or use the lsusb command.


How to setup a static IP on Ubuntu Server 18.04

All the answers telling you to directly edit /etc/netplan/50-cloud-init.yaml are wrong since CloudInit is used and will generate that file. In Ubuntu 18.04.2 it is clearly written inside the file :

$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eno1:
            dhcp4: true
    version: 2

So you should not edit that file but the one under /etc/cloud/cloud.cfg.d/ if you still want to use CloudInit.

Another way is to completely disable CloudInit first by creating an empty file /etc/cloud/cloud-init.disabled (see https://cloudinit.readthedocs.io/en/latest/topics/boot.html) and then the other answers are OK. Under Ubuntu 18.04.2 I had to use dpkg-reconfigure cloud-init to let it take into account the file /etc/cloud/cloud-init.disabled. I think this is a little bit weird.

I suggest you to rename the file (not the right name since 50-cloud-init.yaml let us think it still uses CloudInit).

Then you may end up with a file name /etc/netplan/01-netcfg.yaml which contains the configuration below. Note the use of the networkd renderer instead of NetworkManager because the configuration is on a server.

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      addresses: [192.168.1.246/24]
      gateway4: 192.168.1.1
      nameservers:
         addresses: [192.168.1.1]


What are the consequences of running chmod 755 -R on home directory?

You have changed the permissions of all files and directories in and underneath $HOME from whatever they were (and each file or directory had it own permissions) to rwxr-xr-x. This marks all files "executable" , and grants Other (User, Group, Other) users the ability to inspect and traverse the directories and read all your files. The change will break ssh, and could cause other problems.

You can fix ssh via:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/* ~/.Xauthority

I included ~/.Xauthority to avoid X authentication problems.

Don't execute commands you hear of (read in a book, see online, ...) without understanding what they do. At the very least (for this case) read man chmod, info coreutils 'chmod invocation' and maybe man 2 chmod.

Linux, like Unix, makes it possible to do Powerful Things, but does not require Powerful Things to be Safe. Figure out what it does BEFORE lighting fuse.


Error 404 when trying to install the package linux-image-extra

Your sources might not be up to date.

sudo apt-get update

or the mirror you are using might be out of date as referenced in this question.


'Open Sans' rendering differently on Chrome vs. other operating systems

This is most likely because you have installed the my-weather-indicator package, from ppa:atareao/atareao. The version of the font in this package is the same version supplied by Google Web Fonts, which now uses a more condensed version of the 400 weight (Normal). You can either

Uninstall the my-weather-indicator package, or
Download the Open Sans font from Font Squirrel, and unzip the contents into ~/.fonts (create the folder if it doesn't exist).


After upgrading Kubuntu from 16.04 to 18.04 get black screen on login

The answer seemed to be to remove and purge the nvidia drivers.

However I now have the nvidia card working after following advice in
this post

Unfortunately I'm still limited the one graphics card with DVI and VGA, whereas in 16.04 I was successfully running 3 monitors via two cards.


How heavy on resources is Cinnamon desktop environment?

Cinnamon vs...
I haven't found anyone who has done a direct Cinnamon vs anything else resource usage study.
Its arguable that Phoronix has done the closest to this looking at the performance comparison between gnome-shell (Mutter) & unity (compiz) using both NVIDIA and ATI graphics. They have also looked at battery usage between Gnome, KDE, LXDE and XFCE.
Since Cinnamon's Muffin is a fork of Mutter - you should perhaps assume the performance and resource usage will be similar or the same i.e. you could argue there is a direct read-across for the Gnome results to Cinnamon.
My reading of the results - and making the assumption that better performance is equivalent to less resource usage for the same work - is that gnome-shell and unity were equally resource hungry.  Thus expect Cinnamon and Unity to be similar.
Results varied depending on the actual graphics card - when using NVIDIA drivers, these were equally resource hungry, whereas gnome-shell using ATI was more resource hungry than Unity.
Thus - you should expect Cinnamon to have the same resource profile as Gnome-Shell.
The study also revealed KWin trumped both Mutter and Compiz - LXDE and XFCE trumped these all.
Usual caveats should apply when trying to interpret Phoronix results & methodologies - arguments should be directed to the Phoronix forums!


Unity doesn't look right when running in Parallels

Unchecking "Enable 3D acceleration" in Video Hardware settings will give you a working Ubuntu again, but without OpenGL.

The reason is Unity, the new Desktop Environment for Ubuntu. To continue using 3D acceleration, switch the desktop back to classic Ubuntu:

Click on the power button in the upper right corner and choose "System Settings".
Search for "Login Screen" and double click
Choose Unlock and enter your password
Select Ubuntu Classic as default session.
Re-enable 3d acceleration in Parallels and reboot


server 12.04 boot dhcp, can not find hard disk

This looks like a hardware problem where the computer's BIOS does not see GRUB in /dev/sda and therefore defaults to network. This may be fixed by a few things:

Ensure GRUB is on /dev/sda. If you installed it to /dev/sda1,  some BIOS's hate that.
Check that your hard disk is securely attached by its cable and getting power. Ensure your BIOS is set to try it before anything else, especially Network.
Ensure your hard disk does not have bad sectors

Should you need more info, please comment. When I have time tomorrow morning, I will add more detailed instructions.


Ubuntu 16.04 no desktop just background wallpaper

Drop into a shell by pressing CTRL + ALT + F1

Then try reinstalling the ubuntu desktop metapackage and then unity:

sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall unity


How can I remove the default application indicators, like the power or the volume indicator, in Unity?

You can uninstall the individual indicator packages entirely using Synaptic Package Manager, or blacklist the indicator icons using Gconf-editor.

For example, I've removed the indicator-me package that shows username and chat status.

The volume indicator is called indicator-sound, and the indicator with your username and session management is called indicator-session. The battery indicator is configurable in the power management settings.

Search for 'indicator' in Synaptic to see more of them.


Command-line: Create new partition using the largest continuous free space

You can do this easily on GPT disks using sgdisk:

sudo sgdisk -n 0:0:0 /dev/sdb

For an MBR disk, the best option I know of is to use fdisk. It's not really designed to be scripted, though, so you'd need to create a Bash here document to pass it commands.

In either case, you'd have to figure out the number of the partition you just created in order to further set it up with cryptsetup (or whatever).


Ways to deploy Node.js in a production environment?

Well, after read lot of posts and pages that talk about Node.js deployment-installation, I must said that Chris PPA is mentioned in tons of them as an official source. Beside one can see her PPA linked at the Github Node.js wiki.

So, seem to me that is trust enough to be used in production, what made it the choice if you want keep your system updated using standards Ubuntu tools.


How do I change the background color of the menu bar?

If you're aware of CSS than you would have a greater control over color and style of the top panel. Following is how you can do it with Ambiance theme.

Open Nautilus as root, since you'll be backing up and editing files.

gksu nautilus
From here, make sure all file operations that you do are from this instance of nautilus that you opened using command.
Navigate to /usr/share/themes/Ambiance/gtk-3.0/apps directory

Before you do anything, make copy of files unity.css and gnome-panel.css in the directory to somewhere in your home folder so that if you mess up anything, you can revert back the changes easily.

Since you want to change color of top panel in Unity, open unity.css for editing in a text-editor (gedit).
Now create CSS variable as follows at the topmost of the file

@define-color dark_bg_color #DCDCDC;
@define-color dark_fg_color #3f3f3f;

Note that variable dark_bg_color indicates the panel background color you want to have, set its value with the hashcode of the color you want.
Similarly, variable dark_fg_color indicates foreground color i.e. font color of the panel items, set it with hashcode the value you want.
Finally, save the file and exit. Logout, and login again, and changes you made should be visible. You can modify the values as you want, and in case you want to get back default panel color of Ambiance back, just open Nautilus as root and replace file unity.css with the one you backed up earlier.

While above mentioned method can be used to tweak color of Unity top panel, you can make similar changes in gnome-panel in GNOME classic, by making similar changes in file gnome-panel.css.

The steps I gave above might sound a bit complicated but they're pretty easy than styling any OS (AKA Windows) you think. Explore possibilities here :-)


How to change Thunderbird's display time to 24h format?

Ok, solved it:

1) Make sure you have the locale you need, can't say which you specifically need but when you know you create it like this (using en_DK.utf8)

sudo locale-gen en_DK.utf8

2) To make sure this locale is in effect for thunderbird you add it to the script that starts thunderbird, so first find that script:

2a) find the right script

which thunderbird

In my case: /usr/bin/thunderbird

2b) add locale to the script (I use the editor geany):

gksudo geany /usr/bin/thunderbird

Add this in the beginning of the script (I just put at the very beginning):

LC_ALL="en_DK.utf8"
export LC_ALL

Just want to add this:

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

EDIT: as pointed out by pl1nk A better solution would be to NOT touch the /usr/bin/thunderbird script and instead create the script '/usr/local/bin/thunderbird' with this content

#!/bin/sh
LC_ALL="en_DK.utf8"
export LC_ALL
/usr/bin/thunderbird $@

make sure it's executable

sudo chmod a+x /usr/local/bin/thunderbird

Then check if it's being used to start thunderbird:

which thunderbird

should respond with this:

/usr/local/bin/thunderbird

Now thunderbird can be started as before.


The libparted library, upon which Ubuntu's installer is based, has no way to flag an MBR partition as being an EFI System Partition (ESP). On GPT disks, this is done by setting the "boot flag" on the partition, but this action on an MBR disk has a different effect: It sets the boot flag. This is a design flaw in libparted; they've overloaded the same term on entirely different concepts for GPT and MBR disks.

You can fix the problem using the fdisk, cfdisk, or sfdisk programs in Linux. Use the t command to change the type code from 0x0B to 0xEF, then save your changes with w.


How to run commands from a bash file the way they run from terminal?

Consider this script (saved as /home/muru/test.sh):

#! /bin/bash
DRI_PRIME=1 glxgears -info

A basic launcher for this would look like (say, save it as /home/muru/test.desktop):

[Desktop Entry]
Type=Application
Terminal=true
Name=glx-gears-info
Exec=/home/muru/test.sh

Make them both executable:

chmod +x test.sh test.desktop

Now you should have these two entries in your home folder:

Notice how the name is glx-gears-info even though the launcher's filename is test.desktop. You can double click on it to start the script:

For a script like (say, located at /home/muru/start-aria.sh):

#!/bin/bash
touch /home/cip/Downloads/aria2/session.txt && \
    aria2c --enable-rpc --rpc-listen-all \
       --save-session=/home/cip/Downloads/aria2/session.txt \
       --input-file=/home/cip/Downloads/aria2/session.txt -x16 -s16 -k1M \
       --dir=/home/cip/Downloads/aria2

(I split the command into multiple lines for readability) the launcher file would look like (say /home/muru/start-aria.desktop):

[Desktop Entry]
Type=Application
Terminal=false
Name=Start Aria2
Exec=/home/muru/start-aria.sh

You can set Terminal=false here as this command probably doesn't need a terminal.

To get the terminal window when using Xfce launchers, tick 'Run in Terminal'.

A second command, that would close aria2, can be added in the same Xfce launcher: pkill aria2c

Also:

by adding them into a single launcher,
setting advanced properties like in the image below

(namely 'show last used item' and 'inside button'),

and adding two specific icons,

the launcher will always display the current status of aria2: running or closed.


The GUI in Juju has been updated to 2.7.4 which has fixed this issue. To make that the command is the following:

$:juju upgrade-gui
fetching Juju GUI archive
uploading Juju GUI 2.7.4
upload completed
Juju GUI switched to version 2.7.4


Is it possible to let gcc 4.7 and gcc 4.8 co-exist in Ubuntu 13.10

Yes, the two versions will happily coexist. You can invoke each individually by specifically invoking it though only one version will have CC aliased to it.

Install each separately with:

sudo apt-get install gcc-4.7

sudo apt-get install gcc-4.8

When you are ready to compile with a specific version invoke it explicitely:

gcc-4.7 source.c -o executable

or

gcc-4.8 source.c -o executable


This is by no means the only possible fix but after lots of googling I came across the suggestion that the profile was somehow corrupted. The fix was to

cd .local/share
Move gnome-shell to gnome-shell-old.
Restart laptop and login to messed up account.

In my case that fix worked (a new gnome-shell was created) so I deleted gnome-shell-old.

I apologize for not providing a link. I found this earlier in the day using my tablet.


Install Hard Drive without format or delete partitions

No worries. Ubuntu will not try to reformat any disk plugged in. Its very friendly with data and disk management.

Nothing will be changed without user permission.

Power off your system, plugin your HDD and boot. By default it will be automatically detected.

In case it doesnt, do:

fdisk -l look for the disk device name.
mount /dev/sdb1 /mountpoint /dev/sdb1 is just an example it might vary in your setup.
Browse the HDD in file manager.

Since you mentioned the disk is from Ubuntu, then expect that the filesystem type will be automatically detected by mount.


A good place to start at look for nautilus scripts here.

http://g-scripts.sourceforge.net/cat-executing.php


Script to loop over list of hashes in a file stuck with variable from the first iteration

One option could be a for loop.  The -m option is for the hashes to be ran.  The file is supposed to feed in value and loop each hash type.

The following changes should help your script. I substituted hash for file.

#!/bin/bash
listhsh="hashlist.txt"

for hash in $(cat $listhsh); do
echo $hash
    hashcat -a 0 -m $hash -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
done

As a test, I ran the line as an echo line to see if it would work:

~$ ./hashcat_test
900
hashcat -a 0 -m 900 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
0
hashcat -a 0 -m 0 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
5100
hashcat -a 0 -m 5100 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
100
hashcat -a 0 -m 100 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
1300
hashcat -a 0 -m 1300 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
1400
hashcat -a 0 -m 1400 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
10800
hashcat -a 0 -m 10800 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
1700
hashcat -a 0 -m 1700 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
5000
hashcat -a 0 -m 5000 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt
600
hashcat -a 0 -m 600 -O ~/devoir_PIII_Alice.txt /usr/lib/rockyou.txt

Hope this helps!


You can use terminal for this as -

To shutdown

sudo shutdown -h now

To reboot

sudo reboot

or

sudo shutdown -r now

To log out

gnome-session-quit

or

gnome-session-save --force-logout


Ubuntu suggestion to dual boot with windows in a lightweight PC

I'd say it depends on how long you intend to keep that hardware running.

Depending on that, use the oldest LTS release that will still be supported when your hardware is gone, as the newer ones possibly demand more from your hardware (especially graphics card and memory).

You can find the lifespan of Ubuntu releases here: https://wiki.ubuntu.com/LTS/


The problem was happening because of me halfway leaving the Gnome3 setup. Some files were casing and causing the problem. Now the problem is fixed. I am using Gnome now.


Dual boot: After Win7 MBR repair a restore of Grub2 reverts to Win7 boot problem

I just encountered a similair problem on two(!) of my labtops (Dual booting with Win7 and Ubuntu 18 on Lenovo Thinkpad L450).

It occurred immediately after applying the "December 10, 2019—KB4530734 (Monthly Rollup)" - or actually during the intermediate reboot that Windows requires

I am positive that the root cause is the exact same thus it can be fixed like I did (I never got around to follow the "boot from a Win7 install media" tips google gave me :-)).

As I was having two identical systems I fixed it like this:

On the still-working system: Made a copy of the file winload.exe to a USB stick
On the BAD system: booted to Ubuntu
Renamed the original (bad) winload.exe file (for potential further investigation)
Added the "known good" winload.exe file
Rebooted into Windows
Now the Windows Update procedure continued (one more reboot IIRC) and I am able to boot into either system without a signature problem.

Now I updated my system #2 and encountered the error again, this time my USB disk was ready and the fix worked...!

I expect that you can use a copy of the winload.exe file from any still-booting Windows 7 system


The freezing is only of the terminal posting the command.  Everything else (including playing a DVD on an external drive) works just fine.


Ubuntu installation alongside Windows 10 in desktop PC

I would try to:

install from different USB stick or from DVD
if still will not boot, load default settings in BIOS


What is the general procedure to install development libraries in Ubuntu?

You have to download the source and compile the libs.

You also need some dependencies before compile SDL2. So install these packages first:

sudo apt-get install build-essential xorg-dev libudev-dev libts-dev libgl1-mesa-dev \
libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev \
libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev \
libdbus-1-dev zlib1g-dev libdirectfb-dev

Method 1: Source code archive
Now you can go to the libsdl download page and download SDL2-2.0.0.tar.gz, extract the archive (you can extract the archive using tar: tar -xvzf SDL2-2.0.0.tar.gz), cd into the directory created, and run the following commands (don't forget to install the dependencies mentioned above, before starting to compile):

./configure
make
sudo make install

Method 2: Mercurial repository
Another way to install SDL2 is to download SDL from the mercurial repository online. In order to do this you have to install mercurial first:

sudo apt-get install mercurial

then download SDL (SDL will be downloaded into the directory you're using the terminal)

hg clone http://hg.libsdl.org/SDL

now go into the downloaded SDL directory and build & install (don't forget to install the dependencies mentioned above, before starting to compile) the libs by running:

cd SDL
./configure
make
sudo make install

Don't forget to run:

sudo ldconfig

to update the necessary links and cache to the libraries.

Code::Blocks
Add to
Project > Build options > Compiler settings > Other options > -lSDL2

and to
Project > Build options > Linker settings > Other linker options -lSDL2

Remember to add these to the Project options and not only to Debug or Release settings. Also, if you've already wrongly compiled the sources, remember to Rebuild it (CTRL + F11)


Wi-fi adapter AR9285 does not work on Ubuntu 18.04 LTS

Okay, so after some research someone suggested it could be that the wi-fi antenna wasn't physically connected. And that was the case.


So it seems I finally solved it. It's both easy and riddled with bugs and obstacles. Answer is yes - use early-commands. But truth is in the details, so detailed answer it is.
First of all, prepare the rest of your environment, you can see my other post about detailed steps I went through to do BIOS/UEFI PXE boot of 20.04 and 20.10:
https://askubuntu.com/a/1292097/1080682
Now when you get your environment working correctly (good luck), let's do the custom autoinstall based on config changes served via HTTP mid install.
So if you follow the guide I posted on the link, I kept my Ubuntu user-data here :
/var/www/html/ubuntu-server-20.04.1/user-data

Modify the file with something like this (note I've shortened it for readability):
#cloud-config

autoinstall:
  version: 1
  refresh-installer:
    update: yes
  apt:
    <apt stuff>
  identity:
    hostname: pxe-client
    password: $6$zN/uHJD1rEXD/ETf$q8CoBt3xXmBT37RslyWcpLT1za4RJR3QEtosggRKN5aZAAf6/mYbFEQO66AIPm965glBXB1DGd0Sf.oKi.Rfx/
    realname: pxe
    username: pxe
  keyboard: {layout: hr, toggle: toggle, variant: ""}
  early-commands:
    - curl -G -o /autoinstall.yaml http://10.10.2.1/user-data -d "mac=$(ip a | grep ether | cut -d ' ' -f6)"
  locale: en_US
  network:
    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: yes
          dhcp6: no

Now, this user-data can be real basic, all we need really is for it to have network enabled and that one-liner curl in early-commands. IP 10.10.2.1 is local IP of my HTTP server (also my PXE server, as I serve other config files and ISO images and all that through it, but doesn't matter).
Use whatever you want to modify and serve this file based on the request. Way it is being done above with curl you will actually request from server something like this:
GET /user-data?mac=fa:fa:fa:00:0e:07

The part fa:fa:fa:00:0e:07 is what server sends after querying it's own interfaces. If you have multiple interfaces you'll maybe need to tweak the script, or make sure only one interface is up during early install steps.
I'm planning to use that via PHP + MySQL, and after fetching it in PHP using $_GET["mac"] do something like SELECT * FROM autoinstall-configs WHERE mac = '$_GET["mac"]'; and from data in database table build the new autoinstall.yaml and serve it back to subiquity.
Anyway, your reply has to NOT HAVE the line autoinstall: !!
Here is minimal example of what HTTP/PHP will reply, I changed just hostname and username, and modified it so it passes subiquity syntax checks, oh and excluded early command not to get stuck in loop:
  version: 1
  refresh-installer:
    update: yes
  apt:
    <apt stuff>
  identity:
    hostname: php-client
    password: $6$zN/uHJD1rEXD/ETf$q8CoBt3xXmBT37RslyWcpLT1za4RJR3QEtosggRKN5aZAAf6/mYbFEQO66AIPm965glBXB1DGd0Sf.oKi.Rfx/
    realname: php
    username: php
  keyboard: {layout: hr, toggle: toggle, variant: ""}
  locale: en_US
  network:
    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: yes
          dhcp6: no
  ssh:
    allow-pw: true
    install-server: true
  late-commands:
    - poweroff

To make it clear, here is the diff of the two files:
diff /var/www/html/ubuntu-server-20.04.1/user-data /var/www/html/user-data

1,3d0
< #cloud-config
<
< autoinstall:
16c13
<     hostname: pxe-client
---
>     hostname: php-client
18,19c15,16
<     realname: pxe
<     username: pxe
---
>     realname: php
>     username: php
21,22d17
<   early-commands:
<     - curl -G -o /autoinstall.yaml http://10.10.2.1/user-data -d "mac=$(ip a | grep ether | cut -d ' ' -f6)"

So it's almost the same, just not. These changes (removal of autoinstall: and early-commands: ) is required to pass on to rest of installation. You can test other tweaks on your own.
After that installation will continue with whatever new info was served via answer to request /user-data?mac=<installer-mac-address>.
This is now opening door to further possibilities of making your own web management for your VMs or server farms, or whatever. No longer do you need hand crafted user-data file for every server or group of servers. You can send them each their unique config, so including exact static IP address, partition sizes, different hostname, password, etc.
Canonical, if you pick an idea from this, put me in the credits at least :)
Case closed, cheers!


is it possible to configure 6 Monitors with a Amd r7 260x in different graphical virtual consoles?

I have the xfx r7 260x you have.  I have it hooked up to 2 Dell P2815Q (4K), 1 Dell U2713HM (2560x1440) and one Dell E2414Hr (1920x1080) on ubuntu 12.04.  I have the two P2815Q daisy chained on DP, the U2713HM on the DVI-D and the E2414Hr on the DVI-I.  For now, you cannot daisy chain with the open source drivers, but I did manage to get it working with the AMD catalyst driver.  It is not easy and, if you try to boot with all 4 monitors connected, not all of them will work.  I have found this sequence to work most of the time: boot and login with only the two displayport 4K monitors hooked up, then plug in the other two.  Also, this messes up compwiz a little so you may need to mess around with virtual desktops and viewports, and you need to reset any background as it goes black.

David Airlie is working on some MST support (see other questions in this forum) and it is supposed to come in kernel 3.17.  I recently tried 3.17 r7, but it either isn't working, or doesn't work with AMD.  That kernel will not be in ubuntu for a while, so you're best to work with the catalyst drivers for now.

Note: the daisy chain could support the U2713HM (on the end of the chain) too as it has DP imput but, because the two P2815Q need a lot of bandwidth, Displayport 1.2 bandwidth then limits to only two of them working at once.  Displayport 1.3 will increase bandwidth and may allow it to work.


Some video files in Android phone don't shown when connected to Ubuntu OS

According to @Pilot6 comment :

  Your videos are on SD card. – Pilot6 11 mins ago

I checked my Android phone an found @Pilot6 is right, So i answered my question by myself and the answer is :

  The videos are on SD card ...

Thanks.


I had a look on Thunar (default file-manager on XFCE) and it reports ^M (ctrl+M) will display/hide the menu bar.

I had it visible so could look thru my menus, but if I didn't I'd have tried to hit ALT+V in hopes it'd show the VIEW menu (or ALT+F to show FILE menu).  It won't work in every program, desktop or place, but works for many.


Filesystem Root Disk Space too Low - Syslog Too Big

I would really like to know what could be causing my syslog to suck the life out of my machine.

tail -f /var/log/syslog

and look for repeated lines. If those are errors fix the error. If those are warnings check what program those are from an change the log level of that program.

And -after- that do a

sudo > /var/log/syslog

to empty the file.

  I attempted to open the syslog and apart from normal looking entries intially my page just went solid black...like to government is onto me or something.

Do not use an editor or something that will try to read the whole file. Use tail, less , or more.