Feeds:
Posts
Comments

Posts Tagged ‘command’

If you find yourself trying to figure out which package contains a certain command, or any other file for that matter, apt-file is a command that will make this easy. It probably won’t be installed by default, so do so with this command:

sudo apt-get install apt-file

You will then be presented with the message:

The system-wide cache is empty. You may want to run ‘apt-file update’ as root to update the cache. You can also run ‘apt-file update’ as normal user to use a cache in the user’s home directory.

It’s probably best to run the former option (that is, as superuser), so enter the following:

sudo apt-file update

Let it update the cache, then you can search for the command or package or file. Simply use apt-file search followed by whatever it is you’re looking for. For example, we’ll search for the command ccsm, which is what runs the Compiz-Config Settings Manager, as there is no actual package of that name:

apt-file search ccsm

You might find the list presented is quite long, so it may pay to set your terminal to unlimited scrolling beforehand. In the case of the example, the line we’re looking for:

compizconfig-settings-manager: /usr/bin/ccsm

is not visible, since it is right near the top, which is beyond scrolling. If this happens to you, edit your terminal settings and run the command again.

Generally speaking, if it’s a command/program, then the line that has /usr/bin/ followed by the command (like ccsm) will be the correct one. The actual package that contains it will be listed at the beginning, in this case being compizconfig-settings-manager.

Remember, this can work with other types of files too, so if you’re looking for a specific config file or icon or whatever, just specify that at the end of the command. Eg:

apt-file search ccsm.desktop

Hopefully this is all you need to find that elusive file, or the package that installs a program you’re after.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

At times when using the terminal, the output from a command can be so long, you simply can’t scroll to the beginning, as it is no longer in view. But you can actually set the terminal to display as many lines as you like, or even set it to unlimited scrolling.

In the terminal, go to Edit > Profile Preferences, and in the Scrolling tab you will see there is a default amount of lines to be displayed (probably something like 512). If you have an older computer and are worried about memory, you can up the amount to 2000 or thereabouts, as that should suffice, otherwise the best option is to place no limit on the amount of lines displayed. Under that, you will see “Unlimited“, so check that, and from the next command onwards you won’t have that limitation any more.

Various terminals available might differ as to where to change that setting (like a Settings menu, or Edit > Preferences or Tools > Settings), but they all should have it, and you should find it easy enough.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

If you upgraded to Ubuntu 11.04, you might find that some of your familiar icons in the notification area of your panel’s system tray are missing. These will include such system apps as the Update Manager, but more importantly those programs you are running that usually put icons or indicators there.

Some of these might be used for bringing the related programs to the foreground (which is the only way to access those that disappear when minimised, like Firestarter and Vuze), while others are completely useless if not shown in the notification area. A good example of the latter is Parcellite, a clipboard manager which sits in the system tray, and which you can’t access any other way.

So, in Unity, you might not even be sure certain apps are running, without opening the System Monitor. They’re actually open and still trying to put their icons there, but are being prevented by a default Unity setting. But it’s easy to fix, either by the hands-on/visual approach, or the quicker command-line method.

Dconf Editor

First off, if you don’t have Dconf Editor installed, do so by entering the following into a terminal:

sudo apt-get install dconf-tools

To open it, hit Alt+F2 and enter dconf-editor. Navigate to desktop > unity > panel, where the value for the systray-whitelist entry should look something like: [‘JavaEmbeddedFrame’, ‘Mumble’, ‘Wine’, ‘Skype’, ‘hp-systray’, ‘scp-dbus-service’]

You can manually add programs and indicators to it (eg: [‘JavaEmbeddedFrame’, ‘Mumble’, ‘Wine’, ‘Skype’, ‘hp-systray’, ‘scp-dbus-service’, ‘your-indicator-here’]), or you can just get it to show all notifications (which would be preferable, since any programs you install in the future would be included there).

Simply click the systray-whitelist entry and type ['all'] over what is there. That should restore all your usual system tray icons, which were always running, just not visible. To complete this, you will need to run (via Alt+F2) unity --replace to refresh Unity.

Terminal Command

It’s even easier to do this via the terminal (or Alt+F2):

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

Once again, you’ll need to refresh Unity to see your changes.

Extra Notes

No Notifications: If you actually want no notifications showing up, leave the value empty. Actually, it will need to be [”] (that’s two single-quotes inside the box bracket), which you can do manually, or by the following command:

gsettings set com.canonical.Unity.Panel systray-whitelist "['']"

Don’t Refresh Unity in Terminal: Use Alt+F2 to refresh Unity, as while running unity --replace in the terminal is fine, if you halt that process, or close the terminal window, Unity will crash. While that isn’t a major deal, it will however leave you without a way to rectify this, as Alt+F2 will not produce the Run dialogue (since the panel isn’t running – which also means no way to log out or restart). You may also find that if you manage to get a terminal up (like if you have a launcher for it on your desktop), you won’t be able to type anything into it.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

If you’ve upgraded your system to Ubuntu 11.04, you may notice the handy Run Application dialog seems to be missing. Or you may be a total newbie with a fresh Natty Narwhal system who is wondering what’s this useless Alt+F2 key combination everyone keeps mentioning in forum posts.

Well, the handy way of running commands without opening a terminal – hitting Alt+F2 to open the Run Application dialog – is disabled in 11.04, but you can easily enable it again.

You will need to edit a Compiz-Fusion setting, so open System > Preferences > CompizConfig Settings Manager; if it isn’t installed, just run sudo apt-get install compizconfig-settings-manager in a terminal.

Once open, in the General section you will see Gnome Compatibility; if it isn’t already checked, then do so to enable this plugin.

When you click on it, you will see a couple of legacy options, one being Run Dialog, which you will notice is Disabled.

Click the Disabled button, and a box will appear letting you enable it.

As soon as you check Enabled, a box will appear to let you choose the key binding.

Rather than click on Shift, Super, Ctrl or Alt, click the Grab key combination button, and hit your key combo, which you’ll probably want as the familiar Alt+F2 (you can of course choose any available combo you like, but at least you won’t get confused if seeing guides and forum posts talking about Alt+F2).

Once the Edit Run Dialog box reappears, click OK to finalise the key binding.

You will see that all is as it should be, and can close the settings manager.

After that, you’ll be able to run commands quickly by hitting Alt+F2 and typing them in the Run Application dialog, or by choosing them from the menu of previous commands. The other benefit of this method of running commands is that you would usually need to keep a terminal window open for many commands, or else they’ll cease to run, whereas when invoked through the dialog they’ll continue to run once the Run Application dialog has disappeared.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

If you upgraded to Ubuntu 11.04 (or installed a fresh Natty Narwhal system) and are running the Classic desktop, you may find something amiss with the ability to bring folder windows or programs to the foreground by holding an item over its taskbar button until it appears.

For example, you’re looking in a folder at a sound file you downloaded, and wish to play it in Banshee, which is already open but hidden from view. Normally, you would drag the file over the Banshee taskbar button in the bottom panel, wait till Banshee appears, then drop the file onto it.

A more common use is perhaps file management, when you’re dragging files and folders from one Nautilus window to another which is hidden from view. This is most handy, as it means you don’t need to carefully line up both source and destination folders before doing the drag-and-dropping.

But you may find something is preventing you from doing this, with the only thing happening is a + sign appearing, and if you finally let go on the panel instead of press the Esc key, a launcher will be created there, which you then have to remove. This is not some new setting you can change in Nautilus‘s preferences (which is evident if you try with another file manager like Thunar), but a Compiz bug. While that obviously needs to be ironed out, there is a way around this, which is to run the following command in a terminal:

compiz --replace

Note that the next time you restart, things will be back as before, but at least you can just run that command again (which you can easily do by hitting the up arrow when in the terminal, or pick from the menu in the Run dialogue via Alt+F2).

Also note that if you try adding that command to your startup programs, it will likely do nothing, but you can always make a launcher for your panel, which you can then click once everything has loaded, or when you go to drag stuff via the taskbar and remember you need to.

This bug will likely be fixed soon enough, but at least there is a way around it for now. If you’d like to add your voice to the bug report (since more voices mean quicker action), click here (note that if you haven’t already got a Launchpad account, it only takes a couple of minutes to join, and is worth the small effort, since you can then report your own bugs).

ΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘΘ

Can’t get the Run Application dialog to appear when you hit Alt+F2?

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Most Linux users have had to deal with the command-line at least once or twice, and it is the only way to run most commands, and simply the quickest for others. For those quite familiar with the terminal, it isn’t all that uncommon to see multiple terminal windows open, each one running a different program or command. But you can actually run more than one command at a time, all in a single terminal, simply by getting it to run in the background.

The key-combo Ctrl+Z stops a command without exiting, and gives you back a command prompt. You can use this to run several commands at once, as the command is in effect paused.

At the prompt, type fg to bring the command back to the foreground, or bg to tell it to resume in the background. Either will resume the paused command, but with bg it continues in the background, meaning you can continue to use the terminal for other commands.

Append an ampersand (&) to the end of a command to start a command in the background. If you forget to do this, all you have to do of course is Ctrl+Z then bg at the prompt.

Type jobs for a list of current jobs.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Older Posts »