If I place a shell script in /etc/cron.daily/
, at what time of the day will it be executed?
Malabarba's questions
I like to experiment with lots of different software in my Ubuntu install. Then, every time Ubuntu reaches a new release cycle, I simply do a clean install (instead of upgrading) to get rid of all the extra software (and their respective config files/folders). The only thing I always backup and carry to the next install (besides personal files) are the config files for gnome, so my desktop is always the way I like it. =)
The problem with that, is that the different packages I test out never get properly uninstalled, so my gnome main menu is full of broken links referring to software I had in previous installations (which got carried over because I kept the gnome config files).
Is there any automated way to go through my gnome main menu and remove any broken links? I know how to manually edit the menu, and I could go through it myself, but I'm looking for some script or package that will clean for me so I wouldn't have to do it manually every release cycle.
I'm currently using 2 workspaces on Ubuntu 10.10, and compiz.
Is it possible to completely remove the gnome panel from one of the workspaces? I'd like to have a clean desktop to work with on the second workspace, and a regular desktop with panels on the first workspace. Is that at all possible?
My top gnome-panel is set to not expand and sits on the top-right of my screen. I just realized I wouldn't mind if maximized windows were able to get behind it (it wouldn't actually cover up anything). Is it possible to achieve that with the gnome-panel?
Here's what it looks like now:
Ideally, the window's titlebar would be behind the panel (partially obscured by it). I know that different dock softwares like AWN are able to do that, but I'm running a weak netbook, and I would rather do that with the gnome-panel.
I want to run a command on a ssh-server, but this command is determined by a script on my local machine. How do I do that?
An example for clarity:
I want to write a script here (foo.sh) that takes an argument. If I run ./foo.sh 0
it should somehow send a shutdown signal to the server machine, but if I run ./foo.sh 1
it should send a restart signal.
I know how to manually login via ssh, and I've already set ssh-keys to skip passwords, but I don't know how to automate the procedure with a script.
I'm writing a simple bash script, but I need it to check whether it's being run as root or not. I know there's probably a very simple way to do that, but I have no idea how.
Just to be clear:
What's a simple way to write a script foo.sh, so that the command ./foo.sh
outputs 0
, and the command sudo ./foo.sh
outputs 1
?
I have a headless Ubuntu-server running at work, and I connect to it from my home Windows machine through Putty. I've logged in with putty, and I need to run a program back at the server (a java package) but it won't run without an X11 display. This is the error I get:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
I've never used a remote graphical session before, so correct me if I speak nonsense. The thing is, I don't really need a gui to interact with this software, I just need it to run as if there was a gui. So, what's the easiest way for me to get it to run on the server via remote login? It can be an actual display session, or some kind of emulated display that the application could output to. The important is that I can start it from a command-line-only Putty window, and that it won't stop when I log off.
I read that xvnc
might do the trick, but I didn't get how to do it.
Was I clear enough?
I'm using Gnome-Do with the "Files and Folders v2.5" plugin. I set it to read my .scripts folder, so that I might run my personal scripts from Gnome-Do. The only problem is that Gnome-Do's standard action for shell scripts is to open them instead of running them. That forces me to Tab and scroll-down every time. How can I change Gnome-Do's standard action?
An example for clarity:
I have a foo.sh executable file inside my .scripts folder. When I type foo inside Gnome-Do, it correctly selects the file and offers the Open action. I then have to Tab, press Down, and hit Enter to select the Run action instead. I would the Run action to be first on the list.
Alternatively, a more appropriate way to integrate Gnome-Do with personal scripts would be fine as well.
I fresh installed Ubuntu 10.10 back when it came out, and my laptop was suspending fine. All of a sudden, I can't get my laptop to suspend anymore. It's an HP Pavilion dv2-1110, but I don't think it's a hardware issue, here's why:
- It suspended fine upon first install. I haven't installed any new kernels since then, but I have installed tons of packages, so it's probably a package.
- The suspend and hibernate options disappeared from the shutdown menu. If I press my keyboard's suspend button (or if I close the lid) I get the following message:
- If I try the command
pmi action suspend
, I get the error message:Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal was not provided by any .service files
. - If I try the command
echo -n mem > sudo /sys/power/state
I get absolutely no output and no visible effect.
What might be causing this behavior? I thought a list of installed packages might be useful, but it's huge and I don't know how to post it here in collapse/expand mode or something.
EDIT:Just in case someone asks, none of the installed packages are kdm or anything like that (which would justify the lack of options in gnome's shutdown menu).
I've got a USB mouse attached to my Ubuntu notebook. This mouse is (unfortunately) really sensitive, and so it sometimes gets hard to hit small icons with the mouse pointer. This is really a hardware issue, it's not a bug and it's not Ubuntu's/gnome's fault. Still, I would very much like to this issue through software (solving through hardware would imply buying a new mouse).
Back in Windows, if I set the sensitivity as really low it was comfortable enough. In Ubuntu, even the lowest sensitivity and acceleration available (in the System>Prerences>Mouse menu) is still frustrating. How can I decrease it below the default minimum?
I tried xset
, but it seems xset
only deals with acceleration and threshold, but not actual sensitivity.
When you want to resize a window in gnome (as well as in other systems) you can click-and-hold at the window's border and than drag it. The problem is (and do correct me if I'm wrong here) that the draggable border is just a couple of pixels thick in gnome. That tends to be a little frustrating, and contributes to my wrist pains from using the mouse, as it requires very careful movement of the mouse.
How can I change the thickness of the area I can click in order to resize a window? I don't want to increase the appearance of the window border, I'm not talking about eye candy here. I want to fine tune this functionality where I can resize a window by dragging its border.
Is there a setting somewhere that will change this?
I have two versions of ubuntu installed on my laptop 10.04 and 9.10. They are installed on separate partitions (let's say /dev/sda1 and /dev/sda2 respectively), but I forgot which is which. I'm now booting through liveCD (I'm troubleshooting a grub issue), but I need to know which partition contains the lucid install.
I have full access to the contents of each partition, so it must be easy to find out. I just don't know which file to look into.
I use my laptop with Ubuntu-desktop to do all my work, but I also have a low-end desktop over at my office just sitting there. I've decided I'm going to install Ubuntu-server on it and use it to mirror my entire laptop home folder, to make things easier when I decide to format my laptop's hard-disk.
Whenever I'm at work, both machines are connected to a network and communicate easily (and high-speed) via ssh. When I'm not at work, the desktop is still accessible via ssh. Ideally, the syncing would take place automatically in the background, whenever I change something. It only needs to be one way: the changes I make on the laptop have to be synced over to the server, but the inverse is not necessary.
I know there's software for this out there, my question is: What software can I use to achieve the above objectives and also take full advantage of local-network speeds when I'm at work? Since I'll sometimes deal with large files, the syncing process needs to realise that the two computers are sharing a local network, and then take advantage of that (instead of always syncing through the internet).
Just to be clear, over-the-network syncing is actually more important to me here than over-the-internet syncing. I ideally the software would check if the former is available and, if not, try the latter; but if that's not possible, the first case is my priority.
Hope this isn't too long. Thanks in advance.
I'm using 2 workspaces right now, and I'd like to be able to cycle through them using a single shortcut. At the moment, I can do Ctrl+Alt+Right to switch to workspace 2, and Left switches to 1, but I'd like a single key (or key combination) to switch to the workspace I'm not in right now. That way I would only need that shortcut, and not need two.
I'm running Ubuntu on an old machine, and that keeps me from enabling compiz at all. I tried writing a script using both wmctrl
and xdotool
, but neither work properly (no matter what I do, they both will only switch to workspace 1, and never to 2).
Any suggestions?
From what I can gather, .desktop
files are shortcuts that allow application's settings to be customized. For instance, I have lots of them in my /usr/share/applications/
folder.
If I open that folder in nautilus
, I can run these applications just by double clicking its associated file, e.g. double-clicking firefox.desktop
runs Firefox. However, I can't find a way to do the same thing via terminal.
If I do gnome-open foo.desktop
it simply opens foo.desktop
as a text file. If I make it executable and then run it in bash it simply fails (which is expected, it's clearly not bash script).
EDIT: Doing exec /fullpath/foo.desktop
gives me a Permission denied
message, even if I change ownership to myself. If I make executable and do the same command, the terminal tab I'm using simply closes (I'm guessing it crashes). Finally, if I do sudo exec /fullpath/foo.desktop
, I get an error reporting sudo: exec: command not found
.
That's my question, how can I run a foo.desktop
file from the terminal?
Whenever I open more than one file at the same time with emacs, as in:
emacs foo.dat bar.dat
The window that opens will be split between the two files (a buffer for each file). I would like to avoid that. Is there a line I can place in my .emacs
file to keep that from happening? I would like emacs to only open one buffer in the window, no matter how many files I'm loading.
I'm using version 23.1.1.
I use pidgin as my chat client on ubuntu lucid. Whenever I have a chat window open, I like to mark it as "Always on visible workspace" as it's just more convenient.
Is there a way that I can force chat windows to already be marked as that when they open up? So, if someone started a conversation with me on gtalk (for instance) the window would automatically be on all workspaces, and I wouldn't have to mark it manually.
Recently (I don't don't know when, might have been after an update) the sound indicator disappeared from my panel, and I haven't been getting any sound either. I tried installing the indicator-sound
package, but all I got was this error message:
The following packages have unmet dependencies:
indicator-sound: Depends: libido-0.1-0 (>= 0.1.1) but it is not going to be installed
E: Broken packages
Seems to be a bug, but how do I get around it? Could I install an older version of libido? If so, how do I do that?
Everything had worked fine until a couple days ago, so I'm sure that the package is the problem.
EDIT:The command $ dpkg --get-selections | grep libido
returns the following output:
libido-0.1-0 deinstall
Ok, that's embarassing. Yesterday I uninstalled and reinstalled the libido package half a dozen times, and the indicator-sound package kept reporting the same error. Today, however, I just installed the libido package and now the indicator-sound package installed with no errors. Maybe the system needed a reboot or something.
(Should I answer my own question or just wait for a moderator to close it?)
I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.
This sometimes happens to me with the CPU usage. When it does, I just run a top
command to find out which process is responsible and then kill
it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top
command only tell me my total network usage, neither of them tells me process specific network info.
I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?
The command iftop
gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.
I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue.