The time now is Sun 22 Apr 2018, 14:40
All times are UTC - 4 |
Page 1 of 5 [66 Posts] |
Goto page: 1, 2, 3, 4, 5 Next |
Author |
Message |
john biles

Joined: 17 Sep 2006 Posts: 1466 Location: Australia
|
Posted: Tue 03 Nov 2009, 20:52 Post subject:
Please post your simple tricks you know but others don't Subject description: Like using "ldd" command to show dependencies |
|
Hello Everyone,
Even those you'd think would know everything there is to know about Linux and Puppy might not know or remember even what you'd call the "Linux Basics" even a newbie would know that!
Here's an example I'd forgot about ldd what is ldd well if you open a terminal in a folder with say libflashplayer.so ldd will tell you what dependencies libflashplayer.so requires to work correctly.
Forum members dawnsboy and Michalis reminded me of that and this got me thinking "Knowledge is Power" lets get these little what you might call simple tips down in a forum post for everyone to read and learn.
Lets say that new forum member "boo" reads your tip and discovers through learning and experiment like I did how to get an app working, gets the satisfaction like I did and gets hooked and searches to learn more here on the forum as well as on the web and other forums.
Now a year or two pass by and "boo" has become quite the Linux expert and through a twist of fate answers a post you have made providing you with the required fix you need all because of the simple tip you posted.
So lets get posting and improve everyone's knowledge including your own.
_________________ Legacy OS 2017 has been released.
|
Back to top
|
|
 |
omskates

Joined: 03 Sep 2009 Posts: 257 Location: TriCities, WA
|
Posted: Wed 11 Nov 2009, 04:46 Post subject:
|
|
I'm just posting a reply to boink up this thread because its great
I don't have a tip though Wait...quick file managing for the gui lover: Open up multiple file manager windows for easy drag & drop. Learn your file pathways.
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2572 Location: UK
|
Posted: Tue 19 Jan 2010, 17:54 Post subject:
|
|
yes, this thread is a good idea...
I have no real tips, other than something i learned recently..
to get and use variables from files in bash or the terminal, type
Code: | . /path/to/FILENAME
echo $VAR |
this will show 'hello' if the file called FILENAME above contains
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
Back to top
|
|
 |
G0XAN
Joined: 08 May 2009 Posts: 31 Location: Brighton, UK
|
Posted: Tue 19 Jan 2010, 18:14 Post subject:
|
|
I think my favourite tip about Linux is that just about everything appears in the filesystem. There is some useful stuff in there!
For example, /proc gives access to a load of system info. This knowledge allows me to monitor the DC input to my elderly laptop with very unwell battery and pop up a dialog box to warn if the power lead falls out, before the battery dies.
Second tip is to put this script in /root/Startup/ - any executable in this directory will run when the system starts.
This script may be specific to this Toshiba laptop, but digging around in /proc/acpi/ should reveal where the useful parts are for your system.
Code: |
#!/bin/bash
# AC Power monitoring script
# This script monitors the AC power connection every 30 seconds
# and pops up a message box if the power is disconnected
# AC Power state is available in: /proc/acpi/ac_adapter/ADP1/state
# Power disconnected, file contains: state:<spaces>off-line
# Power connected, file contains: state:<spaces>on-line
# define script name for use in dialog box titles
cScriptName=${0##*/}
while [ 0 ] # repeat for ever
do
if grep -q off-line /proc/acpi/ac_adapter/ADP1/state
then
vMessage="Mains power failure!"
Xdialog --left --title $cScriptName --msgbox "$vMessage" 10 50
fi
sleep 30 # sleep for 30 seconds
done
|
_________________ Gary
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Tue 19 Jan 2010, 18:22 Post subject:
|
|
Hi
Many people don't know how to upload a text file to the forum quickly and easily. Consequently we often get some very long posts. The forum will accept .gz and .zip files as attachments. So the quickest and easiest way I find to compress a single file is with gzip.
To gzip a file open a terminal (usually rxvt or urxvt in Puppy). If your file is in your "/root" directory type:
where my file is the file you want to zip.
This is great for long log files so others more knowledgeable can help you with your issues.
Conversly, if you download a "gzip" file , say myfile.gz, it will probably be saved in "/root/my-documents" or "/root/downloads". Unzip it in a terminal emulator with:
Code: | gunzip /root/my-documents/myfile.gz |
and the file will be extracted in /root/my-documents. Obviously you replace "my-documents" with "downloads" if it is in /root/downloads.
HTH
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
droope

Joined: 31 Jul 2008 Posts: 811 Location: Uruguay, Mercedes
|
Posted: Fri 22 Jan 2010, 21:10 Post subject:
|
|
Sometimes, we execute files just by tiping, for example, "firefox" on console. When we need to make a shortcut, sometimes we need the full path.
In those cases, instead of searching manually, one can do the following:
in console
And it will tell you.
Cheers!
Droope
_________________ What seems hard is actually easy, while what looks like impossible is in fact hard.
“Hard things take time to do. Impossible things take a little longer.” –Percy Cerutty
Mi blog (Spanish)
|
Back to top
|
|
 |
linbie
Joined: 09 Jan 2010 Posts: 64
|
Posted: Fri 22 Jan 2010, 22:19 Post subject:
A simple trick - Power Off shortcut |
|
I asked the question in the beginners forum here about a shortcut for power off button on the desktop.
It works well
[/img]
|
Back to top
|
|
 |
linbie
Joined: 09 Jan 2010 Posts: 64
|
Posted: Sat 23 Jan 2010, 08:19 Post subject:
Desktop shortcut to website |
|
Right click the browser icon
Select "edit item"
If you add the website address to the "arguments to pass" line then the browser will open at that website.
I have two browser icons - one labeled "browser" which opens to my home page (i.e the arguments line is blank) and the other is labelled "google docs" and opens directly into google docs
Unfortunately the executable file is the same for both (or more) and as such the icon is the same.
The example in the attached image would open the browser directly to E-Bay
Description |
The browser opens directly to E-Bay |
Filesize |
21.01 KB |
Viewed |
3879 Time(s) |

|
_________________ Linbie (LINux newBIE)
Dell Inspirion 2500, 900MHz Celeron, 20GB HDD, 128MB RAM, CD/DVD Player, Netgear USB wireless adapter
Puppy 4.3.1 frugal dual boot with WIN XP
|
Back to top
|
|
 |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: Sat 23 Jan 2010, 11:27 Post subject:
|
|
droope wrote: | Sometimes, we execute files just by tiping, for example, "firefox" on console. When we need to make a shortcut, sometimes we need the full path.
In those cases, instead of searching manually, one can do the following:
in console
And it will tell you. |
To extend that, use back quotes. Linux, like Unix before it, will take something in back quotes, run it and return the result to the shell.
So if I want the make the location of Firefox a variable, I can say
FIREFOX=`which firefox`
echo $FIREFOX
/usr/bin/firefox
This is a handy construct in shell scripts where the value may be different on one system than another.
______
Dennis
|
Back to top
|
|
 |
OverDrive
Joined: 02 Jan 2006 Posts: 171 Location: Cleveland, OHIO,USA
|
Posted: Mon 25 Jan 2010, 00:40 Post subject:
|
|
G0XAN, That is a *dandy* little script you got there. I was looking for a answer to that problem a few days ago myself. I had to modify the path to the state file for my laptop config and extended the test period to 10 minutes, after that it works like a champ! Here is my version in case anyone wants to see the differences for their own tweaking.
Code: |
#!/bin/bash
# AC Power monitoring script
# This script monitors the AC power connection every 30 seconds
# and pops up a message box if the power is disconnected
# AC Power state is available in: /proc/acpi/ac_adapter/ADP1/state
# Power disconnected, file contains: state:<spaces>off-line
# Power connected, file contains: state:<spaces>on-line
# define script name for use in dialog box titles
cScriptName=${0##*/}
while [ 0 ] # repeat for ever
do
if grep -q off-line /proc/acpi/ac_adapter/AC/state #-----------Modify this line for your path to the state file....
then
vMessage="Mains power failure!"
Xdialog --left --title $cScriptName --msgbox "$vMessage" 10 50
fi
sleep 600 # sleep for 600 seconds (10 minutes)-------Modify this line for your time interval....
done
|
OverDrive
_________________ Instant Puppy Fan!!!
|
Back to top
|
|
 |
prehistoric

Joined: 23 Oct 2007 Posts: 1726
|
Posted: Mon 25 Jan 2010, 11:10 Post subject:
Obsolete knowledge: spelling |
|
Here's a tip I posted some time back. The original purpose was to get spell checking with Sylpheed, which had been compiled without built-in spell checking. This is useful as an example of a work around for other purposes. You don't have to use options like the external editor hook in Sylpheed for the original purpose. (Of course, you must install the aspell dictionary for the language you want to use.) For most people this will be useful only as an example of how to launch a program which runs in a terminal window.
At present, I'm on a machine fast enough to use Abiword for spell checking. You simply install the dictionaries you use under Abiword, and select the option for automatic spell checking. Then you define Abiword as your external editor. Because Abiword is part of standard Puppy this is a quick hack for getting spell checking if you replace Seamonkey mail with Sylpheed. (Seamonkey mail has its own spell checking, using a different program and dictionaries.) I haven't used the older hack in a while, because Abiword is good enough, on this machine, even if it doesn't know to ignore links in email.
On older versions of Puppy, there is a Gtkspell package that works, and has less overhead, but it hasn't been updated to work with Puppy 4 series.
prehistoric wrote: |
There are versions of Sylpheed with built-in spell checking, but the ones making it into Puppy packages generally don't have it. I can't comment on Sypheed under 4.0 because I'm not running that, but I have long used it under 3.01 with a hack that gives me simple spell checking, if not the best interface. I have defined the external editor, (common preferences->details->external commands) as follows: Code: | rxvt -e aspell -e -c %s | This tells it to run aspell in a terminal with email rules and interactive correction on the file passed to the command. Most of the time the correction I want is in the first 3 alternatives it presents.
I keep thinking I'll get around to installing gtkspell and keep forgetting, because this is just good enough for the present. |
|
Back to top
|
|
 |
prehistoric

Joined: 23 Oct 2007 Posts: 1726
|
Posted: Mon 25 Jan 2010, 11:21 Post subject:
the old center click trick |
|
Suppose you are using an rxvt console to get debugging information by running a command that is producing error messages. How do you get those messages into a text editor?
prehistoric wrote: | dougeeebear wrote: |
...Is there a way to copy/paste with that stupid console?
Is there something better with some features and tabs? | Open a text editor window, select the text you want in the console window, then center click in the editor window to copy to the editor. (You can emulate center click by clicking both right and left buttons simultaneously.) |
Old Unix hands will remember using tee to send or append output to a file, while still seeing it on the console. Puppy has busybox tee. You can merge error output with standard, if cryptic, command line syntax, used here to save output from a make command used to build a program. Code: | make 2>&1 | tee build.log
|
There is also a utility called script on many Linux systems which records entire terminal sessions. Has anyone packaged this for Puppy?
Added: This just came up on a separate thread, after I posted here.
There may be a little confusion about that last command. Tee splits the output stream and sends one branch to the file, the standard output from tee still appears on the console, if not directed elsewhere. This way tee can be used for debugging long pipelines of commands. Just insert tees where you want to capture output.
|
Back to top
|
|
 |
prehistoric

Joined: 23 Oct 2007 Posts: 1726
|
Posted: Thu 28 Jan 2010, 19:19 Post subject:
command line downloads, etc. |
|
Here's an exchange I just ran across. The original problem was putting the wrong link in the box for pwget. (A link to a directory, not a file.) This is explained further down.
In the process, we learn about a robust command for downloads. Before I found Puppy Linux, I used this method to build an entire system from source, before I got the GUI working. If the Linux system you're on doesn't have wget, it probably has serious deficiencies. In the world before flash drives, Tom's root/boot floppy got me many things this way, even on machines where very little worked.
BTW: notice that "Roy" uses 'the old center click trick' described above.
anonymous newbie wrote: | How does one enter an address in pwget to download this iso ?It has the initial address shown in the first post in the thread ie http://www.puppylinux.asia/tpp/NOP which does not name the file in question. If I put this in pwget and give a download folder it shows the console with a link up process then this disappears and the download folder appears. If I add the ISO in question ie http://www.puppylinux.asia/tpp/NOP/puppy-431-boxpup.iso Then the same thing happens that is ,the console appears then disappears and the download folder appears. Am I missing something. I have downloaded ISO s before when the link has the whole address including the name of the ISO and had no problem.I put it down to premature senility but hope there is a better answer. |
Roy wrote: | I do not know about pwget, but if you use the following commands in Puppy's desktop Console, it will work:
Code: | wget -c --user=puppy --password=linux http://www.puppylinux.asia/tpp/NOP/puppy-431-boxpup.iso |
Should you need to interrupt your download for any reason, simply press Ctrl+C to pause it. Using your keyboard's Up Arrow will bring back the original command shown in the code window above; pressing Enter with your blinking cursor at the end of that command line will resume the file transfer. Using this command line with the '-c' in it will also cause the transfer to restart on its own if the connection is temporarily interupted.
-Roy |
Quote: | Roy Thanks for that,it worked perfectly.I dont know why the pwget setup did not work but the CLI system is perfect. Unfortunately to some of us the Console stuff has to be spelt out.I only know enough about this stuff to know what I dont know, Also people who are working in a system that they deeply understand have trouble realising that others in another area havent a clue what they are talking about.
Anyway thanks again ,I guess that this just proves that if you want to know the answer you must ask the question.
Regards D. |
Roy wrote: | You are right; the command line stuff is not what a typical Windows refugee needs to begin using Linux. Personally, I am extremely grateful for these guys who have gone out of their way to create GUI's for guys like us in the past year or two. I only know the wget commands because the GUI stuff was not available when I first started using Puppy.... BTW, you should notice that the wget commands download to your root directory, unless you open the Console from within another directory OR use 'cd /your/target/directory' before inputing the commands I previously provided. |
anonymous newbie wrote: | Roy Unfortunately the wget and pwget seem to fall down on some download sites.I just tried to use it on this site http://lhpup.org/download443.htm#Base/LighthousePup-4.43-d.iso and it it downloaded for a couple of seconds and then declared itself finished. |
Roy wrote: |
That site does not require a username or password, as far as I know. For wget, your command line should look like this:
Code: | wget -c http://lhpup.org/beta/lhp443/LighthousePup-4.43-d.iso |
Note the different web address in my command line, compared to what you were using. To find the correct address, go to the actual download webpage, Right click on the .iso file link, and select Copy Link Location from the drop down menu.
Now when you open your desktop Console, type 'wget -c', add a space with your space bar, and click by pushing down on the center (scroll wheel) of your mouse. This center-click will paste that copied file address into your console.
Hit your Enter key, sit back, and smile....
I think you were trying to download a link that pointed to a web page that contained another link to the file. When you put your mouse pointer over a file name on a web page, look down at the bottom of your Seamonkey screen. If you do not see the actual file name that you are wishing, then it isn't the actual file; it's just another webpage link.
-Roy |
Added: Just tried Tom's Root/Boot Floppy on a dual-core system with 2 GB RAM, to see if it would still work. There were some glitches, but overall it did. Considering the changes in computing since this was written, I'd call that remarkable.
For anyone perverse enough to try this themselves, here are a couple remarks. This program uses a non-standard format the Puppy floppy formatter will not create to fit more data on a floppy. There is a Linux program on the download which will access the raw device, and do what is necessary. Not all floppies, or floppy drives, will work, though most I've tried will.
When you try to run this program under Puppy according to his instructions, you will get an error, because Tom assumed the current directory is at the head of your PATH. (This is a terrible security hole for people running as root, and BarryK knows better.) The way around this is to temporarily prefix it to your PATH in a sub-shell.
Code: | (PATH=".:$PATH" ./install.s) | This illustrates a useful trick for setting variables used only in a particular context.
Here's a test, which also illustrates something about quoting and contexts in shell scripts: Code: | # echo echo' $PATH'>eecho
# chmod +x eecho
# (PATH=".:$PATH" eecho)
.:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/opt/samba/bin
# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/opt/samba/bin
# (PATH=".:$PATH" eecho)
.:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/opt/samba/bin
# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/opt/samba/bin
|
|
Back to top
|
|
 |
yarddog

Joined: 30 Nov 2009 Posts: 187 Location: Great Smoky Mountains, TN USA
|
Posted: Mon 01 Feb 2010, 16:54 Post subject:
|
|
I am fairly new to linux and spend a lot of time trying out new versions which I was burning to CD-R's. This created quite few coasters or frizbees, therefore, I began using CD-RW's to burn the new versions.
This has worked great for me. If the version is not a keeper, I simply use pburn to blank the CD-RW and reuse. Some of these have been reused 10-15 times and so far, no problems.
Hope this helps someone.
yarddog
|
Back to top
|
|
 |
chrissy
Joined: 16 Jan 2010 Posts: 18
|
Posted: Fri 05 Feb 2010, 05:25 Post subject:
|
|
I expect this seems obvious but it took me about a week to work out
I install my puppy to external usb hard-drive.
Sometimes I make a complete mess of things and cant get back in after spending all day setting things up.
So now I install it all, get to the point where it is working just the way I like it,then boot from a live CD with the hard-drive turned off(so i don't confuse which drives are which),turn on the hard-drive and copy the save file to another location (partition or second hard-drive) then if I make a mess of things, I can just go copy the saved file back over the messed up one.
This is handy for the files that I download too .
I have a folder called saves where I put my downloaded files after I install them and that gets backed up on its own.
I dont think it really needs to be a harddrive, I think you could easily back up to dvdrw or cdrw instead.
Saves hours of putting everything back and means I'm not afraid to try a new application.
|
Back to top
|
|
 |
|
Page 1 of 5 [66 Posts] |
Goto page: 1, 2, 3, 4, 5 Next |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|