Monitor visited websites of guest account through any browser I want to know which websites/URLs are visited by users of my home computer's guest account.

Is there a way to log this and save it as nicely formatted list to the disk? I only need date/time and visited URL. If possible, full URLs would be nice, but domain only is also good for a start.

Update:

After having read the linked answers and suggestions in the chat from A.B., I ran the following command:

$ sudo iptables -A OUTPUT -m owner --uid-owner 499 -j LOG --log-prefix='[GUEST INTERNET ACCESS] '

after having set the guest account UID to the fixed UID 499 following Set or determine the UID range for guest accounts.

But the /var/log/kern.log still doesn't contain those logs but lots of messages by apparmor that tell it denied something:

Nov 18 11:19:22 wolf-pack kernel: [ 1030.063374] audit: type=1400 audit(1447841962.731:164): apparmor="DENIED" operation="connect" profile="/usr/lib/lightdm/lightdm-guest-session" name="/run/systemd/journal/stdout" pid=4693 comm="dbus-daemon" requested_mask="w" denied_mask="w" fsuid=499 ouid=0

I have posted a separate question about the AppArmor problem here: AppArmor blocks logging set up through iptables for guest account - How to enable?

I think your intention is clear here: log URLs of websites visited by anyone using any application as the guest user.

Suggesting iptables logging to achieve this task isn't correct. iptables (without some obscure, performance-limiting extensions) works on the IP protocol, not on the application level.

I've also seen suggestions in the URLs suggested as comments - responders suggested only capturing packets with SYN flags (new connections). That too, results from a misunderstanding described above.

The way to achieve what you want is:

Install a web proxy (preferably lightweight, such as tinyproxy).
Add iptables rules that redirect outgoing connections made by only a specific user to ports 80,443/tcp to the local proxy.

What I had in mind is described here (not my post). This way you get a web proxy log which has all the HTTP requests logged. You won't get logs related to SSL protected traffic though, which is a good thing.

To reiterate: URLs are not part of the IP or TCP header structure, thus something working on the IP/TCP level isn't going to be able to show you this data, unless it has some TCP dissector (tcpdump/wireshark are able to do this but not iptables alone).

Have you tried this:

sudo iptables -A output -m owner --uid-owner 499 -j log --log-prefix="'/var/log/kern.log$'uri"

and it might help fine this way.


Cannot boot into desktop after purging GNOME3 PPA I am dual-booting a C2D laptop with W7 x64 and Ubuntu 12.10 x64.

After using the GNOME3 PPA and getting a bit wary of the increased system instability, I tried to downgrade to the standard 12.10 AMD64 components. I installed ppa-purge and issued the command sudo ppa-purge ppa:gnome3-team/gnome3, accepting the solutions offered.

However, instead of running the following additional commands

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install --reinstall ubuntu-desktop

I stupidly rebooted the machine. Now I can't boot into the partition. I tried the following things in Recovery Mode:

Attempted to launch to root and then issue the above (missing) commands, but it gave me some error regarding not being able to write to /var/apt/*something* (sorry but I don't remember the exact locked path),
Attempted to launch with the 'Start Networking' (or similar) option, but nothing happens. The system isn't frozen here, pressing the power button here shuts down the machine as expected.

How do I restore my Ubuntu partition without losing any data?

When you reboot as root, you need to issued the command

mount -o remount,rw /

To to make the disk writable (it's in a read-only state to begin with).

Then you can issue the command:

apt-get install ubuntu-desktop

One possible option would be to reinstall Ubuntu over your current installation. It should keep your files and many of your settings as well.

It is the easiest solution I can think of, albeit not the ideal solution.

You might wish to backup your important data after booting through your liveDVD or iveUSB before reinstalling.


How do I get rid of "U3 System" on my USB drive? I have a USB drive (SanDisk SDCZ40-016G) that mounts in a way I've never seen before. When inserted, two items appear in Places -> Computer:

"SanDisk Ultra Backup: 16GB" contains my data, and "CD Drive: U3 System" contains a Windows executable. The part with the Windows executable doesn't look useful to me so I'd like to remove it. I used GParted to delete the only partition listed on the device and then I created and formatted a new partition:

Strangely, the "CD Drive" containing the Windows executable was perfectly intact after this operation.

What's going on?

The solution came from u3_tool (universe), which can:

uninstall the U3 software
reclaim the CD-ROM disk space
run on Ubuntu

I ran sudo u3-tool -p 0 /dev/sdb and then repartitioned the drive. Now it mounts like a "normal" USB drive.

In Linux (for me) it appears as another disk. You might be able to format that part. Personally I will not recommend it in the odd case it stops up the device, but I doubt it would.


How do I install the latest stable version of Firefox? I want to install the latest Firefox on my Ubuntu (64bit) box.

What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place?

The latest version of Firefox is available for as a security updates in all supported releases of Ubuntu, just doing a normal update will pull it in. You need to enable at least one of the security or updates repositories (e. g. via Software & Updates → Updates); security should be enabled by default but it's better to check, especially if the package manager doesn't update Firefox yet.

Usually it's available within a few hours of Mozilla's announcement, sometimes faster, depending on the archive builders, and the speed of your local mirror, etc.

See also:

Firefox New Version - Community Help Wiki
How to install the latest stable version of Thunderbird?

Here is what I found works best:

Download it from mozilla.com and extract it (to wherever you want). It creates a folder called "firefox" and in that folder there is a file called "firefox". Drag this file onto your panel, and it asks you to give the new launcher a name (call it Firefox, but it doesn't matter), and you're done.  To open Firefox just use the new launcher on the panel (the correct icon should be there automatically).

Be wary though that the firefox command still opens your old installation.


Ubuntu Won't Boot from USB on ASUS X205T I've created a bootable USB for Ubuntu 16.04.01, which worked on my Dell Latitude E6420. I'm now trying to install Ubuntu on my Asus X205T, but whenever I boot override to the drive, it kicks me back to the bios setup, or, on the second try, just gives up and goes to windows. The device is currently running Windows 10. I double checked, and the USB drive does have 64 bit Ubuntu on it. Additionally, the EFI gives me an error message when I try to boot it. I'm attaching some pictures of my BIOS in case they shed some light on the issue. Any help is appreciated. Thanks!

EDIT:
I tried recreating the bootable USB using a FAT32 file system, just to be sure. I also flashed the bios. The computer still ignores the boot override and goes to windows. I've also disabled fast boot and moved the drive to the top of the boot order, and the computer kept swapping back to the bios without ever starting Ubuntu. I have not yet disabled UEFI, but won't I need to change the file system on the USB drive to DD instead of ISO to get that to work?

did you format the usb to fat32?(had a similar problem last week)

what program you using to burn the img into the stick ?

try using win32 disk imager

Download here:
win32 disk imager

if you think its not related to the usb stick try updating bios.


Intel Dual Band Wireless 7265 dropping connection I am running Ubuntu 14.04.01 LTS on an Acer V Nitro laptop which has an Intel Dual Band Wireless 7265 controller. The driver version is 3.13.0-45-generic with firmware 22.24.8.0. The connection is stable for 30-40 minutes and after, it disconnects. Are necessary several reconnect attempts, sometime a restart in order to reconnect to the WiFi network.

Did anyone face this issue with this controller? What do you recommend to diagnose the issue?

The root cause is described in this blog post It seems that there are some bugs in the Intel iwlwifi driver for 802.11N protocol for the kernel/firmware versions 3.13.0-45-generic/22.24.8.0. The temporary solution it is to disable 802.11N which is an work-around until the issue will be fixed. That means that I will not use the full capacity of the 7265 controller, which will be limited to 54MBs.

sudo sh -c 'echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf'

I have a non-software solution for that. Warming up the machine.
Yes you're seeing it right. In the beginning my laptop (ASUS UX305FA) could not connect to some specific WIFI device. one day I just put it in the soft-case and brought it around, the machine was a little bit warmer than before. Suddenly it connected to the WIFI network which was not able to link.
This is more like a magic trick but it works for me... and I am using that WIFI spot now.


What does an "exec" command do? I don't understand the bash command exec. I have seen it used inside scripts to redirect all output to a file (as seen in this). But I don't understand how it works or what it does in general. I have read the man pages but I don't understand them.

man bash says:

exec [-cl] [-a name] [command [arguments]]
      If command is specified, it replaces the shell.  No new  process
      is  created.  The arguments become the arguments to command.  If
      the -l option is supplied,  the  shell  places  a  dash  at  the
      beginning  of  the  zeroth  argument passed to command.  This is
      what login(1) does.  The -c option causes command to be executed
      with  an empty environment.  If -a is supplied, the shell passes
      name as the zeroth argument to the executed command.  If command
      cannot  be  executed  for  some  reason, a non-interactive shell
      exits, unless the execfail shell option  is  enabled.   In  that
      case,  it returns failure.  An interactive shell returns failure
      if the file cannot be executed.  If command  is  not  specified,
      any  redirections  take  effect  in  the  current shell, and the
      return status is 0.  If there is a redirection error, the return
      status is 1.

The last two lines are what is important: If you run exec by itself, without a command, it will simply make the redirections apply to the current shell. You probably know that when you run command > file, the output of command is written to file instead of to your terminal (this is called a redirection). If you run exec > file instead, then the redirection applies to the entire shell: Any output produced by the shell is written to file instead of to your terminal. For example here

bash-3.2$ bash
bash-3.2$ exec > file
bash-3.2$ date
bash-3.2$ exit
bash-3.2$ cat file
Thu 18 Sep 2014 23:56:25 CEST

I first start a new bash shell. Then, in this new shell I run exec > file, so that all output is redirected to file. Indeed, after that I run date but I get no output, because the output is redirected to file. Then I exit my shell (so that the redirection no longer applies) and I see that file indeed contains the output of the date command I ran earlier.

In bash, if you do help exec:

$ help exec
exec: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
    Replace the shell with the given command.

    Execute COMMAND, replacing this shell with the specified program.
    ARGUMENTS become the arguments to COMMAND.  If COMMAND is not specified,
    any redirections take effect in the current shell.

    Options:
      -a name   pass NAME as the zeroth argument to COMMAND
      -c        execute COMMAND with an empty environment
      -l        place a dash in the zeroth argument to COMMAND

    If the command cannot be executed, a non-interactive shell exits, unless
    the shell option `execfail' is set.

    Exit Status:
    Returns success unless COMMAND is not found or a redirection error occurs.

The relevant bit:

If COMMAND is not specified, any redirections take effect in the current shell.

exec is a shell builtin, which is the shell equivalent of the exec family of system calls that G_P speaks of (and whose manpages you appear to have read). It just has the POSIX mandated functionality of affecting the current shell if no command is specified.


Is it possible to make writing to .bash_history immediate? I often open lots and lots of Terminals [Right now I have 7 open on this workspace] and I often search history with grep to find a command I've just written recently, but I don't want to hunt down the terminal and then scroll up and hunt for it more, etc.. Sometimes my terminals close without 'exit,' and everything I've written is lost [Sometimes I've needed something I'd written in a terminal that was killed].

So is there a way to make it so each terminal writes to .bash_history immediately? or at least once a minute, or something like that?

A simple solution as detailed in Update Bash History in Realtime.

It says to put those commands in the .bashrc config:

shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"

The first command changes the .history file mode to append. And the second configures the history -a command to be run at each shell prompt. The -a immediately writes the current/new lines to the history file.

Related for zsh:

How do you share history between terminals in zsh?

A note for all other answers (which are basically the same thing):

Setting PROMPT_COMMAND="history -a;$PROMPT_COMMAND" in the .bashrc (or friends) is enough.

Also, you can manually run history -a whenever you want to "snapshot" the history in the current session.

The command shopt -s histappend is not needed because history -a always appends new lines to the file and never overwrites it. Also, at least as of Bash 4, histappend is the default behavior.


How to draw a picture with text in the center of that via command-line? I need to paint an image with text in the center via command-line to further put into the video. A simple yellow text on black background.

I tried FFmpeg way:

ffmpeg -loop 1 -r 1 -i b.png -b:v 1M -vf "scale=320:240, drawtext=fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf: text='Test Text'" -vcodec mpeg4 -acodec aac preroll.mp4

Which gave me the following error:

[AVFilterGraph @ 0xf56020] No such filter: 'drawtext'

I tried to install ivtools and tried drawtool and idraw which are obviously for desktop environments.

How to create a simple image with text in Ubuntu programatically?

What about this command:

convert -background black -size 800x480 -fill "#ff0080"  -pointsize 72 -gravity center label:'Ask Ubuntu' output.png

By using above command you create an empty .png image which its background color is black.

-background color
   set the background color.
   the default background color (if none is specified or found in the image) is white.

The created image size will be 800x480(width[xheight]).

-size width[xheight][+offset]
   set the width and height of the raw image.

-fill color
   color to use when filling a graphic primitive.

This option accepts a color name, a hex color, or a numerical RGB, RGBA, HSL, HSLA, CMYK, or CMYKA specification. See Color Names for a description of how to properly specify the color argument.

For example,

 -fill blue
 -fill "#ff0080"
 -fill "rgb(255,0,128)"

Enclose the color specification in quotation marks to prevent the "#" or the parentheses from being interpreted by your shell.

To print a complete list of color names, use the -list color option.

-pointsize size
   pointsize of the PostScript, OPTION1, or TrueType font.

-gravity type
   sets the current gravity suggestion for various other settings and options.

Choices include: NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast. Use -list gravity to get a complete list of -gravity settings available in your ImageMagick installation.

label:'your Text Here' write your text into image.png.

Also see more examples.

See full command-line options

The ffmpeg command didn't work because ubuntu doesn't have ffmpeg, it has libav instead.

Try ffmpeg -version to confirm (will return 0.8.something IIRC).

If you get the latest version (2.4.3) from http://ffmpeg.org then drawtext will work.


How do I run a game with a .x86 extension Can anyone help me run the game cs portable, I used to play this all the time on windows?? it's free and the download link is here,
the download link is in the bottom of his profile description.

The file extension is .x86 and the game is only 45MB, so it won't take long too download.

Linux is like a honey badger and honey badgers don't care. Especially about file extensions :)

It's hard to tell whether this is a developer's fault without more info. It looks like you're running something that didn't come as a package that's part of Ubuntu. This could be statically or dynamically linked against some libraries.

You can find out by running:
file /path/to/the/file.x86
if this is script as opposed to a binary, you need to find what's the actual binary it executes by looking at it.

This is important since "statically" means you probably don't have to install any dependencies to be able to run it. Dynamically means that your system needs to have certain libraries installed before you can run the binary.

If it's a binary, you can find out if it's a dynamically or statically linked by running

ldd /path/to/the/file.x86

Example of a dynamically linked binary:

 ldd /bin/bash
    linux-vdso.so.1 =>  (0x00007fff631ff000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fed8fe35000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed8fc31000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed8f871000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fed90082000)

While a statically linked binary would show something along the lines:

not a dynamic executable

One other thing to keep in mind - if you're clicking the file in order to execute it, if it crashes, or just terminates, you won't know what caused it since you don't see the output.

You could try opening a terminal, entering the directory where you have this binary, and running it with ./file.x86. The './' is important here since it means 'in the current directory'. This way you can see any error or informational messages when it terminates and possibly there's some hint about what you need to do in order to make it work.

In other words, check your game's requirements.

For more information:

The Unity3D Game Engine exports Linux game builds to these file types (.x86 & .x86_64).

I encountered this problem today with my first Linux build in Unity (I am a Unity3D developer), but it's easily solvable, as explained in the answers above.

Just thought you'd like to know.

Cheers.


Enable wifi on my computer - firmware missing Possible Duplicate:
  How do I setup my ubuntu on a WiFi network?

I am attempting to set up a wireless network on 11.04, freshly download today. The router is on and working. However, I do not have a wifi "card" (which I am assuming is a little USB-type thing that allows internet access, but correct me if I am wrong) and every time I try to type in the MAC address and everything, nothing works. I also get the "firmware missing" error when I scroll over the signal strength, which I have tried looking up but have been unsuccessful with completely understanding it.

I guess my main question is do I need another little device to be able to use wifi on my ubuntu? I do have an ethernet cable but another person is using it and I do not want to be tied down to that cable.

the problem is that none of the wireless networks show up, however they show up when I go into Windows mode on my laptop. I get an error message at the top saying "firmware missing" which I have tried looking up but still have no straight answer for.

Wireless cards come in a few varieties. If your computer is a laptop, you might well have one installed and not know it, as they are often built in to the unit. A desktop computer with a wireless interface will either have an antenna sticking out somewhere (probably the back panel) or a USB device plugged in to it.

In Ubuntu, many if not most wireless devices will work "out of the box". When you left-click on the Network Manager icon in the upper-right corner of the screen (it looks like a series of signal-strength bars or like an ethernet socket) Network Manager should show you a list of networks. At the top will be "Wired Networks", then a list of the connected networks, then a list of available networks, then "Wireless Networks" and another set of lists. If you don't have a wireless device or it is unavailable for some reason, there will be no "Wireless Networks" section.

If you are unsure as to whether you have a functioning wireless device attached to your computer, you can use the commands "lsusb" and "lspci" to show what devices are connected. If you don't understand the output of the commands feel free to post it here and I will interpret it for you. It's pretty straightforward though!

If your investigation shows that you have a connected wireless device, but Network Manager does not show any "Wireless Networks", then there are further issues. If this happens I'll be happy to walk you through the troubleshooting process.

You can usually connect to the internet by pluging your modem into the usb slot or the ethernet slot.  Or you can get an external wifi adapter.  802.11g USB WiFi Wireless Lan Adapter w/5dBi Antenna is a wireless usb device that from my experience is plug and play with Ubuntu 10.10, 11.04.


Terminator command history I have been looking into this - but I can't get previous entered commands in Terminator (multi-terminal). I have looked into the Preference but I don't see how it is done.

I know this is not really Ubuntu question, but I am sure many of you have used Terminator.

Does anyone know how to get the previous entered commands?

Thanks!

You can try typing:

history

in your terminal.

Or you could search it with CTRL-r.

Try with this:

edit /etc/inputrc

sudo vim /etc/inputrc

uncomment or add this two line

"\e[5~": history-search-backward

"\e[6~": history-search-forward
logout/login

then try to write some command listed in history...

like...

ls -lah

write

ls

and press

page up

If you did everything right it should auto-complete your command :)


Nicer FTP client than FileZilla? FileZilla is really kind of "meh," when it comes to user interface. I'm wondering if there's something simpler/cleaner/slicker out there?

FileZilla is the de-facto standard when it comes to an FTP client. It is extremely powerful while remaining very easy to use. You mentioned the user interface, and you're really not going to find much better then FileZilla as far as that. However, here are the top ten most popular alternatives:

1. Nautilus

Don't forget the FTP client that comes with Ubuntu! It integrates very nicely with Ubuntu, and is very easy to use. You don't have to install any additional software. However, it lacks many of the powerful features that a full-featured FTP client, like FileZilla has.

To use it, go to File > Connect to Server with the desktop selected.

2. gFTP

Another option is to use gFTP, a FTP client with a nice graphical interface that is different from FileZilla's, but only slightly. It can be installed through the Ubuntu Software Center or through sudo apt-get install gftp.

3. Kasablanca

Kasablanca is a GUI FTP client intended for use in KDE, but it will work in Unity too. The interface is very simple and it lacks some of the advanced features of more sophisticated FTP clients. It can be downloaded here.

4. FireFTP

If you prefer a Firefox add-on, FireFTP is a great one that will allow you to transfer files from within the browser. Download it here.

5. KFTPgrabber

A FTP client for the K Desktop Environment (KDE). It can be downloaded at kftp.org.

6. GNOME Commander

GNOME Commander is an FTP client with a very unique interface that supports themes and customization. It can be installed through the Ubuntu Software Center or sudo apt-get install gnome-commander.

7. Sitecopy

Sitecopy is a unique FTP client in that it automatically synches a directory on your computer with a directory on an FTP site automatically in the background. Details at the project's website, which can be found here. Sorry, but I couldn't find a screenshot for this one.

8. Filerunner

Filerunner is an FTP client with a very basic interface. It can be installed through the Ubuntu Software Center or through sudo apt-get install filerunner.

9. Konqueror

Konqueror, a web browser for KDE, can access FTP sites when you type ftp://username@server.com/ into the address bar. it can be installed through the Ubuntu Software Center or through sudo apt-get install konqueror.

10. net2ftp

net2ftp is an online FTP client which lets you upload files from the web browser without having to install any additional software. It can be accessed through net2ftp.com.

Hope that helped. Please let me know if I left any clients out that you think should be included.

If you're after a nice web-based FTP client, www.monstaftp.com is an open source PHP FTP file manager.


How to access the USB stick in my router (Huawei B315) that is shared as a samba share I want to access a USB memory stick that is plugged into  my Huawei B315 LTE router.  I have set it up properly as per the web configuration pages on the router but I have no idea how to access it from my xubuntu 15.10 laptop (which is connected to the wifi that is supposedly sharing the USB Stick).  I have scoured  all the Huawei pages/forums/manual that I could find and I have found no instruction on how to do this.

I have also searched more generally and found either how to consume this from windows or how to consume a windows share from linux neither of which I am trying to do.

I have found various vaguely similar questions, here and elsewhere but they all access a samba share that has a share name on a server with a server name.  If my router has a servername or the usb a share name they are well hidden - I have looked in every setting or menu item on the router.

When logged in as admin to the router apart from the usual LTE and WLAN setup pages it has a 'More' Menu.  This menu has an item for sharing, clicking on that brings you to the sharing page. from here there are three navigation options Samba, User settings and DLNA.

Under Samba there is a single checkbox to enable Samba sharing and this information:

"Your router supports the Samba server. This allows your computer to access the USB storage device or USB printer connected to the router using the Samba server. To set the Samba account, go to the User Settings page."

The User settings page allows you to create users and give them passwords, and read or read/write access to directories (including all) on the share.  I have created a couple of users one with read access and one with read/write.

The DLNA page allows you to enable or disable sharing (I have it enabled) and allows you to set a path (through which setting I have discovered that the usb stick is known to the router as /usb1_1.

I am embarrassed and annoyed that I have spent this much time trying to find a solution to what shouldnt really be a problem.  I admit I dont know a lot about linux or ubuntu and I suspect that is why Im having so much trouble with this. Thanks to anyone that can help.

After some helpful suggestions (thanks @mikewhatever) and a bit more investigation I've worked it out.

The way to reference this share is in the location bar of the file manager use:

smb://ip address/username/sharename/

The username and sharename you get from the user settings page of the routers web interface when you set up the share - at that stage you must already know the IP address as it's what you use to access the web interface.  If the user has access to 'All' then leave out the sharename, otherwise use what the router calls it when you select the users folder.

samba then displays this dialog:

I left workgroup in and selected remember until I log out, put in my username and password and then I was able to browse the files.

I had to work most of this out by trial and error.  As @mikewhatever suggested I tried using smb://routers-IP-address as the servername, this got me a little further. I then put the username in, received another error, and so on, and after a bit of experimenting I determined what was required.  What I've shown here has only been shown with this one router (B315) from Huawei but might be more generally applicable.

I'm guessing the Windows Network and Workgroup stuff is a samba thing, but it does seem odd considering there arent any windows computers on the network.

What I'd like to know now is why isn't this info more readily available?

Please check whether the DLNA setting is enable or not.
If you want to access the USB you need enable the DLNA setting.
This setting is in share options on the router web page.


Picasa would not log into my account I have installed Wine on 11.10, but for some reason Picasa does not detect the internet connection, which exist system wide, except for Picasa

Any suggestions?

Hi, I have reinstalled picasa 3.0 for linux after having replaced ubuntu 11.04 by 11.10. But this time I can log in web album/google account using any browser but cannot log in my picasa web album through picasa. Every time I try, it says authentication failure. I dont understand where the problem is. Could any one help?

OK, I find how to work this out.

If you've not already done so then install Wine. Now all you have to do is copying the wininet.dll.so file from /usr/lib/wine/ to /opt/google/picasa/3.0/wine/lib/wine/ overwriting the one that's there. Picasa should now work!

http://forums.fedoraforum.org/showthread.php?t=223743&highlight=picasa

It works!!! Before copying, need to obtain the root permission: run in Terminal: ”gksudo nautilus” (for ubuntu users).
Thanks a lot and sorry for poor english.


Is it possible to display windows which are bigger than monitor resolution? I want test my game for retina displays, which has 2048×1536 resulution, but my monitor small and I don't see the whole window. Is it possible make this window smaller and save 2048x1536 resolution of game?

You can't do that. If your monitor doesn't support a particular resolution, then you can't display an application at that resolution.


Why pyenv is not showing system version? I moved to Kubuntu 20.04 recently.Two days ago I installed pyenv and using pyenv i installed python(3.6.8) then I looked for available python versions from pyenv using this command.
samip@samip-Inspiron-3521:~$ pyenv versions
3.6.8

But it only showed me this recently installed version but my system has python 3.8.2 installed but anyway i used the 3.6.8 as global version using this command
samip@samip-Inspiron-3521:~$ pyenv global 3.6.8

But now i cannot switch back to system version.
samip@samip-Inspiron-3521:~$ pyenv global system
pyenv: system version not found in PATH

I am new to linux and programming please give me step-by-step solution.
samip@samip-Inspiron-3521:~$ echo $PATH
/home/samip/.pyenv/plugins/pyenv-virtualenv/shims:/home/samip/.pyenv/shims:/home/samip/.pyenv/bin:/home/samip/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

The problem on a fresh Kubuntu 20.04 installation is that there is no python executable. The /usr/bin only has python2 and python3 but pyenv checks for python to determine if a system version is available.
As a workaround create a python executable yourself:
ln -s /usr/bin/python3 /usr/bin/python

Solution :
sudo apt-get remove --purge python3.6


Customizing kernel and uname info For practice I want ot build a custom kernel on my Ubuntu 16.04. I followed this guide:

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

That went well, kernel builds and installs and boots fine. Now I want to add a
custom version string that can be seen with 'uname -a' or something.

The guide says

  In order to make your kernel "newer" than the stock Ubuntu kernel from
  which you are based you should add a local version modifier. Add
  something like "+test1" to the end of the first version number in the
  debian.master/changelog file, before building. This will help identify
  your kernel when running as it also appears in uname -a.

I am not sure what they mean. I have changed the first line of the changelog file from

linux (4.4.0-59.80) xenial; urgency=low

to

linux (4.4.0-59.80-mykernel1) xenial; urgency=low

That then gives me an error during building

dh_installchangelogs -plinux-headers-4.4.0-59.80-mykernel1
dh_installchangelogs: package linux-headers-4.4.0-59.80-mykernel1 is not in control info
dh_installdocs -plinux-headers-4.4.0-59.80-mykernel1
dh_installdocs: package linux-headers-4.4.0-59.80-mykernel1 is not in control info
dh_compress -plinux-headers-4.4.0-59.80-mykernel1
dh_fixperms -plinux-headers-4.4.0-59.80-mykernel1
dh_installdeb -plinux-headers-4.4.0-59.80-mykernel1
dh_installdeb: package linux-headers-4.4.0-59.80-mykernel1 is not in control info

Next thing I tried was to modify the root Makefile like so:

EXTRAVERSION = mykernel1

But that had no effect whatsoever.

Where am I wrong or what else can I try? Thanks.

Do not edit the current version in debian/changelog. Create a new build by dch -i then add the custom version.


How to run a program without typing the full path? System utilities such as ls don't need to have the full path typed before executing them. However, to execute Netbeans, I have to type /home/chris/netbeans-7.0.1/bin/netbeans. How can I make it so that I only have to type netbeans?

An easy way is to place a link in /usr/local/bin:

sudo ln -s -T /home/chris/netbeans-7.0.1/bin/netbeans /usr/local/bin/netbeans

after that you can execute netbeans with:

netbeans &

go to the program directory.
open the terminal using ctrl+alt+T.
Drag and drop the program file to the terminal  windows.
Hit enter on the terminal windows.


Booting ubuntu desktop into command prompt I use ubuntu desktop 10.10 on a netbook. Quite often I use it as a proxy server (squid3) and file server (samba) for my network. So when I am using it as a network server, is it possible to boot into only command prompt and there by I can bring down power usage and have a longer battery backup.

You can edit the kernel parameters in grub to add text as a boot parameter.

To do that temporarily (just for the current boot), you can edit the boot menu entry by pressing e (if you don't want the default boot menu entry, first select the one you want).  If you don't see the boot menu, you can hold down the Shift key during boot to make sure it gets shown.  You have to add the word text at the end of the line that starts with linux.

To make this permanent, you can add text to the value of GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.  If you didn't change that file before (some people remove the quiet and/or splash, or add other kernel options), the line will then look like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

After changing this, you should run sudo update-grub to regenerate the actual grub boot menu configuration.

When you want to start the GUI from the console, do it with:

sudo start gdm

To stop the GUI again, log out (to make sure all your settings are stored etc.), switch to the console, and do the same with "stop" instead of "start":

sudo stop gdm

I dont know if you can boot into shell, w/o the graphics mode, but you can use the 6 terminals *Nix provides, buy pressing

Ctrl + Alt + F1 to F6


Can't mount any partitions - ACL error I've install Ubuntu 12.10 and now I can't mount any partitions.

I get the same error with drives: Adding read ACL for uid 1000 to /media/proach failed: Operation not supported

I have one word for this 'bug': fun. :)
I saw exactly the same error message today, and the solution is...

sudo mkdir /media/$USER
sudo chown $USER:$USER /media/$USER

(thank jasmines for the tipp!)

I know, fun, but that was the solution for me! Ubuntu wants to use a non-existent directory for the mount target, and doesn't create it before attempting the mounting operation!

The last answer make a solution in some cases...

I just found a solution 100% effective. Follow my instructions:

1) In a console write that: $ sudo gedit /etc/fstab

2) Enter your admin password

3) In the gedit Editor, go to the end of the file and write your data with this structure:
 #Hard Drive n1  the next line auto-mont the partition sda2 in the /media directory
/dev/sda2 /media/myHardDrive ntfs defaults 00
 #For CD/DVD the next line auto-mont the CD/DVD in /media dictory with the type iso966
/dev/sr0 /media/CD-DVD iso966

4)save the current text and close de gedit editor.

If all of this works, when you insert a DVD, Hard Drive or any device, they will auto-mount in the directory that you put in the /etc/fstab file.

Of course, if you are any question or error in the steps, i will write as soon i can.


GRUB not appearing after reinstalling Ubuntu in dual boot I had 17.0 Ubuntu installed along with Windows 7 as a dual boot.

Since apt-get wasn't installing anything I realized I had to update, so I did a fresh install to 18.04, erasing the previous version.

Everything works fine but now I can't boot back into Windows. GRUB isn't showing up. Any help?

Did you tried to press Shift on early boot?


Brightness key not working Acer ASPIRE v15 The brightness key (Fn + left/right arrows) on my Acer ASPIRE v15 laptop> on Ubuntu 16.04 LTS are not working.
I can control the brightness by changing the value of brightness by editing the file: /sys/class/backlight/intel_backlight/brightness
I want to connect the (Fn + arrow) key to a script which edits the value in the
above file. But acpi_listen does not detect the pressing of (fn +  arrow(left or right)) key. Though, it is able to detect (fn + arrow(up or down)) keys for volume control.
How to get these keys detected for brightness control by the acpi?
Edit: Binding another keys(other than the (fn + arrow) and calling the script as non-acpi event forces me to run the script  by placing it inside /etc/sudoers.d/ directory in order to avoid prompting for password at each press of the key. (as changing the value of brightness requires root permission).

At first we need some information about the video card. Just to make sure the right one is working. For example it is a APU (CPU+GPU in one processor). Intel or AMD does not matter. In my example it is an i5 470U processor. For further use we need the ID of the graphic card:
$ sudo lspci | grep VGA

--> 00:02.0 VGA compatible controller: Intel Corporation Core Processor
    Integrated Graphics Controller (rev 02)
The ID is 0:2:0

For further information about the vide device use
$ sudo lshw -c video

We need to edit/create a config file for xorg:
/usr/share/X11/xorg.conf.d/20-intel.conf
For our example the following section has to be inserted:
Section "Device"
      Identifier "Intel Graphics"
      Driver "intel"
      Option "Backlight" "intel_backlight"
      BusID "PCI:0:2:0"
      EndSection
Section "Device"

Source: https://wiki.ubuntuusers.de/Grafikkarten/Intel/
Then the grub bootloader has to be edited to rewrite the list of supported OS.
This Bios option was introduced during the time of windows vista.
Source: https://wiki.ubuntuusers.de/Bootoptionen/
Grub editieren and extend the following line with acpi_osi=Linux in
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"

Close file and update grub
$ sudo update-grub

Reboot the System.
$ reboot

The keys (with the sun symbol) on your keyboard for regulating the brightness should work now.

In settings > Devices > Keyboards look for the hotkeys for controlling brightness. If your built in keys don't work, you can manually bind over them (Select the adjust brightness shortcut and press Fn + L/R)


I encountered a gconf2 error while installing some packages, what should I do? I got this error when installing some software:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up gconf2 (3.2.0-0ubuntu1) ...
I/O warning : failed to load external entity "/usr/share/gconf/schemas/compiz-wobbly.schemas"
Failed to open `/usr/share/gconf/schemas/compiz-wobbly.schemas': No such file or directory
I/O warning : failed to load external entity "/usr/share/gconf/schemas/gwd.schemas"
Failed to open `/usr/share/gconf/schemas/gwd.schemas': No such file or directory
dpkg: error processing gconf2 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mutter-common:
 mutter-common depends on gconf2 (>= 2.28.1-2); however:
  Package gconf2 is not configured yet.
dpkg: error processing mutter-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libmutter0:
 libmutter0 depends on mutter-common (>= 3.2); however:
  Package mutter-common is not configured yet.
 libmutter0 depends on mutter-common (<< 3.3); however:
  Package mutter-common is not configured yet.
dpkg: error processing libmutter0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-mutter-3.0:
 gir1.2-mutter-3.0 depends on libmutter0 (>= 3.1.92); however:
  Package libmutter0 is not configured yet.
dpkg: error processing gir1.2-mutter-3.0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-shell:
 gnome-shell depends on gir1.2-mutter-3.0; hNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                      No apport report written because the error message indicates its a followup error from a previous failure.
                No apport report written because MaxReports is reached already
                                                                              No apport report written because MaxReports is reached already
                                                            owever:
  Package gir1.2-mutter-3.0 is not configured yet.
 gnome-shell depends on libmutter0 (>= 3.2.1); however:
  Package libmutter0 is not configured yet.
 gnome-shell depends on gconf2 (>= 2.28.1-2); however:
  Package gconf2 is not configured yet.
dpkg: error processing gnome-shell (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gconf2
 mutter-common
 libmutter0
 gir1.2-mutter-3.0
 gnome-shell
E: Sub-process /usr/bin/dpkg returned an error code (1)

In linux mint, I solved the problem via first:

sudo dpkg --configure -a

then:

sudo apt-get upgrade

It's I/O error! Your hard disk is failing. Use command dmesg and check if kernel log show a Input/Output error in the hard disk. Then check the File-System by running fsck.ext4 /dev/sda1, and reinstall the package that contain file:

apt-file search /usr/share/gconf/schemas/gwd.schemas
apt-file search /usr/share/gconf/schemas/compiz-wobbly.schemas
apt-get install --reinstall $package1 $package2

PS: buy a new hard drive!


Is plexydesk supported on Ubuntu 14.04.3 LTS (Trusty) I tried installing but it fails.

Failed to fetch http://ppa.launchpad.net/plexydesk/plexydesk-dailybuild/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found

I read on Launchpad that it is not supported.

Hope someone can help me install it.

Based on launchpad.net as well as the the official website it is only available for 15.04, 15.10 and 16.04 version of Ubuntu.

Yet you might be able to make use of its source code which is still unstable but available here.

For updated builds please check https://launchpad.net/~plexydesk/+archive/ubuntu/plexydesk

for https://launchpad.net/~plexydesk for other builds.


Aliases not available when using sudo I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo:

danny@kaon:~$ alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'

danny@kaon:~$ ll -d /
drwxr-xr-x 23 root root 4096 2011-01-06 20:29 //

danny@kaon:~$ sudo -i
root@kaon:~# ll -d /
drwxr-xr-x 23 root root 4096 2011-01-06 20:29 //
root@kaon:~# exit
logout

danny@kaon:~$ sudo ll -d /
sudo: ll: command not found

Is there any reason why you cannot use aliases whilst using sudo?

Add the following line to your ~/.bashrc:

alias sudo='sudo '

From the bash manual:

  Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may be set and unset with the alias and unalias builtin commands.

  The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. The characters ‘/’, ‘$’, ‘`’, ‘=’ and any of the shell metacharacters or quoting characters listed above may not appear in an alias name. The replacement text may contain any valid shell input, including shell metacharacters. The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded is not expanded a second time. This means that one may alias ls to "ls -F", for instance, and Bash does not try to recursively expand the replacement text. If the last character of the alias value is a space or tab character, then the next command word following the alias is also checked for alias expansion.

(Emphasis mine).
Bash only checks the first word of a command for an alias, any words after that are not checked. That means in a command like sudo ll, only the first word (sudo) is checked by bash for an alias, ll is ignored. We can tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.

I have a different solution whereby you do not need to add sudo as an alias. I run Linux Mint 17.3 but it should be pretty similar to Ubuntu.

When you are root, then the .profile is run from its home directory. If you do not know what the home directory under root is, then you can check with:

sudo su
echo $HOME

As you can see, the home of root is /root/. Check its contents:

cd $HOME
ls -al

There should be a .profile file. Open the file and add the following lines:

if [ "$BASH" ]; then
    if [ -f ~/.bash_aliases];then
        . ~/.bash_aliases
    fi
fi

Basically, what this bash script does is to check for a file called .bash_aliases. If the files is present, it executes the file.

Save the .profile file and create your aliases in .bash_aliases. If you already have the aliases file ready, then copy the file to this location

Re-launch the terminal and you are good to go!


How to specify a different locale for postgreSQL installation? My system's locale is en_US.UTF-8. Because of that, the postgreSQL installation uses this locale by default for the cluster during installation.

Creating new cluster 9.3/main ...
  config /etc/postgresql/9.3/main
  data   /var/lib/postgresql/9.3/main
  locale en_US.UTF-8
  port   5432

But I want my postgreSQL server to install with locale pt_BR.UTF-8.
Is it possible?

I just found a solution for this problem! Here it is..

1- Stop and drop your current cluster:

$ sudo pg_dropcluster --stop 9.3 main

2- Create a new cluster with the correct locale:

$ sudo locale-gen pt_BR.UTF-8
$ sudo pg_createcluster --locale pt_BR.UTF-8 9.3 main

3- Confirm it worked as expected:

$ sudo -u postgres psql
(9.3)
=> show LC_COLLATE;

Simply install it using below commands :

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

and then change the datastorage location :

/etc/postgresql/<VERSION>/main/postgresql.conf

eg : vi /etc/postgresql/8.4/main/postgresql.conf

Search for "data_directory" and provide your new datapath, now save the file and restart the postgresSQL service to reflect this new change.

Considered : your new path is /Database/Storage

Make sure, datapath is accessible only by postgres user - command to do that.

chown postgres.postgres /Database/Storage
chmod 700 /Database/Storage

Hopes this helps,


How to disable low disk space notification? I've got an SSD drive for root and /home, and a larger HDD for storage. The storage disk is almost full, and there's a low disk space warning on startup. The warning doesn't have any "don't show again" option, only "ignore" and "examine". It also doesn't go away but sticks on the screen until the ignore button is clicked, so it's very annoying in addition to being competely unnecessary.

I tried unselecting the storage HDD in baobab's settings, but that didn't have any effect. I also tried gconf-editor, and looked for apps -> gnome_settings_daemon -> plugins -> housekeeping, but there is no "plugins" under "gnome_settings_daemon". Only "gtk-modules" and "keybindings".

Found via https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/881376

gsettings set org.gnome.settings-daemon.plugins.housekeeping active false

First check your free space with df -h

This answer will not try to stop the warning, but maybe you are better off, freeing some space, for example you can free space used by apt-get:

sudo apt-get autoclean
sudo apt-get clean


Ubuntu 14.04 hangs after login I am using ubuntu 14.04 on Dell inspiron with intel graphics card. I am intermittently getting this issue where after login I can't see anything on status bar and my system is not usable, after which I have to restart my machine(hard reboot). I have already referred : How to fix "The system is running in low-graphics mode" error?.
Pressing ctrl+alt+F1 leads me to terminal which does not respond at all. I can only type into it and it does not have any effect. What are my options?

I posted a solution on other question ( on this pages).

First, my system has an Amd64 X2 and MB-Nividia Grafikchip.

Mint 17 and Ubuntu 14.04.1 installed, no windows.

The problem was solved by changing the grafikdriver to nvidia 3.04....

However to start up ubuntu the first time was tricky; I did it by selecting rescue in the boot menu, window grub repair, then resume normally.

After login the desktop came up.
From there I made the driver changed and update all. Now it's ok.
I made the change also on mint 17 . Also Mint works fine now.


Permission denied, are you root? I get this error whenever I try to install programs using the terminal:

home@ubuntu:~$ apt-get install myunity
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Also I'm unable to install updates using the terminal.

The solution is to read the error message: are you root?. Use sudo to run a command with root privileges, like so: sudo apt-get update

I had this error and in my case I had to remove
noexec on /var in /etc/fstab

which works fine on my CentOS, Fedora and Alpine Linux


Hard Drive Pertition Not Showing I am Wahid,user of ubuntu 14.04 LTS. Before install it I was install Windows 10 in my pc. Before install Windows 10 I was create a pertition from windows cd on "C Drive" [8 GB Capacity]. I went to install ubuntu 14.04 LTS on the new 8GB pertition. I was intalling it for first time from a cd. After install it I see there is no disc of my hard drive on the homepage.I am totaly unable to use my hard disc.

In this circumstance I want to know that where is my old data [like "D Drive","E Drive","F Drive"] ? How can I detect & recover my hard disc.   Please help me.....There is the most importat data in my life in the hard disc.

By right ntfs support are installed by default during installation. However if the support was missing (ie Deleted after installation). You can perform below steps to get it back.

Windows using different filesystem from Linux ie. NTFS. To make Windows partition visible in Linux you need to install ntfs-3g.

Go into terminal Ctrl + Alt + T.
Type sudo apt-get install ntfs-3g
Then look for ntfs partion. fdisk -l
Mount it.

Worse case is during the partition creation, your windows drive was deleted. That will explain why you cant see it anymore.


How can I get some nice eye candy themes for Grub? Grub is well Grub. How do I pimp it a bit with some nice themes?

There still are not too many themes for Grub that are are easy to install. The process of theming Grub is quite complicated. There is a guide available here: A Beginner's Guide to Theming GRUB2

Though that includes a 37 page PDF document to read through! A simple but effective way of sprucing up Grub is to add a custom background image. The easiest way I've found of adding one to Grub is to use Grub Customizer

To install this enter these commands in a Terminal:

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

Then run Grub Customizer, when it has loaded click the Preferences button and then the Appearance tab.

See image below for newer version of Grub Customizer.

Then select the file icon under background image and navigate to your chosen image file (I found that selecting one of the default wallpapers looks effective, I'm using the new Pangolin image from the 12.04 wallpapers). You can also change the font colour of the menu at this point (useful if your background image colour makes the text unreadable - a preview will appear when you select a background image to check whether you'll have any colour clashes).

Then close the preferences pop-up and select the Save button on the main screen, then you can reboot your system to admire your handiwork!

Use this link: http://www.omgubuntu.co.uk/2010/06/dark-shine-burg-theme-adds-transpicuous-vibrancy-to-your-boot-screen/
And visit Related post there too (Get Animated, Themed, Icon Only GRUB Menu Using BURG – now simple to use)


login freeze after suspend on 14.04 (not nvidia related...) I have been having trouble with my notebook lately... I run 14.04 LTS version of ubuntu on a thinkpad x1 carbon form lenovo (2nd generation), and it seems like everytime I wake my laptop from suspend, the login desktop ist missing, as well as any of it's content; basically I see my desktop, the way it is like behind the login screen, ca move the mouse, and... that's a bout it! can't click on anyything, not a single keyboard key works... I have to force shutdown the laptop thourgh the power button and restart again...
I know there are/were some strangely similar issues that have been happening on other notebooks with an nvidia graphics card, and was fixed by some driver swithcing etc, however this doesn't apply to the x1 carbon....
Has anyone been having this problem or has a fix?
Thank's for your help!

Hold down the power button to shut down your laptop.

press power button again and boot computer back up and login...that should do it.

But i will say that laptops like notebooks and chromebooks, are hard to run quality OS's on because their graphic and processing capabilities are low. basically they are smartphones/tablets that look like laptops. So keep in mind that you might have to run a 32-bit OS,and even with that you may experience some issues.They are just not made for quality computing.


Wifi keeps dropping on Dell XPS13 running Ubuntu 16.04, not sure how to use sudoedit on file Dell XPS 13 (7th gen i5), dual booting Ubuntu 16.04 and Windows 10.

Wifi works fine in Windows but in Ubuntu it gets disconnected every 5-10 minutes. The wifi icons on the top bar still appears to be connected. I have to manually click disconnect and connect again for wifi to work.

Tried a solution from 16.04 LTS wifi connection lost randomly every 5 minutes.

Did the following steps:

Got details of my PCI wireless card by running sudo lshw -class network
Took the code on the line that says 802.11ac Wireless Network Adapter: QCA6174
Entered this into the terminal sudoedit /etc/pm/config.d/config
I was then prompted to a page within the terminal which says GNU nano 2.5.3 File: /var/tmp/config.XXibmEDm. Then I entered SUSPEND_MODULES="QCA6174" and I hit ctrl-X to save.
Was prompted to say if I want to save modified buffer: i hit Y
Was prompted file name to write: /var/tmp/config.XXibmEDm. I am stuck here, not sure which action to take. The options given were: Get help/Cancel/DOS format/Mac format/Append/Prepend/Backup file/to files

If you check terminal results for iwconfig I think you will find that power management is on and that is likely causing your issues.  You can disable power management with
sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Reboot

I had a very similar problem, turning off power management solved the issue for me. After logging into your wifi, turn off your power management. I use (sudo iwconfig wlp4s5 power off) currently I have to do this every time I log in, but works like a charm, no more dropped wifi connections.

Note: use iwconfig to get your wireless cards "wl" identifier, yours will most likely not be the same as mine. Hope this helps.


Flattening PDF transparency I have a PDF, made with Inkscape, that uses transparent colors. This image shall be used in a LaTeX document.

While preserving the transparency is nice for editing, it can be a problem for printing. Printing usually involves PDF to PS conversion. Since Postscript does not support transparency, this requires either

flatting, i.e. creating a vector graphic that works without transparency

or

rastering, i.e. rendering a bitmap image.

When a PDF document containing such a figure is printed (or converted to PS) using Evince (or Cairo or Ghostscript), the whole page gets rendered as a bitmap, rendering fonts ugly (different from other pages). (Adobe Acrobat handles such PDFs well.)

Unfortunately, converting the PDF figures to EPS (before including them with LaTeX) doesn't help much, because both pdftops and pdf2ps (again, Cairo or Ghostscript) rasterize the image, i.e. render a bitmap (saved as EPS). (This is slightly better, because it doesn't affect the whole page, but I'd still prefer a vector graphics.)

How can I flatten transparency with Inkscape or other software on Linux?

One way around bad rasterization is to manually convert your PDF document to postscript because when you invoke CUPS through evince or whatever gui, it will be converted anyways.

You can try pdftops -r 1200 document.pdf to increase the resolution from the low default of 300, and then print the resulting postscript. However, with the printers at work this did not yield a significant improvement. Regular text on pages with and without transparent images still looked different -- blurry vs. clear.

So I ended up using Acrobat Professional (on a windows machine) to flatten the transparent images used in my latex document, which gave optimal results. Check that Transparency Flattener Preset is at [High Resolution] in the advanced print setup.
My colleague mentioned that one could perhaps FTP a pdf file directly to a modern laserjet network printer, bypassing the postscript conversion. I have not tried this.

Would be great to have linux-only solution to this issue.

pdftops -origpagesizes input.pdf output.ps

then

ps2pdf -r600x600 output.ps input-new.pdf


skypeforlinux 8.13.0.2 fails to start on ubuntu 14.04 LTS Updating my Ubuntu 14.04 LTS today also installed a new skypeforlinux 8.13.0.2 replacing 8.11.0.4.

skypeforlinux 8.13.0.2 does not start, I just get a blank with a menu bar. The menu entries are selectable, but nothing appears to happen.

Starting the new skypeforlinux from the command line does not produce any output in the terminal window.

Use old package:

sudo apt-get install skypeforlinux=8.11.0.4

Thanks to @Sleeper9 for pointing to official forum.

Update from @Sleeper9: 8.16.0.4 also works.

If you run the newest skypeforlinux (as normal user) in /usr/bin/skypeforlinux in terminal, nothing happens.
i.e. no output.

If you run it in /usr/share/skypeforlinux/skypeforlinux, you get a Segmentation fault.

But an interesting solution is to run it with sudo, then you can work with it.

sudo /usr/share/skypeforlinux/skypeforlinux

and it should run.

I have also deleted my .skypeforlinux in my home folder. Interestingly you run it as root, but the config are written correctly. Looks like some coding error.

Tested in Ubuntu 17.10 GNOME Shell


SCP with two different ports How can I use scp command to copy files between two remote servers from my local PC ?

remote server 1 : IP=67.12.21.133  & port=6774

remote server 2 : IP=67.129.242.40 & port=6774

scp -rp -P 6774 denny@67.12.21.133:/home/denny/testapp1.txt  denny@67.129.242.40:

It gives an error after giving password of 67.12.21.133 ,

ssh: connect to host 67.129.242.40 port 22: Connection refused

lost connection

You can use ~/.ssh/config to specify the ports to use for the hosts (and for setting many other nice things; check the man page man ssh_config):

# ~/.ssh/config

Host 67.12.21.133
  Port 6774

Host 67.129.242.40
  Port 6774

When doing this, you have to use the option -3 to scp, which copies the files through your local machine. Otherwise, scp issues the scp command via ssh on the first host, so it actually runs

 ssh -p 6774 denny@67.12.21.133 scp -rp /home/denny/testapp1.txt denny@67.129.242.40:

and then the ~/.ssh/config of the first remote host (67.12.21.133) is used instead of your local one.

When you have setup your ~/.ssh/config correctly, this should work:

scp -rp3 denny@67.12.21.133:/home/denny/testapp1.txt denny@67.129.242.40:

Of course, you can also copy the contents of the ~/.ssh/config file onto your first remote host, and then you can use scp without the -3 option, which will probably speeden up the transfer.

Or you can use the trick that scp uses and use such a command line:

ssh -p 6774 denny@67.12.21.133 scp -rp -P 6774 /home/denny/testapp1.txt denny@67.129.242.40:

(Note the different case of the port parameter for ssh and scp: ssh -p 6774 vs. scp -P 6774)

PS: I got this information from the OpenSSH bugzilla where I entered this as a bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2020

If you need to transfer data from one server to another, use the SCP command.  To do so Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

scp -pr root@192.168.1.2:/path/to/files /destination/path

Note: The parameter -P can be used if you want to mention the port number.


VirtualBox abruptly stopped detecting USB devices After I first installed VirtualBox, I added my user to vboxusers group using sudo adduser $USER vboxusers command. After that, VirtualBox was able to view USB devices.

Today, all of a sudden it stopped detecting them. Removing and reinstalling VirtualBox didn't fix the issue. How can I fix this error?

Removing didn't fix, but purging did:

sudo apt purge virtualbox
sudo apt install virtualbox

Note that this doesn't remove your virtual machines. Hence, it's safe to perform.

Also make sure that your user is still a a member of vboxusers by running

sudo adduser $USER vboxusers

I suggest deleting the app then installing a newer version of Virtual Box.
sudo apt-get --reinstall install virtualbox


High CPU load with Compiz on Ubuntu 14 The most recent update to 14.04 has caused high compiz CPU usage. Running top, I can see that it goes up when hovering over the dock, and if I give focus to Sublime, Emacs, or Gedit, it heads to 50% or more. Once I give focus back to a shell, it drops to a few %.

Resetting unity like this:

unity-tweak-tool --reset-unity

did not help.

I was running 14.04 LTS on Parallels 10 for months without this problem, and it started right after the last update.

I also had to turn off Parallels 3D acceleration to get the main tool bar to work, and to get any windows to open up at all. There seems to be some interaction that might be Parallels related.

Any ideas how to figure out what the problem is?

I had difficulties with this problem on Ubuntu 14.04. The CPU Usage was charged by compiz over 60 %...I followed the instructions from a Bug-report:

Download the "Compiz Config Settings Manager" from Ubuntu Apps
Run the Compiz Config Settings Manager and select the section OpenGL
Turn the option Sync to VBlank off
Reboot or log out and in.

After this procedure the CPU Usage of compiz is at 10%..

I hope this helps others as well.

I occasionally meet that problem, and I just kill PID of compiz.
Everything goes normal


Why are Last.fm's features unavailable to Banshee users who don't subscribe to the service? Whenever I try to do anything other view my Last.fm profile in Banshee, I am confronted with the following message at the bottom of the inteface:

Failed to tune into station: Stations are only available to paying Last.fm subscribers

These are features I've been able to use in both the Last.fm client from the Software Center and the Rhythmbox plugin. I can also go to the website and listen there. What gives?

Update: To clarify, I have a Last.fm account, but am not a paying subscriber.

Following a link in the answer provided by DoR, it seems Last.fm changed the structure of their service to be restricted outside of the US, UK and Germany, but I am in the UK so this still just as confusing.

Banshee uses a newer version of the Last.fm API which requires you to be a subscriber, https://bugzilla.gnome.org/show_bug.cgi?id=541227. Rhythmbox uses (or did anyway) a deprecated version of the API that did not require you to subscribe to Last.fm.

Because you don't subscribe to last.fm. Last.fm requires you to subscribe to use those features, so it's not Banshee, it's last.fm.


Is there any ability to set my primary monitor? I want my primary display be at the right and my TV (additional) be at the left.
In that case new windows shall appear at the TV. Can I somehow set where new windows will appear ?

Turn off the current Primary monitor in "Displays" application and apply.

The secondary monitor will become the Primary. Then simply turn the old primary monitor again to have both displays active again.

you might be looking to click on that little black bar on the monitor selection pic above, sets where the menu is, which seems to also be the default monitor. worked for me with 12.04 and gnome


como iniciar app inventor en ubuntu 14.04 yo tengo ubuntu version 14.04 y no se como iniciar app inventor 2 ya esta todo instalado lo que quiero saber es como iniciar AIstarter pa'ra poder usar app inventor porfavor me podrian ayudar?

Translation:

  I have Ubuntu version 14.04 and App Inventor 2 isn't starting yet it
  is   already installed. How do I start it?

Tienes que ir aquí Entrar con sus detalles . Para un proyecto de ejemplo , vaya aquí.


How to change the default permissions of files created by transmission-daemon? I have a machine running Ubuntu 12.04 server with transmission-daemon running to handle bitorrents. Everything works fine except the transmission-daemon creates files as the user/group, debian-transmission, and  with 744 file permissions.

I would like to be able to delete and move these file from a samba share.
I considered changing the primary group of the user debian-transmission, but I was worried that might mess up access to other files.
I thought it would be better to change the default permission of new files created by debian-transmission to 774, and add myself to the group debian-transmission.

I know that this can be done with a umask, but my understanding is that this would be set in the .profile file and since debian-transmission has no home folder I wan't sure if that file existed for the user.  So how to I accomplish this?

Suggestions or alternate solutions are welcome. Thanks in advance.

You can specify a umask in transmission's config file (/etc/transmission-daemon/settings.json). Umask we normally represent in octal, but unfortunately, json does not support that, so we have to convert it to base 10. You can do this in the shell like this:

$ echo $(( 8#022 ))
18

That's the default, but you probably want 002, which is the same in decimal, so

sudo editor /etc/transmission-daemon/settings.json
# change "umask": 18 to "umask": 2 and save
sudo reload transmission-daemon # tells transmission-daemon to re-read the config
                                # file. This is important, otherwise, the changes
                                # will be lost

Another thing. If you change the group ownership of the download dir, and add the setgid bit on it, all files created in that directory will have the same group ownership as that directory.

sudo chgrp "$USER" /path/to/transmission/download/dir
sudo chmod g+s /path/to/transmission/download/dir

It will not affect files that already exist. See http://mywiki.wooledge.org/Permissions for more.

Try this:

mkdir /your_path/progress
mkdir /your_path/completed
sudo usermod -a -G debian-transmission your_user
chgrp debian-transmission /your_path/progress
chgrp debian-transmission /your_path/completed
chmod 770 /your_path/progress
chmod 770 /your_path/completed
sudo service transmission-daemon stop
sudo adduser your_user debian-transmission
sudo nano /etc/init.d/transmission-daemon
sudo chown your_user -R /var/lib/transmission-daemon/info/
sudo chown your_user -R /your_path/progress
sudo chown your_user -R /your_path/completed
sudo chown your_user -R /etc/transmission-daemon/settings.json

And change in the file:
    sudo nano /etc/transmission-daemon/settings.json

"rpc-whitelist": "127.0.0.1" > "rpc-whitelist": "*.*.*.*",
"rpc-password": "password" > "rpc-password": "your_password",
"download-dir": "/var/lib/transmission-daemon/downloads" > "download-dir": "/your_path/completed"
"incomplete-dir": "/var/lib/transmission-daemon/downloads" > "incomplete-dir": "/your_path/progress"

Just restart the daemon:

service transmission-daemon start


Run modprobe on startup I need to run sudo modprobe wacom at startup to prevent an unrecoverable kernel panic (a blackscreen drop to terminal with repeating 1second audio looping and zero responsiveness) from occurring when a standard wacom intous (CTH-480) tablet is plugged into USB port on stock XUbuntu 14.04 LTS. I believe mainline kernel fixed this issue some time ago.

Where is the preferred location for this? It must be run as root.

I have seen this
How to run scripts on start up? but I am unsure which answer would work for the required permission level of modprobe.

Go to /etc/modules-load.d/

cd /etc/modules-load.d

Create a conf file with name ending in .conf for example wacom.conf

sudo touch wacom.conf

Inside /etc/modules-load.d/wacom.conf (use for example sudo nano wacom.conf; just write the name of the module you want to load ie, wacom
Reboot and it will be loaded by systemd at boot time

You can add the line modprobe wacom to /etc/rc.local and it will get executed on boot with root privileges.


Install MariaDB on Bionic For the life of me, I can not figure out why I am unable to install mariadb-server 10.2 on my new install of Ubuntu Mate 18.04. I've done this twice on two computers running 16.04 without incident. I'm following the instructions here but to no avail.

After importing the keys and setting the repository, I attempt to install with sudo apt install mariadb-server and am prompted that mariadb-server-10.1 will be installed.

I have attempted with 2 different mirrors as well as attempted to install with the Artful and Xenial dists on those mirrors (since there is no current dist for bionic)

Follow the instructions on the MariaDB site. I ended up finding the solution using "xenial", but I suppose it would work with "artful" as well.

The problem is that when you run sudo apt install mariadb-server it will pull down the version from "bionic", which is currently 10.1. You should run sudo apt install mariadb-server-10.2 instead.

After installing 10.1, running sudo apt install mariadb-server-10.2 will pull in the version from your custom repository and uninstall all the mariadb-server 10.1 files which are not dependencies.

Personally it didnt worked for me with

  sudo apt install mariadb-server-10.1

so what I did is :

sudo apt install mariadb-server-core-10.1


How to list all installed packages I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this?

Ubuntu 14.04 and above
The apt tool on Ubuntu 14.04 and above makes this very easy.
apt list --installed

Older Versions
To get a list of packages installed locally do this in your terminal:

dpkg --get-selections | grep -v deinstall

(The -v tag "inverts" grep to return non-matching lines)
To get a list of a specific package installed:
dpkg --get-selections | grep postgres

To save that list to a text file called packages on your desktop do this in your terminal:
dpkg --get-selections | grep -v deinstall > ~/Desktop/packages

Alternatively, simply use
dpkg -l

(you don't need to run any of these commands as the superuser, so no sudo or any other variants necessary here)

https://www.rosehosting.com/blog/list-all-installed-packages-with-apt-on-ubuntu/:

  1. List the installed software packages on Ubuntu

  To list the installed software packages on your machine you can use
  the following command:

sudo apt list --installed

  The output of the command will be very similar to the following one,
  depending on which packages are currently installed:

Listing...
acl/xenial,now 2.2.52-3 amd64 [installed]
adduser/xenial,xenial,now 3.113+nmu3ubuntu4 all [installed]
apache2/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
apache2-bin/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed,automatic]
apache2-data/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed,automatic]
apache2-doc/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed]
apache2-utils/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
apparmor/xenial-updates,now 2.10.95-0ubuntu2.5 amd64 [installed,automatic]
apt/xenial-updates,now 1.2.19 amd64 [installed]
apt-utils/xenial-updates,now 1.2.19 amd64 [installed]
...

  2. Use the LESS program

  To easily read the entire output you can use the less program.

sudo apt list --installed | less

  3. Use the GREP Command

  You can look for a specific package through the output using the
  grep program.

sudo apt list --installed | grep -i apache

  4. List all packages that include Apache

  The output from the above command will list all packages that include
  apache in their names.

apache2/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
apache2-bin/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed,automatic]
apache2-data/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed,automatic]
apache2-doc/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed]
apache2-utils/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
libapache2-mod-php/xenial,xenial,now 1:7.0+35ubuntu6 all [installed,automatic]
libapache2-mod-php7.0/xenial-updates,now 7.0.13-0ubuntu0.16.04.1 amd64 [installed,automatic]
libapache2-mod-security2/xenial,now 2.9.0-1 amd64 [installed]
libapache2-modsecurity/xenial,xenial,now 2.9.0-1 all [installed]

  Apt supports patterns to match package names and options to list
  installed (--installed) packages, upgradeable (--upgradeable)
  packages or all available (--all-versions) package versions.

  5. Use the DPKG program

  Another alternative that you can use to list the installed software
  packages on your Ubuntu VPS is the dpkg command.

sudo dpkg -l

  The output of the command will provide you with information such as
  the name of the package, version, architecture and short description
  about the package. Of course, you can use the grep program again to
  search for a specific package.

sudo dpkg -l | grep -i apache

  The output should look like the one below:

ii  apache2                       2.4.18-2ubuntu3.1                     amd64        Apache HTTP Server
ii  apache2-bin                   2.4.18-2ubuntu3.1                     amd64        Apache HTTP Server (modules and other binary files)
ii  apache2-data                  2.4.18-2ubuntu3.1                     all          Apache HTTP Server (common files)
ii  apache2-doc                   2.4.18-2ubuntu3.1                     all          Apache HTTP Server (on-site documentation)
ii  apache2-utils                 2.4.18-2ubuntu3.1                     amd64        Apache HTTP Server (utility programs for web servers)
rc  apache2.2-common              2.2.22-6ubuntu5.1                     amd64        Apache HTTP Server common files
ii  libapache2-mod-php            1:7.0+35ubuntu6                       all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
rc  libapache2-mod-php5           5.5.9+dfsg-1ubuntu4.16                amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-php7.0         7.0.13-0ubuntu0.16.04.1               amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-security2      2.9.0-1                               amd64        Tighten web applications security for Apache
ii  libapache2-modsecurity        2.9.0-1                               all          Dummy transitional package
ii  libapr1:amd64                 1.5.2-3                               amd64        Apache Portable Runtime Library
ii  libaprutil1:amd64             1.5.4-1build1                         amd64        Apache Portable Runtime Utility Library
ii  libaprutil1-dbd-sqlite3:amd64 1.5.4-1build1                         amd64        Apache Portable Runtime Utility Library - SQLite3 Driver
ii  libaprutil1-ldap:amd64        1.5.4-1build1                         amd64        Apache Portable Runtime Utility Library - LDAP Driver
.

  With the competition of this tutorial, you have successfully learned
  how to list installed packages in Ubuntu.


Sound problem after installing Lubuntu Desktop in Ubuntu 14.04 LTS After installing lubuntu-desktop in Ubuntu 14.04 I can't record sound. Playback is OK.

I also install ubuntu-restricted-extras and xfce4-mixer

After installing pulseAudio volume control skype sound is ok. But I can't record with sound recorder.

After fresh install it works for me (I only installed Lubuntu not Ubuntu). But still don't know what the problem was. Guessing package overlapping was the issue.

You may try using "Audacity". You can install this from Lubuntu Software Center. Although Audacity has more advanced functionality, it can work as a decent audio recorder. Audacity's "help" section is very good.


vlc does not save my settings I wanted to install TracktForVLC to track my movies and tv shows automatically. But I am having a trouble setting up vlc on my ubuntu 14.04 LTS.
Like mentioned in Configuration, I went to Tools, Preferences, Interfaces and Main Interface. When I check Remote Control Interface, oldrc is set as initial value. I replace oldrc with rc and click save. When I check preferences again, Remote Control Interface is not checked and input form is blank.
So I left it on oldrc, which stays there. Then I want to save RC settings TCP command input insert localhost:4222 and hit save. Again, when I reopen preferences, input form where I wrote localhost:4222 is blank. Any idea why my settings is not stored?
I am using 2.1.6 vlc version. I enabled log to syslog but no log is written.

The problem seems to be that the program can't write to it's own config file.

I had the same problem in Windows, I ran VLC as admin then it worked. For Ubuntu, try doing the same thing by entering sudo vlc at the command line.

Might do the trick.


Logitech H600 wirelss headphones Ubuntu 20 Please, did anyone managed to install Logitech H600 wirelss headset on Ubuntu 20?
I already tested on windows and works as expected.

In Ubuntu20 looks like usb dongle is seen:

enkiai@enkiai-desktop:~/Desktop$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c542 Logitech, Inc. Wireless Receiver
Bus 001 Device 002: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But aplay doesn't show device:
(I have 2 video cards)

enkiai@enkiai-desktop:~/Desktop$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia_1 [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
enkiai@enkiai-desktop:~/Desktop$

I searched for any fixes, but didn't manage to make it work

thank you

In Linux Mint (Ubuntu based) you can use this device without dongle if your motherboard supports Bluetooth.
To connect: press dongle-connect button and volume-up same time for about 10-20 seconds.
Light will flashing very fast and then connection process will start.
Don't forget to use 'high fidelity' sound in sound properties (standard sound is awful).
Microphone didn't work though, but maybe is possible...


How folders created in /var/run on each reboot In recent ubuntus (specifically, what interests me the most is 12.04) /var/run is tmpfs, and thus I assume it starts empty with each reboot.

Yet, I see there some folders, like /var/run/mysqld and numerous others. How those folders created on each reboot? Is there some template folder which copied to /var/run/ (and if so, which script does that), or each folder mkdir'ed separately, or what ?

EDIT:
Please, do not answer that /var/run is persistent, or that /run is persistent. Because it is NOT.

Even if it is so on your system, it is not so on a regular 12.04.

(Thanks to @Zulakis and an answer on Serverfault for pointing out that this answer had not kept up with Ubuntu's ongoing development.)

With the adoption of systemd as of 15.04, there is now a centralized mechanism for the creation of temporary files and directories such as these. A service wishing to use this method can remove mkdir commands in its own startup script and instead place a .conf file in /etc/tmpfiles.d, /run/tmpfiles.d, or /usr/lib/tmpfiles.d, with Ubuntu services seeming to prefer the last option. For example, my system now has:

$ egrep -r /var/run /usr/lib/tmpfiles.d

/usr/lib/tmpfiles.d/var.conf:L /var/run - - - - ../run
/usr/lib/tmpfiles.d/sudo.conf:d /var/run/sudo 0711 root root
/usr/lib/tmpfiles.d/sudo.conf:D /var/run/sudo/ts 0700 root root
/usr/lib/tmpfiles.d/postgresql.conf:d /var/run/postgresql 2775 postgres postgres - -
/usr/lib/tmpfiles.d/sshd.conf:d /var/run/sshd 0755 root root
/usr/lib/tmpfiles.d/screen-cleanup.conf:d /var/run/screen 0775 root utmp

The d means to create a directory if it doesn't already exist, after that is the path, and the rest are the permissions, user, and group. These directories will be created regardless of whether the corresponding service is ever started.

For full documentation, see man tmpfiles.d.

OLD PRE-SYSTEMD ANSWER:

Looks like they're created dynamically by individual services as they start:

$ sudo egrep -r 'mkdir.*/var/run' /etc

/etc/init.d/ssh:        mkdir /var/run/sshd
/etc/init.d/bind9:      mkdir -p /var/run/named
/etc/init.d/timidity:    mkdir -p /var/run/timidity
/etc/init.d/bzflag:                mkdir -p /var/run/bzflag
/etc/init.d/dns-clean:mkdir /var/run/pppconfig >/dev/null 2>&1 || true
/etc/init/winbind.conf: mkdir -p /var/run/samba/winbindd_privileged
/etc/init/dbus.conf:    mkdir -p /var/run/dbus
/etc/init/ssh.conf:    mkdir -p -m0755 /var/run/sshd
/etc/init/libvirt-bin.conf:     mkdir -p /var/run/libvirt
/etc/init/cups.conf:    mkdir -p /var/run/cups/certs

I believe this is the one that handles mysqld:

[ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
/lib/init/apparmor-profile-load usr.sbin.mysqld

man install says that the -d form will "create all components of the specified directories".

douggro is absolutely right, /var/run is mounted as tmpfs, and /var/run is a symlink to /run which is persistent across reboots, so anything that goes in /run will also appear in (and stay in) /var/run.

So any boot services like mysqld, which is a daemon which is started at boot time, that create files in /run, will also have files visible in /var/run (symlink to /run remember). If you want to create a file that will persist through a reboot in /var/run, create it in /run and then reboot.

Hope this answers your question.


Shortcut for switching to previous and next window in Ubuntu? There doesn’t seem to be a solid way to do this. What I want to achieve is shortcuts to go to the previous window and next window.

When I said previous window, the one that displays before the current in the actovities window the next one being the one after.

I’m guessing these are ordered in time opened or time last used, but there doesn’t seem to be a shortcut for it, is it possible to make one?

I eventually want to use these shortcuts for swipe gestures to mimic the behaviour of Mac gestures

The alt tab shortcut doesn’t really do much. The Activities window shows based on window size/monitor while the tab menu shows the windows ordered by the stack. Neither really would work too easily for what I’m talking about for more than two tabs being cycled back and forth. Maybe I'm missing a config option or something but it appears as if you couldn't do it without making some kind of plugin.

If you want to switch between differents windows then you have to use
:

Alt+Tab: Switch between running applications

If you want to switch between differents workspaces, then use:

Ctrl+Alt+arrow: Move between workspaces

In case none works, I would suggest you to get a look at your default keyboard shortcuts, you may see and change them in Settings->Devices->Keyboard.


How do I rotate desktop wallpapers? If I have multiple pictures that I want as my wallpaper how do I set it that my wallpaper changes say, every 5 min or so? Is there a option like this or must I manually change it?

If you have shotwell pre-installed, you can just open it up and choose the slideshow feature for desktop background. There are TONS of different apps/programs/scripts out there for ubuntu. All it takes is a little google search for what you want...chances are, someone has already made it, and its probably free!

Also, check out Variety, it might be a good place to start if you dont like shotwell.

Kubuntu can do this out of the box as can most any other KDE system. It also has a feature to pull images daily from Bing, Wikipedia and more.


How to enable hibernation? In Ubuntu 12.04 and newer, hibernation has been disabled by default in policykit. How can I enable this back?

If this answer does not work in Ubuntu 13.10, see here for an alternative answer

Hibernation was disabled on 12.04 for machines that are not certified with Ubuntu.

In order to enable hibernation you need to test whether it works correctly by running sudo pm-hibernate in a terminal. The system will try to hibernate. If you are able to start the system again then you are more or less safe to add an override.

To do so, start editing:

sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Fill it with this:

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Or in 14.04 and later:

[Re-enable hibernate by default for login1]
  Identity=unix-user:*
  Action=org.freedesktop.login1.hibernate
  ResultActive=yes

[Re-enable hibernate for multiple users by default in logind]
  Identity=unix-user:*
  Action=org.freedesktop.login1.hibernate-multiple-sessions
  ResultActive=yes

Save by pressing Ctrl-O then enter and then exit nano by pressing Ctrl-X.

Restart and hibernation is back!

Or run killall unity-panel-service to just reset the menu.

Some users will then need to run sudo update-grub to get the hibernate option to be available in the power menu.  Some users may also have to at least log out then log in to get it to appear in the (upper right) power menu.

I have Ubuntu Gnome 17.04 amd64 on my notebook. I did the following to enable hibernation:

$ sudo apt-get install hibernate (source)

This installed also libx86-1uswsuspvbetool

Then I could successfully hibernate with sudo systemctl hibernate. There is no pm-hibernate executable in my path.

$ sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Inserted: (source)

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes

Installed https://extensions.gnome.org/extension/755/hibernate-status-button/


Grub unaccessible after windows 10 and ubuntu 14 install I would like to be able to dual boot on windows 10 and Ubuntu 14.
First, I tried to install windows 10 after Ubuntu 14. I was not able to dual boot after that. I know that this is not the best way in this order.
Here is what I tried to repair grub:

https:// help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
https:// sites.google.com/site/easylinuxtipsproject/6

Anything worked. I send the URL of the result of bootRepair to boot.repair@gmail.com but their service has stopped.
Then, I have removed both OS and reinstalled windows, first, and then Ubuntu to get the dual boot. During Ubuntu installation I checked that I wanted grub as boot loader to be able to choose which partition I wanted to use each time my PC starts. But it didn't work either.
Does anyone had the same issue? Any workaround?
EDIT
Here is the bootRepair report for more details
============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector
    1028794648 of the same hard drive for core.img. core.img is at this
    location and looks for (,gpt6)/boot/grub on this drive.
 => Syslinux MBR (3.00-3.35) is installed in the MBR of /dev/sdb.

in your second case scenario where you install win-10 first you needed to have grub installed to /dev/sda when you install Ubuntu,,,,,assuming /dev/sda is the drive it all went to.
 if you chose say /dev/sda2 grub got installed to a partition table (which you can do if you are going to chain load from one grub install to the next)instead of the MBR (master boot record)of the primary drive ,,,which is where you want it .


Wifi is not working. I have a laptp Hp with RTL8723BE. It says *-network UNCLAIMED I have updated the Ubuntu version to 16.04. Also I've tried a bunch of different solutions as those answering these questions for example:

lenovo e540 RTL8723be wifi not working

Wifi problems with rtl8723be in Ubuntu 14.04

Wifi not working on Realtek rtl8723be wifi adapter

And none of them has worked. Please, if someone can help I'll appreciate it a lot.

The network command  sudo lshw -C network :

*-network
   description: Ethernet interface
   product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:08:00.0
   logical name: enp8s0
   version: 07
   serial: 3c:a8:2a:7b:fb:8c
   size: 100Mbit/s
   capacity: 100Mbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8106e-1_0.0.1 06/29/12 ip=192.168.1.47 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
   resources: irq:41 ioport:4000(size=256) memory:b2600000-b2600fff memory:b2400000-b2403fff
*-network UNCLAIMED
       description: Network controller
       product: RTL8723BE PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:09:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: ioport:3000(size=256) memory:b2500000-b2503fff

The lspci | grep -i network command :

09:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter

Try this in the terminal:

echo "options ath9k nohwcrypt=1" | sudo tee  /etc/modprobe.d/ath9k.conf

then type:

sudo modprobe -rfv ath9k

then:

sudo modprobe -v ath9k

I hope it helps!


error downloading libsane-dev message reads: Some months ago my scanner stopped working with the message that I need to install driver software.  My printer is a HP Officejet 6210 All-in-one.  So have attempted to load HPLIP 3.18.6 but get the error message:

The following packages have unmet dependencies.
 libsane-dev : Depends: libsane (= 1.0.25+git20150528-1ubuntu2.16.04.1) but 1.0.25+git20150528-1ubuntu2.16.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.

The previously installed libsane-dev package seems to be broken.

Try re-installing the package. Use

  sudo apt purge libsane-dev

to uinstall the package.

and re-install using

  sudo apt-get install libsane-dev.


What is Macromedia Flash alternative in Ubuntu What is Macromedia Flash alternative in Ubuntu?

You can use Lightspark.

  Lightspark, is a free, open source Flash player. Lightspark is an
  LGPLv3 licensed Flash player and browser plugin written in C++/C that
  runs on Linux. It aims to support Adobe's newer Flash formats and AVM2
  virtual machine.  The last released version is 0.6.0.1, download it
  from here.

  Lightspark currently supports YouTube well enough for daily use.1

1Source:Lightspark

use light spark as an alternative.
The required information is given in this screenshot.


How do I share my Wi-Fi via Wi-Fi Direct on my laptop? On Windows, my laptop's wireless card had the ability to share its own internet by  Wi-Fi Direct. I could connect by laptop to other devices via Intel's My Wi-Fi program, which I believe uses Wi-Fi Direct, and then share my internet to them. Is there any way to do this in Ubuntu?

My laptop model: Samsung NP300E5A.
My wireless card: Intel Corporation Centrino Wireless-N 130.

Thanks!

EDIT: I am using Ubuntu 12.04. Also, I am not trying to share my ethernet connection. I am trying to share my wireless connection to other Wi-Fi devices. See here.

Seems like you have misunderstood WiFi Direct use case. WiFi Direct is not about sharing the connection (as you wrote it), but a peer-to-peer communication without involving AP.

The sad truth is that you cannot mix WiFi Direct with Station mode, which so far makes the whole idea of using WiFi Direct pretty useless. At least I'm not aware about any solution that is capable of doing that.

My advise to you - wait at least couple of years until this technology will be widely supported. Currently, since this technology is primarily driven by Sony, WiFi Direct is already present in their TV's, so you can stream videos/photos to Sony TV directly from your WiFi Direct supported device. Excerpt from the same link:

  Sometimes your friends want to share their personal photos and videos on your beautiful HDTV. With Sony's Wi-Fi Direct™ Mode, your friends can throw personal content to your TV without connecting to your home network. Wi-Fi Direct completely bypasses the Wi-Fi access point/router, so it’s easy to set up.

By the way, latest Android version supports WiFi Direct as well, Galaxy Nexus has it.

As @Andrejs Cainikovs says the technology is not wi-fi direct.
So reading your question and answer, let me rephrase your question.

You are connected to internet via wi-fi and want to share it over the same device by creating some  access point. Am I right?

If so, I am afraid at the time of writing this case is not possible in any other OS other than windows 7 (may be the list will include win8).

Windows 7 has internal support to create a wlan hosted network. In windows if you open  the network and internet → Network Connections, you can see with your actual wlan device there are one or two extra device described as Microsoft virtual wi-fi miniport like below.

This is virtualization of physical adapter. Read more about it here.

To achieve this requirement you need to by a wireless device/wireless repeater. :)

Smiler Question : -

https://superuser.com/questions/233924/share-a-wifi-connection-through-wifi-on-mac-os-x


How to make Vi default? Apparently Ubuntu 11.10 uses Vim when I type

vi filename

How do I force Ubuntu to use Vi instead?

You need to install the actual vi package, which is nvi on Ubuntu.

sudo apt-get install nvi

You might also need to run the line below if nvi isn't picked up automatically as the default provider for vi.

sudo update-alternatives --config vi

vim is set as your default editor. Put this as your default editor by setting this environment variable-->  export EDITOR=vi