Is it possible to avoid setting path manually for python package executables?

@muru provided proper diagnostics: the issue with local directories arises only when running pip3 install cheat.

When running sudo pip3 install cheat the package executable installs to /usr/local/bin/ which is on path.

For the rest of the question "Why did my local version of python package install to a directory which is not in path", the overall answer is close to "You have to know your system and folder structure", which equates to "Put ~/.local/bin/on path.

So reiterating to conclude - if you are installing a package with pip and you are not in sudo mode, you have to add ~/.local/bin/ to path to make package executable run.


Was a problem with HPA

http://en.wikipedia.org/wiki/Host_protected_area

hdparm -N /dev/sdX


Network connection drops down after upgrading to Ubuntu 19.04

What is the space in name server? Can you delete the space and try again? And if it does not help you, please try to turn off IPv6 as the following.

Please add

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

to

/etc/sysctl.conf

and then type the following command and press Enter on a command line

sudo sysctl -p

Next, please create a new file /etc/rc.local and add these contents

#!/bin/bash
# /etc/rc.local

# Load kernel variables from /etc/sysctl.d
/etc/init.d/procps restart

exit 0

and give the permission to execute to the file

chmod 755 /etc/rc.local


How to disable read-write mode in Ubuntu Touch without a PC?

Open the Terminal app in your phone and enter:

sudo mount -o remount,ro /


I accidentally deleted a file while it is still transferred via SCP. What happens?

scp will copy your file without problems.

If you delete a film that is opened by a process only the file name gets removed but the file still exists. You can access the deleted file via a symlink in /proc/$PID/fd where $PID is the process id of the process using the file.


I too have previously tried many different instructions without success and had almost given up when I found a working method using the very nicely created mkusb tool.

Prior Considerations

I am assuming you have the .iso file (of Ubuntu 16.04) already downloaded. If not get it.

I have tried running these instructions from a Live USB stick so they should work from a LiveCD as well.
Note that the USB stick I am live booting from is different from the one I intend to make as a persistent system. I.e. I have 2 USB sticks:

The one I am booting from (it has Ubuntu 16.04 already)
The one I am about to make a persistent live USB.

Installing mkusb

Open a terminal (Ctrl+Alt+T) and run the following commands one by one:

sudo add-apt-repository universe
sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update

sudo apt-get install mkusb

The last command might fail (though unlikely) as mkusb (GUI version) has some dependencies that are not preinstalled/active in the live version of Ubuntu.

No need to panic though, the developer has also created a text only version. Run:

sudo apt-get install mkusb-nox

Creating the persistent drive

I will focus on the main GUI version as that is the one I have used. So if you installed the default mkusb (GUI version) run:

sudo -H mkusb /path/to/iso/filename.iso p

For example I have copied my Ubuntu iso to the the home folder, so I type:

sudo -H mkusb ubuntu-16.04-desktop-i386.iso p

The last p parameter tells mkusb that I want a persistent live install. If you omit that you will get a simple live USB.

After you run the command the GUI will open.
Follow these steps next:

Screen 1: Click Select target device
Screen 2: Double-Click the device you want to install to.
Screen 3: Double check you have selected the right device. Tick the check-box and click Go.
Screens 4, 5: Just click quit and let mkusb decide what's best.

After this mkusb will load some files. Wait patiently till the next input screen.
Screen 6: Enter the percentage of USB drive space you want to allot for persistence file-system. The remaining will show up as portable storage device.

Note: Do not enter a value like 100% as some memory will be required for the Ubuntu OS files. Apparently entering 100% now works. As mentioned in @LMB comment, using 100% means the entire USB is used for the OS and the persistent storage

Done!

Screenshots

The whole process should look something like the following.

Run the command in terminal:

Click Select target device:

Click on the USB drive to make persistent. I want to use my 32 GB one so I double click on option 2:

Double check very carefully and confirm. You don't want to mess up another drive.

Click quit to let mkusb choose default:

Click quit to let mkusb choose default:

Enter a percentage of the drive to reserve for persistence. Mine is a large (32GB) so I allot only 20% ~ 6GB:

If all goes well you will be greeted by a nice green finished screen:

Now plug your newly made persistent drive in any system and check if it really stores data/settings across reboots (Mine does).

References

You can refer to a nice tutorial by Calvin Bui here to guide you through the GUI step by step or read through the detailed documentation
https://help.ubuntu.com/community/mkusb
There has been a previous discussion about it here https://askubuntu.com/a/753163/585316 which I found useful.

Update [August 2017]

As of 01-August-2017 the current version of mkusb (ver 12) is renamed as dus. An updated version of this answer for dus is available here: https://askubuntu.com/a/853839/585316


Error compiling program - Maths library failure?

Your research has led you along the right lines.

Examination of the software's Makefile shows that the rules for creating target parsefish are

parsefsh: parsefsh.o fshfunc.o projection.o

parsefsh.o: parsefsh.c fshfunc.h

fshfunc.o: fshfunc.c fshfunc.h

projection.o: projection.c projection.h

Because there are no explicit actions for these rules, GNU Make uses its built-in rules. For the compile phase (.c to .o) that's

$(CC) $(CPPFLAGS) $(CFLAGS) -c

which works fine, given the Makefile's definitions

CC = gcc
CFLAGS = -Wall -Wextra -g -std=gnu99 -DHAVE_VLOG

however in the link phase, the rule is of the form

$(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)

Note that $(LDFLAGS) comes before the object code file n.o, whereas $(LOADLIBES) and $(LDLIBS) come after. In the Makefile, only LDFLAGS is defined:

LDFLAGS = -lm

which puts -lm in the wrong place (references are resolved from left to right).

The simplest solution is simply to change LDFLAGS = -lm to LDLIBS = -lm.


My IDE keeps crashing instantly: How do I diagnose?

There are nicer ways for sure; a simple approach however would be starting your application from terminal. There you see the output even after it has crashed.


Does rsync requires changing UUID after copying a partition?

rsync does not copy partitions
rsync is a file and folder copying/syncing tool. It is great for syncing a local folder with a folder in a remote computer or backing up folders and files in one computer to another computer.
One thing it does not do is clone a partition. Therefore there is no need to worry about UUID of the partitions while using rsync.
Use gparted (or dd) to clone a partition
If you want to copy a partition, use GUI gparted or commandline dd. It will make an exact copy of the original partition with the exact size and free space as in the original. The copy will also have the same UUID.
This is a problem when a system tries to mount a partition by its UUID, such as using the /etc/fstab file and finds two partition with the same UUID. If the original and the copy are in two different computers, or if the copy replaces the original then the same UUID should not be a problem.
To give the copied partition a new UUID from within gparted:

Select the copied partition. Make sure it is not mounted
Go to Partition in the top menu or right click on the partition
in the diagram
Click on New UUID
Click Apply to make the change

To assign a new UUID using the command line (for ext4 partitions only)
$ tune2fs -U $(uuidgen) /dev/sdXN

or
$ tune2fs -U random /dev/sdXN

where X is a letter, and N is a number specific to the partition of interest.
See answers to this question in Stackexchange for more on changing UUID using the commandline.
Hope this helps


Unable to install google chrome in ubuntu12.04 via "google-chrome-stable_current_i386.deb"

Just double tap on google-chrome- stable.deb and wait until the ubuntu softeware center is open then click on install this method is better than " dpkg " and works perfectly


Is it possible to change user while logged in as guest?

The first thing to do is to choose strong password with at least 16 characters.

TTY or console is just a non graphical terminal.

guest is a restricted account with limited privileges and you can't sudo with that account.

Your only option if you have disabled the other admin account on the login screen, is to switch to a console (aka use ctrl-alt-f1) and do your administration work there. This will mean using only the command line, so you need to improve your cli-fu to be fluent with it.

Mainly you need to know apt-get, dpkg, apt-cache, apt-file, nano

Disable TTYs

And you can disable ttys also, but then the only way to administer the PC will be via ssh (if it is connected to a LAN), given you have installed and configured openssh-server correctly.

Disable the ability to switch to TTYs (Ctrl+Alt+F1…F6)
How can I reduce the number of TTYs?


This wiki page provides information about AppArmor profiles that are present by default or can be installed through the package manager. You may be surprised how many are available, including those that are not in use by default. I recommend reading that before seeking profiles elsewhere.

AppArmor profiles for Ubuntu that are still in development are not generally present by default or available by installing a package, however. You can find them in this Bazaar repository.


Ubuntu 13.04 startup freezes (ATI Radeon RV730)

Parts 1-3 are suggesting Radeon HD 4670

Part 1

My answer comes 1 month later after the question but if you haven't cleared the issue meanwhile, maybe this helps.

As long as the AMD Radeon HD 4000 Series are concerned, AMD isn't providing support beyond specific Kernel version (3.4) and Xserver version (1.12). They are considering this cards legacy.

You can read about this in the footnote of the official AMD drivers download link for Linux (x86/x86_64): http://support.amd.com/us/gpudownload/linux/legacy/Pages/legacy-radeon_linux.aspx

This actually means that if you want 3D acceleration in Ubuntu for AMD Radeon HD 4000 Series you can go as far as Ubuntu 12.04 LTS (that has Kernel 3.2 and Xserver 1.10).

Ubuntu 12.10 has Kernel 3.5 and Xserver 1.13.
Ubuntu 13.04 has Kernel 3.8 and Xserver (still) 1.13.

So, even if you managed to install fglrx in Ubuntu 12.10, it doesn't work at all (but at least it doesn't crash your system). On Ubuntu 13.04 things seem to get worse - from your post - with the system freeze.

I know all this because I also have a HD 4670 card and I've tried to install accelerated drivers for Ubuntu 12.10, run into problems and tried to get to the bottom of the issues. I now run Ubuntu 13.04 with the open source drivers for HD 4670.

Part 2

If up to now it's not very clear: you should remove any fglrx driver from your system as it doesn't really work at all (for all the reasons previously explained) and can only lead (in the worst case) to system freeze. There is no fglrx driver (Ubuntu provided or AMD provided) that supports HD 4670 on Ubuntu 13.04 (or 12.10 as well).

Part 3

What I suspect first and foremost is that fglrx is creating a custom xorg configuration file [/etc/X11/xorg.conf] on install and "forgets" to remove it on uninstall which will throw your graphics into the woods when you restart.

If you've got the time/mood for it, you can try this:

as I understand you now have fglrx installed, please check for the presence of file [/etc/X11/xorg.conf]. If the file is present then continue with 2. else just stop now and do nothing more;
remove fglrx. Immediately after removing fglrx (but before re-booting) check again the presence of file [/etc/X11/xorg.conf]:

If the file isn't there anymore this means my guess was not correct and you probably should install back fglrx so your system can boot to the desktop.
But if the file it's still there just rename/delete it and reboot next.

Part 4

As you indicate that you actually have a HD 5670, this is a totally different situation.

If you go to http://support.amd.com/US/GPUDOWNLOAD/Pages/index.aspx and put the right parameters (Desktop Graphics, Radeon HD Series, Radeon HD 5xxx Series PCIe, Linux x86_64) you'll see that your video card is still current and AMD provides drivers for it that should work in Ubuntu 13.04 (see the note about Xserver up to 1.13 but note there's nothing mentioned about the Kernel version). There are 2 driver versions: stable is 13.4 and beta is 13.6.

You have 2 options:

open in Ubuntu "Software & Updates" and go to the last tab [Additional Drivers]. Ubuntu should suggest what options you have (if any). If fglrx or fglrx-updates is listed as an option it is a little strange it didn't work for you already (maybe it wasn't correctly/fully installed) and maybe you can try it again (but install from [Additional Drivers] if you didn't before). If no option appears it means that none of fglrx or fglrx-updates provided in Ubuntu 13.04 don't support HD 5670 and you should see option 2 next;
if there's no option at 1. or if no option works (I've checked with synaptic for Ubuntu 13.04 and if Ubuntu fglrx version numbers follow AMD driver version numbers, the versions from Ubuntu 13.04 are rather old: 9.10 for fglrx and 9.12 for fglrx-updates) than try one of the drivers from AMD site (I would recommend to try first the stable version and only if this doesn't work, try the beta version). Be advised that, no matter the stable or beta version, you'll have to manage installation (& uninstallation, if needed) independently from the Ubuntu package management.


There will be a lot to the technical details to this solution. Feel free to jump to the layout file section if you do not care about the problem but only on the solution.

xmodmap

Moving up and down via CAPS and Shift+CAPS works on my system with the given .Xmodmap as expected.

You check whether your settings are actually in affect by calling

$ xmodmap -pk | grep ^\\s*66
     66     0xffe5 (Caps_Lock)  0x0000 (NoSymbol)   0xffe5 (Caps_Lock)
$ setxkbmap -layout us && xmodmap ~/.Xmodmap
$ xmodmap -pk | grep ^\\s*66
     66     0xff54 (Down)   0xff52 (Up)

the LEVEL2 Modifier

There is another (real) problem to your question that comes next:

The LEVEL2 <SHIFT> modifier which is activated by pressing the Shift button is there to visually mark characters in a text editor when moving through the lines with the arrow keys. If you assign <UP> ↑ to the second level of <CAPS>, what you are effectively doing is pressing Shift+↑. You have to deactivate the Shift modifier just for that scenario. Afaik you can not do this using xmodmap.

redirecting LEVEL2 Modifier

The "real way" of modifying key maps is with xkb. I found the solution on an old xorg mailing list. The LEVEL2 of Caps has to get redirected to the ↑(<UP>) key (The Up-Key btw has only one level.) On X.org you can deactivating the Shift modifier during redirect with the built-in function RedirectKey(key=<UP>, clearmods=Shift). clearmods "releases" the Shift modifier before the the key is actually "pressed".

layout file

The simplest way to activate the behavior is to create a new layout file:

/usr/share/X11/xkb/symbols/capslockarrow

default partial xkb_symbols "basic" {

    include "de(basic)"
    include "shift(both_capslock_cancel)"

    key <CAPS> {
        type[Group1] = "TWO_LEVEL",
        symbols[Group1] = [ Down, NoSymbol ],
        actions[Group1] = [ NoAction(), RedirectKey(key=<UP>, clearmods=Shift) ]
    };
 };

activate the new layout with

setxkbmap capslockarrow

Notes on the layout file

The new layout file derives from de(basic). That is the layout for the standard german keyboard. You can add any other layout here like us(basic) or us(euro). see /usr/share/X11/xkb/symbols/ to get a glance of what is possible. The two letter code is the filename and in brackets is the respective xkb_symbols definition from the file.
You would not have a caps key modifier anymore. Therefore I added a sort of replacement for Caps: shift(both_capslock_cancel) By pressing both LSHIFT and RSHIFT together, you can activate CAPS Lock and you release the Lock again with any other press of a Shift key.
If anyone is wondering why I did not use a new type definition for that: I simply could not release the Shift modifier before the action of the Up Key was triggered. Releasing the Shift key though should be possible by explicitly calling preserve[Shift] = None in a spearated xkb_types.
As stated in the comments below, Wayland will also rely on XKB but will not allow redirections.


Xubuntu 16.04 Firefox 46 screen distortion when scrolling

Compositor in xfce causes display problems sometimes. Go to Settings → Window Manager Tweak → Compositor and uncheck the Enable display compositing (if you don't need any of the visual effects) and see if that helps. I'm not sure (correct me if I'm wrong), but I believe that before xubuntu 14.04 compositor was disabled by default.


Function key is always turned on in Ubuntu 17.10

Try the shift button.

In my case fn+shift turns off fn


Tool comparable to Windows Paint that would run on Linux

You can try GIMP.  It is an excellent cross-platform tool.

You will find GIMP on Ubuntu Software Centre.

If you want something lighter weight, you can try Pinta.  It too is available to install through the Ubuntu Software Centre.


How do I open port 51413 for Transmission?

It could very well be your ISP blocking it.  Try a different port, and see if you can find any info on the web about your ISP restricting incoming traffic or BitTorrent traffic.

When troubleshooting ufw, you should just disable it temporarily to ensure it's not the problem.


To enable it do those commands (install package called numlockx)
sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enable\n[ -x /usr/bin/numlockx ] \&\& /usr/bin/numlockx on\n\nexit 0|' '/etc/rc.local'

check this community wiki https://help.ubuntu.com/community/NumLock  for more information
Why numlock is disabled by default?
I think because of some laptops and netbooks keyboards require numlock to be disabled to function all keys.
For example look at this laptop keyboard, When enabled, NumLock lets you use the 7-8-9, u-i-o, j-k-l and m keys as a numeric keypad.


Live USB distros won't stay connected to internet

Your chipset from Realtek is badly supported, a quick Google search shows lots of similar problems under linux.

A driver for your chipset is available on Github. You would need to download it and compile it yourself. Install  build-essentials , download the zip archive and compile the driver in the rtl8188ee folder with the classic ./configure, make and sudo make install.


Problems with Adobe Flash Plugin in Ubuntu 12.04 LTS

I ran into the same issue. dpkg showed that flashplugin-installer was already installed but no flash in Firefox. I resolved it by running

sudo apt-get --reinstall install flashplugin-installer


How to select folders to sync in UbuntuOne?

Open the folder you want to sync in Nautilus.
Right-click with the mouse.
Select 'Ubuntu One / Synchronise This Folder


Getting "account locked" error while trying to log in Yahoo! in "Pidgin Messenger"

i fixed this by going into mail.yahoo.com and use the yahoo messenger there, all i did was getting online there and then offline again, so my account was unblocked and i could access yahoo on pidgin.


How to remove Ubuntu SDK click target (failed one)

here i am just giving example related to 15.04-armhf you can specify which you want to remove
First run this

sudo click unregister --user=phablet click-ubuntu-sdk-15.04-armhf

if its not working then you can remove directly from

rm -rf /etc/schroot/chroot.d/click-ubuntu-sdk-15.04-armhf
rm -rf /var/lib/schroot/chroots/click-ubuntu-sdk-15.04-armhf

then you can create from Tool>Options>ubuntu

other wise you can create via commandline

sudo click chroot -a armhf -f ubuntu-sdk-15.04 create

-a is architechture and -f is framework.


If you newly installed PowerTop, give it some time... It takes a few days to get the estimates correct and then starts displaying. I found this info on the net and also speak from experience...


The simplest and easy way to install Wi-Fi driver is to use Ndiswrapper

Install Ndiswrapper

download your Wi-Fi driver (windows version)
Launch Ndiswrapper tool.
Click on Install new driver brows to you Wi-Fi driver
your are done.


There are a few possible solution:

Copy the files to view to your local system and open them from there.
Open an SFTP connection to the server with a GVFS- or KIO-capable file manager (e. g. Nautilus, Nemo, Thunar, Dolphin, Konqueror) and open the files through it.
Use sshfs to mount a network file system over SSH and open the files through its mount point.
In a similar fashion you can set up and use other remote file system services like NFS or CIFS/SMB/Samba.


Change global environment variable using a script that is started using xbindkeys?

That's the expected behavior. A program is only able to set environment variables for itself and its child processes.

In your case you could either store the current state in a file (like ~/.active-modemap) and act on the content of that file. Or you might be able to get the currently used modemap by looking (with grep etc) at the output of xmodmap -pke (or any other output of modemap).


"QtQuick version 2.0 is not installed" while trying to run CurrencyConverter Example for Ubuntu Phone

You are using qmlviewer when you should be using qmlscene. Quote from the tutorial:

To start QML applications, either during the prototyping or final stages, you will use QML Scene. QML Scene is a command-line application that interprets and runs QML code.

...

Here's a tip: although Qt Creator does not yet support qmlscene as QML viewer, you can invoke it from within the IDE. Here’s how:

In Qt Creator, go to Tools > Options…
Choose the External Tools tab, then in the pane select the Preview (qmlviewer) entry
On the Executable: field on the right, replace the contents with /opt/qt5/bin/qmlscene.
Optionally change the command name by double-clicking on the Preview (qmlviewer) entry from above. You can call it Preview (qmlscene).
Click on OK to save the changes.

You can also run QML Scene from the command line:

$ qmlscene /path/to/application.qml


Is there a better command to use than Sudo?

Assuming you are on Ubuntu 14.04, and you want to avoid the command line, otherwise sudo works fine.
I believe your answer is here which is a "open as admin" right-click context menu.


How do I join a channel on Freenode with Empathy?

Basically the channel name for the ape-project is #ape-project. So after joining to freenode on empathy Just do

/join #ape-project

on text input field.


How to make cursor change from thin line to block based on normal or insert mode in Console Vim on Gnome Terminal

For gnome-terminal, add this to your ~/.vimrc (to be created if missing):

if has("autocmd")
  au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
  au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block"
  au VimLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
endif

Found here: Change cursor shape in different modes.

EDIT

Change the last ibeam to block, to leave with a block cursor.


Boot problems after upgrading from 12.04 to 12.10

The message asking you to press S or M might be this one:

I suppose that it could not mount one of your Disk Drive.

This could be cause by:

an error in your file /etc/fstab (this file list how to mount your drives)
=> to solve it, reboot your PC with Recovery mode, in recovery mode menu:

go to Grub option, it will give a message like Updating grub will mount your system in read/write mode. Just chose yes to mount your system in read/write mode. It will update your grub and will exit from Grub menu.
after go to root option and login. Execute following commands:

$ blkid

this should give you the UUID of your Disk

$ cat /etc/fstab

this should give you the content of your fstab file

Check that your Disk UUID is listed in there.
Then please edit your question adding the content of your fstab file to help identify the source of the problem.

or caused by a physical wire disconnected, yes it happens sometimes (as you are mentioning a weird noise on 1st reboot)


What happens when a program gets removed from the Software-Center?

While it is still FOSS, it may be possible that the program (or any other program out of the Software-Center) gets bought by a company that applies a proprietary license or adds other functionality that does not agree with the terms of the Ubuntu software repositories made available to the users in the Software-Center.

Not being FOSS or having a proprietary license has never been an issue for Canonical (see the restricted and multiverse repositories).

If something can't stay in the repositories anymore for other reasons:

  What will happen to the program on my computer, if I already have installed it at that point?

Nothing. It will sit there peacefully.

  Will it automatically be removed from my system?

No.

  Will it just not be updated to the next version?

Yes.

  Will the last appropriate version still remain available in the Software-Center?

It depends on the reasons behind the removal. E.g. if a package is harmful, indeed it will be removed.

  And will I receive some kind of notification about any of this?

No.

You can however check if a package is not in the repositories at any time by running apt-cache policy <package>;

A package that has no available version in the repositories won't show a version available from the repositories as a candidate for the installation.


Why is xrandr reporting a resolution just above the maximum (native) resolution?

After a failed(11.04 to 12.04) dist-upgrade, and a switch to plain Debian Testing, xrandr is reporting correctly.

    Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1366x768       60.0*+
   1360x768       59.8     60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

All sorts of things that were not being detected before are now showing up, including refresh rates and the like.

I've obviously changed too many variables at once to make a concrete diagnosis.

Thanks to Mik and phipsalabim for taking the time to edit and make suggestions.


I modified the ambiance-theme to dark toolbars (including nautilus, banshee etc..) and some other changes as smaller scrollbars.
My changes are based on the Wasp theme (see gnome-look).

It looks like this:

You can find the whole theme here: ambiance theme with dark toolbar

The icons are a personal mix of AwOken and Faenza. I can publish it, if you are interessted.

My modified gtkrc for ambiance:

gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#7EA2B8\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#7EA2B8"

gtk-icon-sizes = "panel-menu=22,22:gtk-button=16,16"

gtk-auto-mnemonics = 1

style "default" {
    xthickness = 1
    ythickness = 1

    #######################
    # Style Properties
    #######################
    GtkWidget::new-tooltip-style = 1
    GtkButton::child-displacement-x = 1
    GtkButton::child-displacement-y = 1
    GtkButton::default-border = { 0, 0, 0, 0 }

    GtkCheckButton::indicator-size = 16

    GtkPaned::handle-size = 0  #MSE

    GtkRange::trough-border = 0
    GtkRange::slider-width = 14
    GtkRange::stepper-size = 16
    GtkRange::trough-under-steppers = 1

    GtkScale::trough-border = 0
    GtkScale::slider-width = 23
    GtkScale::slider-length = 14
    GtkScale::trough-side-details = 1

    GtkScrollbar::activate-slider = 1
    GtkScrollbar::trough-border = 0
    GtkScrollbar::stepper-size = 0
    GtkScrollbar::slider-width = 7
    GtkScrollbar::min-slider-length = 31
    GtkScrollbar::has-backward-stepper  = 0
    GtkScrollbar::has-forward-stepper   = 0

    GtkScrolledWindow::scrollbar-spacing = 2
    GtkScrolledWindow::scrollbars-within-bevel = 1

    GtkMenuBar::internal-padding = 0
    GtkExpander::expander-size = 11
    GtkToolbar::internal-padding = 1
    GtkToolbar::shadow-type = GTK_SHADOW_NONE
#   GtkTreeView::expander-size = 7
#   GtkTreeView::vertical-separator = 0
#   GtkTreeView::odd-row-color = shade (0.96, @base_color) # MSE
    GtkNotebook::tab-overlap = -1

    GtkMenu::horizontal-padding = 0
    GtkMenu::vertical-padding = 0

    WnckTasklist::fade-overlay-rect = 0
    # The following line hints to gecko (and possibly other appliations)
    # that the entry should be drawn transparently on the canvas.
    # Without this, gecko will fill in the background of the entry.
    GtkEntry::honors-transparent-bg-hint = 1
    GtkEntry::state-hint = 0
    GtkEntry::progress-border = { 2, 2, 2, 2 }

    GtkProgressBar::min-horizontal-bar-height = 14
    GtkProgressBar::min-vertical-bar-width = 14

    GtkImage::x-ayatana-indicator-dynamic = 1
    GtkMenuBar::window-dragging = 1

    GtkWidget::link-color = @link_color
    GtkWidget::visited-link-color = @text_color

    ####################
    # Color Definitions
    ####################
    bg[NORMAL]        = @bg_color
    bg[PRELIGHT]      = shade (1.02, @bg_color)
    bg[SELECTED]      = @selected_bg_color
    bg[INSENSITIVE]   = shade (0.95, @bg_color)
    bg[ACTIVE]        = shade (0.9, @bg_color)

    fg[NORMAL]        = @fg_color
    fg[PRELIGHT]      = @fg_color
    fg[SELECTED]      = @selected_fg_color
    fg[INSENSITIVE]   = darker (@bg_color)
    fg[ACTIVE]        = @fg_color

    text[NORMAL]      = @text_color
    text[PRELIGHT]    = @text_color
    text[SELECTED]    = @selected_fg_color
    text[INSENSITIVE] = shade (0.8, @bg_color)
    text[ACTIVE]      = darker (@text_color)

    base[NORMAL]      = @base_color
    base[PRELIGHT]    = shade (0.98, @bg_color)
    base[SELECTED]    = @selected_bg_color
    base[INSENSITIVE] = shade (0.97, @bg_color)
    base[ACTIVE]      = shade (0.94, @bg_color)

    engine "murrine" {
        contrast = 0.6
        arrowstyle = 2
        reliefstyle = 3
        highlight_shade = 1.0
        glazestyle = 0
        default_button_color = shade (1.1, @selected_bg_color)
        gradient_shades = {1.1, 1.0, 1.0, 0.9}
        roundness = 4
        lightborder_shade = 1.26
        lightborderstyle = 1
        listviewstyle = 2
        progressbarstyle = 0
        colorize_scrollbar = TRUE #FALSE #MSE
        menubaritemstyle = 1
        menubarstyle = 1
        menustyle = 2
        focusstyle = 3
        handlestyle = 1
        sliderstyle = 3
        scrollbarstyle = 0 #2
        stepperstyle = 3
#       rgba = TRUE
    }
}

style "dark"
{
    fg[NORMAL]        = "#dfdbd2"
    fg[PRELIGHT]      = "#fff"
    fg[ACTIVE]        = "#fff"
    fg[SELECTED]      = "#fff"
    fg[INSENSITIVE]   = shade (0.5, "#3c3b37")

    bg[NORMAL]        = "#3c3b37"
    bg[PRELIGHT]      = shade (1.0, "#4D4C48")
    bg[ACTIVE]        = shade(0.94, "#3c3b37")
    bg[SELECTED]      = shade(1.0, @selected_bg_color)
    bg[INSENSITIVE]   = "#3c3b37"

    base[NORMAL]      = "#3c3b37" #"#333230"
    base[PRELIGHT]    = shade (0.95, @bg_color)
    base[ACTIVE]      = shade (0.55, @bg_color)
    base[SELECTED]    = shade (1.0, @selected_bg_color)
    base[INSENSITIVE] = @bg_color

    text[NORMAL]      = "#dfdbd2"
    text[PRELIGHT]    = @base_color
    text[ACTIVE]      = @base_color
    text[SELECTED]    = @base_color
    text[INSENSITIVE] = mix (0.5, @bg_color, "#3c3b37")
}

style "narrow" {
    xthickness = 1
    ythickness = 1
}

style "wide" {
    xthickness = 2
    ythickness = 2
}

style "wider" {
    xthickness = 3
    ythickness = 3
}

style "entry" {
    xthickness = 3
    ythickness = 3

    engine "murrine" {
    }
}

style "vscale" {
}

style "hscale" {
}

style "button" = "wider"
{
    bg[NORMAL]   = shade (1.10, @bg_color)
    bg[PRELIGHT] = mix(0.82,shade (1.1, @bg_color),@selected_bg_color)
    bg[ACTIVE]   = shade (0.85, @bg_color)

    engine "murrine"
    {
        border_shades       = { .8, .5} # draw a gradient on the border.
        #border_colors       = { "#D9D4CC", "#D9D4CC" }
        border_colors       = { @bg_color, @bg_color}
        contrast = 1.4
        lightborder_shade = 1.06
    }
}
style "notebook_button" {

    xthickness = 3
    ythickness = 3

    bg[NORMAL] = @bg_color
    bg[PRELIGHT] = shade (1.04, @bg_color)
    bg[ACTIVE] = shade (0.96, @bg_color)
    bg[INSENSITIVE] = @bg_color

    engine "murrine" {
        textstyle = 1
        border_shades = {0.95, 0.88}
        glowstyle = 5
        glow_shade = 1.02
        lightborder_shade = 1.32
    }
}

style "spinbutton" = "notebook_button" {
    xthickness = 4

    engine "murrine" {
    }
}

style "scrollbar" = "button" {  #"button"
    xthickness = 2
    ythickness = 2

    bg[NORMAL] = "#3c3b37"
    bg[PRELIGHT] = shade (1.10, "#3c3b37")
        bg[ACTIVE] = shade (1.10, "#3c3b37")

    engine "murrine"
    {
        border_shades = {0.95, 0.90}
        roundness = 20
        contrast = 1.0
        trough_shades = {0.92, 0.98}
        lightborder_shade = 1.3
        glowstyle = 5
        glow_shade = 1.02
        gradient_shades = {1.2, 1.0, 1.0, 0.86}
        trough_border_shades = {0.9, 0.98}
    }
}

style "hscrollbar" {
}

style "vscrollbar" {
}

style "scale" = "button" {
    bg[NORMAL] = @bg_color
    bg[PRELIGHT] = shade (1.06, @bg_color)
    bg[ACTIVE] = shade (0.94, @bg_color)

    engine "murrine" {
        contrast = 0.6
        border_shades = {0.9, 0.8}
        roundness = 5
        lightborder_shade = 1.32
        gradient_shades = {1.1, 1.0, 1.0, 0.8}
        handlestyle = 2
        trough_border_shades = {0.9, 1.4}
        glow_shade = 1.0
#       reliefstyle = 2
#       shadow_shades = { 1.0, 0.9 }
    }
}

style "notebook_bg" {
    bg[NORMAL] = shade (1.02, @bg_color)
    bg[ACTIVE] = shade (0.97, @bg_color)
    fg[ACTIVE] = mix (0.8, @fg_color, shade (0.97, @bg_color))
}

# The color is changed by the notebook_bg style, this style
# changes the x/ythickness
style "notebook" {
    xthickness = 2
    ythickness = 2

    engine "murrine" {
        roundness = 3
        contrast = 0.8
        focusstyle = 2
        lightborder_shade = 1.16
        gradient_shades = {1.1, 1.0, 1.0, 0.68}
    }
}

style "statusbar" {
    engine "murrine" {
        contrast = 1.2
    }
}

style "comboboxentry" = "notebook_button" {
    xthickness = 3
    ythickness = 3

    engine "murrine" {
        textstyle = 1
        glowstyle = 5
        glow_shade = 1.02
    }
}

style "menubar" = "dark" {
    engine "murrine" {
        textstyle = 2
        text_shade = 0.33
        gradient_shades = {1.0, 1.0, 1.0, 1.0}
        lightborder_shade = 1.23
    }
}
style "dark-toolbar" = "dark"
{
    xthickness = 3
    ythickness = 3
    bg[NORMAL] = "#3c3b37" #"#343330"
    bg[PRELIGHT] =  shade (0.65, @selected_bg_color)
    bg[SELECTED] =  shade (0.35, @bg_color)
    bg[ACTIVE] =  shade (0.35, @bg_color)

    engine "murrine"
    {
        border_shades = {1.3, 1.1} # draw a gradient on the border.
        border_colors = {"#3c3b37", "#3c3b37"}#{ "#343330", "#343330" }
        glowstyle = 4
        gradient_shades = {1.05,1.0,1.0,0.9}
            highlight_shade = 1.1
            lightborder_shade   = 1.05
            reliefstyle = 4     # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow.
            contrast = 1.4
    }
}

style "dark-toolbar-sep" = "dark-toolbar"
 { xthickness = 2 }

style "pixmap-dark-toolbar" = "dark-toolbar"
{
    xthickness = 1
    ythickness = 1
    # To-do: make the toolbar recolorable, possibly without using pixmaps
    # We only like this because of the top line, anyway.
    engine "pixmap"{
        image {
            function = BOX
            file = "toolbar_o.png"
            border = {1,1,1,1}
        }
        image
        {
              function              = HANDLE
              overlay_file          = "handlebox.png"
              overlay_stretch   = FALSE
              orientation           = HORIZONTAL
            }
            image
        {
              function              = HANDLE
              overlay_file          = "handlebox.png"
              overlay_stretch   = FALSE
              orientation           = VERTICAL
            }
            image
        {
               function        = VLINE
               recolorable        = TRUE
               file                = "blank.png"
        }
        image
        {
              function            = HLINE
              recolorable        = TRUE
              file                = "blank.png"
        }
    }
}

style "toolbar-button" = "notebook-button" {
    engine "murrine" {
    }
}

style "menu" = "dark" {
    xthickness = 0
    ythickness = 0

    bg[NORMAL] = "#43423f"
    bg[INSENSITIVE] = "#43423f"
    fg[INSENSITIVE]   = shade (0.54, "#43423f")

    engine "murrine"
    {
        roundness = 0
    }
}

style "menu_item" = "menu" {
    xthickness = 2
    ythickness = 3

    fg[PRELIGHT] = @selected_fg_color

    engine "murrine"
    {
        glowstyle = 5
        glow_shade = 1.1
        border_shades = {0.95, 0.85}
    }
}

style "menubar_item" = "menu" {
    xthickness = 2
    ythickness = 3

    engine "murrine" {
        gradient_shades = {1.1, 1.0, 1.0, 0.88}
        glowstyle = 5
        glow_shade = 1.0
        border_shades = {1.0, 0.9}
        lightborderstyle = 3
        lightborder_shade = 1.26
    }
}

style "scale_menu_item" = "scale" {
    GtkScale::slider-width = 21
    GtkScale::slider-length = 13

    bg[ACTIVE] = shade(0.98, "#4D4C48")
    bg[INSENSITIVE] = shade (0.9, @bg_color)

    engine "murrine" {
        roundness = 20
        border_shades = {1.4, 1.4}
        reliefstyle = 0
        lightborder_shade = 1.36
    }
}

# This style is there to modify the separator menu items. The goals are:
# 1. Get a specific height.
# 2. The line should go to the edges (ie. no border at the left/right)
style "separator_menu_item" {
    xthickness = 1
    ythickness = 0

    GtkSeparatorMenuItem::horizontal-padding = 0
    GtkWidget::wide-separators = 1
    GtkWidget::separator-width = 1
    GtkWidget::separator-height = 7

    engine "murrine" {
        contrast = 0.6
        separatorstyle = 0
    }
}

style "separator_tool_item" {
    xthickness = 0
    ythickness = 1

    GtkVSeparator::vertical-padding = 0
    GtkWidget::wide-separators = 1
    GtkWidget::separator-width = 7
    GtkWidget::separator-height = 1

    engine "murrine" {
        contrast = 0.6
        separatorstyle = 0
    }
}

style "frame_title" {
    fg[NORMAL] = lighter (@fg_color)
}

style "treeview" {
    engine "murrine"
    {
        roundness = 2
        lightborder_shade = 1.1
        gradient_shades = {1.04, 1.0, 1.0, 0.96}
    }
}

style "progressbar" {
    xthickness = 1
    ythickness = 1

    bg[ACTIVE] = shade (0.94, @bg_color)
    fg[PRELIGHT] = @selected_fg_color
    #bg[SELECTED] = "#cdcdcd"

    engine "murrine" {
        #trough_shades = {0.98, 1.02}
        roundness = 8
        lightborderstyle = 1
        lightborder_shade = 1.26
        border_shades = {0.95, 0.85}
        gradient_shades = {1.1, 1.0, 1.0, 0.9}
        trough_border_shades = {0.9, 1.4}
    }
}

style "progressbar_menu_item" = "progressbar" {
    bg[ACTIVE] = shade(0.98, "#4D4C48")

    engine "murrine" {
        roundness = 0
    }
}

# This style is based on the default style, so that the colors from the button
# style are overriden again.
style "treeview_header" = "notebook_button" {
    xthickness = 2
    ythickness = 1

    engine "murrine" {
        glazestyle = 1
        contrast = 0.8
        lightborder_shade = 1.16
        textstyle = 1
        glow_shade = 1.0
    }
}

style "treeview_header_scrolled" = "treeview_header" {
}

style "scrolledwindow" {
    engine "murrine" {
        contrast = 0.6
    }
}

style "radiocheck"  = "button" {
    text[NORMAL] = shade (0.535, @selected_bg_color)
    text[PRELIGHT] = shade(1.06, shade (0.535, @selected_bg_color))
    bg[NORMAL]   = shade (0.92, @bg_color)
    bg[PRELIGHT] = mix (0.2, @selected_bg_color, shade(1.1, @bg_color))
    fg[INSENSITIVE] = darker (@bg_color)
    fg[ACTIVE] = @fg_color

    engine "murrine" {
        reliefstyle = 3
        gradient_shades = {1.2, 1.0, 1.0, 0.9}
        shadow_shades = {0.6, 0.5}
        textstyle = 0
    }
}

style "tooltips" {
    xthickness = 4
    ythickness = 4

    bg[NORMAL]        = @tooltip_bg_color
    fg[NORMAL]        = @tooltip_fg_color
    bg[SELECTED]      = "#000000"

    engine "murrine" {
        rgba = TRUE
    }
}

style "infobar" {
    engine "murrine" {
    }
}

style "nautilus_location" {
    bg[NORMAL]  = mix (0.60, shade (1.05, @bg_color), @selected_bg_color)

}

style "nautilus-sidepane" {
    GtkTreeView::expander-size = 7
    GtkTreeView::vertical-separator = 0
    GtkWidget::separator-height = 0
        GtkTreeView::horizontal-separator = 0 # add extra the padding
    GtkTreeView::odd-row-color = @base_color
    GtkTreeView::even-row-color = @bg_color #"#CBD9E2"
}

style "calendar" {
    xthickness = 0
    ythickness = 0

    engine "murrine" {
        roundness = 0
    }
}

style "calendar_menu_item" = "calendar" {
    base[NORMAL] = "#605E58"
    base[ACTIVE] = "#4b4944"
}

style "iconview" {
    engine "murrine" {
        roundness = 6
        border_shades = {1.16, 1.0}
        glow_shade = 1.1
        glowstyle = 5
    }
}

style "soundfix"
{
}

# Wrokaround style for places where the text color is used instead of the fg color.
style "text_is_fg_color_workaround" {
    text[NORMAL]      = @fg_color
    text[PRELIGHT]    = @fg_color
    text[SELECTED]    = @selected_fg_color
    text[ACTIVE]      = @fg_color
    text[INSENSITIVE] = darker (@bg_color)
}

# Workaround style for menus where the text color is used instead of the fg color.
style "menuitem_text_is_fg_color_workaround" {
    text[NORMAL]        = "#dfd8c8"
    text[PRELIGHT]      = @selected_fg_color
    text[SELECTED]      = @selected_fg_color
    text[ACTIVE]        = @fg_color
    text[INSENSITIVE]   = "#99958b"
}

# Workaround style for places where the fg color is used instead of the text color.
style "fg_is_text_color_workaround" {
    fg[NORMAL]        = @text_color
    fg[PRELIGHT]      = @text_color
    fg[SELECTED]      = @selected_fg_color
    fg[ACTIVE]        = @selected_fg_color
    fg[INSENSITIVE]   = darker (@bg_color)
}

# Style to set the toolbar to use a flat style. This is because the "New" button in
# Evolution is not drawn transparent. So if there is a gradient in the background it will
# look really wrong.
# See http://bugzilla.gnome.org/show_bug.cgi?id=446953.
style "evo_new_button_workaround" {
}

###############################################################################
# The following part of the gtkrc applies the different styles to the widgets.
###############################################################################

# The default style is applied to every widget
class "GtkWidget" style "default"

class "GtkSeparator" style "narrow" #"wide"
class "GtkFrame" style "narrow" #"wide"
class "GtkCalendar" style "wide"
class "GtkEntry" style "entry"

class "GtkSpinButton" style "spinbutton"
class "GtkScale" style "scale"
class "GtkVScale" style "vscale"
class "GtkHScale" style "hscale"
class "GtkScrollbar" style "scrollbar"
class "GtkHScrollbar" style "hscrollbar"
class "GtkVScrollbar" style "vscrollbar"
class "GtkCalendar" style "calendar"
class "GtkInfoBar" style "infobar"
class "GtkIconView" style "iconview"

# General matching follows. The order is choosen so that the right styles override
# each other. EG. progressbar needs to be more important than the menu match.
widget_class "*<GtkNotebook>" style "notebook_bg"
# This is not perfect, it could be done better.
# (That is modify *every* widget in the notebook, and change those back that
# we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>" style "notebook_bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "notebook_bg"
widget_class "*<GtkNotebook>*<GtkLayout>" style "notebook_bg"
widget_class "*<GtkNotebook>*<GtkLabel>" style "notebook_bg"
widget_class "*<GtkScrolledWindow>*" style "scrolledwindow"

# Toolbar default: dark
class "*HandleBox" style "pixmap-dark-toolbar"
class "GtkToolbar"   style "pixmap-dark-toolbar"
widget_class "*HandleBox" style "pixmap-dark-toolbar"
widget_class "*<GtkToolbar>.*"   style "dark-toolbar"
widget_class "*<GtkToolbar>*<GtkEntry>*" style "pixmap-dark-toolbar"

widget_class "*<GtkButton>" style "button"
widget_class "*<GtkButton>*<GtkLabel>" style "button"
widget_class "*<GtkNotebook>" style "notebook"
widget_class "*<GtkStatusbar>" style "statusbar"
widget_class "*<GtkSpinButton>*" style "spinbutton"
widget_class "*<GtkNotebook>*<GtkButton>" style "notebook_button"
widget_class "*<GtkNotebook>*<GtkButton>*<GtkLabel>" style "notebook_button"
widget_class "*<GtkRadioButton>*" style "radiocheck"
widget_class "*<GtkCheckButton>*" style "radiocheck"

widget_class "*<GtkComboBoxEntry>*" style "comboboxentry"
widget_class "*<GtkCombo>*" style "comboboxentry"

widget_class "*<GtkMenuBar>*" style "menubar"
widget_class "*<GtkMenu>*" style "menu"
widget_class "*<GtkMenuItem>*" style "menu_item"
widget_class "*<GtkSeparatorMenuItem>*" style "separator_menu_item"
widget_class "*<GtkSeparatorToolItem>*" style "separator_tool_item"
widget_class "*<GtkMenuBar>*<GtkMenuItem>*" style "menubar_item"

widget_class "*.<GtkFrame>.<GtkLabel>" style "frame_title"
widget_class "*.<GtkTreeView>*" style "treeview"

widget_class "*<GtkProgress>" style "progressbar"
widget_class "*<GtkMenuItem>.*.<GtkProgressBar>" style "progressbar_menu_item"
widget_class "*<GtkMenuItem>.*.<GtkScale>" style "scale_menu_item"
widget_class "*<GtkMenuItem>.*.<GtkCalendar>" style "calendar_menu_item"

# Treeview headers (and similar stock GTK+ widgets)
widget_class "*.<GtkScrolledWindow>*<GtkTreeView>*" style "treeview_header_scrolled"
widget_class "*.<GtkTreeView>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkCTree>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkList>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkCList>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkTreeView>.<GtkButton>.*<GtkLabel>" style "treeview_header"
widget_class "*.<GtkCTree>.<GtkButton>.*<GtkLabel>" style "treeview_header"
widget_class "*.<GtkList>.<GtkButton>.*<GtkLabel>" style "treeview_header"
widget_class "*.<GtkCList>.<GtkButton>.*<GtkLabel>" style "treeview_header"

# The window of the tooltip is called "gtk-tooltip"
##################################################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
##################################################################
widget "gtk-tooltip*" style "tooltips"

##########################################################################
# Following are special cases and workarounds for issues in applications.
##########################################################################

# Workaround for the evolution ETable (bug #527532)
widget_class "*.ETable.ECanvas" style "treeview_header"
# Workaround for the evolution ETree
widget_class "*.ETree.ECanvas" style "treeview_header"

# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "nautilus_location"
widget_class "*NautilusSidePane*" style "nautilus-sidepane"
#widget_class "*NautilusNavigationWindow*" style "nautilus-sidepane"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that this work around assumes that the combobox is _not_ in appears-as-list mode.
widget_class "*.<GtkComboBox>.<GtkCellView>" style "text_is_fg_color_workaround"
# This is the part of the workaround that fixes the menus
widget "*.gtk-combobox-popup-menu.*" style "menuitem_text_is_fg_color_workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the base color.
widget_class "*<GtkListItem>*" style "fg_is_text_color_workaround"
# GtkCList also uses the fg color to draw text on top of the base colors.
widget_class "*<GtkCList>" style "fg_is_text_color_workaround"
# Nautilus when renaming files, and maybe other places.
#widget_class "*<EelEditableLabel>" style "fg_is_text_color_workaround"
# Work around for ubuntu's lucid sound indicator
widget "ido-offscreen-scale" style "soundfix"
# Thickness for indicator menu items
widget "*IdoEntryMenuItem*" style "wide"

# See the documentation of the style.
widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "evo_new_button_workaround"

# Includes
include "apps/banshee.rc"
include "apps/chromium.rc"
include "apps/ff.rc"
include "apps/gnome-panel.rc"
include "apps/gnome-terminal.rc"


sudo apt-get install light-themes should get you the themes back. Have you checked in the /usr/share/themes/ to verify that they're actually missing, and it's not some other problem?

Also, you should file a bug report about this, as it should not happen.


Will there be an install script to install unity on non-Ubuntu distributions?

An install script would have no use for others distribution. Unity itself uses a standard build system, so yes, it should be build on other distro as long as the build depends are met. As for the gnome patches those would need to be incorporated by other distributions in their packaging, this is not something that could be done externally with a script.


Synaptics touch pad disable button not functional

JanC thanks for posting those guides. I have semi fixed the problem, so I thought I'd post the answer in a seperate post.

Basically what I've done is use gconf-editor to go to: /apps/gnome_settings_daemon/keybindings

Looking at the TouchPad entry the default was "XF86TouchpadToggle". However, after creating a keyboard shortcut for the touchpad disable button registered as Help not XF86TouchpadToggle, so I've now changed the value to Help in gconf-editor and my disable button works. The only problem is I have to press the disable button twice for it to be disabled and like wise to re-enable the device.

It does work now though, which is something. It even registers the disabling and re-enabling of the touchpad with a notification in the top right, which is pretty cool.


X server starts late, so your script run in vain before it's up. It could be worthy to create a python script as daemon which watch for devices using pyudev.


Mount ext 4 read-only for old files and writable for new

If you mount a volume as "Read Only" then it is read only. You can't write to a read only file system. You can only read and execute executables.
You can, however, control the permissions of individual files and folders with the chmod command, but I would caution against changing permissions for system files, application files, and configs, because you will break them.
Here's an example usage of chmod:
chmod 444 file.txt
This changes the permissions of the file file.txt to read only for owner, group, and public.
You can use a chmod "calculator" to figure out the symbolic value for permissions in place of 444.


Add ubuntu repository command fails to run

It looks like you should be using 2 distinct commands. cat and apt-key commands are distinct.
Further, the cat command serves only to automatically create the proper sources.list file.  You can just copy-paste the text into the specified file if you have access to any sort of text editor.
Just run the cat command separately from the apt-key command and you'll be golden.


MiKTeX in Ubuntu 14.04: Could NOT find CURL

MikTeX is not packaged for Ubuntu, but it is fairly easy to install if you follow the documentation.

Start by removing any packages you may have installed by hand (e.g. CURL). Then install the dependencies from the repositories:

sudo apt-get install build-essential libcurl3-openssl-dev

Configure and compile (inside the MikTeX source folder):

./configure && make

And finally install it:

sudo make install


Ubuntu 17.10 - AMDGPU-PRO 17.50 with --px option cannot be installed because of missing package

You can try to get this package from the prevoius version of amdgpu-pro package. I did that this way:

install amdgpu-pro 17.40
copy directory /var/opt/amdgpu-local to /var/opt/amdgpu-local-17.40
copy /etc/apt/sources.list.d/amdgpu-pro.list to /etc/apt/sources.list.d/amdgpu-pro-17.40.list
edit /etc/apt/sources.list.d/amdgpu-pro-17.40.list so it points to a -17.40 directory in /var/opt/...
unsinstall amdgpu-pro 17.40

Now you have local source of amdgpu-pro driver which has required package. You can now install amdgpu-pro 17.50 with -px option.

I've tried this solution. Though amdgpu-pro driver v17.50 was installed successfully with -px option, my system got into logon loop. I've struggled to cope with it for an hour or so, but haven't succeed, so I gave up for a while. My system is Lenovo ThinkPad E550 with Radeon R7 M265. Ubuntu 16.04.04 LTS

But probably, it might work fine in your system. Not too much moves to give it a try, eh?


> printf %q "$IFS"
' \t\n'

The %q format argument is used to interpolate the quoted variable $IFS and escapes control characters that would be interpreted by the shell.

Here you can see that IFS separates on spaces, tabs, and newlines.


Shift+home and shift+end don't work in laptop

Don't have enough reputation to mark as duplicate, but copy pasting from this other answer:

  Open "keyboard preferences" ; in the "Layouts" tab, click the "Options..." button
  Look for the "Miscellaneous compatibility options" group
  Select the "Shift with numeric keypad keys work as in MS Windows" checkbox.


cd  is a shell builtin. you should use this:

#! /bin/bash
gnome-terminal --working-directory=/home/username/Desktop/CCA/ -e './Adventure'


If You want to take screenshot of whole windows press PrntScr or Altr + PrntScr.

But If You want to take screenshot of a certain section press Shift + PrntScr.


If your work uses PEAP and whatnot for wifi authentication there are several issues with it on ubuntu and other distros.  I have had moderate success by connecting to a hidden network with the corporate network's name rather than clicking on it and connecting to it.  I am still prompted for a password every time I get to work though.  You can troubleshoot most of these issues by editing the connection file in :

/etc/NetworkManager/system-connections/

Hope this helps.


what happens if i delete a file while tar is processing it?

Absolutely nothing.  Deleting a file just removes the name from the directory.  The file itself is still there as long as it has a name in another directory, or any process already has it open.  Since tar already had the file open, it continues to process it just fine.


Get your Ubuntu Live CD
Put it in your drive and boot up from CD
Choose wipe and install Ubuntu
That will format the whole hard drive and clean everything of it
Then Ubuntu will install and be the only OS on your disk

Follow those steps and you will be able to wipe everything and reinstall.


Auto Switch to external monitor [only] on startup

To switch between monitors, I use xrandr. A nice GUI for xrandr is ARandR, which is in the repos as well. An example xrandr command would look like this:xrandr --output DisplayPort-1 --off --output DisplayPort-0 --off --output DVI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-0 --off
In this case, I would only use the DVI-0 port to display my desktop. Tweak this command to fit your needs. Then, put it into a .sh file, chmod +x it and  make sure it will be run on startup.
Note that ARandR has an option to export the current configuration into a skript, which can be very useful.


How do I download old unsupported packages such as Kernel headers?

Modify your sources.list to point to

http://old-releases.ubuntu.com/

instead of the current

http://<country-code>.ubuntu.com/


Note taking app for to use with pen tablets

I have another recommendation you might want to look into: Write by Stylus Labs. Disclaimer: I have yet to vet it (I just downloaded it and am about to use it for the first time...I will update my answer after trying it out).

It has one major advantage over Xournal, which is that it has infinite scroll. Looks like it has a lot of nice features, like being able to make bookmarks, and insert new text wherever you want in the page.

To install dependencies: sudo apt-get install libqt5widgets5 libqt5network5 libqt5svg5


Unknown version of Tomcat was specified. Tomcat 9 Eclipse Java EE Ubuntu18.04

I had the same problem on Ubuntu 18.04 and Tomcat 9, to fix it run this command:

sudo chown -R $USER:$USER /your_installation_forder/tomcat


Is it OK to create all primary partitions.?

In principle there is no problem with all 4 primary partitions. Some of the new computers are shipping with 4 primary partitions. The main concern is, you will have no option to make any more partitions, in case you need one more.

Even though computers these days have enough RAM to run Ubuntu, the operating system has roots in older time when a swap partition was a must. So even though you may not need it, it is a good idea to have one. It will make the system feel happy.

A separate /home partition is actually an excellent idea. I put it in all my Ubuntu installs. This makes fresh installs of new versions dead simple. Sometimes upgrades from the previous versions don't go well. At other times, after four or five upgrades on top of one another, the system gets cluttered with stuff you don't need and a fresh install is the solution. In these situations a separate /home partition makes it easy to retain your personal data and settings while starting afresh with a new system install.

So if you go with /, /home, and swap you still have space for one more primary partition for data.

The partitions need not be in continuous blocks. You can leave unallocated spaces in between. For example, if you leave some unallocated space in between sda3 and sda4. You may later expand sda3 or move sda4 to the left and then expand sda4.

However, when the partitions get very full, there may not be enough space to copy files over for moving partitions. Then you won't be able to move them around. So, it may be better to adjust your partitions sooner than later.

Even though I don't remember the last time I had my data erased or corrupted by fiddling with partitions, it can happen. Sometimes it is operator error, that is, I make the wrong choice. Thus, it is very very important to backup everything in another hard drive before embarking on any kind of partition re sizing, moving, and deleting.

Hope this helps


What format can I use for the destination drive when backing up with rsync?

Depends on what you want to backup.

If permissions need to be preserved you should use ext where ext4 should be preferred.
If the files are personal and you do not need to care about permissions you could use a windows file system. FAT32 has limits in filesize so I would advice against it. NTFS should be preferred.

I myself would always use the same file system as what you use for the originals.


Install dependencies

sudo apt-get install git cmake g++ libqt4-dev qtbase5-dev qttools5-dev \
 qttools5-dev-tools qtquick1-5-dev qtscript5-dev libqt5xmlpatterns5-dev \
 libqt5svg5-dev libqt5webkit5-dev libssl-dev

UPDATE:
Qt5.4 is now required. This is not in the default repositories.Check if you already have Qt 5.4 by typing

qmake -version

in a terminal window. If you don't have 5.4 or later then follow these steps to install it:
Download the latest version of Qt from http://qt-project.org/. The file you download is actually an installation script called something like

qt-opensource-linux-x64-1.6.0-8-online.run

Move the installer to your Home directory and open a terminal window.
Give the installer execute permissions:

sudo chmod +x qt-opensource-linux-x64-1.6.0-8-online.run

Run the installer:

sudo ./qt-opensource-linux-x64-1.6.0-8-online.run

Follow the installation wizard and write down the installation directory (default: /opt/Qt. You can choose somewhere else if you want but make sure it doesn't have spaces anywhere in the path). Finish the install.
In your file browser, navigate to the installation directory and find the path to the Qt bin directory.
Add the bin directory to your $PATH environment variable so that MuseScore knows where it is. Modify the following command with the correct path as appropriate.:

echo 'export PATH="/opt/Qt/5.4/gcc_64/bin:$PATH"' >> ~/.bashrc

Load your new $PATH variable.

source ~/.bashrc

Complete! You can check the Qt installation was successful by typing

qmake -version

.


ERROR: Package 'stomp.py' requires a different Python: 2.7.12 not in '>=3.6,<4.0'?

The error is rather clear. The package you are trying to install only supports Python 3.6+.
Your options are either to install newer python (for which there are numerous guides online) or to upgrade to a newer Ubuntu LTS release (16.04 is getting close to the End Of Life).


Ethernet disconnects after few minutes in Ubuntu 16.04

I read through the link that you attached in your post and the bit that caught my attention was the ipv6. I've noticed this behavior with IPV6.
How are you connected? Are you in housing, connected to a router, which is connected to a wall? Are you connected over Ethernet or are you connected via WiFi? Are you connected to a unified wireless network as you move about the campus? Does this issue happen on both interfaces or just the one?
The next time that the problem happens, open the shell and type:
ifconfig
Look and see what your IP address is.

Try to ping the gateway
Try to ping 8.8.8.8
Try to ping a different web domain other than what just went offline.

Your send could be failing. You could be connected and your send is succeeding but the route back has an issue so you're not getting a reply. I just went through the no route back issue on a VPN tunnel myself.
If you notice that you have an IPV6 address and that you should be able to connect over IPV4, try the following:
sudo dhclient -r <interface-name>
sudo dhclient -4 <interface-name>

^^ To clarify above, ^^ The interface name will be found with the ifconfig command. Those two commands should force your interface to release the DHCP lease and then request an IPV4 DHCP lease. If you find that this works, you need to edit your interface config so that your network only communicates over IPV4. You can do this through the network manager or manually through config files.


Forced to boot into Windows 7 in dual boot

You probably have to reinstall the grub bootloader. You can achieve this via the installation cd by doing the following in a terminal:

Mount the Ubuntu system partition: sudo mkdir /mnt/ubuntu and sudo mount /dev/sdb1 /mnt/ubuntu
Mount /sys /proc and /dev: sudo mount -t proc none /mnt/ubuntu/proc and sudo mount --rbind /sys /mnt/ubuntu/sys as well as sudo mount --rbind /dev /mnt/ubuntu/dev
chroot into the installed ubuntu system: sudo chroot /mnt/ubuntu /bin/bash
Now in the chroot you can update the Grub config: update-grub
And install Grub to whatever hard disk you like: grub-install /dev/sda or grub-install /dev/sdb

Then reboot your system and choose the right hard drive to boot your system!


It should work without installing any driver, Atfirst Unistall the Driver, than reinstall usb-modeswitch,usb-modeswitch-data, Install http://linuxonly.ru/cms/page.php?7 "Modem Manager Gui" for chking balance, SMS etc.


What happened is that the syntax of the configuration files in apache2.4 have changed.

Source: This has happened to me as well after I upgraded to 13.10

conf.d files

All files that were in /etc/apache2/conf.d should be moved to /etc/apache2/conf-available.

They now work the same way sites and mods work. Just put your conf files in the conf-available folder and enable the one you want with a2enconf <config-file-name>.

Example:

I had a file conf.d/httpd.conf which had the ServerName directive.
To make that work, I had to move it to the conf-available directory and enable it manually.

sudo mv /etc/apache2/conf.d/httpd.conf /etc/apache2/conf-available/httpd.conf
sudo a2enconf httpd

sites files

Previously, files in /etc/apache2/sites-available had no extension. For example /etc/apache2/sites-available/default. Now a .conf extension is required.

Example:

If you had /etc/apache2/sites-available/some-site, in 13.04 you can just enable it using sudo a2ensite some-site. Now it will give you an error saying

  ERROR: Site some-site does not exist!

To fix this, append a .conf to all your config files in sites-available.
You can do the same in sites-enabled, or you can delete all the files and re-enable them each manually.
I recommend doing them manually since you probably need to fix each VHost (next step).

sudo find /etc/apache2/sites-available/ ! -iname '*.conf' -type f -exec mv '{}' '{}'.conf \;

if you decided to do them manually:

sudo rm /etc/apache2/sites-enabled/*
sudo a2ensite your-site-name

Virtual Host directives:

allow/deny vs Require

If you had the following:

<Directory /path/to/your/site/>
    order allow,deny
    allow from all
</Directory>

It should become:

<Directory /path/to/your/site/>
    Require all granted
</Directory>

For more info, check on the comments by DaveRandom on an answer on Stack Overflow.

Simply put, if you upgraded to apache2.4 and kept the old httpd.conf of apache2.2, allow directive should keep working fine. If you upgraded your httpd.conf (which I would suggest), you will get 403 errors until you change the Order/Allow/Deny directives to their equivalent Require.

Directory Options

If you had Directory options, note that they all have to be prepended with a + or - or none of them at all. A mix of both is not allowed:

Example:

This is allowed:

<Directory /path/to/your/site/>
    Options +Indexes +FollowSymLinks -MultiViews
</Directory>

So is this (Note that these examples don't both do the same thing, the previous one disables the MultiViews option, the next one doesn't):

<Directory /path/to/your/site/>
    Options Indexes FollowSymLinks MultiViews
</Directory>

This is no longer allowed:

<Directory /path/to/your/site/>
    Options Indexes FollowSymLinks -MultiViews
</Directory>

Last config option will throw the a syntax error saying:

  Either all Options must start with + or -, or no Option may.

Restart apache

Once everything is done, you need to restart your apache server for the changes to take effect:

 sudo apache2ctl restart

You can find a detailed upgrade guide from 2.2 to 2.4 on the official documentation.


Kingston Datatraveler won't mount in ubuntu 14.04

I fixed it. I tried the advice of pushing the USB in slowly. That didn't work.

What did work was pushing it in very slowly in a timed manner. Here is how:

I used dmesg -wH which keeps live updating dmesg in your terminal.

And right at the moment where Ubuntu said that it recognized it. I stopped pushing it in any further. Weirdly enough, this is as much a skill as learning how to use a small screwdriver or a semi-complex game controller combination in a video game.

My Kingston Datatraveler mounted. It did not mount by pushing it in slowly, but by pushing it in very slowly and immediately stopping when dmesgh said: "USB Mass Storage device detected"


How to start a tftp server in ubuntu using systemctl start tftp command?

Please modify you service file from:

[Unit]
Description=Tftp Server

[Service]
ExecStart=/usr/sbin/in.tftpd
ExecStop=/bin/kill -15 $MAINPID

StandardInput=socket

[Install]
WantedBy=multi-user.target

To this since it's a daemon:

[Unit]
Description=Tftp Server

[Service]
Type=forking
ExecStart=/user/sbin/xinetd
ExecStop=/bin/kill -15 $MAINPID
StandardInput=socket

[Install]
WantedBy=multi-user.target

Source:

http://www.linuxcertif.com/man/5/systemd.service/


This would do the following:

Search through every folder in the bots folder for files named run_bot
Open every matching file for editing in Vim

Example:

That means if you have the following hierarchy:
bots/folder1/run_bot and bots/folder2/run_bot this command would be the equivalent of writing:

vim bots/folder1/run_bot

and

vim bots/folder2/run_bot

It's pretty common to use the wildcard (*) sign when you want to open or edit several files. This is standard bash syntax.


How to activate multiple GPUs on one motherboard?

Lucky you!  My $435 GTX-1070 order was canceled by NewEgg as "out of stock" but I see the same one going for $1200 the last time I looked.  Checking around, the only way I can get one at a reasonable price is to buy a system.

I have pair of gtx-1050 TI on each of two uBuntu 4.13.0-19-generic.  This was 17.04 as I recall.  lspci -v clearly shows them. While not in x1 risers, they are in x8 adapters.  After installing 17.04 I then installed nVidia CUDA tool version 384 (not just the 384 driver).

I assume you did the same?
What motherboard are you using?


How to mount samba drive in Linux using command line

First, unless already installed, install cifs-utils as follows:
sudo apt-get install cifs-utils

Then, choose a path where to place a file containing the credentials to access your shared folder. Let's say /home/.smbcredentials, as an instance.
So, open that file and write your credentials as follows:
usename=yourUsername
password=yourPassword

Also, decide where to mount your shared folder. Let's say /myfolder, as an instance.
Now, assuming you want your network folder to be accessible as soon as your Linux system is started, edit the /etc/fstab file. You can use nano as follows:
sudo nano /etc/fstab

Then, you should be able to see something already written to that file. Therefore, just append one line to the bottom:
//yourHostNameOrIpAddress/path/to/your/shared/folder  /your/mount/point  cifs  guest,iocharset=utf8,file_mode=0777,dir_mode=0777,credentials=/path/to/the/credentials/file

That's all, reboot your Linux system by typing reboot -f and enjoy your network drive mounted!


Which X509 Certificate for Ubuntu Do I Require for Shim UEFI Key Management

If you're trying to enroll a key for use by Shim or directly by your firmware as a Secure Boot key, you need a key file with a filename ending in .der or .cer. The .efi files your file browser is showing are EFI program files, which are not suitable. (You would select such files if you were enrolling a hash, which is what that the competing PreLoader utility uses.)

For more on this topic, see my page on managing Secure Boot or my related page on controlling Secure Boot more completely.


Kubuntu 15.04 recognizing Wacom Intuos5 as Joystick

I'm also having the same problem though with another wacom model (CTL480/S), try opening the Konsole (terminal) and typing:

xsetwacom list devices

and see if the system recognizes the "stylus", the "eraser" and the "pad". If yes then I'm assuming that installing wacom drivers is not the case, but finding why there's not a proper gui to configure the tablet.

In the meantime, try giving http://linuxwacom.sourceforge.net/index_old.php/howto/xsetwacom a try. You can configure your tablet on the terminal with some simple commands.


How to restore Ubuntu to a previous version?

I'm sorry, you should backup all your files and go for a clean install of Ubuntu 16.04 LTS. If you're looking for a stable system, don't try the .10 or any non LTS versions unless you're using new hardware (that was just released). Unfortunately, Ubuntu doesn't do downgrades.

If your hard disk is large, I suggest you create a separate smaller partition where you will place a backup of all your files, and then install Ubuntu in the remaining portion of it. This makes data transfer much faster than using external media.


Some sites disable support for SSL 3.0 (possible because of many exploits/vulnerabilities), so it's possible to force specific SSL version by either -2/--sslv2 or -3/--sslv3.
Also -L is worth a try if requested page has moved to a different location.

In my case it was a curl bug, so curl needs to be upgraded to the latest version (>7.40) and it worked fine.

See also:

3 Common Causes of Unknown SSL Protocol Errors with cURL
Error when Installing Meteor at SO
[Bug 861137] Re: Openssl TLS errors while connecting to SSLv3 sites
How to fix curl sslv3 alert handshake failure? at Unix SE


Screen flashing, application bar disappearing, mouse freezes in Gnome

I was able to turn fix this issue by logging in to the classic Ubuntu environment after I selected my user name.  The flashing and issues went away.


XAMPP VirtualHost in Other Directory 403 Forbidden Error

In order to have readable access to the files the user (any user) must have also read-execute permissions to the whole path of parent directories. The typical/default permissions of the user's home directories and the files inside are:

drwxr-xr-x (or 755 in octal) for the directories and
-rw-r--r-- (or 644) for the files.

That means all other users (the third trinity, or the third bit in octal) have readable access to the home directory (and the regular files inside) of each user.

Within these circumstances, let's assume the Apache's user, which is not owner of the discussed items, but is a member of the other users (of course), can't read files from the directory ~/Dropbox/Documents/Projects/MyApp and we want to change that - the steps are:

# Grant to `other` users read-execute permissions for the path
chmod o+rx ~/Dropbox ~/Dropbox/Documents ~/Dropbox/Documents/Projects

# For the next levels we can apply the permissions recursively
find ~/Dropbox/Documents/Projects/MyApp -type d -exec chmod o+rx {} \;
find ~/Dropbox/Documents/Projects/MyApp -type f -exec chmod o+r {} \;


How to upgrade ubuntu server 10.04 to 12.04

its better to download iso and re install
you could install 12.04 Ubuntu server
Click link
32 bit or 64 bit you could select
the upgrade is not possible for old versions
or try 17.04 Click torrent link


Dual booting doesn't load Windows anymore

Did you remove windows, or did you recently install updates?  If so, you might just need to update the bootloader.  Run this at the command line (assuming your GRUB install is in /boot/grub/):

sudo grub-mkconfig -o /boot/grub/grub.cfg

If your grub install is somewhere else, try reinstalling GRUB:

sudo grub-install /dev/sda

(assuming your computer boots to /dev/sda first)

That should solve the issue.  If not, then your Windows install may be corrupt.  If this doesn't fix it, use your computer's BIOS menu to boot manually on the Windows partition.  If it doesn't boot, then your Windows install died.


Ubuntu preseed partman gets partition type and size wrong

the problem is, that the partitions are created in the order you have them. your data partition uses the entire space left.

as a solution move up the swap part above the data partition. i also added the primary tag to the swap section. you can have up to 4 primary partitions.

d-i partman-auto/expert_recipe string                         \
 boot-root ::                                            \
      32 32 32 free                                  \
              $gptonly{ }                            \
              $primary{ }                            \
              $bios_boot{ }                          \
              method{ biosgrub }                     \
      .                                              \
      500 10000 30720 ext4                            \
              $primary{ } $bootable{ }                \
              method{ format } format{ }              \
              use_filesystem{ } filesystem{ ext4 }    \
              mountpoint{ / }                         \
      .                                               \
      64 10000 24576 linux-swap                       \
              $primary{ }                             \
              method{ swap } format{ }                \
      .                                               \
      500 10000 -1 ext4                               \
              $primary{ }                             \
              method{ format } format{ }              \
              use_filesystem{ } filesystem{ ext4 }    \
              mountpoint{ /data }                     \
      .                                               \


Because they are exactly the same hardware so it will show the same vendor id and same device id. The only difference between the 2 cards is the slot it is sitting in (probably the 1st part in your output).

You can use dmidecode –t slot to match it with the output from lspci -nn to identify them each but you can not tell KVM that.

Interesting question though and generally I would leave it at "you probably need another, different, card" when I came across this:

On kernel.org it says that "Writing a device ID to /sys/bus/pci/drivers/.../new_id will attempt to dynamically add a new device ID to a PCI device driver. This may allow the driver to support more hardware than was included in the driver's static device ID support table at compile time.  The format for the device ID is: VVVV DDDD SVVV SDDD CCCC MMMM PPPP.  That is Vendor ID,    Device ID, Subsystem Vendor ID, Subsystem Device ID, Class, Class Mask, and Private Driver Data.  The Vendor ID and Device ID fields are required, the rest are optional. Upon successfully adding an ID, the driver will probe for the device and attempt to bind to it. For example: # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id"

And that lead me to the command setpci and an U&L topic that suggests you can change the device ID of PCI cards.

So maybe you can change one of the 8080:aa68 to another device id with one of these 2 methods. Do pick an id that is a similar card but maybe a bit older or newer than the one you have. Changing it to a random device id will probably cause trouble.


Replace xscreensaver With gnome-screensaver (Xubuntu)

Installing
When you have removed xscreensaver and installed gnome-screensaver you will need to logout and login for the XFCE lock-screen menu item to work
Setting your screen saver
Installing gnome-screensaver also installs gnome-screensaver-preferences.
If you run this in a terminal you will see this screen which will allow you to change from the "black screen" to one of the gnome-screensavers:

Integrating with Settings Manager
When installing gnome-screensaver it will create a file called /usr/share/applications/gnome-screensaver-preferences.desktop
To integrate this into Settings Manager then replace the contents of this file with the following:
[Desktop Entry]
Name=Screensaver
Comment=Set your screensaver preferences
Icon=preferences-desktop-screensaver
Exec=gnome-screensaver-preferences
Terminal=false
Type=Application
Categories=Settings;DesktopSettings;Security;X-XFCE
NotShowIn=KDE;GNOME;


Will Ubuntu 14.04 work on Asus M5a97 r2.0?

Why not?

If you doubt, why not try the Live CD or USB of Ubuntu to see if you or the laptop likes it.


Wired connections disconnects on high bandwith usage

If it's not a general network problem, then this might be caused by autonegotation or/and DHCP server issues.

Try to disable autonegotation with ethtool.

Keep in mind that this might cut off network depending on your configuration.

sudo apt-get update && sudo apt-get install ethtool
ethtool -s eno2 autoneg off

or

ethtool -s eno2 speed 1000 duplex full autoneg off

Where 1000 is your NIC speed: 1000 for 1 Gpbs, or 100 for 100 Mbps.

This can also have something to do with power saving, so you may want to try disabling ACPI: How do I disable ACPI when booting?


Auto complete for startable/stopable services?

The service command has autocompletion, e.g.:

sudo service rsys<tab> stop

becomes:

sudo service rsyslog stop

Apparently nobody took the time to write autocompletion support for upstart yet...

Update: There is bash-completion for upstart now (I'm not sure it will be included in Ubuntu 10.04 or 10.10, but should go into Ubuntu 11.04, and you can find a solution for older versions in the bug report too).


I found a partial solution. I was not able to use Xvnx the same way I was doing on Ubuntu 9.04 but I found that lightdm was natively supporting VNC. To enable it you can add these lines in /etc/lightdm/lightdm.conf

#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# port = TCP/IP port to listen for connections on
#
[VNCServer]
enabled=true
port=5901
width=1024
height=768
depth=8

It will support only tightvncserver (vnc4server will not work) and it will only enable you to connect to a new session through vnc but when the vncviwer is closed the session is destroyed.

On Ubuntu 9.04, I was able to launch a session, disconnect, and then reconnect to it but was not able to do it with this solution.


mysql 5.7 is working slow on ubuntu 18.04 LTS

While implementing ubuntu 18.04, Ubuntu has made a notable improvement in CPU usage. The Ubuntu has greatly improved and reduced CPU usage. They’ve also fixed hundreds of bugs and made hundreds of other small improvements.

  Just because of that MySQL taking too much time to perform it's operation This issue has been solved with following MySQL parameters,  which force MYSQL to utilize more CPU thread to perform the operation.

Just solved it. By adding the following line to mysqld.cnf has solved the problem:

innodb_read_io_threads=4
innodb_write_io_threads=8 #To stress the double write buffer
innodb_buffer_pool_size=20G # 70-80% available Memory
innodb_buffer_pool_load_at_startup=ON
innodb_log_file_size = 32M #Small log files, more page flush
innodb_log_files_in_group=2
innodb_file_per_table=1
innodb_log_buffer_size=8M
innodb_flush_method=O_DIRECT
innodb_flush_log_at_trx_commit=0
skip-innodb_doublewrite #commented or not depending on test


How to remove coolrom.com malware from ubuntu?

I had the same problem. To get rid of it, click on the three horizontal lines (top right) -> Add-ons -> Extensions. Find Coolrom then remove. Goodluck


Try downloading an image on a flash drive using something like YUMI. Boot from the drive and select rescue a broken system. Follow the steps :)


unable to mount ntfs filesystem after upgrading to windows 10 on dual boot system

Your issue is that you have Windows 10 in 'Quick Boot' or 'Fast Boot' mode.  Basically, Windows 10 is hibernating rather than fully shutting down.

You need to disable 'Quick Boot' or 'Fast Boot' in order to fully mount that partition.  There is a workaround to where you can mount it read-only, but that gets complicated.
See http://www.tenforums.com/tutorials/4189-fast-startup-turn-off-windows-10-a.html for instructions.


how to copy multiple files to a directory and simultaneously enter in that directory?

When you do this:

cp "$@" "${!#}"

that has the effect that the last argument (the directory name) is repeated.

So, I think what you want is probably this instead (just remove the "${!#}"):

cp "$@"

The other issue is that you say it does not enter the directory. A script that you just execute normally will not change your current working directory; if you want that to happen you need to source the script instead. So, instead of running it like this:

./yourscript.sh [arguments]

you would then source it, like this:

. yourscript.sh [arguments]


"disk drive for /dev/shm is not ready yet" at boot

Mountall package in eugenesan ppa is broken. Just comment these sources.list lines, and run

 sudo aptitude install mountall=2.31

After that everything should be ok.


instal ubuntu 12.04 LTS and now boot from HDD?

The first option is the actuall Ubuntu 12.04. The others are just to check your computer.


Assuming, from your question and remarks, that you're a GUI-only user. As I'm a mostly command-line user, I'm used to a different way of addressing problems, but here goes.

In your GUI environment, cheese is started through a file called cheese.desktop, probably located in $HOME/.config/cairo-dock/current_theme/launchers/cheese.desktop (or, left as Exercise for the Student, somewhere in the $HOME/.config/... directory tree), or you can find the original in /usr/share/applications/cheese.desktop. The format of the desktop file is described in the Desktop File Specification

First, create a temporary working directory, and make TWO copies of your cheese.desktop file. Call them camera1.desktop and camera2.desktop, or anything you want.

Edit camera1.desktop and camera2.desktop. In each file, change the

Exec=cheese

and

Name=cheese

lines to

Exec=cheese --device=/dev/camera1
Name=camera1

or

Exec=cheese --device=/dev/camera2
name=camera2

Change ONLY the Exec=cheese line and the Name=cheese lines.

When you are happy with your changes, copy them back to $HOME/.config/cairo-dock/current_theme/launchers/ , keeping the camera1.desktop and camera2.desktop names.

Click on camera1 to start cheese --device=/dev/camera1 and camera2 to start cheese --device=/dev/camera1.

Note: I haven't actually tried this.


Error while downloading ATI/AMD additional drivers

i got same problem :S
but follow this guide, and i hope that is the solution for u.
https://help.ubuntu.com/community/BinaryDriverHowto/ATI


updated to 14.04 on netbook, super slow, not working with monitor

Ubuntu comes with Unity which requires more power for effects, usability etc. My suggestion is install other desktop enviroment like XFCE.

Install XFCE desktop from terminal with sudo apt-get install xubuntu-desktop then logout. On login screen, change Unity enviroment to XFCE by clicking Ubuntu logo righ after


How to get old options back in Nautilus's "Connect to server" window?

I'm using 13.04 but I think it's similar to 12.10 in this regard.

You will need to specify the connection metho in the box that appears:

for secure ftp/ssh: sftp://user@serverip
for samba (windows network share): smb://user@serverip
etc.

NB it will save your connection settings in the "Recent Servers" section so you don't have to re-enter them each time


Ubunty 14.04 freezes when I select a big chunk of text in LibreOffice

Install the video driver by running

sudo apt-get install nvidia-304

and reboot.

I am suggesting 304, because I know that it works better that 340 on that card.


You can compile it yourself from the Source Code available in the official webpage OR wait for playdeb to have it ready which takes a couple of days.

Here is the link http://www.playdeb.net/software/Hedgewars

And the steps are:

Go to : http://www.playdeb.net/updates/ubuntu/10.10/#how_to_install

Follow the instructions there.

Go to: http://www.playdeb.net/updates/ubuntu/10.10/?q=hedgewars

Click on Install this Now

Wait for it to install then go to the Main Meny -> Games

Enjoy.

Of course adding the PPA from playdeb will notify you when the latest version 0.9.15 comes out and you can update like you normally update any other program.

you can help playdeb by notifying the Devs over there that HedgeWar 0.9.15 has come out so they can start working on the deb version as soon as they can.


How can I create a keyboard shortcut for screen brightness as the default  and  don't work?

If the F4 or F5 keys act as just function keys, you need to use Fn+F4 or Fn+F5 instead to trigger the brightness decrease/increase feature.
You would probably be able to change how the function keys work (i.e. only function keys vs. Fn + function keys) from your BIOS settings (depending on the laptop).


Is it possible to use three monitors on my system?

You would need to have an additional graphics card.

Give us details as to what graphics cards (+model) you already have in case it requires special instructions.


Using JUJU bundles in the JUJU-GUI machine view

As of Juju GUI 1.4.0 you now get a change set generated when importing, or dropping a bundle. For more information you can see the blog post http://blog.jujugui.org/2015/06/17/juju-gui-1-4-0-un-committal-release/ and the overview video https://www.youtube.com/watch?v=sr631pNXXzQ

The current release of the Juju GUI (1.3.5) does not support modifying bundles pre-deployment. We are working on adding this functionality right now to the GUI. You can expect that feature to be added in the next couple of weeks. I'll be sure to update this post when it's released but also keep an eye on the blog http://blog.jujugui.org/ and the twitter account https://twitter.com/jujuui

In the interim you can copy the bundle file to your computer, modify its contents, then drag and drop it onto the GUI to deploy it.


Onboard ethernet stopped working after CPU/memory upgrade

Another day of searching for an answer has been successful. The following thread provided a fix. You may have to look through some of the comments at the end to find the correct location for the script to be added based on what version OS install you have. I have no clue why the CPU/memory upgrade triggered this, again everything was ok before.
http://ubuntuforums.org/archive/index.php/t-2020571.html


There is a bug in Vim which enables Application Keypad Mode without defining any mappings for it.
Step 1: Open PuTTY Configuration  menu
Step 2: In the left pane(Category), select Terminal> Features.
Step 3: Select the checkbox along Disable application keypad mode.
Step 4: In the left pane, select Session.
Step 5: Save the settings for the session.


How to schedule an irregular backup script requiring user confirmation

Based partly on feedback in the comments, here is the solution I came up with.

1. Create an empty logfile, ~/.lastbackup.log, to contain a record of the time the backup script last ran.

2. Create a wrapping scheduler script, ~/scheduler.sh, to be placed in Gnome's Startup Applications (~/.config/autostart), to check the logfile date at each boot and decide whether to run the main script:

#!/bin/bash
BACKUPINTERVAL=3 # in days
DATETODAY=$(date +"%Y-%m-%d")
DATELASTBACKUP=$(</path/to/.lastbackup.log) # get last backup date from logfile
DATEDIFF=$(( ($(date --date=$DATETODAY +%s) - $(date --date=$DATELASTBACKUP +%s) )/(60*60*24) ))
if [ "$DATEDIFF" -ge "$BACKUPINTERVAL" ] ; then
    # more than 3 days since last backup, so run script
    /usr/bin/x-terminal-emulator -e /path/to/backup.sh
fi

3. Create the main backup script, ~/backup.sh, to run when necessary:

#!/bin/bash
/usr/bin/dialog --yesno "Do backup now?" 8 40 # user can opt out
if [ $? -eq 0 ] ; then
    # do backup
    # user can check output to screen
    if [ $? = 0 ]; then
        # write date to logfile
        echo $(date +"%Y-%m-%d") > /path/to/.lastbackup.log
        echo 'Backup done'
        read
    fi
fi


Any install on any disk from any source fails

Found this post, referring to possible MEMORY (RAM) errors causing such errors. Now only trying to run memtest86+ from UEFI boot via USB (not in GRUB options, also not with  key), so that's the next challenge for tomorrow. Pfff.


How to go back to last page viewed in Document Viewer?

Alt+p (previous) and Alt+n (next) are the shortcuts you are looking for. You can see all available keyboard combinations under the menu (tree vertical dots).


Some letters are missing in the terminal. Why?

Are you are using truetype fonts when the terminal is expecting monospaced?

Here are some thoughts that need be considered so as to understand why this is the case, please forgive me if this is common knowledge to you but it springs to my mind in response to your query.

Most consoles today are simulations: Back in the days when terminals were the interface with main frame computers, the graphical output was far less of a concern than it is today, there was simply neither the power nor the inclination for fancy fonts. Typesetting had not yet come into consideration. Above anything else, computing resources were far to sparse to implement such graphical niceties.

The structure of the console is essentially a matrix; a grid of rows and columns that are compiled in buffers; think perhaps of shelves with compartments all of the same size so that all of the shelves always have the same length.

Now for this to function when each letter fills a single box on a shelf or in a grid; the individual characters must be of equal width; If they are any wider than the box they will either not be displayed at all, or, they will be displayed incorrectly; This is why a terminal needs "monospaced" fonts.

You might think of it this way; the terminal is fundamentally structured by the fonts themselves, they are its building blocks. When you change the font the terminal size also changes.

In more powerful machines we find a bitmap outputs or vector, in which pixels or and coordinates are the constructors essentially replacing the font as the basic element with dots. When this is the case; fonts with different widths can be used.


Thinkfan on Thinkpad T410 - thinkpad_acpi doesn't seem to support fan_control

I was using the instructions here: http://x220.mcdonnelltech.com/ubuntu/ and was thus missing the driver option expermental=1 in my /etc/modprobe.d/thinkfan.conf file - which seems to be needed to get this working as expected.

Do the following:

sudo nano /etc/modprobe.d/thinkfan.conf

There should be a line

options thinkpad_acpi fan_control=1

change it to

options thinkpad_acpi experimental=1 fan_control=1

Reboot your computer so the changes take effect.


Switching to a tcp port fixed the problem. I have no idea why... (firewalls open)
Ipv6 sites were working because the traffic wasn't being redirected through the vpn.


How to remove icons from KDE application dropdown menu items?

There is an option for that in KDE's systemsettings, in

Application Appearence > Style > Fine Tuning


Looks to me like you have a problem with your disk drive sda1. It's formatted as an ext4 file system and the file system is spitting out errors.

Probably one way of fixing it would be by copying as much data as you can from the drive and then discarding the drive and putting the data on another one. Expensive and time-consuming. You can try other things, and then YMMV.

Another approach would be to try and fix the disk errors using a program like fsck. Just google "using fsck to fix disc errors" is probably the quickest way to proceed if you decide to go down that route. The risk (perhaps small) is that the drive will continue to fail and you may lose more data. On the other hand it's not abnormal for drives to fail slowly and in a controlled manner.

What you do next probably depends a lot on how important the data on the drive is, whether or not it has been backed up, how much there is, whether you can afford any system down time etc etc.


You need to install the package libxrandr2. This package includes the missing file libXrandr.so.2


Where is the save directory for screenshot?

For 18.04: ~/Pictures

From: https://linuxconfig.org/how-to-take-a-screenshot-on-ubuntu-18-04-bionic-beaver-linux

  screenshot is a default application for taking screenshots on Gnome
  desktop. To take screenshot simply hit PrtSc button on your keyboard
  and the screenshot of your entire desktop will be taken and saved as
  *.png file inside your ~/Pictures directory.


How to get/install/activate a Broadcom 4312 wl driver in Ubuntu 12.10

The Broadcom 14e4:4315 needs this:

sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl


Graphical applications / ports / tasks manager?

I've never used this particular tool but googling for netstat gui turned it up. It's called Net Activity Viewer.

View when system's at rest

View when system's being used to browse internet

Alternatively there's GNOME Network Tool (gnome-nettool) which is covered here - Network GUI Tools in 11.10+ (Whois, DNS Checker, Trace Route, etc...).

References

Downloading & Installing


Why no Global-Menu support in LibreOffice for 12.04?

The reason for not including global-menu in libreoffice was that there were too many issues remaining and the development team basically ran out of time & resources.

  Unfortunately, resource constrains did not allow this to happen, so
  this was postponed to the quantal release. The planning will be done
  at UDS-Q beginning of May

From this blue-print you can see the open issues:

https://blueprints.launchpad.net/ubuntu/+spec/desktop-p-libreoffice-lo-menubar-polish

Thus - you can install lo-menubar - but it will give you issues as described.

Possibly the 12.10 release of libreoffice will be available either as a backport or via a PPA and thus global menu integration will be completed ... at this stage this is speculative though.


From this slightly old question, the package xubuntu-default-settings sets the LightDM greeter to the Xubuntu one. In 14.10, it uses the file /usr/share/lightdm/lightdm.conf.d/60-xubuntu.conf. Either delete this file, or copy /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf to a higher number:

sudo cp /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf /usr/share/lightdm/lightdm.conf.d/99-unity-greeter.conf

This will set the Unity greeter as the highest priority.


Can I just delete Chromium without hurting my Chrome application / program at all?

Chromium is open source and Chrome is closed source :)

A list of the differences is available here: https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md

Note that if that isn't enough for you, a simple Google search for Chromium vs Chrome gives a ton of results.

As for the replacement, you can simply delete one of the two with apt or package manager. However, I've heard that chrome loses speed without Chromium, so on my laptop I keep both installed but I use Chrome. Thus, I would recommend you uninstall Chrome if you have to uninstall something.