Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Wednesday, 11 February 2015

How change a file on a read only partition? topic






I have a file where is defined the 'menu boot' for example:


Quote:





label live
menu label ^Try Ubuntu without installing
kernel /casper/vmlinuz
append file=/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --




But it is into a read only partition, i can't mount (remount) it with read/write privileges

How can i edit that?
I need to change only this file. I have more partition. It is into /dev/sdb1






Tuesday, 10 February 2015

Avidemux: How to index file types other than just mpg topic






Hey all,

I'd ask this on avidemux.org, but their registration appears to be disabled for some reason.

Anyway, maybe someone here will know this:

When I open an MPEG file with avidemux, it gives me the option to build an index (which it stores in a file). Once built, I can scroll really smoothly through the video and everything. It does not give me that option for other file types (e.g. mp4), and so I can only scroll in too-large chunks (1-10 second intervals), or frame-by-frame, neither of which is appealing.

Is there a way to force it to build a proper index for all file types, or is MPEG somehow special? Since I can always go frame by frame, it would stand to reason that it should be able to index anything, after it's been loaded into memory.

Thanks much!






[ubuntu] phpmyadmin file size limit topic






Hi, I've just purchased a VPS with Ubuntu 14.04.1 LTS and Plesk 12 Web Admin Edition.

I have to import to phpmyadmin a large wordpress database (30MB). Unfortunately the max file size allowed by phpmyadmi is 2,048MiB. It's not possible to change this value via the Plesk panel. How can I change this value via SSH?

I've already tried this but without any effect.

Thank you






Monday, 9 February 2015

Problems with ExFat file system. topic






Hey People!

I was doing some research some time ago because I needed a system file which was compatible with Windows, MacOS and Linux, and in addition capable of holding bigger than 4GB files.
I found that exFat in principle could do it. So i formated my hard drives using this file system.
However, I am now trying to do a backup of my old files and bringing a bit of order to my files and I encounter sometimes a strange problem. The external hard drive just would unmount alone when i try to move or copy files from one folder to a different one,
giving me an error saying something like:

Transport endpoint not found (I'll edit this line with the correct words when I get the exact error again)

and i would need to unplug the disc, and plug it again. The files which are affected are usually always the same ones, and I would have no real access to them anymore in any way... Trying to read them or open them with a program would bring me the same error.

Does somebody know how can I solve this? I would format my HD in a different file system, but right now I have no extra HD where I could copy between 1 and 2TB of data to be able to format the original drive.

Thanks a lot in advance, and sorry if this is not the right forum to post, but I could not find a solution on the search bar...

Cheers,
Tachan






Cannot decrypt file topic






Hi,

What would be the problem here


Code:


cr2 bk1.zip.enc
Error decrypting PKCS#7 structure
140322686195360:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:539:


Thank you






Saturday, 7 February 2015

.desktop file not shown in dash topic






Hi there,

Recently I made two scripts, one that will close some apps, the other will reopen previously closed apps. Here are thee bash scripts:

Code:


#!/bin/bashkillall -9 diodon
killall -9 thunderbird
killall -9 my-weather-indicator
killall -9 alarm-clock-applet
killall -9 caffeine-indicator
killall -9 psensor
killall -9 CopyAgent


and


Code:


#!/bin/bashdiodon &
thunderbird &
/opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator &
alarm-clock-applet --hidden &
caffeine-indicator &
psensor &
/opt/copy-client/CopyAgent &


When I execute them in terminal by their absolute pat they work as I desire. Here is what I type in gnome-terminal:

Code:


Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/killapps.sh

and


Code:


Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/startapps.sh


So far so good. But then I want to add them in dash for easy access. To do so, i created two .desktop items in "/home/borche/.local/share/applications" with following content:

Code:


[Desktop Entry]Version= 1.0
Name=Game Mode Off
Comment=This is my comment
Exec=Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/startapps.sh
Icon=utilities-terminal
Terminal=false
Hidden=false
Type=Application
Categories=Utility;
Name[en_US]=GameModeOff


and


Code:


[Desktop Entry]Version= 1.0
Name=Game Mode On
Comment=This is my comment
Exec=Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/killpps.sh
Icon=utilities-terminal
Terminal=false
Hidden=false
Type=Application
Categories=Utility;
Name[en_US]=GameModeOn


- When I tried to double click from nautilus i got an error:

Code:


Untrusted application launcher
The application launcher “GameModeOff.desktop” has not been marked as trusted. If you do not know the source of this file, launching it may be unsafe.


- But if I made the .desktop files executable they work as desired, no errors, but I cant't find them by searching the dash.


I tried to validate both .desktop files for any kind of irregularity by typing:

Code:


desktop-file-validate .local/share/applications/*.desktop

and no errors, so I guess they are good.


Now I'm reading other similar threads but I can't find the right solution. Both .desktop files appear to work as desired if I access them via nautilus or gnome-terminal but they can't be found in dash by typing their names.


Thank you.






[ubuntu] failed to load COM32 file menu.c32 topic






Have been trying to install a Linux distro onto my flash drive using Unetbootin. But after selecting my flash drive in the BIOS and then trying to run the distro, all i get is: failed to load COM32 file menu.c32? Does anyone know what is going on here, and if so, how i might remedy it please.






[ubuntu] Is it possible to recover a really small file after re-installing Ubuntu 14.04? topic






Hey guys,
Few days back I had to re-install Ubuntu 14.04. But unfortunately I forgot to backup this one tiny file (less than 1 MB) that was in my home directory.
Now although I'm not very hopeful I am still hoping if someone could tell me if there's even a bleak possibility of recovering that file. Thanks.






Friday, 6 February 2015

ubuntu can't find shared library libcudart.so.5.0, but the file is there topic






hi, I am learning programming in cuda. So I installed cuda toolkit 5.0 on my Ubuntu 12.04 64bit. And I tried running some cuda sample programs a few days ago, they were running smoothly. Until today, the computer suddenly complains :" error while loading shared libraries: libcudart.so.5.0: cannot open shared object file: No such file or directory"
But I checked the folder where the shared object file is supposed to be, it is still there! Please see the picture that I uploaded.

So will anyone tell me how I can have the computer "see" the shared object file?
PS: I can go around the problem by making a copy of the libcudart.so.5.0 file in the folder where the executable file is located. But it's not the best way to go.....











Attached Images












[ubuntu] file permission s flag topic






hi, i'm currently reading 'Hacking, the art of exploitation' and try to reproduce some of the examples there. One example would be to change the file permissions seeting the s flag on file, so it can be executed by any user as if it would be the file owner. what i'm doing is the following...


Quote:





[kbear@HECHTNY]:~/Dev\> ls -la uidcheck
-rwxr-xr-x 1 kbear kbear 8621 Feb 6 15:42 uidcheck
[kbear@HECHTNY]:~/Dev\> ./uidcheck
real uid: 1000
effective uid: 1000
[kbear@HECHTNY]:~/Dev\> sudo chown root:root uidcheck
[kbear@HECHTNY]:~/Dev\> ls -la uidcheck
-rwxr-xr-x 1 root root 8621 Feb 6 15:42 uidcheck
[kbear@HECHTNY]:~/Dev\> sudo chmod u+s uidcheck
[kbear@HECHTNY]:~/Dev\> ls -la uidcheck
-rwsr-xr-x 1 root root 8621 Feb 6 15:42 uidcheck
[kbear@HECHTNY]:~/Dev\> ./uidcheck
real uid: 1000
effective uid: 1000
[kbear@HECHTNY]:~/Dev\>





the uidcheck file is a simple program that prints the userid as well as the effective userid (using getuid(), geteuid() respectively, see code below). after changing the owner to root and changing the file permission w/ the s flag i would expect the ids to be different and not the same. i did the same thing on the live-cd provided w/ the book and there it seems to work all fine.

Am i missing something or is this a security feature preventing this kind of change of file permissions.

thanks for the help

regards



Code:


#include <stdio.h>

int main(){
    printf("real uid: %d\n",getuid());
    printf("effective uid: %d\n",geteuid());
}








copy file to other machines, change filename based upon extension topic






I'm at a total loss on how to automate this process, and not have to manually edit my script every time I need to run it. I'm guessing maybe GREP or PED might be used, but since I don't know how to use those functions much I don't know how to even search for how to do this.

What I have to do is:
1-update a Twinkle buddylist (file is in the format of xxxx.bud, where xxxx=4 digit extension being used by Twinkle at that machine)
2-copy that .bud file to a list of IPs in the office
-sometimes a machine may not be on the network, but I don't want to have to go in and edit the script to account for this every time I run it just to keep the script from jamming up.
3-when copying the .bud to the machines, it needs to read the extension name on that machine and name the .bud file to match
-The extension can be found by looking at the .cfg file name in the directory the .bud is going into (ie. 2222.cfg).

Step one will be done manually, it's only listed here because the script will pull that file once I've edited it. So no need to include Step 1 in the script.

An example of this process might look like this:
I have an updated 1111.bud file on IP123. I need to copy it to the following machines (their Twinkle extension is listed in (), .bud filename listed after in ())
IP456 (2222) (2222.bud)
IP789 (3333) (3333.bud)
IP987 (4444) (4444.bud)
IP654 (5555) (5555.bud)
IP321 (6666) (6666.bud)

Currently I have a script that I manually enter the .bud file name for each IP, looking up the information each time. I have a long list of IPs to copy to, so this eats up a bunch of time just to update the script each time. If I can get a script to behave like I'm looking for, I also don't have to worry about the many possible typos on the extensions as I type them in.

Any help would be greatly appreciated, both in examples and how to find stuff like this in the future. I'm usually pretty good with web searches, but when it comes to scripting I'm still learning how to search for stuff.






[ubuntu] Trying to find startunity file topic






Hi all,

I'm trying to get Linux Mint to run on crouton, which is kind of difficult. I was using this guide http://jeanlouisnguyen.blogspot.com/...ary-os-on.html , and modified it to work with linux mint. Essentially, it uses a copy of startxfce4 in /usr/bin on the chroot to start elementary (mint). I can get mint to work -- if I install the ubuntu-desktop meta package. I'm looking for the file that xinit targets in unity (maybe xinitrc) that's similar that the chroot can look for to start cinnamon.

startxfce4 is in /usr/bin
startunity is in /usr/local/bin, but when I copy it and tell the chroot to look at it, the chroot doesn't recognize it.

Any and all help is appreciated. I understand this a complicated question, so I realize I may have not included enough pertinent information. Thanks!