I have installed LXDE on my Ubuntu PC (not Lubuntu). I want to change the text in the logout session. The default text is "Logout LXDE session ?". But I want to personalize it. I've already changed the picture of the logout session. Can you help me? Thank you very much.
BowStar
I don’t know yet how to solve this in a completely and permanent way, but you can create a new logout dialogue box:
Make a Folder and, inside it, click with the right mouse button to create a new empty file (a simply txt file) with the name "temp-lubuntu-logout" (you can change the file name after the conclusion of the work.
Paste this text, changing the items to fit your options:
!/bin/sh
lxsession-logout --prompt "Your custom message" --banner "Your logo" \
--side "left | top | right | bottom (The position of the logo)"
Open with the terminal the folder where is your temp-lubuntu-logout file and make it executable with this command:
sudo chmod +x temp-lubuntu-logout
That’s all! You just created a script file!
To verify is it is working, write in the terminal:
./temp-lubuntu-logout
(dont forget the dot before the /)
Now I can’t help more them this. You need to link this script to the the command of a app. Or you can change the lubuntu-logout script with your new script file (you may, for example, rename the original script to "former-lubuntu-logout" and your file to "lubuntu-logout". Probably, the path to the "lubuntu-logout" file is /usr/bin).
https://crisnepita.wordpress.com/2012/08/12/cambiar-un-poco-la-ventana-de-cerrar-sesion-en-lubuntu/
https://unix.stackexchange.com/questions/170029/command-to-log-out-of-lxde-directly/171880
http://tunealxde.blogspot.pt/2015/02/tunea-el-dialogo-de-cierre-de-sesion-de.html
I have found a way to change it.
Warning
This requires you to know what you are doing.
Use your favorite hex editor and edit file /usr/bin/lxsession-logout
Scroll all the way down the file, then go up until you see a human-readable section.
Over there, on a long string, there is the logout menu in bytes.
Once you change stuff in there, and save the binary, if you did not break something it will work. For deleting something, just overwrite its section with spaces, same for text and labels.
Tip: only edit and don't change any appearance order or add more bytes at some index because it will scramble the offset table of the file and will become corrupted.
Related
How do I fix this on Mac?
Unable to save /test.py Error: Read-only file system
Since Mojave, you are no longer allowed to write to /. I suspect this is the cause of your problem: nothing to do with Sublime Text.
Pick another directory to save your files to, preferably in your home folder.
Once you make your document, go to File and click Save (or just press cmd+n).
Write the title of your document.
Right under the name there should be a little box that says Macintosh. You can click on it and change it to whatever file you prefer.
you must have left the save location as "macintosh". Basically this error means, that this "macintosh" folder is read-only. There is no issue like "sublime not having permission to write to the disk".
Just save to a usual folder and you would be gtg.
Make sure you save it to your project's folder and not just to the desktop or whatever is the default.
I want to do the following:
Save numeric data in a CSV-like formatting, with a ".foo" extension;
Associate the ".foo" file extension with some python script, which in turns opens the .foo file, reads its content, and plots something with a plotting library (matplotlib most probably).
The use-case would be: double-click the file, and its respective plot pops up right away.
I wonder how I should write a python script in order to do that.
Besides, the windows "open with" dialog only allows me to choose executables (*.exe). If I choose "fooOpener.py", it doesn't work.
This isn't really a programming question, but what you need to do is to figure out how to get the Python executable into the registry key that opens your data file.
For example, I created a little Python script called opener.py that looks like this:
import sys
print(sys.argv)
input()
Then I created a testfile.foo and used the "change" button in that file's property dialog to choose opener.py. (You can do this if you click Browse and change the Open With dialog's file filter to "All Files".)
Of course this didn't work (as you noticed). So I opened regedit and searched for opener.py and found it at the following registry key:
HKEY_CURRENT_USER\Software\Classes\Applications\opener.py\shell\open\command
The default value of this key was "C:\opener.py" %1. I changed it to python "C:\opener.py" %1. It worked!
Long story short, to do this properly you need to custom-edit the registry. Actually setting up the file association is more complex than just editing that one key (you have to also indicate that .foo is associated with opener.py).
An alternative approach would be to turn your Python script into a standalone executable using one of the several tools available for that purpose, or write a small executable in C that launches the script.
press the windows key
type cmd
right click the result and choose "run as administrator"
assoc .foo=foofile
ftype foofile="C:\Users\<user>\AppData\Local\Programs\Python\PYTHON~1\python.exe" "C:\<whatever>\fooOpener.py" "%1" %*
Use pythonw.exe if it's a .pyw file (to prevent a cmd window from spawning).
If you want to use an existing file type, you can find its alias by not assigning anything. For example, assoc .txt returns .txt=txtfile.
instead of editing registry, you can create batch file
opener.cmd
with content
python "C:\<whatever>\fooOpener.py" %1
and associate extension with this file.
It works!
I run simulations for various choices of parameters. For each choice I store the resulting data in a folder, like
/home/me/Documents/MyProject/C=10/1.dat
/home/me/Documents/MyProject/C=10/2.dat
/home/me/Documents/MyProject/C=10/3.dat
...
and
/home/me/Documents/MyProject/C=20/1.dat
/home/me/Documents/MyProject/C=20/2.dat
/home/me/Documents/MyProject/C=20/3.dat
...and so forth.
would like to write a little text file AAA.txt which contains not just the C parameter but all the others too. Then when viewing this folder which contains the data I want to hold my cursor on the little file symbol and have a little box appear. This box should show just the content of AAA.txt, so I can quickly check which set of parameters was used in this particular run.
Anyone know how to do this? I use Ubuntu 14.04
I am not aware of ways to give you a custom "tooltip". As an alternative, you could look into creating custom thumbnails of your .dat files.
See here for how to do that with nautilus; the default file browser for Ubuntu.
Alternatively, you might look into what Gloobus can do for you.
since this is my first question here, I hope I do not distract you ;-)
I have wondered for a long time now wether there was an option in any
GTK setting that allows me (p.ex. in Nautilus) to select only the file's
or folder's name in an expanded tree view, NOT like this:
https://www.dropbox.com/s/fkeit8nk6ezhjnv/BadNautilus.png?dl=0
But more like this:
https://www.dropbox.com/s/52b9iv2lz0zvahl/GoodSystem7.png?dl=0
In the top picture you see that I wanted to get the context menu of
my home folder while I had the "Downloads" folder expanded, p.ex.
for opening a terminal.
If a (right-)click in the middle of nowhere would be taken as being directed at the current view's top level folder (in this example, my home folder), opening a terminal wouldn't be that of a problem.
Another example: Suppose I wanted to add a new file by selecting right click->New document->... (any template here). This is not possible in a folder
where I have to scroll down because it has so much content in it.
So summing it up:
There are context menu actions that "belong" to the empty screen space in a folder view below the listed files (at least in Nautilus) that I also want to be able to use in a folder which is so crowded that there is no more empty screen space. I know some, at least System 7 finder and Win (up to XP), file managers which are capable of this. Is it possible to system-wide set
the screen space next to the file name string to be equivalent to the empty screen space below a file listing?
Any ideas?
Best regards,
JohnS
I'd like to Create a New Text Document in the Current Directory, named "New Text Document" that is created with the text Highlighted for Renaming, the same as if you right-click the open folder > New >Text Document
I'd prefer to do it straight from the Command Line, or if not possible, then a Batch Script
I'd like to just point to %windir%\System32\notepad.exe and make it create a new Document in the current folder, or maybe somehow launch it from the Current Directory somehow..
or I thought about creating a file called "New Text Document.txt" elsewhere on the computer, and maybe pointing to that file, and copying it to the current directory.. but I'd like it to go straight to renaming.
anyone know if thats possible or not?
thanks
Try this:
echo 2> NewTextDocument.txt
This will redirect any error to NewTextDocument.txt.
Since this command is valid (no error), it will produce new file with empty content.
More about redirecting: wikipedia