How to issue organize desktop command from the shell

It's not entirely clear what your question is. However, if it is that you want to be able to "organise desktop icons" (i.e. into a grid) from the command-line then this will likely depend on what flavour and version of Ubuntu you are using, because they use different managers.

There is a similar question here with no answer. However, there is quite a lot of discussion here with some very good answers, including a custom-made perl script that appears to do exactly that.


Error with Graphics program using C (Ubuntu 14.04)

As I studied the programming language C/C++ we did use a library called Allegro, which seemed to be a good & easy library to do graphics programming in.

http://liballeg.org/


File Manager Type Classification - Document (pdf/docx)

you could try to add the "MIME Type" to the attributes. Just right click on one of the attributes ( Name, Type, Size, ...) and select "MIME Type".

Thomas


Change MTP default action when connecting to Ubuntu

Go to system settings.

And then choose "Details"


Wifi connection fail, but web connects with wire connection

For an unknown reason, today it worked again, internet connection is ok through the wifi. Maybe an issue from my Internet Service Provider?


booted lubuntu 14.04, canot install because installation window is empty or transparent

It sounds like Lubuntu 14.04 is having some display issues and not working right... if you installed it now you'd probably still have the same problems. You should probably fix the display issues first (could try booting with some of the troubleshooting-type kernel options from the grub (Ubuntu) menu, under "F6 Other Options" like nomodeset, noapic, acpi=off, etc? Often one or a combination of them get things going on older or odd hardware.

Or you could try a different desktop environment (easier).

You could try a newer Lubuntu like 14.10, or try Xubuntu, regular Ubuntu (unity or gnome3). Or even a Ubuntu-based one like Mint, it's Mate version is based off the older gnome2 and is a little "lighter" than unity/gnome3.

Just grab the .iso file and use like before. If you have a -RW disk to use that would be more economical, or a usb drive but sometimes writing a bootable live usb is even more trouble (http://www.pendrivelinux.com has been good, especially used from windows)


Ubuntu 11.10 Download and install problems

To speed up downloading of updates you can do the following:

Go to Ubuntu Software Center > Edit > Software Sources or (update Manager > settings) and from Download from drop down menu choose Other then on the next window choose Select Best Server and wait for it to pick the best server for you, then run sudo apt-get update again.


Well, finally I've solved the problem.

In this case, I had two problems:

By default, remote-fs.target is NOT depending on network-online.target . This is an known ¿bug? reported by the comunity. So, this si what makes that sometimes work and sometimes not (depends if ethernet has link or not when nfs is mounted).
Second problem, in my case, I mount rbinds after mount the NFS. The source of the rbinds is a folder of the NFS mountpoint (so, it's clear that is has to be mounted later). When systemd generates the ".mount" unit files for every mountpoint of the fstab, all rbinds were depending of local-fs.target. Of course, this is a problem in this case because it could mount the rbinds (local-fs.target) before the nfs mountpoint (remote-fs.target).

So, to solve this situation what I made is:

First, I edited the file /lib/systemd/system/remote-fs-pre.target and added:

Wants=network-online.target

After=network-online.target
Then, in /etc/fstab I indicated to the NFS mountpoint the next options:

X.X.X.X:/nfs_share         /mnt/nas        nfs   _netdev,noauto,x-systemd.automount,nolock,soft,intr,nfsvers=3,tcp,bg,rw      0       0

And finally, we indicate to systemd that rbinds are network device (so, systemd will put them on remote-fs.target) and also I indicated that /mnt/nas has to be mounted strictly.

/mnt/nas/config/php            /etc/php               none    noauto,_netdev,x-systemd.automount,x-systemd.requires=/mnt/nas,rbind,defaults     0       0

With this change, I fix the order of launching the mounts propertly in systemd


How to specify 'root' in path in text file

For every user, ~/ signifies its home folder. For every regular user, that would translate to /home/username, for example, /home/dean, but for the root user, to /root.

Since the executable is located in toot's home folder, the full path will be as follows:

/root/opt/eclipse/eclipse


Ubuntu 12.4 and XP on Separate Drives, Dual Boot, How?

You need to determine which drive takes priority in boot up. This settings can be visiable in BIOS.
If you don't to change BIOS,You need to install grub in that disk.
Say you have installed windows system on disk1 (160GB) and installed ubuntu on 200GB.
Now according to BIOS if disk1 is top list, ubuntu won't boot. As by default grub is installed in 200GB.
To correct it,

Boot up with ubuntu live disk/usb.
Install boot-repair.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Do a recommended repair. That should fix the issue.
Alternatively

Click on Advanced, Goto Grub-location
Change Place Grub to correct device .


How to disable the "website is now full screen" warning in Firefox?

In the Firefox address bar type about:config and hit enter, then click the I accept the risk button.

Then search for full-screen-api.warning.timeout and set its value to 0.

After this change the message is not displayed any more when switching a video to full-screen, but you still get the message when you move the cursor to the top edge of the screen.

If you want to disable the warning completely, you'd also have to change the value for full-screen-api.warning.delay to -1. This change prevents the warning from being displayed if you move the cursor to the top screen edge.

Reminder

Please be reminded that doing this might be a security risk. Take a look at , the article provided in the comments under the question by Duncan X Simpson. This site shows how an attacker could use the full screen API to fake a website to gain access to the credentials of your online-accounts. You shouldn't "click the link" on that site unless you're able to figure out what's going on behind the scene; just read.

But as the warning pops up for only three seconds by default, one could miss the warning due to looking away from the screen at that moment for some reason. For real security the warning shouldn't time out but stay on the screen until one clicks to hide it (that would be work for the firefox team).

However, 100% security never exists and as always we have to weigh security against convenience, so if you disable the warning, keep your eyes open!


I need help compiling evince from source package on Ubuntu 14.10

Ubuntu’s source of evince 3.14 is patched to  allow using  gtk 3.12. It's done via the rtl_avoid_3.14_dep.patch


The value of DISPLAY to be set on SSH X-forwarding is usually 10 + (whatever the value is on your local system). So, if locally you have DISPLAY=:0, then the forwarded setting will use DISPLAY=:10, and DISPLAY=:1 locally will need DISPLAY=:11 on the SSH session.
Check the value of echo $DISPLAY on a local terminal.

The value of DISPLAY locally in turn depends on the number of X11 sessions you have running (actually the value that was given to X11 when it was executed, but that's usually set by the display manager based on the number of currently running X11 sessions). So if two users are logged in, one will probably have DISPLAY=:0, reusing LightDM's X11 session (assuming LightDM is the display manager), and the other will have DISPLAY=:1, and if third user also logs in to the GUI, they'll probably get DISPLAY=:2, and so on.

The value of 10 comes from the offset given to SSH:

$ grep X11DisplayOffset /etc/ssh/sshd_config
X11DisplayOffset 10


How to search for files in Terminal using indexed list?

I would suggest using locate while updating the database every 30 minutes (subsequent updates take far less time than the initial).

crontab entry

*/30 * * * * /usr/bin/updatedb

If you're working in any of the pruned directories, you would need to modify /etc/updatedb.conf.  Or if you were only working in for instance /home/user, you could add directories to omit, and speed up updating the database.


How do I run a script on Unity login/logout?

Considering your requirement of running a job when you login to Unity and not for other logins, an Upstart session job seems perfect.

You may have noticed it: processes that you run after a GUI login are under a second init process. This init is a proper Upstart init, and you can start and stop session jobs based on events emitted by it. No root privileges needed at all. Better yet (or worse depending on the perspective), this is not yet completely supported for headless systems. An SSH login didn't start the user init from a quick test that I made just now.

To create a session job, make a new .conf file in ~/.config/upstart. That's the default primary directory for Upstart session jobs ($XDG_CONFIG_HOME/upstart), create it if doesn't exist. Here's an example job:

tee ~/.config/upstart/myjob.conf <<EOF
description "My job"
start on desktop-start
stop on desktop-end

script
       firefox 'http://upstart.ubuntu.com/cookbook/#session-job'
end script
EOF

You can manually control it:

start myjob
# or
initctl start myjob

The service command are used to control system jobs (those in /etc/init.d or /etc/init). For controlling session jobs, one needs to use the initctl command, which is used to interact with Upstart.

See man upstart-events for more events you can use.


If you need to repeat the scrip endlessly, you can use a nested while loop:

while true; do
    # Do something, for example output the current date and time:
    printf '%(%c)T\r' -1
done

In your example code, you are using the old style for subshell output wrapping. As @ThomasWard says: "most Bash guides don't recommend the use of backticks, and instead suggest to wrap your commands within $( ), i.e. $(monStatus.sh -p appName:Tomcat | head -2 | tail -1 | nawk '{print $2}'). This is actually the more recommended way to do subshell output capture as a variable or as substitution nowadays."

As @dessert says, "note there's actually a difference between the backticks and the $(…) syntax: When the old-style backquote form of substitution is used, backslash retains its literal meaning except when followed by $, `, or \. – compare the outputs of echo $(echo \\ ) and echo `echo \\ `!"
In addition, you can simplify few more things:

Use nawk 'FNR==2{print $2}' instead of head -2 | tail -1 | nawk '{print $2}'.

Use Bash builtin test [ (see man test and this answer), the 'and' list operator &&, and positive (==, -eq) instead of negative (!=, -ne) condition.

#!/bin/bash
while true; do
    sleep 90
    [[ $(monStatus.sh -p appName:Tomcat | nawk 'FNR==2{print $2}') == 'offline' ]] && RestartTomcat.sh
done

But, according to the comment "after it runs the restart it should end", the correct suggestion is to use while with a condition:

#!/bin/bash
while [[ $(monStatus.sh -p appName:Tomcat | nawk 'FNR==2{print $2}') -ne offline ]]
do
    sleep 90
done
RestartTomcat.sh

Or if you want to use a positive condition, the until loop can be implemented in the same way:

#!/bin/bash
until [[ $(...) -eq offline ]]; do sleep 90; done; RestartTomcat.sh


Can't install systemctl - E: Package 'systemd' has no installation candidate

Should have thought the header on the PPA might have given you pause for thought:

  WARNING! Don't use this. This PPA is just for temporary development.

It only carries a package for the latest development version of Ubuntu (currently Wily).

As for installing systemd on Trusty... The consensus seems to be "don't do it". Too much relies on Upstart being the init script. If you need it, you're better off upgrading to 15.04.


Trouble installing CouchDB on Ubuntu 12.04

I had the same problem. I am on Ubuntu 14.04.1 LTS, but perhaps my solution will help.

When I did a ps -ef | grep couchdb, I found the following in a process run by couchdb:

-couch_ini /etc/couchdb/default.ini /etc/couchdb/local.ini

I had already changed local.ini, but that didn't help. When I looked at default.ini, I saw the port and host set there as well, so I removed my changes from local.ini and added them to default.ini. After restarting couchdb, I had success.


Pipelight flash plugin installation doesnt work with 16.04

With Mozilla/firefox closed, run the following command:

sudo pipelight-plugin --create-mozilla-plugins

Open Mozilla and check about:plugins: it should now be listed.

You will probably have to do this every time the plugins are updated.


Don't bother.

The usual way to keep the system clock synchronized is ntpd. It should be installed and configured by default on Ubuntu. Do you have an ntpd process running? Is your system's clock incorrect?

EDIT :

From your comment on my other answer, it looks like you've got an NTP server you can use.

You should already have the ntp software installed on your system.  dpkg -l ntp to verify.  You probably have an ntpd daemon already running, though it won't work because it doesn't know what server to talk to; ps -ef | grep ntpd to confirm that.

/etc/ntp.conf is the configuration file for ntp.  The default version has:

server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org

Comment out those lines and add:

server your.ntp.server

then run:

sudo /etc/init.d ntp restart

man ntpd for more details, but this should be enough to get you going.


i am unable to install couch DB in my ubuntu 18.04

This doesn't exactly answer your question, but a simple option is to run couchDB in a docker container, and not as an installation. To do this simply install docker (here's a question about how to do that), then once that is up and running run this command:

  sudo docker run -d -p 5984:5984 --name couchdb apache/couchdb:1.7.1

and an instance of couchdb will be running in a docker container. Go to http://127.0.0.1:5984/_utils/ to verify that its up.


from quickly.widgets import url_fetch_progressbar can not be found?

You will have to install the package python-quickly.widgets

Either through the Software Center, Synaptic or the terminal:

sudo apt-get install python-quickly.widgets


how to set default login asking for password again?

I found this answer by Arthur Tan  :

  Run the following command in terminal:

sudo gpasswd -d username nopasswdlogin

substitute your username for username.

It solved my problem
You can find it here


Battery Status Not Displayed on Ubuntu 12.04 for toshiba laptop

Go to the gear button in the upper corner select the system settings in the drop down menu.
Once you are there select power then look for this


How to create a group, add users to the group, and have that user access all folders in files in that directory?

Do the following:

Add group:

sudo addgroup staff

Add user to group:

sudo adduser mike staff

Give group access to folder:

sudo chgrp -R staff /home/Clients

Set permissions on folder:

sudo chmod -R 775 /home/Clients

Make all folders subsequently created inside /home/Clients to be owned by group staff:

sudo setfacl -dR -m g:staff:rwx /home/Clients


How to make cpu utilization only till 80%?

You can use cpulimit link to limit CPU usage. Install cpulimit using below command.

sudo apt install cpulimit

Run stress command.

stress -c 2 -i 1 -m 1

Check stress PID using ps

ps -ef | grep stress

dedunu   14821 13536  0 14:56 pts/15   00:00:00 stress -c 1 -i 1 -m 1
dedunu   14822 14821 34 14:56 pts/15   00:06:29 stress -c 1 -i 1 -m 1
dedunu   14823 14821 37 14:56 pts/15   00:07:07 stress -c 1 -i 1 -m 1
dedunu   14824 14821 40 14:56 pts/15   00:07:39 stress -c 1 -i 1 -m 1

You can see PIDs of the stress command. Run cpulimit command for each and every stress process.

sudo cpulimit -p 14821 -l 80
sudo cpulimit -p 14822 -l 80
sudo cpulimit -p 14823 -l 80
sudo cpulimit -p 14824 -l 80


Possible reasons for skipped numbers in names of drive partitions

Because MBR-based partition schemes can only have a maximum of four primary partitions, Linux installers typically 'play nice' by making use of an extended partition, which uses up only one primary (in your case, sdb2, since sda1 is already allocated to the NTFS partition). The required root (/) and swap partitions are then created as sdb5 and sdb6 logical partitions within sdb2, leaving sdb3 and sdb4 available for other OSes to use in subsequent installations.

Newer partitioning schemes such as GPT don't have the same limitations and don't need the extended partitions as a workaround.


[ Directory '../../etc/postgresql/9.3/main' does not exist ]

Try to locate pg_hba.conf with following coomand.
find / | grep pg_hba.conf

May be you installed a different version of postgresql.


Answered here https://askubuntu.com/a/929115/248158 and here https://askubuntu.com/a/1073515/39176. For completeness

sudo kbd_mode -s

(persistent across reboots).


Stream all audio FROM my android phone TO pulseaudio

This can not be done

Don't read below if you are not interested in a solution for using DLNA-streams from Android to Ubuntu.

To send audio via a network connection from Android to Ubuntu you always need a renderer on your Ubuntu desktop and a streaming application on the android device. Android does not use pulseaudio as a sound server. We therefore depend on an additional app to send audio to the desktop.

There are several applications that can do this. I tested this successfully with gmediarender on the Ubuntu side and BubbleUpnp for Android.

Install and run gmediarender on Ubuntu from the command line.

sudo apt install gmediarender
gmediarender -f <Name>

Consult the manpage for more options.
Install and run Bubble UPnP on the Android device.
Search for the renderer name you gave in Bubble UPnP > Local Renderer

Select tracks to play on the Android device and listen to them on the Ubuntu machine.

  Note that this will also work for photos or video content you can stream to your computer using Bubble UPnP.


I get an Error when I try to follow Tor browser bundle instructions...help?

The term LANG in tar -xvJf tor-browser-linux32-3.5_LANG.tar.xz stands for the language of the bundle. So if you downloaded the english version you would have to substitute LANG by en-US. The correct command in this case is

tar -xvJf tor-browser-linux32-3.5_en-US.tar.xz


What do windows' users like most after migrating into Ubuntu?

Personally:

It's free.

Way faster on my machine than Windows ever was.

Finding, installing and most importantly uninstalling software, is so much easier.

No pesky pre-installed trial software.

I don't have to worry about viruses.

I know that if I had the knowhow I could do pretty much anything I wanted.

Also, it looks pretty.


Reverse sed's/regexes' pattern-matching priority order

To get what you want try this:

sed -r 's/^([^.]*)\.(.*)/\1\n\2/'

Test:

$ echo "string.with.dots" | sed -r 's/^([^.]*)\.(.*)/\1\n\2/'
string
with.dots

sed will match greedily, so while you are using sed 's/\(.*\)\.\(.*\)/\1\n\2/' it will greedily match upto last . as the first captured group and then then the rest after the . as second.

In my sed expression, to stop sed from being greedy, i have to search for some alternatives. I have matched from the start to a . as the first group ([^.]*) and then whatever after the first match as the second.

Now if you want all portions around . in separate lines:

$ echo "string.with.dots" | sed -r 's/^([^.]*)\.([^.]*)\.(.*)/\1\n\2\n\3/'
string
with
dots


At some point the lower window disappeared. I then had to regularly press Enter in the Upgrade window in order to make it proceed whenever it hang (or it actually proceeded and pressing Enter only made it refresh or something).


Read the messages.

Package nis is not available,

However the following packages replace it:
hostname:i386 hostname

So, if you want the functionality, install hostname or hostname:i386.

If you want to play with the NIS source, you will have to find it on the web.


All the games you told above is basically games that were developed to run in Windows. But you can run it on your Ubuntu system with varying degrees of success using:
wine
or
playonlinux
(A GUI for Wine allowing to install Windows games and applications on Linux)


Please get a temporary wired ethernet connection, open a terminal and do:

sudo apt-get install linux-backports-modules-cw-3.8-precise-generic

Detach the ethernet, reboot and let us hear your report.


Fix backup with Anaconda2 as primary Python Shell

duplicity is a Python script that lives at /usr/bin/duplicity and the error given indicates a problem at line 61 of the script. Opening it in your favorite text editor and navigating down to line 61 might provide some clues. I'm running duplicity 0.6.23 on Ubuntu 14.04.5 LTS and duplicity 0.7.06 on Ubuntu 16.04.3 and in both cases line 61 of the script is blank and I cannot reproduce this error.

It's possible that you can simply edit the script to resolve the problem, commenting out line 61, or re-installing duplicity, however if Duplicity and Anaconda clash is an accurate assessment of the problem you could run duplicity under a different account and insure that the path for that account includes  /usr/bin BEFORE your Anaconda folder. More details on account specific  $PATH adjustment can be found in the answers here.


Installing Ubuntu 13.04 after installing Windows 8

On Windows 8, try EasyBCD, a handy tool that allows you to create a multiboot environment in order to run multiple operating systems on the same computer.

For me it worked.


When device is in monitor mode only "sniff" traffic, do not send anything.
Because of that can not send dhcp offer and dhcp can not use this interface.

  Monitor mode, or RFMON (Radio Frequency MONitor) mode, allows a
  computer with a wireless network interface controller (WNIC) to
  monitor all traffic received from the wireless network. Unlike
  promiscuous mode, which is also used for packet sniffing, monitor mode
  allows packets to be captured without having to associate with an
  access point or ad hoc network first. Monitor mode only applies to
  wireless networks, while promiscuous mode can be used on both wired
  and wireless networks. Monitor mode is one of the six modes that
  802.11 wireless cards can operate in: Master (acting as an access point), Managed (client, also known as station), Ad hoc, Mesh,
  Repeater, and Monitor mode.

resource


How to make my own Dropbox / Ubuntu One server at home?

There are actually lots of them.

SparkleShare (deps: git/subversion, mono, python) at github
GUI-based sync software.

a. Versioning: through a source control system, hence it's mutex-based on a central server through a version number.

b. State: under development

c. Pros: OSS, mono-based so easily moddable, Cons: user-level process, GC-dependent, ineffective sharing protocol by orders of magnitude as git is primarily for small text files, fairly hard to compile (I tried). Using high-level tools.
lipsync (deps: Unison, rsync)
Command-line service-based software.

a. Versioning: through the rsync delta algoritm. I assume programmer must choose conflict resolution.

b. State: I can't find its source code, so I have no idea. The only things in his git repo are binaries.

c. Pros: nice setup, using middle-level tools.
iFolder - Novell's Dropbox.
I haven't studied its source yet. I just want to get this edit over with and if people are interested I'll add more.

a. Versioning:

b. State: Problematic getting it to even compile on Ubuntu, let alone packages. Here's a detailed install guide.

c. Pros: Windows X64 client, mature, AD-integration with ACLs, features no other project has started to implement. I think this might be a good starting point. Cons: Novell might not use its public svn repo as the primary repo and only do code-drops. I don't know exactly about this though. Might be too coupled to openSUSE to easily install on Ubuntu. To check out its algorithms.
scp/rcp - deprecated in favor of rsync
DRDB - block device mirroring tools for distributed RAID-1, i.e. a server-variant of dropbox. I haven't checked out its source code yet, but it's linux only. The actual algorithm would probably be easy to combine with the source code in my musings below this software-listing.

a. Versioning: internal message format over LAN/WAN

b. State: seems mature enough

c. Pros: stable enough for linux, Cons: no other operating systems are supported

Right now I'm investigating improving compile-times on a Virtualized Windows 7, where the compile-times on a Windows 7 on metal is 40 s, but virtualized approx 3m 20s. I'm thinking of writing an ioctl driver that is a write-through cache that looks like a ram-disk for selected folders on NTFS.

Using the above software, I think a week's worth of 2-3-person full-time development would produce a usable Alpha that doesn't lose you files by combining the above softwares.

On my system then, the general idea would be;

Mount a virtual drive \?{GUID}, that is the ram-disk and RW-cache. The software creating this virtual drive takes two input parameters (that are vital):

a. The target folder; this is the SMB folder, so I will be letting the operating system's network stack handle the actual IO. In my case this is in turn the VMWare virtual folder, that has in itself a target on an ext4 drive, but it could easily be your file server using SAMBA/SMB.

b. The path of the folder to be mounted, e.g. C:\ramdisk

This code for creating virtual volumes be taken from TrueCrypt's code, in /Driver/DriverFilter.c (among other files)
The drive uses SMB/the VMWare/network protocol to fetch data when it starts; it fetches with a low task priority, asynchronously from the network and fills its cache. It could use a simple compacting algorithm and have 1 thread that uses message-box type continuation passing to get great performance. On Windows it could use the normal async IO calls, and on linux it could use the epoll/inotify implementation and take code from nginx.
My service that is the ram-disk mounts the unnamed ramdisk drive as an NTFS folder. All programs can continue writing to C:\ramdisk, or whatever I call it.
Async copy from network still going on. With a read-rate of approx 100 MiB/s and 2 GiB ramdisk, it would be 20.5 s to read all data.

Each call to read would perform an in-CPU calculation of the index into a fixed n:ulong GiB max sized array. It would require conflict resolving though or read-write locks. If we'd implement a conflict-resolve algoritm like those available through Microsoft Sync, we could pass each chunk that conflicts as a message to another conflict resolve-process. Dropbox solves it by creating a new file and naming it "PrevFileName Username's Conflicted Copy (yyyy-MM-dd).ext". Perhaps this could be altered through a small widget, if one is compiling against that single source -- the widget would detect outstanding changes as messages/events and choose the conflict resolution protocol. As such, when programming against a folder in exclusive-mode, the Windows VM could set the widget to 'exclusive'.

This would have these PROs

It would be non-blocking / async
It would make the assumption but not require that one computer will be writing mostly to the files.
It would work for arbitrarily large files
It would work on *nix and Windows by tying together the mentioned projects.
It would work when high read-performance is needed (i.e. the files are physically located on disk)
When the conflicting events are reached, one could provide a user interface app that allows the user to write/download plugins that act sanely for different sorts of events -- i.e. different sorts of files. E.g. a text file could be brought up with Kompare/WinDiff, while a binary would be duplicated and saved as another file.


Why doesn't cp detect '\ ' (backslash+space)?

Escaping a field separator inside a variable to prevent word splitting isn't useful: the shell will still split words on the separators listed in $IFS:

~/tmp/directory with spaces$ workingDirectory=$(pwd | sed "s/ /\\\ /g")
~/tmp/directory with spaces$ echo $workingDirectory
/home/user/tmp/directory\ with\ spaces
~/tmp/directory with spaces$ strace /bin/echo $workingDirectory |& grep '^execve'
execve("/bin/echo", ["/bin/echo", "/home/user/tmp/directory\\", "with\\", "spaces"], [/* 62 vars */]) = 0

So an obvious workaround for that would be setting $IFS to an empty string (and avoiding escaping spaces at all), essentially disabling word splitting entirely:

~/tmp/directory with spaces$ workingDirectory=$(pwd)
~/tmp/directory with spaces$ echo $workingDirectory
/home/user/tmp/directory with spaces
~/tmp/directory with spaces$ IFS=
~/tmp/directory with spaces$ strace -s 64 /bin/echo $workingDirectory |& grep '^execve'
execve("/bin/echo", ["/bin/echo", "/home/user/tmp/directory with spaces"], [/* 62 vars */]) = 0
~/tmp/directory with spaces$ stat $workingDirectory
  File: ‘/home/user/tmp/directory with spaces’
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: 812h/2066d  Inode: 782086      Links: 2
Access: (0775/drwxrwxr-x)  Uid: ( 1000/    user)   Gid: ( 1000/    user)
Access: 2016-03-24 11:22:43.606332994 +0100
Modify: 2016-03-24 10:51:00.835689309 +0100
Change: 2016-03-24 10:51:00.835689309 +0100
 Birth: -

However disabling word splitting entirely in general doesn't make too much sense. Unless you have good reasons to disable word splitting entirely for more than one command I suggest you simply use double quotes to prevent it limitedly to the strings that can possibly contain field separators:

workingDirectory=$(pwd)
cp "$workingDirectory"/jad/jad /usr/bin/


Wiped out OSX (Mac Air), to install Ubuntu 13.10 which doesn't boot

I think the issue that you're running into has to do with UEFI. Perhaps simply waiting 30 seconds will reveal grub. In short Macbooks use this as a replacement for the traditional BIOS. Take a moment to look through the Mactel support teams installation instructions and be sure to follow the steps.

I usually keep a small partition that still has OSX installed for firmware updates as well as checking things out if I suspect a hardware problem. I also have a base image with OSX only should I want to bring the machine in to the Mac store for repair. I highly recommend considering a dual boot system.

Once you've looked over the general install instructions take a look at your hardware specific page. I made some assumptions about your version of hardware in this link but you can navigate the wiki should you have a difference version.


Make terminal use pageup/pagedown instead of shift-pageup/shift-pagedown?

I am afraid this is not possible, as no PgUp/PgDown will be sent to command-line applications, which will render some of them unusable. This is good ol' days Unix feature.

If you want more user-friendly scrolling, I suggest using the less command. It's used this way:

command-with-lot-of-output | less

This will start the less command with output of your original command. (More about piping output to other programs can be found here: http://www.dsj.net/compedge/shellbasics1.html)

Less can be navigated using arrows or PgUp/PgDown. For your convenience, it also provides searching and more (see man less for more).
You can quit less by just hitting the q key.


What to do if "apt" does not work but "apt-get" does?

apt install is available starting in Ubuntu 14.04. In Ubuntu 14.04 and later it is possible to use either apt install or apt-get install.

Your apt package in 14.04 is not up to date. The latest version of apt in Ubuntu 14.04 is 1.0.1ubuntu2.17 from the security repository and your version of apt is apt 1.0.1ubuntu2 for i386.

Download apt manually from the official Ubuntu website.
Remove the existing apt package the strong way.

sudo dpkg --remove --force-remove-reinstreq apt
sudo apt update

Change directories to the directory where you downloaded the apt .deb file and install it.

sudo dpkg -i apt_1.0.1ubuntu2.17_i386.deb

Explanation

reinst-required
       A package marked reinst-required is broken and requires
       reinstallation. These packages cannot be removed, unless
       forced with option --force-remove-reinstreq.


How to configure UFW for a basic desktop / laptop?

A basic Desktop firewall is going to deny inbound and allow outbound 'traffic' in a basic setup.  Essentially, while Windows can incorporate application-based filtering, it's default rulesets are to permit outbound and reject inbound except where the outbound traffic is getting a response.  This is the typical "desktop" firewall setup usually observed in the wild on the typical end user's desktops.

(Ideally, you are using ufw for simplicity, but a truly useful ruleset will use pure iptables instead.)

The ufw way.  And probably the most basic but effective ufw setup for a Desktop computer that doesn't need any special inbound connections or special restrictions going outbound:

In theory, you will want to deny inbound traffic, and permit outbound, and allow incoming traffic related to your actions going outbound.  ufw pretty much does this by default.

Note that I do not have any additional allow rules here.  You don't need any additional allow rules - ufw by default does what my manually installed iptables set below does - it accepts inbound traffic related to an established outgoing connection, so web browser connections and email clients, which initialize their outgoing communications in the high port numbers which are the 'random ports range', will work, and you won't need to accept http (80), https (443), etc. traffic on their ports back in because it's already transparently handled.  To add additional ALLOW IN rules like Boris's answer does only opens the typical desktop user to unneeded connections on those ports, which a Desktop would not need.

(1) Enable UFW

Turn on ufw rules

ufw enable

This should really be all you need to do for ufw.  But, you can continue on if you want.

(2) Deny Inbound Traffic

Pretty sure this is default, but to make sure, run this to make sure it denies incoming traffic by default (except that related to outgoing, such as web browser stuff):

ufw default deny incoming

(3) Permit Outbound Traffic

This should also be the default, but run it and make sure that outgoing traffic is allowed:

ufw default allow outgoing

That should be all you need to do!

(I will spot check this later today)

And then, there is my way, with iptables and manual manipulation of the netfilter/iptables rules instead of ufw (which does that silently)

From what I can tell, ufw has a default ruleset and that should be all you need for the typical desktop.

However, I prefer the iptables approach because I know iptables pretty well so far, and because I like manually configuring my firewall rather than let ufw or random firewall control software build my rules for me.

This is my ruleset for iptables (NOT ufw) on my basic desktops with no other things listening, and is not being locked down like my personal laptop computer is.  It also achieves pretty much almost exactly the same thing that the UFW stuff does:

iptables -A INPUT -i lo -j ACCEPT - Gotta allow localhost, no?

iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED - Allow already established traffic to finish coming in.  Allow traffic related to outgoing communications through.

iptables -A INPUT -p icmp -j ACCEPT - Allow ICMP packets in (ping, etc.).  You don't need this, but you can have it if you want it.

iptables -A INPUT -j REJECT --reject-with icmp-host-unreachable - This denies everything else coming towards the computer.

The system default for iptables without ufw rules or any other rules enabled is "ACCEPT" for INPUT, OUTPUT, and FORWARD.  So I manually add the 'Reject all other traffic' rule there at the end myself.

(Note that this is almost exactly what the IPtables HowTo on the Ubuntu help pages produces.  Plus some minor minor tweaks)


Remove and disable every radeon and fglrx packages from the official repository, just follow the instrunctions at this page http://wiki.cchtml.com/index.php/Main_Page and everything will run fine.

The HDMI audio bridge it's not automatically activated and you have to switch between your audio output devices using the "Audio Settings" menu under the volume control on the system bar. It's also probably useful for you to know that under the "gear icon" ( the one on the upper right corner ) there is a shortcut for the displays management.


crontab not running second argument after first argument

Cron should do this with no problem. However, the && means "do the second command only if the first exited successfully". So if the second is being ignored, then most likely the first one failed or, in any case, exited with an exit status != 0.

So, either fix whatever is causing the first command to fail or change the crontab so it runs one command after the other irrespective of whether it worked or not:

00 15 * * * /home/jesse/test/a.out; /home/jesse/test/b.out


Can't connect to any wireless connection after updating

I think you have to revert to 5.100.82.112 version of the bcmwl-kernel-source package (worked for me with the same device), since the 6.20.155.1 version of it doesn't work with bcm4313 hybrid bluetooth/wireless device.

It was taken from 6.20.55.19 from here, see also this bug report.

This 6.20.55.19 package was made for special wireless devices sold with Dell laptop (bcm43142 aka bcm4365 or Dell 1704) with Ubuntu installed on it.

According to Broadcom  Linux page support:

The last official supported wireless device driver corresponding
to the bcm4313 device is the 5.100.82.112.

You probably have to fix this version in the Ubuntu package management system by adding the lines below to a new created /etc/apt/preferences.d/bcmwl-kernel-source file (sudo maybe necessary):

Package: bcmwl-kernel-source
Pin: version 5.100.82.112+bdcom*
Pin-Priority: 1001

Maybe, the two versions of these packages have to be available in the repositories since they are not made for the same devices, but with a special attention to there respective version number or name in order to avoid one to replace the other uselessly.


How to open one (or more) gnome-terminal window with few tabs, each with different profile, when start/reboot the computer?

To open a gnome-terminal window with few tabs we should use the option --tab. See gnome-terminal --help-all. Also in man gnome-terminal we can find this explanation:

--window-with-profile=PROFILENAME
     Open a new window containing a tab with the given profile.
     More than one of these options can be provided.
--tab-with-profile=PROFILENAME
     Open a tab in the window with the given profile.
     More than one of these options can be provided, to open several tabs.

So, to open gnome-terminal window with few tabs, we should use command as this one:

gnome-terminal --tab-with-profile=ProfileA --tab-with-profile=ProfileB --tab-with-profile=ProfileC

Compose your own command and test it into a terminal. If it works satisfactorily add it as an entry in Startup Applications:

There are few possible approaches how to open few gnome-terminal windows with few tabs in each. I would suggest to use a command as follow:

gnome-terminal --tab-with-profile=ProfileA --tab-with-profile=ProfileB && gnome-terminal --tab-with-profile=ProfileC --tab-with-profile=ProfileD

Another idea is to create separate Startup Applications entry for each gnome-terminal window.


I can´t say much about Wubi but how did you create your Live-USB? I had Problems with LiLu and Pendrive, try to create the live-usb with UNetbootin if it still doesn´t work try to disable fast startup in Windows8.


After some googling I found this bug report on launchpad in which someone posted a "workaround" that is working for me.

Configured VLC with the settings below by going to Tools->preferencs.

Then click save and close all VLC instances before re-launching your video. Now you can seek without ever losing audio.


Unity doesn't load after installing NVIDIA drivers

I had this happen to me on Ubuntu 14.10 x86_64 with kernel 3.16.0-28 after loading Nvidia 346 drivers. After login I would get the blank Ubuntu background wallpaper and nothing else, no way to do anything. There are many similar problems posted online over the past four years; most of the solutions did not work for me. Attempting to restart unity I got an error:
 compiz: plugin OpenGL not loaded.

Finally, this is what worked:

CTRL-ALT-F3 < ...to reach console, and then login. >
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo killall nvidia-persistenced
sudo apt-get purge nvidia*
 < see the error message, and get the process ### >
sudo kill -9 ###
  < ... ### is from previous error; a process locking user "nvidia-persistenced" >
sudo apt-get purge nvidia*
sudo apt-get install nvidia-prime
sudo reboot

 < ...wait... >
CTRL-ALT-F3 < ...to reach console, and then login. >
export DISPLAY=:0
sudo dconf reset -f /org/compiz/
gsettings reset org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins
  <...note space after 'core/' and before 'active-plugins'  >
sudo reboot

...and then it worked. Would love not to have to go through that again!

See also:
https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1166765
and
https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1342339


If it can read a regular cd you could burn super grub2 disk to a cd and boot from the cd. When you boot from the cd it will bring you to a menu. If you arrow down and hit enter on enable extra grub boot functionality it will take you to another menu that shows: enable usb boot experimental. If you select that it may take a second but it will send you back to the main menu. Then you can hit detect any operating systems it may take a minute considering the laptop but your bootable usb drive should be detected that way and you can force it to boot that way so you can install a distro of linux on your harddrive :3 I've had to force many computers to boot like that even got a 1998 compaq and a 97 Acer to do that. Good luck!  Link to cd iso: http://www.supergrubdisk.org/category/download/supergrub2diskdownload/


"Shut Down" and "Restart" from system (drop-down) menu inactive

I found out a solution with "dconf":

Install the "dconf-editor" from USC (ubuntu sofware center).
Launch the dconf from the dash
Press a combine Ctrl+f, on the "search box" type: "shutdown" then you will see the "supress-logout-restart-shutdown", tick it for a mark.

reference here

This solves my trouble, but exactly as in the name: "supress....", it will shutdown or restart your session right after you press the "indicator append session" without asking for confirmation.

So that's another issue - how can I get it to ask for confirmation before shutdown or restart to prevent losing unsaved data?


The shebang that needs to be written includes an exclamation mark.

Try to write #!/bin/bash at the first line of your shell script.


If Linux and not Windows, I might suggest gpt partitioning. Ubuntu installs to gpt and can boot with BIOS or UEFI. But Windows only boots from gpt partitioned drive with UEFI.
But with gpt partitioning you do not have any issues of primary or logical partitions.

Most desktop installs do not need separate partitions for all the various system folders. Some with SSDs may want them on rotating drive or temp files just mounted in memory.

Do not use separate /boot. Do not share /home, but create a separate /mnt/data partition. The only issue may be with different installs whether UID will be the same.

If BIOS with MBR partition, no Linux partitions have to be primary, Windows requires Primary partitions to boot. Best to use one or two primary, and then make entire rest of drive as one large extended partition for an unlimited number of logical partitions.

For the Total space you want for Ubuntu:
Ubuntu's standard install is just / (root) & swap, but it is better to add another partition for /home if allocating over 30GB.:
Only if gpt -  all partitions in gpt are primary:

gpt: 300 MB efi FAT32 w/boot flag (for UEFI boot or future use for UEFI, you only can have one per drive, so if already existing do not attempt another)

gpt: 1 MB No Format w/bios_grub flag (for BIOS boot not required for UEFI)

for gpt(GUID) or MBR(msdos) partitioning
Ubuntu partitions - smaller root only where hard drive space is limited.
If total space less than about 30GB just use / not separate /home or standard install.

1. 10-25 GB Mountpoint / primary or logical beginning ext4
2. all but 2 GB Mountpoint /home or /mnt/data  logical beginning ext4
3. 2 GB Mountpoint swap logical
4. If desired leave space for added / (root) of 20GB each

Depending on how much memory you have you may not absolutely need swap but having some is still recommended. I do not hibernate (boots fast enough for me) but if hibernating then you need swap equal to RAM in GiB not GB. And if dual booting with windows a shared NTFS partition is also recommended. But you usually cannot create that as part of the install, just leave some space. Or partition in advance (recommended).
One advantage of partitioning in advance is that the installer will use the swap space to speed up the install. Thanks Herman for the tip.

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

suggested partitions for just Ubuntu on 3TB drive.

any problems with this partition scheme?

Another advanced suggestion from TheFu with Multiple / (root) - Post #5 similar to what I actually do

http://ubuntuforums.org/showthread.php?t=2170308


How to use hardware encoding in ffmpeg (h264_omx) on Raspberry Pi 4 running Ubuntu

You might need to build a custom version of FFmpeg to use the hardware encoder on Raspberry Pi.
Make sure the --enable-omx and --enable-omx-rpi flag is enabled when configuring the FFmpeg build (see the links below for build steps). These flags indicate that build FFmpeg with Raspberry Pi-specific OpenMAX encoder, which is silghtly different from the normal version of the OpenMAX encoder (e.g. they dependend on different .so libraries).
See also
Steps to build FFmpeg for RPi with the h264_omx encoder:
http://www.redhenlab.org/home/the-cognitive-core-research-topics-in-red-hen/the-barnyard/hardware-encoding-with-the-raspberry-pi
Why the FFmpeg binary provided from Raspbian repo doesn't support MMAL and OpenMAX codecs:
https://www.raspberrypi.org/forums/viewtopic.php?t=184425#p1166882


Ubuntu 14.04 on mid-2009 macbook pro not booting

Have you tried replacing or pulling/pushing/checking the HDD cable?
It's a common failure in macbooks from around 2009.
I've had 3 macbooks with this failure in my company (and there is not so much macbook there...)
The problem is exactly the same as you describe. Computer way sloooow, and some hangs. Ata errors also, due to timeouts in bus.

The easiest way to make sure if this is the problem is putting your internal HDD in an USB enclosure and boot. If computer is faster through USB (reasonabily faster) than through ATA, you found it. You have then to replace your internal ATA cable (try cleaning and reconecting first). ebay could be your friend here as it's not very cheap...

About your problems due to WD disk instead of Seagate... I've never had any problem replacing macbook disks with any particular brand. In fact I'm used to buy WD and hitachi because they seemed to me that they last for long (But I've used samsung, toshiba...)


How to make a bootable OSX El Capitan USB?

There's a ready script that automates this whole process. Manually it's as mentioned in MacWorld, but using the Linux tools:

InstallESD.dmg is an image of a GPT disk with HFS+ partition which contains installer files, but is not bootable itself.

Working as a root, convert InstallESD.dmg into raw image format and mount it using kpartx:

dmg2img InstallESD.dmg InstallESD.img
kpartx -a InstallESD.img
mount /dev/mapper/loop0p2 /mnt/installesd

InstallESD.dmg contains another disk image, BaseSystem.dmg, which is a bootable installer disk. But writing it directly to the USB drive does not work, because that would create a partition with almost no free space and still lacking some important files.

Extract base system image BaseSystem.dmg, convert into raw and mount too:

dmg2img /mnt/installesd/BaseSystem.dmg BaseSystem.img
kpartx -a BaseSystem.img
mount /dev/mapper/loop1p1 /mnt/basesystem

Format the USB flash drive as HFS+:

sgdisk -o /dev/sdb
sgdisk -n 1:0:0 -t 1:AF00 -c 1:"disk image" -A 1:set:2 /dev/sdb
mkfs.hfsplus -v "OS X Base System" /dev/sdb1
mount /dev/sdb1 /mnt/usbstick

Copy missing installer files (beware of ending /):

rsync -aAEHW --info=progress2 /mnt/basesystem/ /mnt/usbstick/
rm -f /mnt/usbstick/System/Installation/Packages
rsync -aAEHW -P /mnt/installesd/Packages /mnt/usbstick/System/Installation/
rsync -aAEHW -P /mnt/installesd/BaseSystem.dmg /mnt/usbstick/
rsync -aAEHW -P /mnt/installesd/BaseSystem.chunklist /mnt/usbstick/
sync

It is possible to copy with other tools (tar, cpio), just supply parameters preserving the most of file metadata. rsync supports also -X parameter, supposed to copy HFS+ extended attributes, but in practice it fails with the error "Operation not supported".


Ubuntu automatically shows deleted files

First: If we have a modern GUI (today all of us - only exception are dedicated servers!)
The deleting of a file - Do Not Remove the file from the system, but renames or move the file!
Windows and Unix/Linux have different ways of doing this:
In Linux Deleted files (Trash bin active) live in a hidden folder( in your File Manager pressing [Ctrl]h toggles View Hidden Files:

In Linux/unix all files/folders starting with a . (Dot) are hidden, in windows it is an attribute - a flag in the directory is raised - this flag is the hidden!, So they do not recognize each others way of deleting a file/folder - when recycle-bins are in use!

In Windows Trash-bin is called $Recycled - Windows creates a link to the file in $Recycled folder and renames - changes the first character with the Greek lower case letter Tau (death).

In Linux the folder is named  .Trash-[UID] (in my system it is .Trash-1000 my userID is 1000 if you have more users there will be more files with growing numbers each user have their own trash-bin)

Deleting files in the other OS is a bad idea, because: Deleting from a foreign OS only handles the native trash-bin and not the others.

Linux actually moves the file to the hidden directory.

Try viewing the hidden files on your USB-stick, you will find the .Trash-(some number) directory, which you have not emptied!! :-(

Windows think the disk (pen) is corrupt if you delete windows owned files from Linux, Linux tries to correct the file names and show them!

Actually it is VERY ANNOYING to have to empty the trash every time we have finished using a USB-device for transferring purpose - this is why we all seems to loose storage on our removable devices! ( Deleted files are mostly all there still !!)


There is no way to make your password unchangeable.
The only way is to limit the privileges of other administrators.


One of the reasons you aren't seeing anything is because it's rhythmbox instead of rythmbox.

The most viable theory is that there are two processes running. You can try:

killall rhythmbox.

Typos can be dangerous.


To set a static IP in Network Manager click the network icon on top of the screen, select "Edit connetions", then select your connection and press "Edit". You will see this screen (select IPV4 tab):

Select "Method" as "Manual" and add the required information.

To be able to connect directly from outside, you will need to change VB network settings from NAT to bridge:

You also need to be sure that the static IP is within the network range of the outside network. And set the available gateway correctly too.


Why are some online forms unable to submit?

Your problem could be many things.

Try using ping from the command line with these options:

ping google.com

You should get the responses back normally. Then try this:

ping -s 1300 -M do google.com

which will determine if you are getting packet loss. That will detect whether you've got a networking problem with the MTU settings. I had that once and it produced a variety of effects.

If your Ubuntu is set up to use an MTU (max transmission unit) packet size of 1500 but your ISP's gateway is only allowing 1000, then you'll get packet loss and problems like you describe.

It's made worse if you have a firewall on your router that is blocking the ICMP packets that should notify you of the error (happens a lot because some sysops think ICMP packets are evil).

You can also try resetting the router to its factory defaults.


Dual Boot Ubuntu 13.10 and Windows 8 preinstalled

Let me tell you Windows 8 is an operating system not recommended for Windows and also Ubuntu. It is my particular opinion. Nowadays most companies sell pcs with W8: Dell, HP, Asus, and so on. I would prefer a computer without any installed system.


How to mount an iphone 5s to Ubuntu 14.04?

iOS 8 requires libimobiledevice-1.2, which is not available as packet for 14.04 imho. Instructions on how to install here


Press Ctrl + Z to stop the w3m process.

Run the command jobs -l to find the w3m process that has been stopped.
Example for me stopping top: [1]+  3047 Stopped (signal)        top

Send it to the background with bg n where n is the number that jobs -l says for the process.
Example for my stopped top from earlier: bg 1 and got back [1]+ top &

To bring it back to the foreground use fg 1


Ubuntu 14.10 uses VESA:DVST instead of my AMD driver

Just run in terminal

sudo apt-get install mesa-utils

and you will get correct output there.


There is a difference between command-line arguments and standard input.

gzip accepts filenames as arguments. It will read the raw data from the specified files and compress them. If you have a command outputting a list of filenames, you can use xargs to pass those filenames to gzip as command-line arguments.

However, if no file arguments are passed to gzip, it defaults to read its raw data from standard input and print the compressed result to standard output. If you have a command outputting raw data which you want to compress, you can pipe it to gzip.


Disable prefetching on intel processor on 20.04

Those files, /dev/cpu/CPU_NUM/msr and the msr-tools provided read and write msr commands that manipulate them interface to/from the kernel via the msr module, which must be loaded before use of the rdmsr or wrmsr commands. Error reporting is non-existent or not great and so it might not be apparent what is wrong if the module is lot loaded.
Example (no msr module, then with msr module):
doug@s18:~$ ls -l /dev/cpu
total 0
crw------- 1 root root 10, 184 Oct 19 08:34 microcode
doug@s18:~$ sudo rdmsr 0x198
rdmsr: open: No such file or directory
doug@s18:~$ sudo modprobe msr
doug@s18:~$ ls -l /dev/cpu
total 0
drwxr-xr-x 2 root root      60 Oct 19 08:37 0
drwxr-xr-x 2 root root      60 Oct 19 08:37 1
drwxr-xr-x 2 root root      60 Oct 19 08:37 2
drwxr-xr-x 2 root root      60 Oct 19 08:37 3
drwxr-xr-x 2 root root      60 Oct 19 08:37 4
drwxr-xr-x 2 root root      60 Oct 19 08:37 5
crw------- 1 root root 10, 184 Oct 19 08:34 microcode
doug@s18:~$ ls -l /dev/cpu/0
total 0
crw------- 1 root root 202, 0 Oct 19 08:37 msr
doug@s18:~$ sudo rdmsr 0x198
279f00002e00

Important note for the future: In upcoming kernels (as of 5.9, I think), user write access to the MSRs (Machine Specific Registers) is being restricted. Access will need to be enabled. I use the grub command line option:
GRUB_CMDLINE_LINUX_DEFAULT= "msr.allow_writes=on"

The write msr ability can also be changed after boot via /sys/module/msr/parameters/allow_writes. Example:
doug@s18:~$ sudo cat /sys/module/msr/parameters/allow_writes
off
doug@s18:~$ sudo wrmsr 0x19c 0
wrmsr: pwrite: Operation not permitted
doug@s18:~$ echo on | sudo tee /sys/module/msr/parameters/allow_writes
on
doug@s18:~$ sudo cat /sys/module/msr/parameters/allow_writes
on
doug@s18:~$ sudo wrmsr 0x19c 0
doug@s18:~$

Note: I know that writing 0 to 19C (IA32_THERM_STATUS) is O.K.


Why can I not use my BSNL USB Modem(LW273) ?

You should try wvdial, it should be available in the synaptics, it makes the setup process for datacards much easier. You can also install it by running the following in the terminal:

sudo apt-get install wvdial

Also, do explore the network applet and check the settings before you are confirmed. I think you didn't do the latter thoroughly.


Ubuntu 14.04 LTS Windows 8 Guest macvtap setup

You have to create a bridge with every network device you want to be available to the guest so it can be used by kvm.
More info here: https://wiki.ubuntu.com/KvmWithBridge and here: https://help.ubuntu.com/community/KVM/Networking


I encountered a similar issue. It looks like you're using an old version of npm which is no longer supported. (According to the last post in this GitHub issue ).

I would suggest uninstalling npm completely and reinstalling the latest version.

To uninstall both node and npm (if npm was bundled with your node installation), try sudo apt-get remove nodejs. (To reinstall the latest versions, see MorganGalpin's answer to this Stack Overflow question)

To uninstall npm only, try npm rm npm -g (removes npm globally) or make uninstall in the folder where npm is installed (which npm will tell you where that is).


While the approach suggested by @DK Bose within the comments is completely correct, another possible solution is to create custom keyboard shortcut that uses xdotool as command in the following way:

xdotool type --clearmodifiers 'µ'

Source of the idea is provided within the comments of this answer. xdotool should be installed:

sudo apt install xdotool

This shortcut (Ctrl+Shift+M as it is defined above) works also within wine applications, the only specific thing is that you should press Ctrl+Shift for about 1 second and then press M.


Google Voice plugin for gmail not working (12.04 x64 & firefox 17.0)

This is not an answer - solution - to your question.

If the google-talkplugin is problematic , then is problematic and is not a fault of Ubuntu.

I will tell you what I did to make it work , but (again) this is not a solution. (maybe a workaround).

Download and install Google Chrome , I don't know how ,but for a reason , the plugin works there.

When you have installed Google Chrome , then open Firefox and open a terminal too and run this command

sudo dpkg-reconfigure google-talkplugin

Probably it will work with Firefox too. (worked for me).


Ubuntu 13.04 Boot stuck at the changing Orange & White Dots. How can I get it to work?

Not a solution as such:
If you press the 'Esc' key during the Ubuntu boot process it should show you what is going on in the background and might give you a hint where the boot process is getting stuck.

I hope this helps


Can't open Ubuntu Software Center except from the terminal

The root user has only a few programs under the home folder. Maybe it freezes while loading all of your installed programs. Try waiting a minute or two depending on the speed of your HD. If its your first time successfully running the program under your user name, you may have to wait longer in order for it to sync. Sometimes when I run soft-cen on my netbook it freezes while loading, but then recoveres because I have too many installed programs for such a weak CPU and slow HD.


Motherboard compatibilty with Ubuntu 20.04

According to Linux Status Report for ASUS Desktop Motherboards the ASUS TUF B450M-PLUS GAMING motherboard is tested as compatible with Ubuntu 18.04, so it seems very likely that the similar ASUS TUF B460M-PLUS GAMING motherboard model would also be compatible with Ubuntu 20.04. In order to get a more focused evaluation of the motherboard's compatibility before you install Ubuntu, boot from the Ubuntu installer live USB and run Ubuntu as a live session.


Just Installed Ubuntu how do i boot from my C: drive?

Whether or not your system boots off of the USB drive or the internal hard drive you just installed Ubuntu onto depends on 2 factors:

Whether or not the USB drive is still plugged in
If your BIOS/UEFI boot order has USB drive prioritized above or below the internal hard drive.

The easiest solution would be to just remove the USB drive, and boot up your computer. That will boot up into Ubuntu 14.04, regardless of what drive it is installed on, because it's the only OS available.

If you want to change your boot order, there is a function key that you will need to hold down, and that function key is motherboard-specific. Look on the bottom of the screen as you turn on the computer, and it has the computer manufacturer on the screen. On the bottom there will be something like Settings: F7, or similar. Press that button, and you will be taken to your BIOS/UEFI settings.


Error: kernel headers not found. (But they are in place)

The message is misleading.

In my case it was actually missing dkms so before you install the addition run

sudo apt-get install build-essential linux-headers-`uname -r` dkms


Read man mount.ntfs, it will tell you how to mount your partitions as a user (with the uid= and gid parameters. From the man mount.ntfs page:

Access Handling and Security
   By default, files and directories are owned by the effective user and group of the mounting process, and  everybody  has
   full  read,  write,  execution  and directory browsing permissions.  You can also assign permissions to a single user by
   using the uid and/or the gid options together with the umask, or fmask and dmask options.

   Doing so, Windows users have full access to the files created by ntfs-3g.

   But, by setting the permissions option, you can benefit from the full ownership and permissions features as  defined  by
   POSIX. Moreover, by defining a Windows-to-Linux user mapping, the ownerships and permissions are even applied to Windows
   users and conversely.

   If ntfs-3g is set setuid-root then non-root users will be also able to mount volumes.

However, root is still involved (because "mount"ing is a system-level thing), and unmountable NTFS drives will cause it to hang they're automounted, so don't use auto in your /etc/fstab entry.

Read man mount, especially about the user parameter:

   The non-superuser mounts.
          Normally, only the superuser can mount filesystems.  However, when fstab contains the user option on a line, any‐
          body can mount the corresponding filesystem.


Not really. Ubuntu does not fit on a CD anymore; assuming we are not talking about a mini ISO install. You need at least a DVD but those too are read only mediums so do not work that well: it will put everything into RAM making it slow.

You should use a USB stick if possible: you can make that "persistent" and have  more partitions on it so you can save files into the 2nd partition. See for instance How can I make a 19.04 persistent live USB from Windows? or the older How to make a live Ubuntu 18.04 USB with a persistent storage of more than 4GB
 and https://wiki.ubuntu.com/LiveUsbPendrivePersistent

You will need a 4Gb stick for Ubuntu 18.04 and newer. 2Gb is too small.


Setup with same mount point (help me, please!)

Let's suppose this scenario:

sda1, sda2, sda3 are the 3 partitions where you got installed the listed operating systems;
sda4 is your free partition

First of all, you can only set a mountpoint for one partition. So if you want to set / you can only choose one partition. If you can select two then it should be a bug. There are tools like LVM and mdadm that should let you do something similar (use two partitions as the same mountpoint, either mirrored or stripped).

Supposing you want to setup / mountpoint. When you select a partition, you have the option to format it. So, if you set the mountpoint of / to sda1, if you choose to format it your old OS is gone. If not your system will be installed there, and files with the same name will probably be overwritten.

Hope this helps you.


Open the terminal and type:

sudo apt install lynx
lynx -dump -listonly -nonumbers "https://www.ubuntu.com/" | uniq -u

This command improves upon the previous command by redirecting the output to a text file named links.txt.

lynx -dump "https://www.ubuntu.com/" | awk '/http/{print $2}' | uniq -u > links.txt


Basically, the login screen doesn't recognise the keyboard layout. Everything worked when I switched the layout to the standard US, however, this was really inconvenient since I am not using a standard US keyboard. After a bit of digging, I found the answer here. The steps are as follows:

sudo dpkg-reconfigure keyboard-configuration
sudo service keyboard-setup restart


As steeldriver says, that file was wrong, that file corresponds to and older version of ubuntu, i delete that file and back to normal, thans a lot.


"Bad file descriptor" with /dev/stdin using dd

Well, I'm an idiot. Turns out the ip address for the receiving machine had changed on me, so I was trying to clone to the wrong address. I tried again with the new address, and things seem to be going smoothly.

Sigh...


How to calculate the average of cpu usage and memory usage over a period of time in ubuntu

You can use

cat /proc/loadavg

That gives you the 3 load average numbers for the period 1, 5, and 15 minutes.

Then the number of currently running processes and then the pid of the last called process.

I don't know what you mean with the median and deviation values.

But hopefully this is a start for you.

cat /proc/meminfo

gives you memory stats.

The /proc directory could give you more infos for your needs.
Just cat /proc/xxxx the file you are interested in.

cat

is just a programm to show the contents of a file to your termial.
Jo can use your javaprogramm or whatever to read those files and send the values to your database.


Set http_proxy shell variable

Type the following command to set proxy server:

$ export http_proxy=http://server-ip:port/
$ export http_proxy=http://127.0.0.1:3128/
$ export http_proxy=http://proxy-server.mycorp.com:3128/

How do I setup proxy variable for all users?

To setup the proxy environment variable as a global variable, open /etc/profile file:

# vi /etc/profile

Add the following information:

export http_proxy=http://proxy-server.mycorp.com:3128/

Save and close the file.

How do I use password protected proxy server?

You can simply use wget as follows:

$ wget --proxy-user=USERNAME --proxy-password=PASSWORD http://path.to.domain.com/some.html

Lynx has following syntax:

$ lynx -pauth=USER:PASSWORD http://domain.com/path/html.file

Curl has following syntax:

$ curl --proxy-user user:password http://url.com/

try this information it may help you.


TeamViewer slow on Ubuntu without monitor 16.04

Install a dummy server:

sudo apt-get install xserver-xorg-video-dummy-lts-xenial

Add a /etc/X11/xorg.conf file with the following contents:

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection
Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection
Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1024x800"
    EndSubSection
EndSection


Apache no longer starts (AH02238: Unable to configure RSA server private key)

From your Vhost or website on apache the .crt file does not match the .key file.

I had this problem and had to contact my SSL provider to give me the private key file.

This can happen when you make a CSR online and had previously made a CSR server-side.

Hope that helps you.

(To prevent the start failure set your website to http port 80) during your debugging.


Did you install Kubuntu on top of an existing Ubuntu installation of another flavor? If so you might have a conflict with window managers trying to start simultaneously. If you can open a terminal, run "plasmashell" and see if your KDE environment loads. If this works, you need to figure out how to stop the previously installed WM from starting when starting a plasma session.


How to check command line requests routed thru Tor?

Usually software which is called from your shell doesn't know about about Tor or any other proxy. So you have to tell it. The bad thing is that many software has specific ways to set a proxy up. Below you find some ways to get Tor working on commandline. I assume that you run a combination of Tor and Privoxy at the IP address 127.0.0.1 and port 8118. This might not true in your case. So you should enter the correct values.

Proxy environment variable

There is a special environment variable which is respected by some shell software. Open your .bashrc (or other shell rc file) and enter the following lines.

export http_proxy="http://127.0.0.1:8118"
export https_proxy=${http_proxy}
export HTTP_PROXY=${http_proxy}
export HTTPS_PROXY=${http_proxy}

Applications like wget, GnuPG and curl are known to respect those values.

torsocks

Torsocks is a helper software with re-routes all requests through Tor. Just prepend the software to any command line call.

torsocks your-shellscript
torsocks wget http://example.org

Furthermore you can also use tor-resolve to get an IP address through Tor.

tor-resolve example.org
torsocks ssh $(tor-resolve my.server.example.org)

SSH

If you're using SSH, you can edit your $HOME/.ssh/config.

Host *
     ProxyCommand socat STDIO SOCKS4A:127.0.0.1:%h:%p,socksport=9050

This setting sends every SSH connection through Tor. However the keyword Host in ssh_config allows you to set it up for special hosts. Please have a look at the manpage of ssh_config.

Further ressources

The TorifyHOWTO at Torproject.org has advice for setting up different services. The toraliases might also give some hints and has a setup for IPtables.


Newsgroup notification in the indicator applet?

You can use the libnotify-mozilla application to achieve this, which is made available via a PPA. Further instructions on installation can be found on WebUpd8.


Why cannot I get a live-USB to use a partition for persistence?

Syslinux has not allowed persistent partitions on the same drive since Ubuntu 14.04.

However a Syslinux type install, (UNetbootin, Rufus, Universal), will use a persistent partition labeled casper-rw or home-rw if it is located on a different drive, either internal or external. It will use the first casper-rw file or partition it finds while booting

If you want a casper-rw partition on the same drive use grub2 type bootable disk creator like mkusb, (that works with BIOS and UEFI), or install grub2 to the USB manually and loop mount an ISO.

If you simply need more than 4GB persistence you can use YUMI to make the drive, it's casper-rw file can be larger than 4GB and there is a UEFI version.


Call a shell script from PHP, run as root

Your sudoers line is granting access to execute "my_script.php" while your shell_exec is invoking "my_script.sh".
When a password is not required, the requiretty option should be irrelevant.


You can install local DEB packages using the dpkg tool, and you do so by running the following command:

sudo dpkg -i <packagename>.deb

Make sure to replace <packagename> with the actual name of the package.

There is also a chance you may get dependency errors the first time you run this. If so, run sudo apt --fix-broken install, and then re-run the dpkg command and the package will install fine.


Adjust screen backlight on ancient HP, with Lubuntu 15.10

I'm not sure if it's applicable on your machine, but I have sometimes had luck using another approach than the GRUB_CMDLINE one. You might do better fixing settings in xorg's conf.d directories.
Here is a good guide on how one might do that:
http://itsfoss.com/fix-brightness-ubuntu-1310/

The guide is for Ubuntu 14.04, but I've had luck with it in Ubuntu 15.10 as well.


Reset python from 3 to 2 after anaconda modified PATH

Open a terminal  and type:

sudo -H gedit ~/.profile

This will open an editor. Check if there is a path for Python 3.

If in the above step you couldn't find the Python 3 environment variable, run:

sudo -H gedit ~/.bashrc

look for a Python 3 environment variable, and comment it out.


Bluetooth not working on ubuntu 14.04 with dell inspiron 15-3521

Similar steps as from Diabolik2. New information is where and how to get the hex file.

Sources:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1065400/comments/11
https://askubuntu.com/a/534632/336592.

To have a complete solution I write all my steps from the beginning:

Find ID of your device:

$ lsusb | grep Bluetooth

My output for example:

Bus 001 Device 003: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0

from which 0a5c:21d7 should be remembered.
Get a hex file for your device:

After searching for bluetooth drivers in Google I have chosen this download: http://drivers.softpedia.com/get/BLUETOOTH/Broadcom/Broadcom-43142-Bluetooth-40-Adapter-Driver-12007030-for-Windows-8.shtml#download
I have extracted the last .hex file by chance. Fortunately it worked. STEPS: In nautilus right-click on the downloaded .cab file > chose Open with Archive Manager > select last .hex file in the archive list > right click > Extract...
download and compile hex2hcd

$ git clone git://github.com/jessesung/hex2hcd.git
$ cd hex2hcd
$ make
convert the .hex to .hcd

 $ ./hex2hcd /path/to/extracted.hex /where/you/want/your_new.hcd

Copy the hcd file to /lib/firmware as lib/firmware/fw-0a5c_21d7.hcd.

In the filename use the ID which you have previously found out.


Is it a problem to have packages with "amd64" architecture when I have an intel cpu?

No, it will usually not cause any problems.

amd64, also known as x64, x86_64 and x86-64 refers to the 64-bit version of the x86 instruction set. It was developed by AMD (hence the name amd64) as an alternative to Intel's and HP's IA-64 architecture, as a means to add 64-bit computing capabilities to the existing x86 architecture.

Most recent Intel and AMD processors (with the exception of Intel's Itanium line) utilise the x86_64 architecture, so do not be confused by the name.


Fonts installed but 'multicols.sty' not found

As far I can understand, the file multicol.sty is contained in texlive-latex-base package.

Try to install it with sudo apt-get install texlive-latex-base.

For ngerman you should install texlive-lang-german with sudo apt-get install texlive-lang-german.

As steeldriver recommended, below is working TeX example:

\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{layout}
\usepackage{multicol}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
\firstname{}
\lastname{}
\setlength{\columnseprule}{0.4pt}
\begin{document}
    \section{headline}
    \hspace*{\hintscolumnwidth}%
    \begin{minipage}{\maincolumnwidth}
    \setlength{\hintscolumnwidth}{0pt}
        \begin{multicols}{2}
        \cventry{}{C\#}{basic}{}{}{} \par \cventry{}{UNIX}{basic}{}{}{} \par
        \cventry{}{vim}{basic}{}{}{} \par \cventry{}{\LaTeX}{basic}{}{}{} \par
        \cventry{}{HTML, CSS, PHP}{very basic}{}{}{} \par
    \end{multicols}
    \end{minipage}
\end{document}

It compiles normally from Gummi (sudo apt-get install gummi).

All needed TeX dependencies may be installed with

sudo apt-get install texlive-latex-extra lmodern texlive-lang-german texlive-latex-base


/home/jdoe doesn't appear after creating user named "jdoe"

As noted in man useradd
   -d, --home-dir HOME_DIR
       The new user will be created using HOME_DIR as the value for the
       user's login directory. The default is to append the LOGIN name to
       BASE_DIR and use that as the login directory name. The directory
       HOME_DIR does not have to exist but will not be created if it is
       missing.
If you want useradd to create the directory, you need the -m or --create-home option, or set the CREATE_HOME value in /etc/default/useradd:
   -m, --create-home
       Create the user's home directory if it does not exist. The files
       and directories contained in the skeleton directory (which can be
       defined with the -k option) will be copied to the home directory.

       By default, if this option is not specified and CREATE_HOME is not
       enabled, no home directories are created.


you can manually change the /etc/resolv.conf file after connecting to the VPN or you can set up one the ovpn files to do it whenever you connect. the trouble with both those is that the resolv.conf file gets overwritted periodically. not figured out how to change it permenantly yet without changing permissions on the resolv.conf so that it cant be overwritten


I suggest you try using USB stick and depending on distro, some software for writing the image to it.
In ubuntu go for Statup disc creator or unetbootin.
You can also try the dd method(read from this thread).

Startup disk creator works with cd/dvd also so give it a try.


when dual booting ubuntu before windows 7 what type of file system should ubuntu be set to?

Create a partition with ext4 filesystem for the installation of Ubuntu.


Install HPLIP Toolbox from Ubuntu Software Center.

Printer>add>Select your printer device>on conections choose HPLIP LINUX Imaging and printing


In the first case:

rename 's/\.bak$//' *.bak

you are running a regular expression against filenames and replacing the matching part of expressions (.bak at the end of a file name) with the second expression (which is empty).

In the second case:

rename 'y/A-Z/a-z/' *

you are matching against the regular expression pattern space and transliterating to the target. In other words, the range A-Z is changed to the range a-z, making the filenames lower case.

I suggest you look at the man page for sed for more commands and more details. I believe the 's' command is used most often. As well, regex (section 7) and perl documentation may also be of help. In particular, here's a tutorial on perl and regular expressions.

From man sed:

s/regexp/replacement/
       Attempt to match regexp against the pattern space.  If  success‐
       ful,   replace  that  portion  matched  with  replacement.   The
       replacement may contain the special character & to refer to that
       portion  of  the  pattern  space  which matched, and the special
       escapes \1 through \9 to refer  to  the  corresponding  matching
       sub-expressions in the regexp.

y/source/dest/
       Transliterate  the  characters in the pattern space which appear
       in source to the corresponding character in dest.


Do you have any space outside of the LVM? (A Windows partition, say?) If so, you could shrink it by a small amount (500MiB should be plenty, but in a pinch, even 100MiB might be OK) and create a /boot partition in that space. If not, you may need to shrink your LVM partition, which is unfortunately a bit awkward. This article I wrote a while ago covers the basics of doing this.


error processing package grub-efi-amd64-signed ubuntu 20.4

Try purging grub and reinstall. Worked for me!
sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub


other windows of same application get hidden when I close one of them

If the last window you used before the terminal you closed was Firefox, then it should get focus when you close that terminal. If it was another terminal, then that terminal should get focus. It is not clear from your question, but I hope this answered it in any case.


Why are the default permissions for /media/username root:root?

In my case this is how things look in /media:

$ ls -l /media | grep $USER
drwxr-x---+  3 root root 4096 Jan 22 15:59 oli

Basically this means that only a root user can interact with the directory. This is great for security (certainly stops other users seeing, let alone stealing/deleting/changing data) but that's not where the story ends.

You might notice the plus sign at the end of the permission mask. This means an ACL (Access Control List) is in use. This allows for far more granular permissions.

$ getfacl /media/$USER
getfacl: Removing leading '/' from absolute path names
# file: media/oli
# owner: root
# group: root
user::rwx
user:oli:r-x
group::---
mask::r-x
other::---

It's through ACL where my user is allowed to view the contents of /media/oli. I'm still not allowed to edit the contents.

The thing doing the mounting in modern desktops (both Gnome and KDE) is udisks2:

root      2882  0.3  0.0 195956  4048 ?        Sl   Jan16  30:35 /usr/lib/udisks/udisks-daemon
root      2887  0.0  0.0  47844   784 ?        S    Jan16   0:00 udisks-daemon: not polling any devices
root      3386  0.0  0.0 429148  6980 ?        Sl   Jan16   7:35 /usr/lib/udisks2/udisksd --no-debug

As you can see, it's running there as root, so when something accesses it over DBUS, it's able to create the mount-points within /home/$USER and chown them down to your user so they can edit the contents.

None of that changes what I said originally. I'm just explaining how it works in practice. This is how something on your desktop is in-effect allowed to write somewhere that is only allowed by root, and how your user is allowed to read it despite an otherwise restrictive ownership.

All that turns it into an environment that is secure for the user's data but one that also makes it hard for the user to meddle with the fabric of the mount. They can't, for example, delete the mount-point or rename it which could cause issues unless they have root access.

Edit: Something that just occurred to me is that it also gives an administrator a good place to mount things for a single user. The permissions by default help keep this mount private and protect this mount against the user's meddling. It seems like a fairly sane default for something that done without the /media/$user/ directory, would need root permissions.


Can't login to my XFCE environment from lxdm

I had the same problem. I found a helpful solution at the end of this thread.

Essentially,

Open /usr/share/xsessions
Open the xfce.desktop file with a text editor
Find the name value and replace the space with a dash or hyphen
Restart!

Hopefully this will help.


There's nothing to fix, and this is perfectly normal.

ext4 creates a lot of overhead before any files are created. It does not mean it is "worse" than ext3. If you fill that partition with files, you will notice that ext3's (and NTFS's) overhead will grow proportionally with the files, as with ext4 it will basically remain constant forever.

By "pre-allocating" the overhead, it can manage it much better than a growing one. So ext4 is just doing now what ext3 would do later.

Besides, 27G may look a lot, but it's still a mere 1.5% overhead. Compare that to the old days of FAT, where slack space could eat anything from 5% to 30% of your partition space, and you'll notice how greatly things have evolved since then.

Also, I strongly recommend against using -m 0. Reserved space is there for a reason: it lowers the fragmentation chances and saves some space for fsck. It is reserved only from users, but root (and thus all your software installs) can fully use it. If you think 5% is excessive, leave at least 1% .

Remember: there's no fragmentation nightmares in ext. But this beauty comes at a price. It needs free space as room for proper management. Give it to him and things will run much smoother. Besides, who ever uses their HDD beyond 90% before buying a larger one? So what's the problem about a 5% reserved space? It may save you the next time you accidentally create a dozen-GB file that fills up the whole partition and end up crashing the OS due to lack of space for other processes.

For a more detailed, further technical reading, read here


My website is accessible on my home network but nobody else can access it on the internet

You need to know the public address of your router.  192.168.2.1 is an internal IP address used in home networking - it also happens to be the address of the router right next to me, and I suspect the address of several million routers across the world.

You are looking for the address that your ISP assigns to your router.  If your comfortable with your routers configuration program, you could use that.  Otherwise, you could call your ISP.


Make terminal window directly transparent to Ubuntu wallpaper

I don't think you can force the transparency to display only your wallpaper on a system running Unity.

The reason can be found in one of the gconf settings of gnome-terminal on 14.04:

$ gconftool-2 --long-docs /apps/gnome-terminal/profiles/Default/background_type

      Type of terminal background. May be "solid" for a solid color,
      "image" for an image, or "transparent" for either real transparency if
      a compositing window manager is running, or pseudo-transparency
      otherwise.

The only way to get a pseudo-transparency (i.e terminal background set to the wallpaper) is by running Ubuntu without a compositing manager.

If your graphics card doesn't support 3d-acceleration, Gnome 3 automatically runs the fallback-mode (which is Kali's default mode). That's why you may have seen gnome-terminal showing only the wallpaper.

Source:

make gnome-terminal real transparent


Calibre has an Ubuntu version (from the main repository)

As does Sigil (via a PPA) : http://code.google.com/p/sigil/wiki/LinuxDistroPackages

Not sure what PDF-VIEWER is but Ubuntu has a PDF viewing application installed by default.


Click in your user name in the corner of your screen.
Select 'System Settings'
Region and Language
In the 'Layouts' tab click 'Options...'
Look for 'Miscellaneous Compatibility Options' group. Check if the 'Shift with numeric keypad works as in MS Windows' option is activated.


Ubuntu service started from /etc/init.d ends up with the wrong PID

I am posting the answer here in the hope that it will save others the hours of frustration I have had to endure.  The easy issue to deal with here is the nobody user that I talk of above. This happens quite simply because the nginx.conf file created by openresty - see

/usr/local/openresty/nginx/conf/nginx.conf

does not bother specifying a user. Just edit the first line

#user nobody so it reads user www-data www-data and that particular issue is sorted.

The second issue is the init.d script.  I am afraid that the openresty documentation has to take the blame here.  They go to some lengths to explain how to get openresty & how to compile it.  A few words on how to daemonize it would not have gone amiss.

After hours of groping in the dark I thought of searching for openresty init.d.  The very first result that came up was this one.  I am reproducing that script below

#!/bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Nginx Daemon"
NAME=nginx
PREFIX=/usr/local/openresty/nginx
DAEMON=$PREFIX/sbin/$NAME
CONF=$PREFIX/conf/$NAME.conf
PID=$PREFIX/logs/$NAME.pid
SCRIPT=/etc/init.d/$NAME

. /lib/lsb/init-functions

if [ ! -x "$DAEMON" ] || [ ! -f "$CONF" ]; then
 echo -e "\033[33m $DAEMON has no permission to run. \033[0m"
 echo -e "\033[33m Or $CONF doesn't exist. \033[0m"
 sleep 1
 exit 1
fi

do_start() {
 if [ -f $PID ]; then
    echo -e "\033[33m $PID already exists. \033[0m"
    echo -e "\033[33m $DESC is already running or crashed. \033[0m"
    echo -e "\033[32m $DESC Reopening $CONF ... \033[0m"
    $DAEMON -s reopen -c $CONF
    sleep 1
    echo -e "\033[36m $DESC reopened. \033[0m"
 else
    echo -e "\033[32m $DESC Starting $CONF ... \033[0m"
    $DAEMON -c $CONF
    sleep 1
    echo -e "\033[36m $DESC started. \033[0m"
 fi
}

do_stop() {
 if [ ! -f $PID ]; then
    echo -e "\033[33m $PID doesn't exist. \033[0m"
    echo -e "\033[33m $DESC isn't running. \033[0m"
 else
    echo -e "\033[32m $DESC Stopping $CONF ... \033[0m"
    $DAEMON -s stop -c $CONF
    sleep 1
    echo -e "\033[36m $DESC stopped. \033[0m"
 fi
}

do_reload() {
 if [ ! -f $PID ]; then
    echo -e "\033[33m $PID doesn't exist. \033[0m"
    echo -e "\033[33m $DESC isn't running. \033[0m"
    echo -e "\033[32m $DESC Starting $CONF ... \033[0m"
    $DAEMON -c $CONF
    sleep 1
    echo -e "\033[36m $DESC started. \033[0m"
 else
    echo -e "\033[32m $DESC Reloading $CONF ... \033[0m"
    $DAEMON -s reload -c $CONF
    sleep 1
    echo -e "\033[36m $DESC reloaded. \033[0m"
 fi
}

do_quit() {
 if [ ! -f $PID ]; then
    echo -e "\033[33m $PID doesn't exist. \033[0m"
    echo -e "\033[33m $DESC isn't running. \033[0m"
 else
     echo -e "\033[32m $DESC Quitting $CONF ... \033[0m"
     $DAEMON -s quit -c $CONF
     sleep 1
     echo -e "\033[36m $DESC quitted. \033[0m"
  fi
}

do_test() {
 echo -e "\033[32m $DESC Testing $CONF ... \033[0m"
 $DAEMON -t -c $CONF
}

do_info() {
 $DAEMON -V
}

case "$1" in
 start)
  do_start
  ;;
 stop)
  do_stop
  ;;
 reload)
  do_reload
  ;;
 restart)
  do_stop
  do_start
  ;;
status)
    status_of_proc -p $PID "$DAEMON" "$NAME" && exit 0 || exit $?
    ;;
 quit)
  do_quit
  ;;
 test)
  do_test
  ;;
 info)
  do_info
  ;;
 *)
  echo "Usage: $SCRIPT {start|stop|reload|restart|quit|test|info}"
  exit 2
  ;;
 esac

 exit 0

An omission in the original script which I have corrected - there was no status method.


How can I list all the packages that come on a default snap?

You can often find the packages that a snap bundles as dependencies by going to /snap/yourSnapName/current/snap/snapcraft.yaml.in or /snap/yourSnapName/current/snap/snapcraft.yaml. Or you can try and find the snapcraft.yaml in a GitHub repo online.

That's not a complete answer for your use-case, I think a manifest might be what you're looking for? That feature has not yet been developed.


Backspace, Tab, Del and arrow keys not working in terminal (using ssh)

EDIT: Reference: Mateng's answer

Mateng is close in that I think you're probably running Bourne Shell.  But you shouldn't be editing your /etc/passwd file directly.  Try using the chsh command instead:

chsh -s /bin/bash

The -s flag will make the new shell (Bash in this case) your login shell, going forward.


You can use this PPA for the latest beta release:

  A custom build of the latest beta release of MonoDevelop (built from
  the tag in git) that can be installed parallel to the version included
  in the official Ubuntu repositories.

sudo add-apt-repository ppa:ermshiperete/monodevelop-beta
sudo apt-get update
sudo apt-get install monodevelop-current

The latest version today is 5.9.0.427 for Precise, Trusty, Utopic and Vivid.

If there are problems during installation, similar to mine in Vivid, then just install the dependencies manually, e.g.:

sudo apt-get install gtk-sharp-4.0
sudo apt-get install gnome-sharp-4.0
sudo apt-get install mono-addins-4.0
sudo apt-get install jscall-sharp-0

The above were mine, you might have more/less then these.


No boot option after UBUNTU 12.1 installation on another hard disk

Grub2 probably got installed on the Ubuntu hard drive, while the machine is booting off the First (Windows) drive.  Change the boot order in BIOS to boot off the second hard drive first and you should either get a boot menu with both OS's listed, or it may boot directly into Ubuntu.

If it boots directly into Ubuntu then you should update the grub boot menu with the command

sudo update-grub


Bluetooth doesn't work at system boot Ubuntu 17.04

Something is not installed by default for Bluetooth. In Ubuntu Software Center search for: Bluetooth Support.

This package provides all of the different plugins supported by the Bluez Bluetooth stack.


For unclear reasons, when you edit the icon of an application's .desktop file with Alacarte, Alacarte edits the Icon= line, but also removes a possible extension from the icon's name.

Editing the icon manually will fix the issue, and your icon will be correct.


Unable to mount /dev/loop0 during install

The checksums (MD5) can be found on releases.ubuntu.com.  I would suggest you do the following:

Check that the MD5 checksum of the ISO image you downloaded matches the one in the aforementioned link, by following these directions.
If that looks okay, boot the CD and press the Spacebar key when you see the keyboard icon in the bottom-center of the screen.  Select your language, then the "Check CD for defects" boot option.

If neither of those produce any errors, please file a bug here, following these instructions to attach /casper.log to it.


I've had the same issue in xmonad - while the compose key was working fine in "Gnome Flashback (Metacity)", it had no effect when I used it in "Gnome Flashback (Xmonad)".

I tried all kinds of solutions, including setting the compose key in gsettings (As described in the question) and trying different options in im-config and others in the related bug report.

What finally worked for me was a simple:

  setxkbmap -option "compose:lwin"

(I'm using the left Windows-key as compose key, replace with "compose:menu" to fully answer the question)

To make this permanent on Ubuntu 16.04 for your user, add the command to ~/.xsessionrc:

echo '/usr/bin/setxkbmap -option "compose:lwin"' >> ~/.xsessionrc


This problem was likely due to a firmware issue reported with the Dell u2414h monitor.  Using an HDMI vs displayport cable seemed to instantly return monitor support.

Of greater utility, resetting the BIOS by removing the CMOS battery on the motherboard was helpful in returning the BIOS to its original configuration without monitor support.


What is the difference in /home locations between nautilus and the command-line?

I think Nautilus just changes the actual path to visually show 'Home' instead. The path is not different in Nautilus, it just shows it like that in the GUI.

Press Ctrl+L in nautilus to view the actual path.


Can I install Unison for Ubuntu 18.04 LTS on Ubuntu 20.04 LTS?

I think a better solution is

Purge the current installation
Install the former Debian version on the Ubuntu 20.04 LTS server:

wget http://ftp.fr.debian.org/debian/pool/main/u/unison/unison_2.48.4-1+b1_amd64.deb
sudo dpkg -i unison_2.48.4-1+b1_amd64.deb

wget http://ftp.fr.debian.org/debian/pool/main/u/unison/unison-gtk_2.48.4-1+b1_amd64.deb
sudo dpkg -i unison-gtk_2.48.4-1+b1_amd64.deb

Then set them on hold aptitude hold unison unison-gtk.
Follow https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1875475 to see when it will be fixed.


Installing this package seems to be problematic on Ubuntu, because the version of PHP shipped in the official Ubuntu repositories is not compiled with the necessary options. Namely, tring to install it with pecl install pthreads-1.0.0 results in

checking checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled

The most straightforward way to fix this seems to be to use PHP packages with ZTS support enabled, which can be found in some PPAs (such as this one). Then, installing the PHP Pthreads extension through PECL should work (I have not tested this).


How to enlarge the Text Input field size in Empathy?

The text field resizes itself after entering text more than one row (or when pressing Shift+Enter to insert a line break).

I don't know any option that enables a different default size.


Volume control not working on one account

You can try the following (one after the other):

make sure the affected user is not in the audio group, then reboot.
rename (or delete) the hidden directory ~/.pulse for removing erroneous user settings from the affected account, then log out and back in.
Unlikely cause, but if present remove external audio devices (e.g. earphones), then reboot.


From the comments...

Uninstall your current dkms driver (https://github.com/tomaspinho/rtl8821ce)...

cd rtl8821ce          # old source folder
sudo ./dkms-remove.sh # uninstall old dkms driver

And try this one... https://github.com/shubham151/rtl8821ce. (git clone https://github.com/shubham151/rtl8821ce.git). Don't follow the ReadMe there for how to install it, rather, follow the same procedure that you did before, so that you get the dkms install.

git clone https://github.com/shubham151/rtl8821ce.git # git clone new driver
cd rtl8821ce             # new source folder
chmod +x dkms-install.sh # make executable
chmod +x dkms-remove.sh  # make executable
sudo ./dkms-install.sh   # install new dkms driver


16.04 SERVER USING vsftpd using tls getting ECONNREFUSED

If anyone having the same issue, removing the following lines solved the problem for me:

ssl_tlsv1=YES
ssl_tlsv2=NO
ssl_tlsv3=NO


for package lists have a look at http://packages.ubuntu.com/.

there is also a list of all sections or all packages for Ubuntu 16.04 LTS (xenial).

at the moment for glibc this can be offered...
--> this means for now it can't be answered completely because a feature freeze is usually approximately 2 months before the release, so there might change something!